neemous
June 11th, 2003, 23:26
I'm not quite understanding what this function
does. It seems to be doing alot of math to me,
but it seems to have no context. Its in a dongle
protected program. It gets called many times,
sometimes before and after calls to the dongle
other times seem unrelated to the dongle apis.
Its input is usually a large number, not always.
The input isnt any return from the dongle/emulator
as far as I can tell, and when it returns, it
sets a flag (I think) but no real decisions are
made. The program just continues on its way,
checking the dongle more. :
MOV EAX,[ECX+04]-usually a big number like: A03982E0
MOV ECX,EAX
MOV EDX,EAX
XOR ECX,00016000
XOR EDX,00000680
SAR ECX,0C =FFFA038E..I dont really understand shift instructions
AND ECX,3F
SAR EDX,06
SHL ECX,06
AND EDX,3F
ADD ECX,EDX
MOV EDX,EAX
XOR EDX,-13
XOR EAX,00700000
SHL ECX,06
AND EDX,3F
SAR EAX,12
ADD ECX,EDX
AND EAX,3F
SHL ECX,06
NEG EAX
SUB EAX,ECX
AND EAX,00FFFFFF
RET
Then it will return to something like:
SUB EAX,EDI- in this case EAX is now 00C6ECAE
MOV ECX,[ESP+14]
MOV [ESI+1C],EAX
XOR EAX,EAX
CMP EDI,EBP
MOV [ESI+14],EBP
SETZ AL
MOV [ESI+10],EAX
MOV EAX,ESI
POP EDI
POP ESI
POP EBP
POP EBX
MOV FS:[00000000],ECX -what is this?
ADD ESP,10
RET 0004
Can anyone give me a clue what this program is doing
and why it does it so many times?
Thanks, n
does. It seems to be doing alot of math to me,
but it seems to have no context. Its in a dongle
protected program. It gets called many times,
sometimes before and after calls to the dongle
other times seem unrelated to the dongle apis.
Its input is usually a large number, not always.
The input isnt any return from the dongle/emulator
as far as I can tell, and when it returns, it
sets a flag (I think) but no real decisions are
made. The program just continues on its way,
checking the dongle more. :
MOV EAX,[ECX+04]-usually a big number like: A03982E0
MOV ECX,EAX
MOV EDX,EAX
XOR ECX,00016000
XOR EDX,00000680
SAR ECX,0C =FFFA038E..I dont really understand shift instructions
AND ECX,3F
SAR EDX,06
SHL ECX,06
AND EDX,3F
ADD ECX,EDX
MOV EDX,EAX
XOR EDX,-13
XOR EAX,00700000
SHL ECX,06
AND EDX,3F
SAR EAX,12
ADD ECX,EDX
AND EAX,3F
SHL ECX,06
NEG EAX
SUB EAX,ECX
AND EAX,00FFFFFF
RET
Then it will return to something like:
SUB EAX,EDI- in this case EAX is now 00C6ECAE
MOV ECX,[ESP+14]
MOV [ESI+1C],EAX
XOR EAX,EAX
CMP EDI,EBP
MOV [ESI+14],EBP
SETZ AL
MOV [ESI+10],EAX
MOV EAX,ESI
POP EDI
POP ESI
POP EBP
POP EBX
MOV FS:[00000000],ECX -what is this?
ADD ESP,10
RET 0004
Can anyone give me a clue what this program is doing
and why it does it so many times?
Thanks, n