View Full Version : API on Safedisc 2.60
quake_ger
April 7th, 2004, 13:52
I am just trying to unpack safedisc2 (Morrowind,German). I read 3 tutorials about Safedisc 2 (from Peex, quake2, ...). I fixed all APis except 4 which are not really api-functions. Is it this API Stuff how r!sc it called? How can I fix them?
I would be happy if somebody can help me

evlncrn8
April 7th, 2004, 14:25
Quote:
[Originally Posted by quake_ger]I am just trying to unpack safedisc2 (Morrowind,German). I read 3 tutorials about Safedisc 2 (from Peex, quake2, ...). I fixed all APis except 4 which are not really api-functions. Is it this API Stuff how r!sc it called? How can I fix them?
I would be happy if somebody can help me  |
not really api functions? so they're safedisc api right? aka crypted code chunks, trace into the call, and watch what it does.. quite simple
quake_ger
April 7th, 2004, 14:51
Do you know the Routine how it comes to the "real" api?
it makes the same way but the api which comes out is no API from Kernel32.dll, User32.dll, Ole32.dll, Msvcrt.dll,... and so on. But I downloaded a Crack to compare the IAT and this API must be called from Kernel32.dll
evlncrn8
April 7th, 2004, 20:48
Quote:
[Originally Posted by quake_ger]Do you know the Routine how it comes to the "real" api?
it makes the same way but the api which comes out is no API from Kernel32.dll, User32.dll, Ole32.dll, Msvcrt.dll,... and so on. But I downloaded a Crack to compare the IAT and this API must be called from Kernel32.dll |
then its a normal api, not sd2 api (crypted code chunks).. trace into the call using e8's, you'll see where he does the api resolve ..
what you're describing is the safedisc api wrapper, where it goes to a memory area, then into the handler, and eventually (after a while) ends up at the right api va to do the api call.. trace into it, pay attention to the registers..
quake_ger
April 9th, 2004, 14:29
but its not a normal api. This Api doesn´t exist, what I sometimes get.
...where it goes to a memory area, then into the handler, and eventually (after a while) ends up at the right api rva to do the api call.. trace into it...
yeah I already know this. At the end is a ret. And this ret brings me to the real rva. But at 6 or 7 calls the rva doesn´t exist! but what exactly is API STuff how r!sc it called?
evlncrn8
April 9th, 2004, 17:23
Quote:
[Originally Posted by quake_ger]but its not a normal api. This Api doesn´t exist, what I sometimes get.
...where it goes to a memory area, then into the handler, and eventually (after a while) ends up at the right api rva to do the api call.. trace into it...
yeah I already know this. At the end is a ret. And this ret brings me to the real rva. But at 6 or 7 calls the rva doesn´t exist! but what exactly is API STuff how r!sc it called? |
sd2/3 api-> 'Crypted Code Chunks' usually starts with a call, which goes into the sd routine, basically it then decrypts the bytes, sets eip to the start, executes it, then when it rets it gets crypted back up again
as for the api not existing, try tracing it again, this time only probe the api u couldnt before when u reach oep, note down the code flow, then repeat again, you'll see where he's catching you.. also remember theres anti bpm code, so be careful
quake_ger
April 13th, 2004, 08:52
Quote:
sd2/3 api-> 'Crypted Code Chunks' usually starts with a call, which goes into the sd routine, basically it then decrypts the bytes, sets eip to the start, executes it, then when it rets it gets crypted back up again |
I don´t really understand it. Which Bytes will be decrypted and when? Peex wrote in his tutorial that he changed the address in esp and then he got the right address. I tryed a different way I downloaded an API spytool and tryed to find out which address will be called but I only found HeapAlloc Api´s and but not what I searched

evlncrn8
April 13th, 2004, 12:17
r eip to one, trace into it, watch what happens
and 'which bytes'.. the ones were the call is.. like i said, ditch the tuts
and do some tracing, make your own notes, it'll all fall into place easier then
quake_ger
April 15th, 2004, 07:28
It seems that 'Crypted Code Chunks' are only in SAfedisc 2.60 and above. (But why doesn´t Safedisc2Cleaner unwrapp Morrowind?)
evlncrn8
April 15th, 2004, 12:34
Quote:
[Originally Posted by quake_ger]It seems that 'Crypted Code Chunks' are only in SAfedisc 2.60 and above. (But why doesn´t Safedisc2Cleaner unwrapp Morrowind?) |
nope, ccc's existed even in the days of sd1, theres different variations tho if i remember correctly morrowind didnt have any, keep debugging or rebuild the exe, play the game, and have faults on in sice, that way you should catch where it crashes, backtrace, see whats going on etc
quake_ger
April 22nd, 2004, 07:35
Okay, I did it

After debugging about an hour I found the real calls and so on.
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.