Function at 0x4018c0
Capabilities:
Enumerate pe sections
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ecx
push edx
push esi
push edi
push ebx
push 0x401b0e
call fcn.00401c30
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
test dword [esi + 0x14], 1
je 0x4018f4
mov eax, 0x80000000
test dword [esi + 0x14], 2
je 0x401902
or eax, 0x40000000
push 0
push 0x80
push 3
push 0
push 1
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 4], eax
inc eax
je 0x401b0e
dec eax
test dword [esi + 0x14], 4
je 0x401aad
push eax
push edx
push ecx
push 0
push 0
push 0x3c
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop ecx
pop edx
pop eax
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 8]
lea edi, [edi + 0x54]
push eax
push edx
push ecx
push 0
push 0
push edi
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop ecx
pop edx
pop eax
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 8]
and edi, 0xffff
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x1c], eax
push eax
push edx
push ecx
push 0
push 0
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop ecx
pop edx
pop eax
push 0
lea eax, [ebp - 4]
push eax
push edi
push dword [ebp - 0x1c]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1c]
call fcn.00401d00
test eax, eax
je 0x401b0e
mov edi, dword [ebp - 0x1c]
add edi, dword [edi + 0x3c]
push dword [edi + 0x50]
pop dword [esi + 0x10]
push 4
push 0x3000
push dword [esi + 0x10]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esi + 0xc], eax
push esi
mov ecx, dword [ebp - 8]
and ecx, 0xffff
mov edi, dword [esi + 0xc]
mov esi, dword [ebp - 0x1c]
rep movsb byte es:[edi], byte [esi]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
mov dword [ebp - 0x1c], eax
pop esi
mov edi, dword [esi + 0xc]
add edi, dword [edi + 0x3c]
push 0x3c
push dword [esi + 0xc]
call fcn.00401760
mov dword [ebp - 0x10], eax
push 0x401
push dword [esi + 0xc]
call fcn.00401760
mov dword [ebp - 0x20], eax
push dword [edi + 0x38]
pop dword [ebp - 0x14]
movzx eax, word [edi + 0x14]
movzx ecx, word [edi + 6]
lea edi, [eax + edi + 0x18]
mov dword [ebp - 0x18], ecx
dec dword [ebp - 0x18]
push dword [ebp - 0x20]
push dword [edi + 0x14]
call fcn.00401cb0
mov edx, eax
push dword [ebp - 0x14]
push dword [edi + 0xc]
call fcn.00401c90
mov ecx, eax
add ecx, dword [esi + 0xc]
push dword [ebp - 0x10]
push dword [edi + 0x10]
call fcn.00401c90
mov ebx, eax
push eax
push edx
push ecx
push 0
push 0
push edx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop ecx
pop edx
pop eax
push 0
lea eax, [ebp - 4]
push eax
push ebx
push ecx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
add edi, 0x28
cmp dword [ebp - 0x18], 0
ja 0x401a50
jmp 0x401afa
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x10], eax
push 4
push 0x3000
push dword [esi + 0x10]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esi + 0xc], eax
push eax
push edx
push ecx
push 0
push 0
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop ecx
pop edx
pop eax
push 0
lea eax, [ebp - 4]
push eax
push dword [esi + 0x10]
push dword [esi + 0xc]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
call fcn.00401c4d
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0xc]
pop ebx
pop edi
pop esi
pop edx
pop ecx
leave
ret 4
cmp dword [ebp - 0x1c], 0
je 0x401b1d
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call fcn.00401b33
call fcn.00401c4d
xor eax, eax
pop ebx
pop edi
pop esi
pop edx
pop ecx
leave
ret 4