Function at 0x4017a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
movzx edx, word [ecx]
cmp edx, 0x5a4d
je 0x4017d3
push 0xc1
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
jmp 0x4019ed
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
cmp dword [edx], 0x4550
je 0x4017fc
push 0xc1
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
jmp 0x4019ed
push 4
push 0x3000
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x50]
push ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x34]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40184e
push 4
push 0x3000
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x50]
push edx
push 0
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40184e
push 0xe
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
jmp 0x4019ed
nop
nop
nop
nop
nop
nop
nop
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 0x401896
push 0xe
call dword [sym.imp.KERNEL32.DLL_SetLastError]
nop
nop
nop
nop
nop
nop
nop
push 0x8000
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
xor eax, eax
jmp 0x4019ed
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov dword [ecx + 4], edx
mov eax, dword [ebp - 0x18]
mov dword [eax + 0xc], 0
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 8], 0
mov edx, dword [ebp - 0x18]
mov dword [edx + 0x10], 0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x14], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 0x10]
mov dword [edx + 0x18], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0x14]
mov dword [ecx + 0x1c], edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x20], ecx
push 4
push 0x1000
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.0072bac0
add esp, 0xc
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
add ecx, dword [eax + 0x3c]
mov edx, dword [ebp - 0x18]
mov dword [edx], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xc]
mov dword [ecx + 0x34], edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00401a00
add esp, 0xc
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x1c], ecx
je 0x401965
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.00401cd0
add esp, 8
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00401db0
add esp, 4
test eax, eax
jne 0x401977
jmp 0x4019df
mov edx, dword [ebp - 0x18]
push edx
call fcn.00401b00
add esp, 4
mov eax, dword [ebp - 0x18]
push eax
call fcn.00401c60
add esp, 4
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
cmp dword [edx + 0x28], 0
je 0x4019da
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x28]
mov dword [ebp - 0x14], edx
push 0
push 1
mov eax, dword [ebp - 0xc]
push eax
call dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4019d0
push 0x45a
call dword [sym.imp.KERNEL32.DLL_SetLastError]
jmp 0x4019df
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0x10], 1
mov eax, dword [ebp - 0x18]
jmp 0x4019ed
mov edx, dword [ebp - 0x18]
push edx
call fcn.00402110
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret