Function at 0x408ac7
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
mov eax, dword [0x59de90]
xor eax, ebp
mov dword [ebp - 0x28], eax
push 0
call fcn.0040b550
pop ecx
push eax
call fcn.00525f68
pop ecx
call fcn.00525f7a
add eax, 0x24
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
and eax, 0x80000001
jns 0x408b03
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x408b10
mov eax, dword [ebp - 0x24]
add eax, 0x3a
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x80]
call fcn.00401b3b
push 0x5780c0
lea ecx, [ebp - 0x80]
call fcn.00401547
push 0x5d
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x5d
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x45
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x41
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x4d
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x49
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x39
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x35
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x4d
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x3d
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x4d
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x39
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x39
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x5d
lea ecx, [ebp - 0x80]
call fcn.00404a3d
push 0x45
lea ecx, [ebp - 0x80]
call fcn.00404a3d
lea ecx, [ebp - 0x80]
call fcn.00401c04
push eax
push 0x5780c4
call fcn.00525eab
pop ecx
pop ecx
push 8
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x24]
call fcn.0053e158
add esp, 0xc
push 0x32
lea ecx, [ebp - 0x80]
call fcn.00404a3d
lea ecx, [ebp - 0x80]
call fcn.00401c04
push eax
lea eax, [ebp - 0x64]
push eax
push 0x5780c8
call fcn.00525eab
add esp, 0xc
lea ecx, [ebp - 0x80]
call fcn.00401be7
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
cmp eax, 0x5a4d
je 0x408c32
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409119
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
cmp dword [eax], 0x4550
je 0x408c5b
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409119
push 4
push 0x3000
mov eax, dword [ebp - 0x20]
push dword [eax + 0x50]
mov eax, dword [ebp - 0x20]
push dword [eax + 0x34]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x408caa
push 4
push 0x3000
mov eax, dword [ebp - 0x20]
push dword [eax + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x408caa
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409119
push 0
call fcn.0040b550
pop ecx
push eax
call fcn.00525f68
pop ecx
call fcn.00525f7a
add eax, 0x24
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x84]
and eax, 0x80000001
jns 0x408cd9
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x408cec
mov eax, dword [ebp - 0x84]
add eax, 0x3a
mov dword [ebp - 0x84], eax
lea ecx, [ebp - 0xdc]
call fcn.00401b3b
push 0x5780d0
lea ecx, [ebp - 0xdc]
call fcn.00401547
push 0x5d
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x5d
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x45
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x41
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x4d
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x49
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x39
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x35
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x4d
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x3d
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x4d
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x39
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x39
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x5d
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
push 0x45
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
lea ecx, [ebp - 0xdc]
call fcn.00401c04
push eax
push 0x5780d4
call fcn.00525eab
pop ecx
pop ecx
push 8
lea eax, [ebp - 0xc0]
push eax
push dword [ebp - 0x84]
call fcn.0053e158
add esp, 0xc
push 0x32
lea ecx, [ebp - 0xdc]
call fcn.00404a3d
lea ecx, [ebp - 0xdc]
call fcn.00401c04
push eax
lea eax, [ebp - 0xc0]
push eax
push 0x5780d8
call fcn.00525eab
add esp, 0xc
lea ecx, [ebp - 0xdc]
call fcn.00401be7
push 0x24
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x408e6a
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x8000
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x409119
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 0x18]
and dword [eax + 0xc], 0
mov eax, dword [ebp - 0x18]
and dword [eax + 8], 0
mov eax, dword [ebp - 0x18]
and dword [eax + 0x10], 0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x14], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x18], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x1c], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x20], ecx
push 4
push 0x1000
mov eax, dword [ebp - 0x20]
push dword [eax + 0x54]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x20]
push dword [eax + 0x54]
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.0052b500
add esp, 0xc
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
add ecx, dword [eax + 0x3c]
mov eax, dword [ebp - 0x18]
mov dword [eax], ecx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x34], ecx
push dword [ebp - 0x18]
push dword [ebp - 0x20]
push dword [ebp + 8]
call fcn.00407ecd
add esp, 0xc
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x1c], ecx
je 0x408f1e
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
call fcn.00408474
pop ecx
pop ecx
push 0
call fcn.0040b550
pop ecx
push eax
call fcn.00525f68
pop ecx
call fcn.00525f7a
add eax, 0x24
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp - 0xe0]
and eax, 0x80000001
jns 0x408f4d
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x408f60
mov eax, dword [ebp - 0xe0]
add eax, 0x3a
mov dword [ebp - 0xe0], eax
lea ecx, [ebp - 0x138]
call fcn.00401b3b
push 0x5780e0
lea ecx, [ebp - 0x138]
call fcn.00401547
push 0x5d
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x5d
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x45
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x41
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x4d
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x49
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x39
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x35
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x4d
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x3d
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x4d
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x39
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x39
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x5d
lea ecx, [ebp - 0x138]
call fcn.00404a3d
push 0x45
lea ecx, [ebp - 0x138]
call fcn.00404a3d
lea ecx, [ebp - 0x138]
call fcn.00401c04
push eax
push 0x5780e4
call fcn.00525eab
pop ecx
pop ecx
push 8
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0xe0]
call fcn.0053e158
add esp, 0xc
push 0x32
lea ecx, [ebp - 0x138]
call fcn.00404a3d
lea ecx, [ebp - 0x138]
call fcn.00401c04
push eax
lea eax, [ebp - 0x11c]
push eax
push 0x5780e8
call fcn.00525eab
add esp, 0xc
lea ecx, [ebp - 0x138]
call fcn.00401be7
push dword [ebp - 0x18]
call fcn.00408542
pop ecx
test eax, eax
jne 0x4090b4
jmp 0x40910e
push dword [ebp - 0x18]
call fcn.00408126
pop ecx
push dword [ebp - 0x18]
call fcn.00408415
pop ecx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
cmp dword [eax + 0x28], 0
je 0x409109
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x28]
mov dword [ebp - 0x14], ecx
push 0
push 1
push dword [ebp - 0xc]
call dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4090ff
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40910e
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x10], 1
mov eax, dword [ebp - 0x18]
jmp 0x409119
push dword [ebp - 0x18]
call fcn.00409125
pop ecx
xor eax, eax
mov ecx, dword [ebp - 0x28]
xor ecx, ebp
call fcn.00524b49
leave
ret