Function at 0x451dec
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeb4
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 4], eax
xor ecx, ecx
push ebp
push 0x452004
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov edx, dword [ebx]
lea eax, [ebp - 0x54]
mov ecx, 0x40
call fcn.00406da4
cmp word [ebp - 0x54], 0x5a4d
je 0x451e37
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x452024
mov edx, dword [ebx]
add edx, dword [ebp - 0x18]
lea eax, [ebp - 0x14c]
mov ecx, 0xf8
call fcn.00406da4
cmp dword [ebp - 0x14c], 0x4550
je 0x451e65
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x452024
push 4
push 0x2000
mov eax, dword [ebp - 0xfc]
push eax
mov eax, dword [ebp - 0x118]
push eax
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x451eb5
cmp byte [ebp + 0x1c], 0
je 0x451ea8
push 4
push 0x2000
mov eax, dword [ebp - 0xfc]
push eax
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 0xc], eax
jmp 0x451eb5
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x452024
cmp dword [ebp - 0xc], 0
jne 0x451ec8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x452024
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp - 0xfc]
mov dword [eax], edx
push 0x11
push 0
call sub.kernel32.dll_GetProcessHeap
push eax
call sub.kernel32.dll_HeapAlloc
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov dword [eax + 4], edx
mov eax, dword [ebp - 8]
xor edx, edx
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 8]
xor edx, edx
mov dword [eax + 8], edx
mov eax, dword [ebp - 8]
mov byte [eax + 0x10], 0
push 4
push 0x1000
mov eax, dword [ebp - 0xfc]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 0x10], eax
push 4
push 0x1000
mov eax, dword [ebp - 0xf8]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0xf8]
mov edx, dword [ebx]
mov eax, dword [ebp - 0x10]
call fcn.00406da4
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x18]
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov edx, dword [ebp - 0xc]
mov dword [eax + 0x34], edx
mov eax, dword [ebp - 8]
push eax
lea eax, [ebp - 0x14c]
push eax
mov eax, dword [ebx]
push eax
call fcn.00451940
mov edx, dword [ebp - 0x118]
mov eax, dword [ebp - 0xc]
cmp edx, eax
ja 0x451f89
sub eax, edx
jmp 0x451f93
or ecx, 0xffffffff
sub ecx, edx
add ecx, eax
inc ecx
mov eax, ecx
test eax, eax
je 0x451fa1
push eax
mov eax, dword [ebp - 8]
push eax
call fcn.00451a04
mov eax, dword [ebp - 8]
push eax
call fcn.00451b1c
test al, al
jne 0x451fb3
call fcn.0040ba00
mov eax, dword [ebp - 8]
push eax
call fcn.00451d24
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x451ffa
mov edx, eax
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x14], edx
test edx, edx
jne 0x451fd9
call fcn.0040ba00
push 0
push 1
mov eax, dword [ebp - 0xc]
push eax
call dword [ebp - 0x14]
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x451ff3
call fcn.0040ba00
mov eax, dword [ebp - 8]
mov byte [eax + 0x10], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x45201e
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18