Guybrush
March 15th, 2003, 12:44
I have a target that's protected with HASP.. it's my first HASP expierence..
after reading a lot of tutorials i'm still not quite sure how it works.
when i start the program i get a nice message box that my hasp dongle is not found.
so i put a bpx on freeenvironmentstringsa and i'm near the haspcode.
strange thing is, first call is not with service 1 or 2.. it calls directly with service 32h and esi=38h which means it it will return a 38h block in eax after the call. ecx will hold an errorcode.
so i manually changed the returned block with some random stuff.. (not sure what to put here yet) and changed ecx to 0 (no error)
after that it will break another time with service 6, which will return the HASPID in ebx and edx. and error in ecx.
and that's all, after that i found out it MD5 sums my HASPID i think.. and checks it, i manually changed the jumps but it still fails
so i basically have 2 service calls (32h and 6) and some MD5 check but not sure what to do
i think i need to emulate the readblock, so it will be correct with the haspid.. but i havent found where it makes the check...
after reading a lot of tutorials i'm still not quite sure how it works.
when i start the program i get a nice message box that my hasp dongle is not found.
so i put a bpx on freeenvironmentstringsa and i'm near the haspcode.
strange thing is, first call is not with service 1 or 2.. it calls directly with service 32h and esi=38h which means it it will return a 38h block in eax after the call. ecx will hold an errorcode.
so i manually changed the returned block with some random stuff.. (not sure what to put here yet) and changed ecx to 0 (no error)
after that it will break another time with service 6, which will return the HASPID in ebx and edx. and error in ecx.
and that's all, after that i found out it MD5 sums my HASPID i think.. and checks it, i manually changed the jumps but it still fails

so i basically have 2 service calls (32h and 6) and some MD5 check but not sure what to do

i think i need to emulate the readblock, so it will be correct with the haspid.. but i havent found where it makes the check...