Function at 0x40cd40
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x58
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x30
mov ebx, eax
lea eax, [esp + 0x3c]
push ebp
push eax
mov esi, ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], ebp
call fcn.00413110
add esp, 0xc
lea ecx, [esp + 0x58]
push ecx
push esi
mov dword [esp + 0x40], esi
call dword [0x42311c]
test eax, eax
jne 0x40cd94
push str.GetFileSizeEx__
push 0x112
push str..QHImageHlp.c
xor edx, edx
call fcn.0040f7a0
jmp 0x40d146
push 0x4000
mov dword [esp + 0x68], 0x4000
call fcn.00411c23
mov esi, eax
add esp, 4
cmp esi, ebp
jne 0x40cdb7
push 8
call dword [0x423128]
mov dword [esp + 0x60], esi
cmp esi, ebp
jne 0x40cdda
push 0x4299ac
push 0x20e
push str..QHImageHlp.c
xor edx, edx
call fcn.0040f7a0
jmp 0x40d146
push 0x40
push ebx
push ebp
push ebp
lea edi, [esp + 0x48]
call fcn.0040cac0
add esp, 0x10
test eax, eax
je 0x40d149
mov edx, 0x5a4d
cmp word [ebx], dx
je 0x40ce0c
push str._rN_f
push 0x214
jmp 0x40d137
mov eax, dword [ebx + 0x3c]
push 4
cdq
lea ecx, [esp + 0x30]
push ecx
push edx
push eax
lea edi, [esp + 0x48]
call fcn.0040cac0
add esp, 0x10
test eax, eax
je 0x40d149
cmp dword [esp + 0x2c], 0x4550
je 0x40ce46
push str._rN_f
push 0x219
jmp 0x40d137
mov esi, dword [ebx + 0x3c]
push 0x14
push ebx
add esi, 4
push ebp
push esi
lea edi, [esp + 0x48]
call fcn.0040cac0
add esp, 0x10
test eax, eax
je 0x40d149
push 2
add esi, 0x14
lea edx, [esp + 0x2c]
adc ebp, ebp
push edx
push ebp
push esi
mov dword [esp + 0x44], ebp
call fcn.0040cac0
add esp, 0x10
test eax, eax
je 0x40d149
mov eax, dword [esp + 0x28]
mov ecx, 0x10b
cmp ax, cx
jne 0x40cebd
movzx eax, word [ebx + 0x10]
cmp ax, 0x78
jae 0x40ceae
push 0x429bd4
push 0x226
jmp 0x40d137
mov dword [esp + 0x20], 1
mov ebp, pe_nt_image_headers32
jmp 0x40cef5
mov edx, 0x20b
cmp ax, dx
jne 0x40d12d
movzx eax, word [ebx + 0x10]
mov ecx, 0x88
cmp ax, cx
jae 0x40cee8
push 0x429bd4
push 0x22c
jmp 0x40d137
mov dword [esp + 0x20], 0
mov ebp, 0xf0
movzx eax, ax
cmp eax, ebp
jae 0x40cefe
mov ebp, eax
movzx edx, word [ebx + 2]
mov dword [esp + 0x14], edx
test ebp, ebp
je 0x40cf26
mov eax, dword [esp + 0x34]
push ebp
push ebx
push eax
push esi
lea edi, [esp + 0x48]
call fcn.0040cac0
add esp, 0x10
test eax, eax
je 0x40d149
cmp dword [esp + 0x20], 0
mov eax, dword [esp + 0x6c]
je 0x40cf63
lea ecx, [esi + 0x40]
mov dword [eax], ecx
lea edx, [esi + 0x80]
mov dword [eax + 4], edx
mov ecx, dword [ebx + 0x80]
mov dword [eax + 0xc], ecx
mov edx, dword [ebx + 0x84]
mov dword [eax + 0x14], edx
mov ecx, dword [ebx + 0x40]
mov dword [eax + 0x10], ecx
mov edx, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x74]
mov dword [esp + 0x20], edx
jmp 0x40cf9d
lea edx, [esi + 0x40]
mov dword [eax], edx
lea ecx, [esi + 0x90]
mov dword [eax + 4], ecx
mov edx, dword [ebx + 0x90]
mov dword [eax + 0xc], edx
mov ecx, dword [ebx + 0x94]
mov dword [eax + 0x14], ecx
mov edx, dword [ebx + 0x40]
mov dword [eax + 0x10], edx
mov eax, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x84]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x6c]
mov edx, dword [eax + 4]
add edx, 4
add esi, ebp
mov ebp, dword [esp + 0x34]
adc ebp, 0
cmp dword [esp + 0x20], 0
mov dword [esp + 0x24], ecx
mov dword [eax + 8], edx
mov dword [eax + 0x18], 0
je 0x40d123
mov ecx, dword [esp + 0x14]
mov eax, 0x333
mov edx, eax
mov dword [esp + 0x28], eax
cmp cx, dx
jbe 0x40cfdf
mov dword [esp + 0x14], eax
jmp 0x40cff1
mov eax, 0xffff
cmp cx, ax
jne 0x40cff1
mov dword [esp + 0x14], 0xfffe
movzx edi, word [esp + 0x14]
lea edi, [edi + edi*4]
add edi, edi
add edi, edi
add edi, edi
mov eax, edi
call fcn.0040c9a0
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40d029
push 0x4299ac
push 0x259
push str..QHImageHlp.c
xor edx, edx
call fcn.0040f7a0
jmp 0x40d146
test edi, edi
je 0x40d049
push edi
push eax
push ebp
push esi
lea edi, [esp + 0x48]
call fcn.0040cac0
add esp, 0x10
test eax, eax
je 0x40d149
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
push ecx
call fcn.0040d230
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40d123
push 0xa
push ebp
lea eax, [esp + 0x40]
call fcn.0040d180
add esp, 8
test eax, eax
je 0x40d123
mov eax, dword [eax + 4]
test eax, eax
jns 0x40d123
and eax, 0x7fffffff
add eax, ebp
push 0x360
push eax
lea eax, [esp + 0x40]
call fcn.0040d180
add esp, 8
test eax, eax
je 0x40d123
mov eax, dword [eax + 4]
test eax, eax
jns 0x40d123
and eax, 0x7fffffff
add eax, ebp
push 0
push eax
lea eax, [esp + 0x40]
call fcn.0040d180
add esp, 8
test eax, eax
je 0x40d123
mov eax, dword [eax + 4]
test eax, eax
js 0x40d123
push 0x10
xor ecx, ecx
push ebx
add eax, ebp
push ecx
push eax
lea edi, [esp + 0x48]
call fcn.0040cac0
add esp, 0x10
test eax, eax
je 0x40d149
cmp dword [ebx + 4], 0x80
jne 0x40d123
mov eax, dword [esp + 0x18]
mov edx, dword [ebx]
push 0x80
call fcn.0040d230
mov esi, dword [esp + 0x70]
add esp, 4
push 0x80
lea edx, [esi + 0x1c]
push edx
push 0
push eax
call fcn.0040cac0
add esp, 0x10
test eax, eax
je 0x40d149
mov dword [esi + 0x18], ebp
mov dword [esp + 0x1c], 1
jmp 0x40d149
push str._rN_e
push 0x230
push str..QHImageHlp.c
mov edx, 1
call fcn.0040f8d0
add esp, 0xc
mov eax, dword [esp + 0x60]
test eax, eax
je 0x40d15a
push eax
call fcn.00411598
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40d16b
push eax
call fcn.00411598
add esp, 4
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret