Function at 0x5d7a00
Capabilities:
Enumerate pe sections
Write file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov eax, 0x775d8c
test edi, edi
jne 0x5d7a19
mov eax, 0x775d84
mov esi, dword [esp + 0x20]
push esi
push 4
push 1
push eax
call fcn.00697336
add esp, 0x10
test edi, edi
mov edi, dword [esp + 0x1c]
jne 0x5d7a54
movzx eax, word [edi]
movzx ebx, ax
mov eax, ebx
and eax, 0xff
push esi
push eax
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
add esp, 0x10
movzx eax, word [edi + 2]
movzx ebx, ax
mov ecx, ebx
and ecx, 0xff
push esi
push ecx
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
movzx eax, word [edi + 4]
movzx ebx, ax
mov edx, ebx
and edx, 0xff
push esi
push edx
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
movzx eax, word [edi + 6]
movzx ebx, ax
mov eax, ebx
and eax, 0xff
push esi
push eax
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
call fcn.0069f599
movzx ecx, word [eax + 0x14]
shl cx, 4
add cx, word [eax + 0x10]
mov edx, 0x301
add cx, dx
mov edx, dword [eax]
shl cx, 5
add cx, word [eax + 0xc]
sar edx, 1
movzx ebp, cx
movzx ecx, word [eax + 8]
shl cx, 6
add cx, word [eax + 4]
push esi
shl cx, 5
add cx, dx
movzx eax, cx
movzx ebx, ax
mov eax, ebx
and eax, 0xff
push eax
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
movzx ebx, bp
add esp, 0x44
mov ecx, ebx
and ecx, 0xff
push esi
push ecx
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
mov ebx, dword [edi + 0x10]
mov edx, ebx
push esi
and edx, 0xff
push edx
call fcn.006a2aa7
mov eax, ebx
shr eax, 8
and eax, 0xff
push esi
push eax
call fcn.006a2aa7
mov ecx, ebx
shr ecx, 0x10
and ecx, 0xff
push esi
push ecx
call fcn.006a2aa7
push esi
shr ebx, 0x18
push ebx
call fcn.006a2aa7
mov ebx, dword [edi + 0x14]
mov edx, ebx
and edx, 0xff
push esi
push edx
call fcn.006a2aa7
mov eax, ebx
shr eax, 8
and eax, 0xff
push esi
push eax
call fcn.006a2aa7
mov ecx, ebx
add esp, 0x40
shr ecx, 0x10
and ecx, 0xff
push esi
push ecx
call fcn.006a2aa7
push esi
shr ebx, 0x18
push ebx
call fcn.006a2aa7
mov ebx, dword [edi + 0x18]
mov edx, ebx
and edx, 0xff
push esi
push edx
call fcn.006a2aa7
mov eax, ebx
shr eax, 8
and eax, 0xff
push esi
push eax
call fcn.006a2aa7
mov ecx, ebx
shr ecx, 0x10
and ecx, 0xff
push esi
push ecx
call fcn.006a2aa7
push esi
shr ebx, 0x18
push ebx
call fcn.006a2aa7
movzx eax, word [edi + 0x20]
movzx ebx, ax
mov edx, ebx
and edx, 0xff
push esi
push edx
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
movzx eax, word [edi + 0x28]
movzx ebx, ax
add esp, 0x40
mov eax, ebx
push esi
and eax, 0xff
push eax
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
mov ebp, dword [esp + 0x34]
add esp, 0x10
test ebp, ebp
jne 0x5d7d32
movzx eax, word [edi + 0x30]
movzx ebx, ax
mov ecx, ebx
and ecx, 0xff
push esi
push ecx
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
movzx eax, word [edi + 0x32]
movzx ebx, ax
mov edx, ebx
and edx, 0xff
push esi
push edx
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
movzx eax, word [edi + 0x34]
movzx ebx, ax
mov eax, ebx
and eax, 0xff
push esi
push eax
call fcn.006a2aa7
push esi
shr ebx, 8
push ebx
call fcn.006a2aa7
mov ebx, dword [edi + 0x38]
mov ecx, ebx
and ecx, 0xff
push esi
push ecx
call fcn.006a2aa7
mov edx, ebx
shr edx, 8
and edx, 0xff
push esi
push edx
call fcn.006a2aa7
mov eax, ebx
add esp, 0x40
shr eax, 0x10
and eax, 0xff
push esi
push eax
call fcn.006a2aa7
push esi
shr ebx, 0x18
push ebx
call fcn.006a2aa7
mov ebx, dword [edi + 0x3c]
mov ecx, ebx
and ecx, 0xff
push esi
push ecx
call fcn.006a2aa7
mov edx, ebx
shr edx, 8
and edx, 0xff
push esi
push edx
call fcn.006a2aa7
mov eax, ebx
shr eax, 0x10
and eax, 0xff
push esi
push eax
call fcn.006a2aa7
push esi
shr ebx, 0x18
push ebx
call fcn.006a2aa7
add esp, 0x30
movzx eax, word [edi + 0x20]
test ax, ax
je 0x5d7d4e
mov edx, dword [edi + 0x1c]
movzx ecx, ax
push esi
push ecx
push 1
push edx
call fcn.00697336
add esp, 0x10
movzx eax, word [edi + 0x28]
test ax, ax
je 0x5d7d6a
mov ecx, dword [edi + 0x24]
movzx eax, ax
push esi
push eax
push 1
push ecx
call fcn.00697336
add esp, 0x10
test ebp, ebp
jne 0x5d7d8a
movzx eax, word [edi + 0x30]
test ax, ax
je 0x5d7d8a
movzx edx, ax
mov eax, dword [edi + 0x2c]
push esi
push edx
push 1
push eax
call fcn.00697336
add esp, 0x10
push esi
call fcn.00698742
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
test eax, eax
je 0x5d7db9
call fcn.006a1a12
mov ecx, dword [eax]
mov edx, dword [esp + 0x18]
push ecx
push 6
push edx
call fcn.005d8100
add esp, 0xc
or eax, 0xffffffff
add esp, 8
ret
xor eax, eax
add esp, 8
ret