![]() |
WinCE dll unpacking
Hi,
I have a packed dll for WinCE and I wan't to analyse it. Unfortunately I can not identify what protector is used. It seems that the dll is unpack himself in the memory during runtime. There is only 5 functions who does the unpacking/decompressing, so I decide to make a static unpacker for it. I have a problem to analyse 2 short functions, and I don't know how to handle them: Quote:
Quote:
Maybe somebody can give me some tips how to handle this calls? Regards, leader |
Hi,
I have a problem with the analyze one function. I think this function make the decompression of the code in the memory. It has many integer overflow checks and it will be overflow in short time: Code:
char *__fastcall sub_9F92(char *a1, int a2, _BYTE *a3, _DWORD *a4)- a1 => compressed code buffer - a2 => length of compressed code buffer - a3 => To this address will be decompressed the the code - a4 => I think it will store the lengh of decompressed code (not sure) __CFADD__ check if the sum of 2 integers is overflow or not. Tipically used to check the sum of the same integer. There is another overflow check by multiply the integer with 2 (For example v6 *= 2) As you see the inital value of integer v6 is 0x80000000, so it produce very fast overflow and the function will return without decompressing the code. I try to reproduce this ARM code on X86 but without success. I spent many time on it, but I can not understand the purpose of this overflow checks and how the decompression made. I would be very pleased with all your useful ideas. Thanks, leader |
I just identified that the function above is NRV2E decription rutine.
It is used in UPX, so I think this windows ce dll is compressed with a modified UPX. I made a little program to decompress code section using UCL library, now I need to rebuild import library.... :) |
| All times are GMT +8. The time now is 09:49. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX