Function at 0x601950
Capabilities:
Read file on windows
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0xc], 0
mov esi, dword [edi + 0x28]
nop word [eax + eax]
mov ecx, dword [esi + 0xc]
cmp dword [edi], ecx
jne 0x601a14
mov eax, dword [esi + 0x2c]
or ebx, 0xffffffff
cmp byte [0x6ac61e], 0
mov eax, dword [eax + 0x1c]
jne 0x601bd9
imul ecx, eax, 0x2c
mov dword [esp + 0x10], ecx
mov eax, dword [ecx + 0x6af554]
dec eax
cmp eax, 5
ja case.default.0x6019a4
jmp dword [eax*4 + 0x601c48]
push 0
lea eax, [esp + 0x1c]
push eax
push dword [esi + 4]
push dword [esi]
push dword [ecx + 0x6af550]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x6019cd
mov ebx, dword [esp + 0x18]
jmp case.default.0x6019a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x6019f7
push 0
push dword [esi + 4]
push dword [esi]
push dword [ecx + 0x6af550]
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
cmp ebx, 0xffffffff
jne case.default.0x6019a4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
or ebx, ebx
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x6af55c], eax
test ebx, ebx
jle 0x601bd0
mov eax, dword [esi]
mov dword [edi], eax
mov ecx, dword [esi]
add ecx, ebx
mov dword [esi + 0xc], ecx
mov edx, dword [esi + 0x1c]
test edx, edx
jle 0x601a4a
sub ecx, dword [edi]
mov eax, edx
cmp edx, ecx
cmovge eax, ecx
sub edx, eax
mov dword [esi + 0x1c], edx
mov ecx, dword [edi]
add ecx, eax
cmp dword [esi + 0x18], 0
je 0x601bf6
mov dword [edi], ecx
cmp dword [esi + 0x1c], 0
jg case.0x601b72.3
mov dword [esi + 0x18], 0
mov edx, dword [esi + 0x20]
test edx, edx
jle 0x601a6e
mov eax, dword [esi + 0xc]
mov ecx, edx
sub eax, dword [edi]
cmp edx, eax
cmovge ecx, eax
sub edx, ecx
mov dword [esi + 0x20], edx
add dword [edi], ecx
cmp dword [esi + 0x20], 0
jg case.0x601b72.3
cmp dword [esi + 0x14], 0
jne 0x601c34
mov ebx, dword [edi]
mov edi, 8
mov eax, dword [esi + 0xc]
sub edi, dword [esp + 0xc]
sub eax, ebx
cmp edi, eax
cmovge edi, eax
lea eax, [esp + 0x20]
add eax, dword [esp + 0xc]
push edi
push ebx
push eax
call fcn.00609db0
mov edx, dword [esp + 0x18]
lea eax, [edi + ebx]
add edx, edi
add esp, 0xc
mov edi, dword [ebp + 8]
mov dword [esp + 0xc], edx
mov dword [edi], eax
cmp edx, 8
jb case.0x601b72.3
mov dword [esi + 0x14], 1
mov eax, dword [edi]
mov dword [edi + 8], eax
mov eax, dword [edi + 0x28]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
cmp al, 1
jne 0x601c0a
mov ebx, dword [esp + 0x24]
mov ecx, eax
mov eax, ebx
shrd ecx, eax, 0x10
mov eax, ebx
movzx edx, cl
mov ecx, dword [esp + 0x10]
shrd ecx, eax, 0x18
shl edx, 8
movzx eax, cl
add eax, edx
movzx ecx, bl
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
mov eax, ebx
shr eax, 8
shl ecx, 8
movzx eax, al
add ecx, eax
mov eax, ebx
mov dword [edx + 0x1c], ecx
mov ecx, dword [esp + 0x10]
shr eax, 0x10
shrd ecx, ebx, 8
movzx eax, al
mov dword [edx + 0x20], eax
cmp cl, 1
jne 0x601b47
mov ecx, dword [esp + 0x14]
mov edx, edi
call fcn.00601790
jmp 0x601b59
mov ebx, dword [esp + 0x14]
test ebx, ebx
jne 0x601b79
movzx ecx, cl
mov edx, edi
call fcn.006014e0
mov dword [esi + 0x14], 0
mov ecx, eax
mov dword [edi + 0x14], 0
cmp eax, 3
ja case.default.0x601b72
jmp dword [ecx*4 + 0x601c60]
mov eax, dword [edx + 0x2c]
cmp ebx, dword [eax]
je 0x601b9a
mov dword [esi + 0x14], 0
mov dword [edi + 0x14], 0
mov dword [esi + 0x18], 1
jmp case.0x601b72.3
movzx eax, cl
cmp eax, dword [edx + 0x10]
mov dword [esi + 0x14], 0
mov dword [edi + 0x14], 0
jne 0x601c03
cmp dword [esi + 0x1c], 0
jne case.0x601b72.3
mov eax, dword [edi]
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0x14], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
jne 0x601bd9
mov eax, 0xfffffffd
jmp 0x601bdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [edi + 0x1c], 0
jne 0x601c39
mov dword [edi + 0x1c], eax
mov dword [edi + 0x14], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 8], ecx
mov dword [edi + 4], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xfffffffd
jmp case.default.0x601b72
mov dword [esi + 0x14], 0
mov eax, 0xfffffffe
mov dword [edi + 0x14], 0
cmp dword [edi + 0x1c], 0
jne 0x601c39
mov dword [edi + 0x1c], eax
mov dword [edi + 0x14], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
mov dword [edi + 8], eax
mov dword [edi + 0x14], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret