Log in

View Full Version : OCX unpacking


tazmanian
June 13th, 2003, 10:34
This is a very strange thing, that i'll explain...

I'm unpacking an ocx file, packed with not comercial packer, a selfmade one...

Each time the program (VB5) loads the OCX in a especific memory address range....see this:

OCX file info:
ImageBase: 1830000
Size : 410000

Each time the program loads the ocx in 1BC0000 or 1BE0000, not 1830000 address, so, the unpacking only will work here, not in other PC's...

Cause the "jmp dword [APIAddress]" will point to 183xxxx, not the right address, resulting a fault.

2 app uses the same ocx, but one loads at 1830000 addres (correct one) and the other loads at 1BC0000 address (wrong )

Like this:
Correct one:
1825415 jmp dword ptr [183xxxx] <-- same range address

Wrong one:
1BC5415 jmp dword ptr [183xxxx] <-- different, causing a GPF, cause jumps out of file =\

How can i make a OCX to work in any memory range?

Thank you!

evlncrn8
June 13th, 2003, 16:23
make new reloc info, an ocx is essentially a dll if im not mistaken, so for those addresses to be updated, you would have to apply some reloc info to the dump, lots of work tho heheh

sope
June 14th, 2003, 00:02
Hello tazmanian

For Relocation fixup give it a try to Mackt's Relocation rebuilder "ReloX" (http://www.woodmann.net/crackz/Tools/Relox.zip)

Good Luck.
Sope!