Function at 0x52faa8
Capabilities:
Enumerate pe sections
Get file size
Read file via mapping

Disassembly:
mov eax, 0x5aeeb2
call fcn.00591b5c
sub esp, 0xd4
push 0x180
call fcn.00565bb9
pop ecx
mov dword [ebp - 0x88], eax
and dword [ebp - 4], 0
cmp dword [ebp - 0x88], 0
je 0x52faec
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x88]
call fcn.0053092a
mov dword [ebp - 0xcc], eax
jmp 0x52faf3
and dword [ebp - 0xcc], 0
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0x84], eax
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x80], eax
lea ecx, [ebp - 0x74]
call fcn.004d00b6
mov dword [ebp - 4], 1
push dword [ebp + 8]
lea ecx, [ebp - 0x74]
call fcn.004d0448
push dword [ebp + 0xc]
lea eax, [ebp - 0x74]
push eax
call fcn.004d5a6a
pop ecx
pop ecx
mov ecx, dword [ebp - 0x80]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x80]
cmp dword [eax + 8], 0xffffffff
jne 0x52fba0
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x8c], eax
cmp dword [ebp - 0x8c], 0
je 0x52fb7b
push 1
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x8c]
call dword [eax]
mov dword [ebp - 0xd0], eax
jmp 0x52fb82
and dword [ebp - 0xd0], 0
and dword [ebp - 0x94], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x74]
call fcn.004d018e
mov eax, dword [ebp - 0x94]
jmp 0x52fedd
push 0
mov eax, dword [ebp - 0x80]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 0x80]
mov dword [ecx + 4], eax
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0x80]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ecx, dword [ebp - 0x80]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x80]
cmp dword [eax + 0xc], 0
jne 0x52fc63
cmp dword [ebp + 0xc], 0
je 0x52fc06
push str.Failed_to_create_file_mapping
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
je 0x52fc3e
push 1
mov eax, dword [ebp - 0x98]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x98]
call dword [eax]
mov dword [ebp - 0xd4], eax
jmp 0x52fc45
and dword [ebp - 0xd4], 0
and dword [ebp - 0xa0], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x74]
call fcn.004d018e
mov eax, dword [ebp - 0xa0]
jmp 0x52fedd
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x80]
push dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [ebp - 0x80]
mov dword [ecx + 0x10], eax
mov eax, dword [ebp - 0x80]
cmp dword [eax + 0x10], 0
jne 0x52fd10
cmp dword [ebp + 0xc], 0
je 0x52fcb3
push str.Failed_to_map_view_of_file
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0
je 0x52fceb
push 1
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xa4]
call dword [eax]
mov dword [ebp - 0xd8], eax
jmp 0x52fcf2
and dword [ebp - 0xd8], 0
and dword [ebp - 0xac], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x74]
call fcn.004d018e
mov eax, dword [ebp - 0xac]
jmp 0x52fedd
mov eax, dword [ebp - 0x80]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x78]
movzx eax, word [eax]
cmp eax, 0x5a4d
je 0x52fdb0
cmp dword [ebp + 0xc], 0
je 0x52fd53
push str.Failed_to_find_DOS_signature
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], 0
je 0x52fd8b
push 1
mov eax, dword [ebp - 0xb0]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xb0]
call dword [eax]
mov dword [ebp - 0xdc], eax
jmp 0x52fd92
and dword [ebp - 0xdc], 0
and dword [ebp - 0xb8], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x74]
call fcn.004d018e
mov eax, dword [ebp - 0xb8]
jmp 0x52fedd
push dword [ebp - 0x78]
mov ecx, dword [ebp - 0x80]
add ecx, 0x24
call fcn.005478a8
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x78]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x7c], ecx
push 4
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x52fe60
cmp dword [ebp + 0xc], 0
je 0x52fe06
push str.Failed_to_find_NT_header
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0xbc], eax
cmp dword [ebp - 0xbc], 0
je 0x52fe3e
push 1
mov eax, dword [ebp - 0xbc]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xbc]
call dword [eax]
mov dword [ebp - 0xe0], eax
jmp 0x52fe45
and dword [ebp - 0xe0], 0
and dword [ebp - 0xc4], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x74]
call fcn.004d018e
mov eax, dword [ebp - 0xc4]
jmp 0x52fedd
push dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x80]
add ecx, 0x68
call fcn.0054785e
mov eax, dword [ebp - 0x7c]
movzx eax, word [eax + 0x14]
mov ecx, dword [ebp - 0x7c]
lea eax, [ecx + eax + 0x18]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x7c]
movzx eax, word [eax + 6]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push dword [ebp - 0x14]
mov ecx, dword [ebp - 0x80]
add ecx, 0x164
call fcn.005477a1
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x78]
mov dword [eax + 0x14], ecx
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x7c]
mov dword [eax + 0x18], ecx
mov ecx, dword [ebp - 0x80]
call fcn.005308c3
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x80]
call fcn.0052f9f9
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0xc8], eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x74]
call fcn.004d018e
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret