Function at 0x401b20
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
movzx edx, word [ecx]
cmp edx, 0x5a4d
je 0x401b4c
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x401dbf
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
cmp dword [edx], 0x4550
je 0x401b75
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x401dbf
lea eax, [ebp - 8]
push eax
push 4
push 0x400
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401b95
xor eax, eax
jmp 0x401dbf
lea edx, [ebp - 4]
push edx
push 0x40
push 0x44b4
mov eax, dword [ebp + 0xc]
add eax, 0x1000
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401bba
xor eax, eax
jmp 0x401dbf
lea ecx, [ebp - 0x38]
push ecx
push 4
push 0x4ec
mov edx, dword [ebp + 0xc]
add edx, 0x6000
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401be0
xor eax, eax
jmp 0x401dbf
lea eax, [ebp - 0x20]
push eax
push 4
push 0x20
mov ecx, dword [ebp + 0xc]
add ecx, 0x7000
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401c03
xor eax, eax
jmp 0x401dbf
lea edx, [ebp - 0x1c]
push edx
push 4
push 0x1c0
mov eax, dword [ebp + 0xc]
add eax, 0x8000
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401c28
xor eax, eax
jmp 0x401dbf
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 8]
mov dword [edx + 0x34], eax
lea eax, [ebp - 0x28]
call fcn.00401a20
test eax, eax
jne 0x401c5c
xor eax, eax
jmp 0x401dbf
mov ecx, dword [ebp + 8]
sub ecx, 0x400000
mov dword [ebp - 0x2c], ecx
je 0x401c79
mov edx, dword [ebp - 0x2c]
push edx
lea eax, [ebp - 0x28]
call fcn.004019a0
add esp, 4
mov eax, dword [ebp + 0xc]
add eax, 0x1e0
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov dword [ecx + 0xc], 0x1000
mov edx, dword [ebp - 0x34]
mov dword [edx + 0x10], 0x44b4
mov eax, dword [ebp - 0x34]
add eax, 0x28
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov dword [ecx + 0xc], 0x6000
mov edx, dword [ebp - 0x34]
mov dword [edx + 0x10], 0x4ec
mov eax, dword [ebp - 0x34]
add eax, 0x28
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov dword [ecx + 0xc], 0x7000
mov edx, dword [ebp - 0x34]
mov dword [edx + 0x10], 0x20
mov eax, dword [ebp - 0x34]
add eax, 0x28
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov dword [ecx + 0xc], 0x8000
mov edx, dword [ebp - 0x34]
mov dword [edx + 0x10], 0x1c0
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 0x400
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401d11
xor eax, eax
jmp 0x401dbf
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 4]
push ecx
push 0x44b4
mov edx, dword [ebp + 0xc]
add edx, 0x1000
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401d39
xor eax, eax
jmp 0x401dbf
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
push 0x4ec
mov edx, dword [ebp + 0xc]
add edx, 0x6000
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401d5e
xor eax, eax
jmp 0x401dbf
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
push 0x20
mov edx, dword [ebp + 0xc]
add edx, 0x7000
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401d80
xor eax, eax
jmp 0x401dbf
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
push 0x1c0
mov edx, dword [ebp + 0xc]
add edx, 0x8000
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401da5
xor eax, eax
jmp 0x401dbf
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x28], 0
je 0x401dbd
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x28]
mov dword [ebp - 0x10], edx
jmp dword [ebp - 0x10]
xor eax, eax
mov esp, ebp
pop ebp
ret