Some help reverse engennering a piece of code?

All the inane chatter goes in here. If you're curious about whether we will support a game, post HERE not in General Discussion :)

Moderator: ScummVM Team

User avatar
maximus
Posts: 102
Joined: Sun Jan 06, 2008 4:17 pm
Location: Toronto, Ontario

Post by maximus »

Serious Callers Only: do what Fingolfin suggested (create a blog), but post the link here as someone may still find this interesting, even if this forum isn't the ideal platform.
Serious Callers Only
Got a warning
Posts: 173
Joined: Thu Feb 25, 2010 7:44 am

Post by Serious Callers Only »

Doesn't matter. Not getting anywhere on the return value of that function. I even wrapped the dll with the original dll as the wrapper so i could inspect the return values without a debugger. It still differs from the original in one way (a certain type of call can crash it).

Before i go i must apologize to Qbix, i see what you mean now. But i don't think that figures, wrapping the old dll gives very large figures for being a simple max output to send on flushconsole (at least using in as return).
Serious Callers Only
Got a warning
Posts: 173
Joined: Thu Feb 25, 2010 7:44 am

Post by Serious Callers Only »

Well i eventually did something primitive with this, found the main error (the booleans introduced in python were wrecking havoc with the caller of the python interpreter, needed to convert those calls to int at the border of the python api):

http://planet-vampire.com/forum/index.php?topic=5438.0

(just used getProcAdress on a valve dll and low-effort python extension to hook the output of the python to the ingame console.
It worked.
But now i'd like to do something better (for instance, mouselistener for dialogs using the (hidden) valve api), but i don't know even how to start.
1rst problem: the other dlls appear to be obfuscated, and i'm not a reverser. I have no idea how to reconstruct a purposefully broken export table like likely the valve "protection" did to those poor dlls.

2nd problem: I doubt that the getProcAdress method would work for c++ object oriented system. In fact i have no idea how to hook into something like that (how to find the object instance i want, how to create a new instance of any argument object, how to find and use the definitions of those objects, etc).

I guess this project will stay on hold forever unless i get some help. Hell at least i got bloodlines running on python 2.7, it's something.
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Post by Longcat »

fingolfin
ScummVM Co-Lead


Joined: 21 Sep 2005
Posts: 1401
Location: Germany  
I don't think this forum is entirely the right place for your monologue, and for loooong code excerpts. Please consider getting a blog, and posting there.

   
Tue Mar 08, 2011 10:15 am 
 
Serious Callers Only
Got a warning
Posts: 173
Joined: Thu Feb 25, 2010 7:44 am

Post by Serious Callers Only »

Longcat wrote:fingolfin
ScummVM Co-Lead


Joined: 21 Sep 2005
Posts: 1401
Location: Germany  
I don't think this forum is entirely the right place for your monologue, and for loooong code excerpts. Please consider getting a blog, and posting there.

   
Tue Mar 08, 2011 10:15 am 
 
You don't say dude? Did the post above look like a long code monologue to you?
It is in fact, a release announcement, though a almost useless one because it is "only" python 2.7 for the game.

Are you especially annoyed at me asking for support on a place where lots of reverse engineers congregate, on the "Junkyard" forum, among many other posts talking about their pet projects?
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Post by Longcat »

Nope, it looked like a long blogpost, dude. I'm not especially annoyed, more surprised at the fact that you seem to ignore the suggestions of both co-leads of ScummVM while at the same time asking for help and advice on their forums.
Serious Callers Only
Got a warning
Posts: 173
Joined: Thu Feb 25, 2010 7:44 am

Post by Serious Callers Only »

Another troll.

Come join the rpg codex. You'll fit right in.
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Post by Longcat »

Well, you don't seem to be getting much support or response other than the forum moderators telling you to create a blog, so yeah, all in all this is one long monologue. Pointing that out is hardly trolling. Ignoring moderators on the other hand, is.

Good luck with your project though;)
Serious Callers Only
Got a warning
Posts: 173
Joined: Thu Feb 25, 2010 7:44 am

Post by Serious Callers Only »

I disagree with your interpretation of what the moderators wanted. He wanted me to stop posting long quotes of code, i stopped posting long quotes of code.

I don't see any harm or contradiction.

What's the problem of asking code questions? No one is required to answer. And i admit i was aggressive on my last post above, i've been getting a little, uh, aggressive on forums that curtail harmless discussion.
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Post by Longcat »

Out of curiosity, how many helpful answers have you gotten so far? Because I can't seem to find any. Plus, this is a forum related to adventure games, not rpg's. There must be hundreds of forums more appropriate than this one for your project. At least, that's how I interpret Fingolfins post, but I can't speak for him of course.

So no, there is no harm done, but I really can't see what you are getting out of this other than spamming the forums.
Serious Callers Only
Got a warning
Posts: 173
Joined: Thu Feb 25, 2010 7:44 am

Post by Serious Callers Only »

I got Qbix answer, that eventually lead me to realize that the result didn't matter. It was only a signal to buffer the stdout to the game console, and i worked around it.
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Post by Longcat »

Ok, I digress. I still agree that you should consider getting a blog or find a forum more related to rpg's, but being a normal member on these forums I'll leave this up to the moderators. Qbix is the dev on DosBox by the way, maybe their forums will prove more useful to you;)
User avatar
DrMcCoy
ScummVM Developer
Posts: 595
Joined: Sat Dec 17, 2005 1:33 pm
Location: Braunschweig, Germany
Contact:

Post by DrMcCoy »

As a ScummVM developer, I do have moderational powers here.
And I agree, you should get a blog. A single forum thread is completely ill-fit for your RE progress descriptions, as interesting they may be. And no, that does not mean you're getting a whole subforum here ;).

Of course, you may announce your blog's creation here, if you wish. And I for one would add it to my RSS reader.
Serious Callers Only
Got a warning
Posts: 173
Joined: Thu Feb 25, 2010 7:44 am

Post by Serious Callers Only »

Sorry, there is no chance at all that i'm going to be able to unravel the obfuscation valve did on those dlls alone, and thus, no point on even starting a blog. I guess that "release" on the link above is going to be the last.

Godspeed on your coding.
Locked