neviens
October 29th, 2002, 13:46
Hi all!
After searching in KERNEL32.dll for code replacement API
for one well known protector, found a LockResource,
fitting my needs.
It perfectly replaces the code in protector:
push ebp
mov ebp, esp
mov eax, [xxxxxxxx]
mov eax, [ebp+8]
pop ebp
ret 4
with:
Exported fn(): LockResource - Ord:024Eh
|
mov eax, [esp+04]
ret 4
, _but_ from win32.hlp I found following:
>..The LockResource function locks the specified resource in memory...
Here comes my question - how it is possible with this
simple mov and ret? Is it (locking) really done?
Don't want any resource locks in my unpacked app.
,
Neviens.
After searching in KERNEL32.dll for code replacement API
for one well known protector, found a LockResource,
fitting my needs.
It perfectly replaces the code in protector:
push ebp
mov ebp, esp
mov eax, [xxxxxxxx]
mov eax, [ebp+8]
pop ebp
ret 4
with:
Exported fn(): LockResource - Ord:024Eh
|
mov eax, [esp+04]
ret 4
, _but_ from win32.hlp I found following:
>..The LockResource function locks the specified resource in memory...
Here comes my question - how it is possible with this
simple mov and ret? Is it (locking) really done?
Don't want any resource locks in my unpacked app.
,Neviens.

. Think about what some of these API functions are meant to do. In a lot of cases it is a lot simpler or merely to reserve future enhancements etc in advance or for backwards compatibility. I believe only 4 functions are actually moved straight into the EXE because they are globally the same on all versions of Windows in Kernel32.