• Welcome to SC4 Devotion Forum Archives.

extracting object files from a binary

Started by GoaSkin, November 27, 2007, 09:51:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GoaSkin

After examining the assembler code of some functions in the SC4RH binary, I enhanced some functions for new game features. Because a binary file uses instructions to jump to specific byte positions, there is no way to insert assembler code directly. Is there a solution for that problem?

Is it possible to edit the assembler code with specific programs that automaticly fix the values of jmp/call instructions or a way to extract a specific object file that may be edited and then re-linked (may work to link it into a DLL as DLL plugin)?

I understand a bit of low level programming but do not have much experience with binary cosmetics.
download SC4Config public BETA (RC1)

wouanagaine

following my pm


original function code (x86):
somefunctionstartingadress : push eax
                                        mov eax,20
                                        ...
                                        pop eax
                                        ret

new code:
somefunctionstartingadress : jmp endofcode
                                        mov eax,20
                                        ...
                                        pop eax
                                        ret
endofcode: your new function code

hope it helps

New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4