Function at 0x4d22a0
Capabilities:
Parse pe header
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x5392a4]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 8], 0xffffffff
mov dword [ebp - 0xc], 1
push 0
call fcn.0048d0f0
add esp, 4
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
jne 0x4d22f3
jmp 0x4d24bc
mov dword [ebp - 0xc], 2
mov eax, dword [ebp - 0x22c]
push eax
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4d231c
jmp 0x4d24bc
mov dword [ebp - 0xc], 3
push 0x104
lea ecx, [ebp - 0x220]
push ecx
push 0
mov edx, dword [ebp - 0x10]
push edx
call sub.PSAPI.DLL_GetModuleFileNameExW
test eax, eax
jne 0x4d2343
jmp 0x4d24bc
mov dword [ebp - 0xc], 4
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x4d2377
jmp 0x4d24bc
mov dword [ebp - 0xc], 5
push 0
push 0
push 0
push 2
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4d23a1
cmp dword [ebp - 8], 0xffffffff
jne 0x4d23a6
jmp 0x4d24bc
mov dword [ebp - 0xc], 6
push 0
push 0
push 0
push 4
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jne 0x4d23d3
jmp 0x4d24bc
mov dword [ebp - 0xc], 7
mov eax, dword [ebp - 0x230]
mov dword [ebp - 0x224], eax
mov ecx, dword [ebp - 0x224]
movzx edx, word [ecx]
cmp edx, 0x5a4d
je 0x4d2407
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4d24bc
mov dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x224]
mov ecx, dword [ebp - 0x224]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x234], ecx
mov edx, dword [ebp - 0x234]
cmp dword [edx], 0x4550
je 0x4d243e
push 0xbf
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4d24bc
mov dword [ebp - 0xc], 9
mov eax, dword [ebp - 0x234]
movzx ecx, word [eax + 0x14]
test ecx, ecx
jne 0x4d2460
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4d24bc
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0x234]
mov eax, dword [edx + 0x58]
mov dword [ebp - 0x228], eax
push 0
push 0
push 0x18
push 0x34
mov ecx, dword [0x595ba0]
mov edx, dword [ecx]
mov ecx, dword [0x595ba0]
mov eax, dword [edx + 0x44]
call eax
mov dword [ebp - 0x23c], eax
mov ecx, dword [ebp - 0x228]
push ecx
mov edx, dword [ebp - 0x23c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x23c]
mov edx, dword [eax + 0x110]
call edx
xor eax, eax
jne 0x4d22d5
cmp dword [ebp - 0x10], 0xffffffff
je 0x4d24cc
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0xffffffff
je 0x4d24dc
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0xffffffff
je 0x4d24ec
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004489b2
mov esp, ebp
pop ebp
ret