Function at 0x40a4f4
Capabilities:
Parse pe header

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x110
mov eax, dword [0x485df0]
xor eax, ebp
mov dword [ebp + 0x6c], eax
push esi
push edi
mov edi, dword [ebp + 0x78]
mov esi, ecx
cmp byte [esi + 4], 0
mov dword [ebp - 0xa0], edi
je 0x40a523
mov al, 1
jmp 0x40a710
push ebx
lea eax, [ebp - 0x9c]
xor ebx, ebx
push eax
mov ecx, edi
mov dword [ebp - 0x9c], ebx
mov dword [ebp - 0x98], ebx
call fcn.0041afb6
test eax, eax
jne 0x40a554
push str.DING::CPEFileHelper::ReadHeaders_70__:_CSignedPEFile::ReadHeaders___:_GetLength____FALSE_n
call fcn.004085ae
pop ecx
jmp 0x40a70c
push 0x40
lea eax, [ebp + 4]
push eax
push ebx
push ebx
mov ecx, edi
call fcn.0041b257
test eax, eax
jne 0x40a56e
push str.DING::CPEFileHelper::ReadHeaders_78__:_CSignedPEFile::ReadHeaders___:_Read____FALSE_n
jmp 0x40a549
mov eax, 0x5a4d
cmp ax, word [ebp + 4]
je 0x40a580
push str.DING::CPEFileHelper::ReadHeaders_85__:_CSignedPEFile::ReadHeaders___:_IMAGE_DOS_SIGNATURE___dosHeader.e_magic_n
jmp 0x40a549
lea ecx, [ebp - 0x94]
call fcn.00417943
mov ebx, 0x108
push ebx
lea ecx, [ebp - 0x94]
call fcn.00417a07
test eax, eax
jne 0x40a5aa
push str.DING::CPEFileHelper::ReadHeaders_94__:_CSignedPEFile::ReadHeaders___:_buffer.Alloc____NULL_n
jmp 0x40a6fb
lea ecx, [ebp - 0x94]
call fcn.0043a5b6
mov ecx, dword [ebp - 0xa0]
mov edi, eax
mov eax, dword [ebp + 0x40]
push ebx
cdq
push edi
push edx
push eax
call fcn.0041b257
test eax, eax
jne 0x40a5d8
push str.DING::CPEFileHelper::ReadHeaders_102__:_CSignedPEFile::ReadHeaders___:_Read____FALSE_n
jmp 0x40a6fb
cmp dword [edi], 0x4550
je 0x40a5ea
push str.DING::CPEFileHelper::ReadHeaders_109__:_CSignedPEFile::ReadHeaders___:_IMAGE_NT_SIGNATURE___pHeaders32__Signature_n
jmp 0x40a6fb
movzx eax, word [edi + 0x18]
mov ecx, 0x10b
cmp cx, ax
jne 0x40a61b
mov edx, dword [ebp + 0x40]
lea eax, [edx + 0x58]
mov dword [esi + 8], eax
lea eax, [edx + 0x98]
mov dword [esi + 0x10], eax
mov eax, dword [edi + 0x98]
mov dword [esi + 0x18], eax
mov eax, dword [edi + 0x9c]
jmp 0x40a655
mov ecx, 0x20b
cmp cx, ax
jne 0x40a6f6
lea ecx, [ebp - 0x94]
call fcn.0043a5b6
mov edx, dword [ebp + 0x40]
lea ecx, [edx + 0x58]
mov dword [esi + 8], ecx
lea ecx, [edx + 0xa8]
mov dword [esi + 0x10], ecx
mov ecx, dword [eax + 0xa8]
mov dword [esi + 0x18], ecx
mov eax, dword [eax + 0xac]
cmp byte [ebp + 0x7c], 0
mov dword [esi + 0x1c], eax
jne 0x40a693
mov eax, dword [esi + 0x18]
xor ecx, ecx
cmp ecx, dword [ebp - 0x98]
ja 0x40a68c
jb 0x40a675
cmp eax, dword [ebp - 0x9c]
ja 0x40a68c
mov eax, dword [esi + 0x1c]
xor ecx, ecx
cmp ecx, dword [ebp - 0x98]
jb 0x40a693
ja 0x40a68c
cmp eax, dword [ebp - 0x9c]
jbe 0x40a693
push str.DING::CPEFileHelper::ReadHeaders_159__:_CSignedPEFile::ReadHeaders___:_m_dwWinCertificateLength___m_dwMaxCertificateSize_n
jmp 0x40a6fb
push 8
pop ecx
mov dword [esi + 0x14], ecx
mov dword [esi + 0xc], 4
movzx eax, word [edi + 6]
movzx edi, word [edi + 0x14]
dec eax
imul eax, eax, 0x28
add eax, edx
lea edx, [edi + eax + 0x18]
xor eax, eax
mov byte [ebp + 0x44], 0
lea edi, [ebp + 0x45]
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp + 0x4c]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0xa0]
push 0x28
lea eax, [ebp + 0x44]
push eax
push 0
push edx
call fcn.0041b257
test eax, eax
jne 0x40a6e5
push str.DING::CPEFileHelper::ReadHeaders_184__:_CSignedPEFile::ReadHeaders___:_Read____FALSE_n
jmp 0x40a6fb
mov eax, dword [ebp + 0x54]
mov ecx, dword [ebp + 0x58]
add eax, ecx
mov dword [esi + 0x20], eax
mov byte [esi + 4], 1
jmp 0x40a701
push str.DING::CPEFileHelper::ReadHeaders_150__:_CSignedPEFile::ReadHeaders___:_Unknown_PE_header_format_n
call fcn.004085ae
pop ecx
lea ecx, [ebp - 0x94]
call fcn.004179fc
mov al, byte [esi + 4]
pop ebx
mov ecx, dword [ebp + 0x6c]
pop edi
xor ecx, ebp
pop esi
call fcn.0043e999
add ebp, 0x70
leave
ret 8