r4g3
October 22nd, 2003, 10:54
1. unpacked with aspackdie 1.41
2.
its a delphi vlc app, but w/o a standart startup routines. the window is created using RegisterClassA/CreateWindowExA
CODE:00411CA1 push ebx ; lpWndClass
CODE:00411CA2 call RegisterClassA
its a (lpWndClass) ebx;
a few lines above is
mov dword ptr [ebx+4], offset sub_411B68
the WindowProc. So finaly we get to sub_411A2C - the OK btn handler.
The problem here is that the MessageBox is never called w/ an unpacked app. Running the packed one again reveals that
CODE:00411AC9 call Listactns@TListActionLink@AddItem
nonsense ir overwriten w/ a jmp xxxxx to some showmessage routine.
So again with the unpacked one i traced the xrefs starting from the one at the start of that stupid vcl function. that brings us back to the WinMain:
CODE:00411E00 mov eax, ds:dword_4138A4
CODE:00411E05 cmp eax, ds:dword_412424
CODE:00411E0B jnz short loc_411E4B
CODE:00411E0D push offset loc_4118E0
the followed xref is push'ed after a cmp of actuall EP w/ a saved one. So the first patch at 12424 is to replace it with the new EP of the unpacked app.
The second one makes MessageBox always show "registered". It modifies
a push'ed constant back in ok btn handler.
The routine jmp'ed instead of that vcl call checks for serial validity in some perverted way and accordingly to its results calls [ebp-4] is all is ok or [ebp+8] otherwise. [ebp-4] is that push'ed constant - a ptr to routine placing "serial ok" string ptr to a public variable.
3. no additional comments here :P