Function at 0x40e250
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x10c], 0
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x104]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
movzx ecx, word [eax]
cmp ecx, 0x5a4d
je 0x40e294
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x10c], 1
xor al, al
jmp 0x40e4ad
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x104]
mov edx, dword [ebp - 8]
add ecx, dword [edx + 0x3c]
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x1c]
cmp dword [eax], 0x4550
je 0x40e2c5
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x10c], 2
xor al, al
jmp 0x40e4ad
push 4
push 0x2000
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x50]
push eax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40e302
push 4
push 0x2000
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x50]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40e31c
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x10c], 3
xor al, al
jmp 0x40e4ad
push 0x14
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x108], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x108]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x108]
mov dword [eax + 0xc], 0
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x108]
mov dword [edx + 8], 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x108]
mov dword [ecx + 0x10], 0
push 4
push 0x1000
mov edx, dword [ebp - 0x1c]
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 - 0x1c]
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 - 0x1c]
add eax, dword [ecx + 0x54]
push eax
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.0045bb90
add esp, 0xc
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
add edx, dword [ecx + 0x3c]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x108]
mov dword [ecx], edx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x108]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xc]
mov dword [ecx + 0x34], edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x104]
push edx
mov ecx, dword [ebp - 0x20]
call fcn.0040dcb0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x18], ecx
je 0x40e41a
mov edx, dword [ebp - 0x18]
push edx
mov ecx, dword [ebp - 0x20]
call fcn.0040df50
mov ecx, dword [ebp - 0x20]
call fcn.0040e040
test eax, eax
jne 0x40e42a
jmp 0x40e4a3
mov ecx, dword [ebp - 0x20]
call fcn.0040ddd0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x108]
mov edx, dword [ecx]
cmp dword [edx + 0x28], 0
je 0x40e49f
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x108]
mov edx, dword [ecx]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x28]
mov dword [ebp - 0x14], eax
jne 0x40e46a
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x10c], 4
jmp 0x40e4a3
push 0
push 1
mov edx, dword [ebp - 0xc]
push edx
call dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40e48f
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x10c], 5
jmp 0x40e4a3
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x108]
mov dword [edx + 0x10], 1
mov al, 1
jmp 0x40e4ad
mov ecx, dword [ebp - 0x20]
call fcn.0040e5e0
xor al, al
mov esp, ebp
pop ebp
ret