Function at 0x404008
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov eax, dword [eax]
test eax, eax
jne 0x404018
leave
ret 4
add eax, 8
mov dword [ebp + 8], eax
jmp 0x404023
sub esp, 0x5c
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jle 0x4040b6
push dword [ebp - 4]
call fcn.00404614
mov dword [ebp - 0x44], eax
cmp word [ebp - 0x44], 0x5a4d
jne 0x4040b6
xor eax, eax
jmp 0x4040bb
mov eax, 1
test eax, eax
je 0x4040cd
mov eax, 0
jmp 0x40460e
push 0x3c
push dword [ebp - 4]
call fcn.00404656
push eax
call fcn.00404630
mov word [ebp - 8], ax
mov eax, dword [ebp - 8]
cwde
push eax
push dword [ebp - 4]
call fcn.00404656
mov dword [ebp - 0xc], eax
push dword [ebp - 0xc]
call fcn.00404630
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0x4550
jne 0x404142
push 0x16
push dword [ebp - 0xc]
call fcn.00404656
push eax
call fcn.00404614
mov dword [ebp - 0x4c], eax
push 2
mov eax, dword [ebp - 0x4c]
cwde
push eax
call fcn.0040467d
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
je 0x404142
xor eax, eax
jmp 0x404147
mov eax, 1
test eax, eax
je 0x404159
mov eax, 0
jmp 0x40460e
call fcn.004046a4
mov dword [ebp - 0x10], eax
push 0xda89fc22
push dword [ebp - 0x10]
push 0
call fcn.004046f7
mov dword [ebp - 0x14], eax
push 0x700ed6df
push dword [ebp - 0x10]
push 0
call fcn.004046f7
mov dword [ebp - 0x18], eax
push 6
push dword [ebp - 0xc]
call fcn.00404656
push eax
call fcn.00404614
cwde
mov dword [ebp - 0x1c], eax
push 0x38
push dword [ebp - 0xc]
call fcn.00404656
push eax
call fcn.00404630
mov dword [ebp - 0x20], eax
push 1
push dword [ebp - 0x1c]
call fcn.004047e8
push eax
lea eax, [ebp - 0x1c]
mov ebx, eax
mov ecx, 0
pop edx
push edx
push ecx
push ebx
mov dword [ebx], ecx
cmp ecx, edx
jg 0x404313
mov eax, dword [ebp - 8]
cwde
push eax
push dword [ebp - 4]
call fcn.00404656
mov dword [ebp - 0x3c], eax
push pe_nt_image_headers32
push dword [ebp - 0x3c]
call fcn.00404656
mov dword [ebp - 0x40], eax
push 0x28
push dword [ebp - 0x1c]
call fcn.0040480f
push eax
push dword [ebp - 0x40]
call fcn.00404656
mov dword [ebp - 0x24], eax
push 8
push dword [ebp - 0x24]
call fcn.00404656
push eax
call fcn.00404630
mov dword [ebp - 0x40], eax
push 0xffff
push dword [ebp - 0x40]
call fcn.0040467d
mov dword [ebp - 0x28], eax
push 0x10
push dword [ebp - 0x24]
call fcn.00404656
push eax
call fcn.00404630
mov dword [ebp - 0x2c], eax
push 0xc
push dword [ebp - 0x24]
call fcn.00404656
push eax
call fcn.00404630
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], eax
mov eax, 0
setg al
test eax, eax
je 0x404287
mov eax, dword [ebp - 0x2c]
jmp 0x40428a
mov eax, dword [ebp - 0x28]
push eax
push dword [ebp - 0x40]
call fcn.00404656
mov dword [ebp - 0x2c], eax
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call fcn.00404656
mov dword [ebp - 0x3c], eax
push 1
push dword [ebp - 0x3c]
call fcn.004047e8
mov dword [ebp - 0x40], eax
push dword [ebp - 0x20]
push dword [ebp - 0x40]
call fcn.00404837
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
call fcn.0040480f
mov dword [ebp - 0x30], eax
push 0x50
push dword [ebp - 0xc]
call fcn.00404656
push eax
call fcn.00404630
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x30], eax
mov eax, 0
setg al
test eax, eax
je 0x404304
mov eax, dword [ebp - 0x30]
jmp 0x404307
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
pop ebx
pop ecx
pop edx
inc ecx
jmp 0x4041d1
add esp, 0xc
cmp dword [ebp - 0x34], 0
jne 0x40432a
mov eax, 0
jmp 0x40460e
push 0x40
push 0x3000
push dword [ebp - 0x34]
push 0
push 0xffffffff
push dword [ebp - 0x14]
call fcn.0040489f
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x404360
mov eax, 0
jmp 0x40460e
push 6
push dword [ebp - 0xc]
call fcn.00404656
push eax
call fcn.00404614
cwde
mov dword [ebp - 0x1c], eax
push pe_nt_image_headers32
mov eax, dword [ebp - 8]
cwde
push eax
call fcn.00404656
mov dword [ebp - 0x3c], eax
push 0x28
push dword [ebp - 0x1c]
call fcn.0040480f
push eax
push dword [ebp - 0x3c]
call fcn.00404656
push eax
push dword [ebp - 4]
push dword [ebp - 0x38]
call fcn.004048d2
push 1
push dword [ebp - 0x1c]
call fcn.004047e8
push eax
lea eax, [ebp - 0x1c]
mov ebx, eax
mov ecx, 0
pop edx
push edx
push ecx
push ebx
mov dword [ebx], ecx
cmp ecx, edx
jg 0x40449a
push pe_nt_image_headers32
mov eax, dword [ebp - 8]
cwde
push eax
call fcn.00404656
mov dword [ebp - 0x3c], eax
push 0x28
push dword [ebp - 0x1c]
call fcn.0040480f
push eax
push dword [ebp - 0x3c]
call fcn.00404656
push eax
push dword [ebp - 4]
call fcn.00404656
mov dword [ebp - 0x24], eax
push 0xc
push dword [ebp - 0x24]
call fcn.00404656
push eax
call fcn.00404630
mov dword [ebp - 0x2c], eax
push 0x10
push dword [ebp - 0x24]
call fcn.00404656
push eax
call fcn.00404630
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x2c], 0
je 0x40444c
cmp dword [ebp - 0x20], 0
jle 0x40444c
mov eax, 1
jmp 0x40444e
xor eax, eax
test eax, eax
je 0x404491
push dword [ebp - 0x2c]
push dword [ebp - 0x38]
call fcn.00404656
mov dword [ebp - 0x3c], eax
push 0x14
push dword [ebp - 0x24]
call fcn.00404656
push eax
call fcn.00404630
push eax
push dword [ebp - 4]
call fcn.00404656
mov dword [ebp - 0x48], eax
push dword [ebp - 0x20]
push dword [ebp - 0x48]
push dword [ebp - 0x3c]
call fcn.004048d2
pop ebx
pop ecx
pop edx
inc ecx
jmp 0x4043c4
add esp, 0xc
push 0xa4
push dword [ebp - 0xc]
call fcn.00404656
push eax
call fcn.00404630
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jle 0x4044c8
push dword [ebp - 0xc]
push dword [ebp - 0x38]
call fcn.0040491b
push 0x80
push dword [ebp - 0xc]
call fcn.00404656
push eax
call fcn.00404630
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jle 0x40450a
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp - 0x38]
call fcn.00404b77
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x40450a
mov eax, 1
jmp 0x40450c
xor eax, eax
test eax, eax
je 0x40453d
push 0
push 0x8000
push 0
push dword [ebp - 0x38]
push 0xffffffff
push dword [ebp - 0x18]
call fcn.0040489f
mov eax, 0
jmp 0x40460e
push 0x28
push dword [ebp - 0xc]
call fcn.00404656
push eax
call fcn.00404630
push eax
push dword [ebp - 0x38]
call fcn.00404656
mov dword [ebp - 0x2c], eax
push 0x16
push dword [ebp - 0xc]
call fcn.00404656
push eax
call fcn.00404614
mov dword [ebp - 0x40], eax
push 0x2000
mov eax, dword [ebp - 0x40]
cwde
push eax
call fcn.0040467d
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x404606
push 0
push 0
push 0
push 1
push 0
push dword [ebp - 0x2c]
call fcn.0040489f
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x404606
push 0
push 0
push 0
push 0
push 0
push dword [ebp - 0x2c]
call fcn.0040489f
push 0
push 0x8000
push 0
push dword [ebp - 0x38]
push 0xffffffff
push dword [ebp - 0x18]
call fcn.0040489f
mov eax, 0
jmp 0x40460e
mov eax, dword [ebp - 0x38]
jmp 0x40460e
mov esp, ebp
pop ebp
ret 4