LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-23-2004, 01:00 PM   #1
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
Hacking Win32 exe files ? (removing INT15 timer CALLS) for wine compatability


Bo selecta !

so.... in the great move from Windows to linux i hit one minor snag.
there is no open source route planner / travel manager. and i dont like the online ones.

so i decided to try wine. A win32 API compatability layer for UNIX.
it runs counter strike, Internet explorer, MS Office, so why not "TNT TravelManager GB"

everything works except for one tiny almost insignificant problem.

the Assembly Instruction 'INT15' is not supported by Wine.
its an annoying timer call that controlls how long the splash screen stays on screen.
because it is not supported, the splash screen stays up permenantly. and controll never goes to the main application window.
this INT15 only exists twice in the whole binary, one to Start the timer, and once to stop the timer.

before i give up and pay the whopping £3 for wineX (which might not work either)
i want to try hacking the program a little.

since i dont know enough about wine or the win32 api to implement this API Call, i was thinking of removing it from the Win32 exe.

Replaceing this INT15 instruction with an ADD 0, or a JUMP to nex instruction Instruction.

any idea's what will happen ?

im hopeing that without a call to the timer, the splash screen will pop uo, then instantly close.

also.... which to you think would be easyer.... doing it with a Hexeditor, or reverse engineering to windows Assembly, then re-asembling ?
 
Old 06-23-2004, 03:03 PM   #2
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
I'm not sure how much I can go into here...basically you are asking:

How do I reverse engineer Win32 applications

I appreciate here it is for a legitimate use - what you'll have to do is use a Win32 Disassembler (Windasm (aka Wdasm) is the newbie tool; IDAPro for ...pros...) - find the call and remove it by NOPing it out. (So long as that call doesn't contain any useful code such as the declaration of variables etc - I've seen it happen)

There's no "reassembling" as such - the disassembler will show you the ASM code - you can then find the offset of the call and just edit the call --> 90s

Easier said than done. You may encounter anti cracking techniques in the program or CRC checks...and of course it's still not easy without those things.

All in all, I think it's a case of you going to google; getting the tools; learning ASM and Windows API better than the back of your hand; reading tons of guides on "Cracking" or "Reverse engineering"

Of course an another thing you could do is mail the guys at wine and talk about your problem - instead of learning the redundant win32 stuff, how about learning to program in linux and fix the problem yourself :D

Have fun :)

Steve
 
Old 06-23-2004, 04:56 PM   #3
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Original Poster
Rep: Reputation: 47
Thanx... hey, i bin linuxing so long i forgot that not everything is open source... lol.

here's what ive done so far...

i opened the EXE with a Hex editor and found 2 'CD 15' instructions (which are the compiled Hex versions of the assembly 'int 15'), and replaced them with '90 90' (which is the NOP)

as i expected, this caused the splash screen to instantly close, However the main window did not function correctly....

if you have ever programmed in raw Windows API, and you forget to call the message handler loop.... well, that happened. the window does not re-draw its space when covered / un-covered.

i wonder, why is it that wine have implimented all the complexities of DirecX sound, and other things, but have not done somthing as simple as a timer call... ?

oh well... looks like i will have to try wineX. (whatever its new name is)
doing anything more is waaaaay beyond my ability.

thankx for the help though.
 
Old 06-24-2004, 02:18 AM   #4
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
No worries, like I said it wasn't easy - do please report back on how winex4 treats you (it's new name is cedega but I refuse to use it :P)

Steve
 
Old 06-24-2004, 07:09 AM   #5
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Original Poster
Rep: Reputation: 47
i cant remember the new name, but its very clever...

cedega is a grape used to make PORT WINE.... clever
 
Old 06-24-2004, 11:57 AM   #6
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Quote:
Originally posted by qwijibow
icedega is a grape used to make PORT WINE.... clever :p
+5 informative :)

That is far too clever - maybe if they didn't pay people to work on new names and
got on with getting good games to work (well; games i like anyway :) ) it'd be a lot
better :D

Steve
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Associating .exe files with Wine Cinematography Linux - Software 8 05-04-2005 07:08 PM
Associating .exe files with Wine Cinematography Linux - Software 1 05-04-2005 07:38 AM
Wine and .exe-files ?! irrlichterum Linux - Software 4 04-17-2005 04:18 PM
Where does Wine install my .exe files? KidMW14 Linux - Newbie 5 03-11-2004 10:20 AM
WINE and .exe files evilmonkey Linux - Newbie 7 06-22-2003 12:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration