All pastes #732894 Raw Edit

Signature File Subroutine #1

public text v1 · immutable
·published 2007-10-11 11:10 UTC
rendered paste body
 .text:00402050 ; ---------------------------------------------------------------------------
.text:00402051                 align 10h
.text:00402060
.text:00402060 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
.text:00402060
.text:00402060 ; Attributes: bp-based frame
.text:00402060
.text:00402060 sub_402060      proc near               ; CODE XREF: sub_404880+52Cp
.text:00402060
.text:00402060 var_8C          = dword ptr -8Ch
.text:00402060 var_7C          = dword ptr -7Ch
.text:00402060 var_78          = dword ptr -78h
.text:00402060 var_74          = dword ptr -74h
.text:00402060 var_70          = dword ptr -70h
.text:00402060 var_6C          = dword ptr -6Ch
.text:00402060 var_68          = dword ptr -68h
.text:00402060 var_4           = dword ptr -4
.text:00402060 arg_0           = dword ptr  8
.text:00402060
.text:00402060                 push    ebp
.text:00402061                 mov     ebp, esp
.text:00402063                 sub     esp, 8Ch
.text:00402069                 mov     eax, dword_8AE4E8
.text:0040206E                 xor     eax, ebp
.text:00402070                 mov     [ebp+var_4], eax
.text:00402073                 call    sub_621170
.text:00402078                 push    0               ; int
.text:0040207A                 push    0               ; size_t
.text:0040207C                 lea     eax, [ebp+var_70]
.text:0040207F                 push    eax             ; int
.text:00402080                 lea     ecx, [ebp+var_6C]
.text:00402083                 push    ecx             ; int
.text:00402084                 push    offset aSignaturefile ; "signaturefile"
.text:00402089                 call    sub_61F8A0
.text:0040208E                 test    eax, eax
.text:00402090                 jnz     short loc_4020AB
.text:00402092                 push    1               ; uExitCode
.text:00402094                 push    eax             ; int
.text:00402095                 push    offset aSignaturefile ; "signaturefile"
.text:0040209A                 push    934h            ; int
.text:0040209F                 push    offset a_Client_cpp ; ".\\Client.cpp"
.text:004020A4                 push    2               ; int
.text:004020A6                 call    sub_625DD0
.text:004020AB
.text:004020AB loc_4020AB:                             ; CODE XREF: sub_402060+30j
.text:004020AB                 mov     edx, [ebp+var_70]
.text:004020AE                 mov     eax, [ebp+var_6C]
.text:004020B1                 push    4
.text:004020B3                 push    offset unk_8338E8
.text:004020B8                 push    100h
.text:004020BD                 push    offset unk_8AE008
.text:004020C2                 push    edx
.text:004020C3                 push    eax
.text:004020C4                 call    sub_626D20
.text:004020C9                 add     esp, 18h
.text:004020CC                 test    eax, eax
.text:004020CE                 jnz     short loc_40210B
.text:004020D0                 push    offset aSignaturefile ; "signaturefile"
.text:004020D5                 push    offset aCouldNotAuthen ; "Could not authenticate the %s file."
.text:004020DA                 lea     ecx, [ebp+var_68]
.text:004020DD                 push    64h
.text:004020DF                 push    ecx
.text:004020E0                 call    sub_61B710
.text:004020E5                 add     esp, 10h
.text:004020E8                 push    0
.text:004020EA                 call    sub_625B00
.text:004020EF                 push    1               ; uExitCode
.text:004020F1                 push    0               ; int
.text:004020F3                 lea     edx, [ebp+var_68]
.text:004020F6                 push    edx             ; int
.text:004020F7                 push    946h            ; int
.text:004020FC                 push    offset a_Client_cpp ; ".\\Client.cpp"
.text:00402101                 push    4DCh            ; int
.text:00402106                 call    sub_625DD0
.text:0040210B
.text:0040210B loc_40210B:                             ; CODE XREF: sub_402060+6Ej
.text:0040210B                 mov     eax, [ebp+var_6C]
.text:0040210E                 push    ebx
.text:0040210F                 push    esi
.text:00402110                 push    edi
.text:00402111                 push    offset asc_83D040 ; "\r\n"
.text:00402116                 push    eax
.text:00402117                 mov     edi, eax
.text:00402119                 call    sub_61BAB0
.text:0040211E                 add     esp, 8
.text:00402121                 mov     esi, eax
.text:00402123                 push    edi
.text:00402124                 mov     byte ptr [esi], 0
.text:00402127                 call    sub_61B770
.text:0040212C                 add     esi, 2
.text:0040212F                 push    offset asc_83D040 ; "\r\n"
.text:00402134                 push    esi
.text:00402135                 mov     ebx, eax
.text:00402137                 call    sub_61BAB0
.text:0040213C                 mov     edi, eax
.text:0040213E                 push    esi             ; char *
.text:0040213F                 mov     byte ptr [edi], 0
.text:00402142                 call    j__atol
.text:00402147                 add     esp, 0Ch
.text:0040214A                 cmp     eax, 1
.text:0040214D                 jz      short loc_402169
.text:0040214F                 push    1               ; uExitCode
.text:00402151                 push    0               ; int
.text:00402153                 push    0               ; int
.text:00402155                 push    966h            ; int
.text:0040215A                 push    offset a_Client_cpp ; ".\\Client.cpp"
.text:0040215F                 push    85100083h       ; int
.text:00402164                 call    sub_625DD0
.text:00402169
.text:00402169 loc_402169:                             ; CODE XREF: sub_402060+EDj
.text:00402169                 add     edi, 2
.text:0040216C                 push    offset asc_83D040 ; "\r\n"
.text:00402171                 push    edi
.text:00402172                 call    sub_61BAB0
.text:00402177                 add     esp, 8
.text:0040217A                 push    7               ; size_t
.text:0040217C                 push    offset aRelease ; "RELEASE"
.text:00402181                 mov     esi, eax
.text:00402183                 push    edi             ; int
.text:00402184                 mov     byte ptr [esi], 0
.text:00402187                 call    sub_61B4C0
.text:0040218C                 test    eax, eax
.text:0040218E                 jz      short loc_4021AA
.text:00402190                 push    1               ; uExitCode
.text:00402192                 push    0               ; int
.text:00402194                 push    0               ; int
.text:00402196                 push    983h            ; int
.text:0040219B                 push    offset a_Client_cpp ; ".\\Client.cpp"
.text:004021A0                 push    85100083h       ; int
.text:004021A5                 call    sub_625DD0
.text:004021AA
.text:004021AA loc_4021AA:                             ; CODE XREF: sub_402060+12Ej
.text:004021AA                 add     esi, 2
.text:004021AD                 cmp     ebx, 2
.text:004021B0                 jnz     loc_40226D
.text:004021B6                 call    sub_401DD0
.text:004021BB                 mov     edx, [ebp+var_70]
.text:004021BE                 cmp     al, 1
.text:004021C0                 sbb     eax, eax
.text:004021C2                 add     eax, 1
.text:004021C5                 mov     [ebp+var_74], eax
.text:004021C8                 mov     eax, [ebp+arg_0]
.text:004021CB                 mov     ecx, [eax]
.text:004021CD                 mov     eax, [ebp+var_6C]
.text:004021D0                 add     eax, edx
.text:004021D2                 cmp     esi, eax
.text:004021D4                 mov     [ebp+var_78], ecx
.text:004021D7                 jnb     loc_402287
.text:004021DD                 lea     ecx, [ecx+0]
.text:004021E0
.text:004021E0 loc_4021E0:                             ; CODE XREF: sub_402060+205j
.text:004021E0                 push    4               ; size_t
.text:004021E2                 push    offset aNgis    ; "NGIS"
.text:004021E7                 push    esi             ; int
.text:004021E8                 call    sub_61B4C0
.text:004021ED                 test    eax, eax
.text:004021EF                 jz      loc_402287
.text:004021F5                 lea     edi, [esi+7]
.text:004021F8                 lea     eax, [edi+21h]
.text:004021FB                 mov     byte ptr [esi+4], 0
.text:004021FF                 push    offset asc_83D040 ; "\r\n"
.text:00402204                 mov     byte ptr [esi+6], 0
.text:00402208                 push    eax
.text:00402209                 mov     byte ptr [edi+20h], 0
.text:0040220D                 mov     [ebp+var_7C], eax
.text:00402210                 call    sub_61BAB0
.text:00402215                 mov     ebx, eax
.text:00402217                 mov     byte ptr [ebx], 0
.text:0040221A                 mov     eax, [esi]
.text:0040221C                 add     esp, 8
.text:0040221F                 cmp     eax, 65736162h
.text:00402224                 jz      short loc_40222B
.text:00402226                 cmp     eax, [ebp+var_78]
.text:00402229                 jnz     short loc_402258
.text:0040222B
.text:0040222B loc_40222B:                             ; CODE XREF: sub_402060+1C4j
.text:0040222B                 mov     al, [esi+5]
.text:0040222E                 cmp     al, 63h
.text:00402230                 jz      short loc_40223C
.text:00402232                 cmp     al, 65h
.text:00402234                 jnz     short loc_402258
.text:00402236                 cmp     [ebp+var_74], 0
.text:0040223A                 jz      short loc_402258
.text:0040223C
.text:0040223C loc_40223C:                             ; CODE XREF: sub_402060+1D0j
.text:0040223C                 push    edi
.text:0040223D                 lea     ecx, [ebp+var_8C]
.text:00402243                 call    sub_624FF0
.text:00402248                 mov     edx, [ebp+var_7C]
.text:0040224B                 lea     ecx, [ebp+var_8C]
.text:00402251                 push    ecx
.text:00402252                 push    edx
.text:00402253                 call    sub_6223A0
.text:00402258
.text:00402258 loc_402258:                             ; CODE XREF: sub_402060+1C9j
.text:00402258                                         ; sub_402060+1D4j ...
.text:00402258                 mov     eax, [ebp+var_70]
.text:0040225B                 mov     ecx, [ebp+var_6C]
.text:0040225E                 lea     esi, [ebx+2]
.text:00402261                 add     ecx, eax
.text:00402263                 cmp     esi, ecx
.text:00402265                 jb      loc_4021E0
.text:0040226B                 jmp     short loc_402287
.text:0040226D ; ---------------------------------------------------------------------------
.text:0040226D
.text:0040226D loc_40226D:                             ; CODE XREF: sub_402060+150j
.text:0040226D                 push    1               ; uExitCode
.text:0040226F                 push    0               ; int
.text:00402271                 push    0               ; int
.text:00402273                 push    9BAh            ; int
.text:00402278                 push    offset a_Client_cpp ; ".\\Client.cpp"
.text:0040227D                 push    85100083h       ; int
.text:00402282                 call    sub_625DD0
.text:00402287
.text:00402287 loc_402287:                             ; CODE XREF: sub_402060+177j
.text:00402287                                         ; sub_402060+18Fj ...
.text:00402287                 mov     edx, [ebp+var_6C]
.text:0040228A                 push    edx
.text:0040228B                 call    sub_61CD60
.text:00402290                 mov     ecx, [ebp+var_4]
.text:00402293                 pop     edi
.text:00402294                 pop     esi
.text:00402295                 xor     ecx, ebp
.text:00402297                 pop     ebx
.text:00402298                 call    sub_4096EA
.text:0040229D                 mov     esp, ebp
.text:0040229F                 pop     ebp
.text:004022A0                 retn
.text:004022A0 sub_402060      endp
.text:004022A0
.text:004022A0 ; ---------------------------------------------------------------------------