Skip to content

Instantly share code, notes, and snippets.

@extremecoders-re
Created March 21, 2016 14:33

Revisions

  1. extremecoders-re created this gist Mar 21, 2016.
    34 changes: 34 additions & 0 deletions check.asm
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    .text:004010EC ; int __stdcall check(int part1, int part2)
    .text:004010EC check proc near ; CODE XREF: DialogFunc+104p
    .text:004010EC
    .text:004010EC output = byte ptr -21h
    .text:004010EC part1 = dword ptr 8
    .text:004010EC part2 = dword ptr 0Ch
    .text:004010EC
    .text:004010EC push ebp
    .text:004010ED mov ebp, esp
    .text:004010EF add esp, 0FFFFFFDCh
    .text:004010F2 mov ecx, 32
    .text:004010F7 mov esi, offset installId
    .text:004010FC lea edi, [ebp+output]
    .text:004010FF mov edx, [ebp+part1]
    .text:00401102 mov ebx, [ebp+part2]
    .text:00401105
    .text:00401105 encode: ; CODE XREF: check+23j
    .text:00401105 lodsb
    .text:00401106 sub al, bl
    .text:00401108 xor al, dl
    .text:0040110A stosb
    .text:0040110B rol edx, 1
    .text:0040110D rol ebx, 1
    .text:0040110F loop encode
    .text:00401111 mov byte ptr [edi], 0
    .text:00401114 push offset String2 ; "0how4zdy81jpe5xfu92kar6cgiq3lst7"
    .text:00401119 lea eax, [ebp+output]
    .text:0040111C push eax ; lpString1
    .text:0040111D call lstrcmpA
    .text:00401122 leave
    .text:00401123 retn 8
    .text:00401123 check endp
    .text:00401123
    .text:00401126