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

Disassembly:
sub esp, 0x2c
mov eax, dword [0x755898]
xor eax, esp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x30]
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
xor ebx, ebx
push ebx
lea edx, [esp + 0x14]
push edx
mov esi, ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x28], eax
mov ebp, 8
push ebp
lea eax, [esp + 0x34]
mov dword [esp + 0x30], ecx
mov ecx, dword [esi + 0x128]
push eax
push ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
call edi
test eax, eax
je 0x5a163c
cmp dword [esp + 0x10], ebp
jne 0x5a163c
add dword [esi + 0x70], ebp
mov edx, dword [esp + 0x28]
push edx
adc dword [esi + 0x74], ebx
call sub.WS2_32.dll_ntohl
cdq
mov ebp, eax
mov ebx, edx
cmp ebp, 1
jne 0x5a14d1
test ebx, ebx
jne 0x5a14d1
push edx
mov edx, dword [esi + 0x128]
lea eax, [esp + 0x14]
push eax
mov ebx, 8
push ebx
lea ecx, [esp + 0x3c]
push ecx
push edx
call edi
test eax, eax
je 0x5a163c
cmp dword [esp + 0x10], ebx
jne 0x5a163c
add dword [esi + 0x70], ebx
lea eax, [esp + 0x30]
push eax
adc dword [esi + 0x74], 0
mov ecx, esi
call fcn.005c6450
mov ebx, edx
mov ebp, eax
test ebx, ebx
jg 0x5a14c4
jl 0x5a163c
cmp ebp, 0x10
jb 0x5a163c
mov dword [esp + 0x14], 1
add ebp, 0xfffffff0
jmp 0x5a14fd
test ebp, ebp
jne 0x5a14e7
test ebx, ebx
jne 0x5a14e9
mov ebp, dword [esi + 0x68]
sub ebp, dword [esi + 0x70]
mov ebx, dword [esi + 0x6c]
sbb ebx, dword [esi + 0x74]
jmp 0x5a1500
test ebx, ebx
jg 0x5a14fa
jl 0x5a163c
cmp ebp, 8
jb 0x5a163c
add ebp, 0xfffffff8
adc ebx, 0xffffffff
mov ecx, dword [esi + 0x70]
mov eax, dword [esi + 0x74]
add ecx, ebp
adc eax, ebx
cmp eax, dword [esi + 0x6c]
jl 0x5a151e
jg 0x5a1648
cmp ecx, dword [esi + 0x68]
ja 0x5a1648
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x20]
push ecx
push 8
lea edx, [esp + 0x34]
push edx
push eax
call edi
test eax, eax
je 0x5a163c
cmp dword [esp + 0x1c], 8
jne 0x5a163c
cmp dword [esp + 0x14], 0
je 0x5a157b
mov eax, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x20]
push ecx
push 8
lea edx, [esp + 0x3c]
push edx
push eax
call edi
test eax, eax
je 0x5a163c
cmp dword [esp + 0x1c], 8
jne 0x5a163c
xor edx, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
jmp 0x5a158b
mov edx, dword [esp + 0x14]
mov ecx, ebp
sub ecx, edx
mov eax, ebx
sbb eax, dword [esp + 0x18]
xor edi, edi
cmp eax, edi
jg 0x5a15a9
jl 0x5a15a3
cmp ecx, dword [esp + 0x48]
jae 0x5a15a9
mov edi, ebp
sub edi, edx
jmp 0x5a15ad
mov edi, dword [esp + 0x48]
mov edx, dword [esp + 0x24]
mov eax, dword [esi + 0x128]
push 0
lea ecx, [esp + 0x14]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5a163c
mov eax, dword [esp + 0x10]
cmp eax, edi
jne 0x5a163c
mov edx, dword [esp + 0x24]
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
mov eax, dword [esp + 0x2c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a163c
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x10], eax
jne 0x5a163c
add dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
adc eax, 0
cmp eax, ebx
mov dword [esp + 0x18], eax
jl 0x5a1587
jg 0x5a161c
cmp dword [esp + 0x14], ebp
jb 0x5a1587
add dword [esi + 0x70], ebp
pop edi
mov eax, 1
adc dword [esi + 0x74], ebx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0061d2ff
add esp, 0x2c
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xa4], eax
mov ecx, dword [esp + 0x38]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0061d2ff
add esp, 0x2c
ret 0xc