Function at 0x5a7c88
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x50], 0xffffffff
je 0x5a7cc5
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
cmp edx, dword [ecx + 0x2c]
jne 0x5a7cb8
cmp eax, dword [ecx + 0x28]
jae 0x5a7cc5
jmp 0x5a7cba
jge 0x5a7cc5
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x50]
mov dword [ebp - 0xc], edx
jmp 0x5a7cdc
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
mov edx, dword [edx + 0x14]
add dword [ebp - 8], eax
adc dword [ebp - 4], edx
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x54], 0
je 0x5a7d88
xor eax, eax
mov dword [ebp - 0x24], eax
xor edx, edx
mov dword [ebp - 0x20], edx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x2c], ecx
cmp dword [ebp + 0x20], 0
je 0x5a7d2c
push 0
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x20]
lea edx, [ebp - 0x24]
push edx
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
push dword [ecx]
call dword [0x825cf4]
mov dword [ebp - 0x28], eax
jmp 0x5a7d51
push 0
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x1c]
lea edx, [ebp - 0x24]
push edx
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
push dword [ecx]
call dword [0x825cf0]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x5a7d67
mov eax, dword [ebp - 0x20]
xor edx, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
jmp 0x5a7e5b
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x18], 0xffffffff
push dword [ebp - 0x28]
call fcn.005a6a12
pop ecx
mov dword [0xd220e0], eax
jmp 0x5a7e5b
push 0
push 0
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [0x825d10]
test eax, eax
jne 0x5a7dbc
call sub.KERNEL32.DLL_GetLastError
push eax
call fcn.005a690c
pop ecx
mov dword [0xd220e0], eax
mov eax, 0xffffffff
mov edx, eax
jmp 0x5a7e61
cmp dword [ebp + 0x20], 0
je 0x5a7ddc
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x20]
push dword [ebp - 0xc]
call sub.KERNEL32.DLL_WriteFile
mov dword [ebp - 0x14], eax
jmp 0x5a7df4
push 0
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x1c]
push dword [ebp - 0xc]
call sub.KERNEL32.DLL_ReadFile
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
xor edx, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x14], 0
jne 0x5a7e1f
call sub.KERNEL32.DLL_GetLastError
push eax
call fcn.005a690c
pop ecx
mov dword [0xd220e0], eax
mov eax, 0xffffffff
mov edx, eax
jmp 0x5a7e61
cmp dword [ebp + 0x1c], 0
je 0x5a7e5b
cmp dword [ebp + 0x10], 0
jne 0x5a7e5b
cmp dword [ebp + 0xc], 0
jne 0x5a7e5b
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp - 0x34]
movsx edx, byte [eax + 0xb]
and edx, 0xff
mov ecx, dword [ebp - 0x34]
movsx eax, byte [ecx + 0xc]
and eax, 0xff
shl eax, 8
add edx, eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x38], edx
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov esp, ebp
pop ebp
ret