Function at 0x1317a8d0
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Get file size
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb0
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
mov byte [esp + 0xc], 0
mov eax, 0x105
call fcn.13142e8c
mov dword [esp + 0x10], eax
push 0x105
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0xc]
push eax
call sub.kernel32.dll_GetModuleFileNameA_1
xor eax, eax
mov dword [esp + 0x44], eax
xor eax, eax
mov dword [esp + 0x40], eax
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov eax, dword [esp + 0x28]
push eax
call sub.kernel32.dll_CreateFileA_1
mov ebx, eax
push 0
push 0
push 0
push ebx
call sub.kernel32.dll_SetFilePointer_1
push 0
push ebx
call sub.kernel32.dll_GetFileSize_1
mov esi, eax
mov eax, esi
call fcn.13142e8c
mov dword [esp + 0x14], eax
push 0
lea eax, [esp + 0x24]
push eax
push esi
mov edi, dword [esp + 0x20]
push edi
push ebx
call sub.kernel32.dll_ReadFile_1
push ebx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x3c]
add eax, dword [esp + 0x14]
mov dword [esp + 0x24], eax
push 1
push 0x2000
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x50]
push eax
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov ebx, eax
mov dword [esp + 0x18], ebx
push 4
push 0x1000
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x54]
push eax
push ebx
call sub.kernel32.dll_VirtualAlloc_1
mov ebp, eax
mov dword [esp + 0x1c], ebp
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x54]
mov edx, ebp
mov eax, edi
call fcn.131430cc
mov eax, dword [esp + 0x24]
add eax, 0x18
mov edx, dword [esp + 0x24]
movzx edx, word [edx + 0x14]
add eax, edx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x24]
movzx esi, word [eax + 6]
dec esi
test esi, esi
jl 0x1317aa76
inc esi
xor edi, edi
lea eax, [edi + edi*4]
mov edx, dword [esp + 0x34]
mov eax, dword [edx + eax*8 + 8]
mov dword [esp + 0x38], eax
lea eax, [edi + edi*4]
mov edx, dword [esp + 0x34]
mov eax, dword [edx + eax*8 + 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
cmp eax, dword [esp + 0x3c]
jae 0x1317aa19
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x38], eax
push 4
push 0x1000
mov eax, dword [esp + 0x40]
push eax
lea eax, [edi + edi*4]
mov edx, dword [esp + 0x40]
mov eax, dword [edx + eax*8 + 0xc]
add eax, ebx
push eax
call sub.kernel32.dll_VirtualAlloc_1
mov ebp, eax
mov eax, ebp
xor ecx, ecx
mov edx, dword [esp + 0x38]
call fcn.13143964
lea eax, [edi + edi*4]
mov edx, dword [esp + 0x34]
mov eax, dword [edx + eax*8 + 0x14]
add eax, dword [esp + 0x14]
mov edx, ebp
mov ecx, dword [esp + 0x3c]
call fcn.131430cc
push 0x8000
push 0
push ebp
call sub.kernel32.dll_VirtualFree_1
inc edi
dec esi
jne 0x1317a9e9
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x78]
mov edx, ebx
add eax, edx
mov edi, dword [eax + 0x20]
add edi, edx
mov ebp, dword [eax + 0x1c]
add ebp, edx
mov esi, dword [eax + 0x18]
dec esi
test esi, esi
jl 0x1317aacd
inc esi
mov edx, dword [edi]
mov eax, ebx
add edx, eax
mov dword [esp + 0x2c], edx
mov edx, dword [ebp]
add edx, eax
mov dword [esp + 0x30], edx
mov eax, dword [esp + 8]
push eax
mov eax, dword [esp + 0x30]
push eax
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jne 0x1317aac4
mov eax, dword [esp + 0x30]
mov dword [esp + 0x40], eax
jmp 0x1317aacd
add edi, 4
add ebp, 4
dec esi
jne 0x1317aa94
mov eax, dword [esp + 0x10]
push eax
call sub.kernel32.dll_GetModuleHandleA_2
mov ebx, eax
mov eax, ebx
mov eax, dword [eax + 0x3c]
mov edx, ebx
add eax, edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x78]
add eax, edx
mov edi, dword [eax + 0x20]
add edi, edx
mov ebp, dword [eax + 0x1c]
add ebp, edx
mov esi, dword [eax + 0x18]
dec esi
test esi, esi
jl 0x1317ab3b
inc esi
mov edx, dword [edi]
mov eax, ebx
add edx, eax
mov dword [esp + 0x2c], edx
mov edx, dword [ebp]
add edx, eax
mov dword [esp + 0x30], edx
mov eax, dword [esp + 8]
push eax
mov eax, dword [esp + 0x30]
push eax
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jne 0x1317ab32
mov eax, dword [esp + 0x30]
mov dword [esp + 0x44], eax
jmp 0x1317ab3b
add edi, 4
add ebp, 4
dec esi
jne 0x1317ab02
cmp dword [esp + 0x40], 0
je 0x1317abaf
cmp dword [esp + 0x44], 0
je 0x1317abaf
mov eax, dword [esp + 0x44]
cmp byte [eax], 0
je 0x1317abaf
mov eax, dword [esp + 0x40]
cmp byte [eax], 0
je 0x1317abaf
mov eax, dword [esp + 0x44]
movzx eax, byte [eax]
mov edx, dword [esp + 0x40]
cmp al, byte [edx]
je 0x1317abaf
mov byte [esp + 0xc], 1
lea eax, [esp + 0x48]
push eax
push 0x40
mov eax, dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x50]
push eax
call sub.kernel32.dll_VirtualProtect
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
call fcn.13147844
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x50]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esp + 0x10]
call fcn.13142ea8
mov eax, dword [esp + 0x14]
call fcn.13142ea8
push 0x8000
push 0
mov eax, dword [esp + 0x20]
push eax
call sub.kernel32.dll_VirtualFree_1
push 0x8000
push 0
mov eax, dword [esp + 0x24]
push eax
call sub.kernel32.dll_VirtualFree_1
movzx eax, byte [esp + 0xc]
add esp, 0x50
pop ebp
pop edi
pop esi
pop ebx
ret