Function at 0x100057a0
Capabilities:
Enumerate pe sections
Get system information on windows
Parse pe header

Disassembly:
mov ecx, dword [esp + 0xc]
sub esp, 0x24
push ebp
xor ebp, ebp
cmp ecx, 0x40
jae 0x100057c0
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebp
add esp, 0x24
ret 0x1c
mov eax, dword [esp + 0x30]
cmp word [eax], 0x5a4d
je 0x100057df
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebp
add esp, 0x24
ret 0x1c
push edi
mov edi, dword [eax + 0x3c]
lea edx, [edi + 0xf8]
cmp ecx, edx
jae 0x100057ff
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop ebp
add esp, 0x24
ret 0x1c
add edi, eax
cmp dword [edi], 0x4550
je 0x1000581e
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop ebp
add esp, 0x24
ret 0x1c
cmp word [edi + 4], 0x14c
jne 0x10005809
push ebx
mov ebx, dword [edi + 0x38]
test bl, 1
je 0x10005845
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0x24
ret 0x1c
movzx eax, word [edi + 0x14]
lea ecx, [eax + edi + 0x18]
movzx eax, word [edi + 6]
test eax, eax
push esi
jbe 0x1000587b
add ecx, 0xc
mov esi, eax
jmp 0x10005860
mov edx, dword [ecx + 4]
test edx, edx
mov eax, dword [ecx]
jne 0x1000586d
add eax, ebx
jmp 0x1000586f
add eax, edx
cmp eax, ebp
jbe 0x10005875
mov ebp, eax
add ecx, 0x28
dec esi
jne 0x10005860
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [esp + 0x14]
mov edx, dword [edi + 0x50]
lea eax, [ecx - 1]
lea esi, [edx + ecx - 1]
not eax
lea ecx, [ecx + ebp - 1]
and esi, eax
and ecx, eax
cmp esi, ecx
je 0x100058b9
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0x24
ret 0x1c
mov edx, dword [edi + 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push esi
push edx
call ebx
mov ebp, eax
test ebp, ebp
jne 0x100058e4
push 4
push 0x3000
push esi
push eax
call ebx
mov ebp, eax
test ebp, ebp
je 0x10005908
push 0x34
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x1000591c
push 0x8000
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0x24
ret 0x1c
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
xor eax, eax
mov dword [esi + 4], ebp
mov ax, word [edi + 0x16]
mov dword [esi + 0x1c], ecx
mov ecx, dword [esp + 0x50]
mov dword [esi + 0x20], edx
mov dword [esi + 0x28], ecx
shr eax, 0xd
and eax, 1
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x4c]
mov dword [esi + 0x24], eax
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x40]
mov dword [esi + 0x30], edx
mov ecx, dword [edi + 0x54]
call fcn.100051c0
test eax, eax
je 0x10005a1a
mov eax, dword [edi + 0x54]
push 4
push 0x1000
push eax
push ebp
call ebx
mov edx, dword [edi + 0x54]
mov ecx, dword [esp + 0x3c]
mov ebx, eax
call fcn.10005130
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 0x3c]
mov edx, dword [esp + 0x40]
push esi
push edi
add ebx, ecx
push edx
mov dword [esi], ebx
push eax
mov dword [ebx + 0x34], ebp
call fcn.100051e0
test eax, eax
je 0x10005a1a
mov eax, dword [esi]
mov eax, dword [eax + 0x34]
sub eax, dword [edi + 0x34]
je 0x100059b7
push eax
mov eax, esi
call fcn.10005540
mov dword [esi + 0x18], eax
jmp 0x100059be
mov dword [esi + 0x18], 1
mov edi, esi
call fcn.100055e0
test eax, eax
je 0x10005a1a
mov ecx, dword [esp + 0x38]
push esi
push ecx
call fcn.100053a0
test eax, eax
je 0x10005a1a
mov eax, esi
call fcn.10005500
test eax, eax
je 0x10005a1a
mov edx, dword [esi]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x10005a4f
mov ecx, dword [esi + 0x14]
test ecx, ecx
je 0x10005a3e
mov ecx, dword [0x10088c48]
mov edx, dword [0x10088c44]
add ebp, eax
mov eax, dword [0x10088c4c]
push eax
push ecx
push edx
call ebp
test eax, eax
jne 0x10005a2b
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.10005bb0
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0x24
ret 0x1c
mov dword [esi + 0x10], 1
mov eax, esi
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x24
ret 0x1c
add eax, ebp
mov dword [esi + 0x2c], eax
mov eax, esi
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x24
ret 0x1c
mov dword [esi + 0x2c], 0
mov eax, esi
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x24
ret 0x1c