Function at 0x1004cc90
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
movzx edx, word [ecx]
cmp edx, 0x5a4d
je 0x1004ccb1
xor eax, eax
jmp 0x1004ce5d
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 0x1004cccf
xor eax, eax
jmp 0x1004ce5d
push 4
push 0x2000
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 0x1004cd0c
push 4
push 0x2000
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 0x1004cd19
xor eax, eax
jmp 0x1004ce5d
push 0x14
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x18]
mov dword [edx + 0xc], 0
mov eax, dword [ebp - 0x18]
mov dword [eax + 8], 0
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0x10], 0
push 4
push 0x1000
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x50]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
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 - 8]
mov eax, dword [edx + 0x3c]
mov ecx, dword [ebp - 0x20]
add eax, dword [ecx + 0x54]
push eax
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.1002fb50
add esp, 0xc
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
add edx, dword [ecx + 0x3c]
mov eax, dword [ebp - 0x18]
mov dword [eax], edx
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov eax, dword [ebp - 0xc]
mov dword [edx + 0x34], eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.1004cb90
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
sub edx, dword [ecx + 0x34]
mov dword [ebp - 0x1c], edx
je 0x1004cdef
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.1004c960
add esp, 8
mov edx, dword [ebp - 0x18]
push edx
call fcn.1004c720
add esp, 4
test eax, eax
jne 0x1004ce01
jmp 0x1004ce4f
mov eax, dword [ebp - 0x18]
push eax
call fcn.1004ca40
add esp, 4
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
cmp dword [edx + 0x28], 0
je 0x1004ce4a
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x28]
mov dword [ebp - 0x14], edx
jne 0x1004ce2a
jmp 0x1004ce4f
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 0x1004ce40
jmp 0x1004ce4f
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0x10], 1
mov eax, dword [ebp - 0x18]
jmp 0x1004ce5d
mov edx, dword [ebp - 0x18]
push edx
call fcn.1004c540
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret