10-16-2014, 09:33 PM
Greetings.
I'm currently working on combining Alkarter's Exe with Silva's and folks DLL, at least for simpliest features.
It's kinda funny work with that btw i'm not really expirienced with asm-olly tracking.
Today i got stuck with reworking 4xxx state.
First of all, state have same adress as in origianl lf2 exe, and initiated like
and failed.
to figure out what goes wrong i even completly rewrite State8xxx procedure about 10 times
and then i found some strange things
ok, here is procs code
and header
Everything works fine till i'm trying to change original
to 4xxx fixed
Then game just works like everything after that LEA doesnt exist.
Character using 4xxx just dissapearing like next: 1000, dunno why, cause testing it just show me "Sector 3" doesnt effect anymore.
Any advice either ideas how to fix that strange character dissapearing?
After spending a lot of hours i just have no any else point to resolve it xO
I'm currently working on combining Alkarter's Exe with Silva's and folks DLL, at least for simpliest features.
It's kinda funny work with that btw i'm not really expirienced with asm-olly tracking.
Today i got stuck with reworking 4xxx state.
First of all, state have same adress as in origianl lf2 exe, and initiated like
Code:
invoke JmpPatch, 0041F5FCh, addr State8xxx
and failed.
to figure out what goes wrong i even completly rewrite State8xxx procedure about 10 times
and then i found some strange things
ok, here is procs code
Code:
State8xxx proc
CMP EAX,1F40h ; 8000
JL SHORT state4xxx ;
CMP EAX,2328h ; 9000
JGE SHORT exit1 ;
jmp SHORT exit2 ;
exit1: jmp dword ptr [Transform1] ;
exit2: jmp dword ptr [Transform3] ;
state4xxx:
CMP EAX, 0FA0h ; 4000
JL SHORT exit1
MOV ECX,DWORD PTR DS:[452980h] ; wtf
LEA EDX,DWORD PTR DS:[EAX-0FA0h] ; calculating ID, 4xxx-4000=ID
XOR EAX,EAX ; comparing for same ID as already owned
CMP DWORD PTR DS:[452990h],EAX
JLE SHORT sector3
sector1:
MOV ESI,DWORD PTR DS:[ECX]
CMP DWORD PTR DS:[ESI+6F4h],EDX
JE SHORT sector2
MOV ESI,DWORD PTR DS:[452980h]
ADD EAX,1
ADD ECX,4
CMP EAX,DWORD PTR DS:[452990h]
JL SHORT sector1 ; repeating till reach ~1F, then JE works
JMP SHORT sector3
sector2:
MOV ECX,DWORD PTR DS:[452980h]
MOV ECX,DWORD PTR DS:[ECX+EAX*4]
MOV EAX,DWORD PTR DS:[EBX+EDI*4+3ECh]
MOV DWORD PTR DS:[EAX+368h],ECX
sector3:
MOV EDX,DWORD PTR DS:[EBX+EDI*4+3ECh]
MOV DWORD PTR DS:[EDX+70h],0 ; base frame after transform, usualy 0
MOV EAX,DWORD PTR DS:[EBX+EDI*4+3ECh]
MOV DWORD PTR DS:[EAX+318h],0h ; adding +140 frame count for 8xxx, and here +0 for 4xxx
MOV EAX,DWORD PTR DS:[EBX+EDI*4+3ECh]
jmp Transform2 ; back to regular code
State8xxx endp
and header
Code:
Transform1 dd 0041F675h
Transform2 dd 0041F67Ch
Transform3 dd 0041F60Ah
Everything works fine till i'm trying to change original
Code:
LEA EDX,DWORD PTR DS:[EAX-1F40h]
Code:
LEA EDX,DWORD PTR DS:[EAX-0FA0h]
Then game just works like everything after that LEA doesnt exist.
Character using 4xxx just dissapearing like next: 1000, dunno why, cause testing it just show me "Sector 3" doesnt effect anymore.
Any advice either ideas how to fix that strange character dissapearing?
After spending a lot of hours i just have no any else point to resolve it xO