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

Disassembly:
sub esp, 0x38
mov eax, dword [0x70a308]
xor eax, esp
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x48]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
push edi
mov esi, ecx
mov ecx, dword [esp + 0x50]
xor edi, edi
push edi
mov dword [esp + 0x34], eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x1c], ecx
mov ebx, 8
push ebx
lea ecx, [esp + 0x40]
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 0x108]
push ecx
push edx
mov dword [esp + 0x24], edi
call ebp
test eax, eax
je 0x58ade9
cmp dword [esp + 0x10], ebx
jne 0x58ade9
add dword [esi + 0x70], ebx
mov eax, dword [esp + 0x34]
push eax
adc dword [esi + 0x74], edi
call sub.WS2_32.dll_ntohl
cdq
mov edi, eax
mov ebx, edx
cmp edi, 1
jne 0x58ac83
test ebx, ebx
jne 0x58ac83
mov eax, dword [esi + 0x108]
push edx
lea ecx, [esp + 0x14]
push ecx
mov edi, 8
push edi
lea edx, [esp + 0x48]
push edx
push eax
call ebp
test eax, eax
je 0x58ade9
cmp dword [esp + 0x10], edi
jne 0x58ade9
add dword [esi + 0x70], edi
lea ecx, [esp + 0x3c]
push ecx
adc dword [esi + 0x74], ebx
mov ecx, esi
call fcn.00588c30
mov edi, eax
test edx, edx
jg 0x58ac75
jl 0x58ade9
cmp edi, 0x10
jb 0x58ade9
add edi, 0xfffffff0
adc edx, 0xffffffff
mov dword [esp + 0x28], edx
mov ebx, edx
jmp 0x58acbc
test edi, edi
jne 0x58ac9f
test ebx, ebx
jne 0x58aca1
mov edi, dword [esi + 0x68]
sub edi, dword [esi + 0x70]
mov eax, dword [esi + 0x6c]
sbb eax, dword [esi + 0x74]
mov dword [esp + 0x28], eax
mov ebx, eax
jmp 0x58acbc
test ebx, ebx
jg 0x58acb2
jl 0x58ade9
cmp edi, 8
jb 0x58ade9
add edi, 0xfffffff8
adc ebx, 0xffffffff
mov dword [esp + 0x28], ebx
mov eax, dword [esp + 0x38]
cmp eax, 0x666f6f6d
jne 0x58ad29
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x108]
push 0
lea edx, [esp + 0x14]
push edx
push edi
push eax
push ecx
call ebp
test eax, eax
je 0x58ade9
mov eax, dword [esp + 0x10]
cmp eax, edi
jne 0x58ade9
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
push edx
mov edx, dword [esp + 0x18]
push ecx
push eax
push edx
mov ecx, esi
call fcn.0058a040
add dword [esi + 0x70], edi
pop edi
mov eax, 1
adc dword [esi + 0x74], ebx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005f85e7
add esp, 0x38
ret 0x10
cmp eax, 0x78646973
jne 0x58ad92
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x108]
push 0
lea eax, [esp + 0x14]
push eax
push edi
push ecx
push edx
call ebp
test eax, eax
je 0x58ade9
mov eax, dword [esp + 0x10]
cmp eax, edi
jne 0x58ade9
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
push edx
mov edx, dword [esp + 0x18]
push ecx
push eax
push edx
mov ecx, esi
call fcn.00588f10
add dword [esi + 0x70], edi
pop edi
mov eax, 1
adc dword [esi + 0x74], ebx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005f85e7
add esp, 0x38
ret 0x10
cmp eax, 0x7461646d
jne 0x58aeaa
xor ebp, ebp
cmp dword [esi + 0x90], ebp
je 0x58ae00
cmp dword [esi + 0x64], ebp
jne 0x58ae00
push ebp
mov eax, dword [esi + 0x70]
mov ecx, dword [esi + 0x74]
add eax, edi
lea edx, [esp + 0x20]
push edx
push eax
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x108]
adc ecx, ebx
push eax
mov dword [esp + 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x58afb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x58afb8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005f85e7
add esp, 0x38
ret 0x10
mov dword [esp + 0x1c], ebp
mov ecx, edi
sub ecx, ebp
mov eax, ebx
sbb eax, dword [esp + 0x1c]
xor edx, edx
cmp eax, edx
jg 0x58ae22
jl 0x58ae1c
cmp ecx, dword [esp + 0x54]
jae 0x58ae22
mov ebx, edi
sub ebx, ebp
jmp 0x58ae26
mov ebx, dword [esp + 0x54]
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 0x108]
push 0
lea ecx, [esp + 0x14]
push ecx
push ebx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x58ade9
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x58ade9
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x30]
push ecx
push eax
mov eax, dword [esp + 0x3c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x58ade9
mov ecx, dword [esp + 0x2c]
cmp dword [esp + 0x10], ecx
jne 0x58ade9
mov edx, dword [esp + 0x20]
xor eax, eax
add dword [edx], ecx
adc dword [edx + 4], eax
add ebp, ecx
mov ecx, dword [esp + 0x1c]
adc ecx, eax
cmp ecx, dword [esp + 0x28]
mov dword [esp + 0x1c], ecx
jg 0x58afb4
jl 0x58aea1
cmp ebp, edi
jae 0x58afb4
mov ebx, dword [esp + 0x28]
jmp 0x58ae04
push 0
cmp eax, 0x766f6f6d
jne 0x58adad
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0x108]
lea ecx, [esp + 0x14]
push ecx
push edi
push edx
push eax
call ebp
test eax, eax
je 0x58ade9
mov ecx, dword [esp + 0x10]
cmp ecx, edi
jne 0x58ade9
test ecx, ecx
je 0x58ade9
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x58aefb
push eax
call fcn.005cfa9b
mov ecx, dword [esp + 0x14]
add esp, 4
push ecx
call fcn.005cfaa6
add esp, 4
mov dword [esi + 0x1c], eax
test eax, eax
je 0x58ade9
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
push ecx
push ebp
push eax
call fcn.005fa190
mov edx, dword [esp + 0x1c]
add esp, 0xc
cmp dword [esi + 0x90], 0
mov dword [esi + 0x20], edx
mov ecx, esi
je 0x58af8f
call fcn.0058aa20
cmp dword [esi + 0x98], 0
je 0x58ade9
mov eax, dword [esp + 0x10]
push eax
call fcn.005cfaa6
mov ecx, dword [esi + 0x98]
mov dword [ecx + 0x1c], eax
mov edx, dword [esi + 0x98]
mov eax, dword [edx + 0x1c]
add esp, 4
test eax, eax
je 0x58ade9
mov ecx, dword [esp + 0x10]
push ecx
push ebp
push eax
call fcn.005fa190
mov edx, dword [esi + 0x98]
mov eax, dword [esp + 0x1c]
mov dword [edx + 0x20], eax
mov ecx, dword [esi + 0x98]
add esp, 0xc
call fcn.0058aa20
add dword [esi + 0x70], edi
pop edi
mov eax, 1
adc dword [esi + 0x74], ebx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005f85e7
add esp, 0x38
ret 0x10
mov ebx, dword [esp + 0x28]
add dword [esi + 0x70], edi
mov ecx, dword [esp + 0x44]
pop edi
adc dword [esi + 0x74], ebx
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.005f85e7
add esp, 0x38
ret 0x10