Function at 0x5987d0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
jl 0x59894d
cmp dword [ebp - 8], 0x64
jge 0x59894d
mov edx, 0x18
shl edx, 0
add edx, 0x64a408
push edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 0x4030
shl eax, 0
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 8]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, dword [eax + 0x4020]
sub edx, dword [ecx + 0x4024]
jns 0x598849
mov eax, 0x18
shl eax, 0
add eax, 0x64a408
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x598aa7
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x4024]
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 0x1c]
mov edx, dword [ebp - 4]
mov dword [edx + 0x18], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, dword [eax + 0x4020]
sub edx, dword [ecx + 0x4024]
mov eax, dword [ebp - 4]
mov dword [eax + 0x14], edx
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x4028], 1
push 0
mov edx, dword [ebp - 4]
push edx
push 0
lea eax, [ebp - 0x10]
push eax
push 1
mov ecx, dword [ebp - 4]
add ecx, 0x14
push ecx
imul edx, dword [ebp - 8], 0x38
mov eax, dword [0x64a534]
mov ecx, dword [eax + edx + 4]
push ecx
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x598911
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x59890f
imul edx, dword [ebp - 8], 0x38
mov eax, dword [0x64a534]
lea ecx, [eax + edx + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x53b
push str.WSASend__d__failed_with_error__d__s
push 0
call fcn.0059bdc0
add esp, 0x14
mov edx, dword [ebp - 8]
push edx
call fcn.0059a510
add esp, 4
mov eax, 0x18
shl eax, 0
add eax, 0x64a408
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x598aa7
jmp 0x598926
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x8068]
add edx, 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x8068], edx
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x402c], 1
mov edx, 0x18
shl edx, 0
add edx, 0x64a408
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x598aa2
mov eax, dword [ebp - 8]
push eax
call fcn.005984f0
add esp, 4
mov dword [ebp - 0xc], eax
imul ecx, dword [ebp - 0xc], 0x18
add ecx, 0x64a408
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, 0x4030
shl edx, 0
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 8]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + 0x4020]
sub ecx, dword [eax + 0x4024]
jns 0x5989ab
imul edx, dword [ebp - 0xc], 0x18
add edx, 0x64a408
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x598aa7
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x4024]
mov edx, dword [ebp - 4]
lea eax, [edx + ecx + 0x1c]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x18], eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + 0x4020]
sub ecx, dword [eax + 0x4024]
mov edx, dword [ebp - 4]
mov dword [edx + 0x14], ecx
mov eax, dword [ebp - 4]
mov dword [eax + 0x4028], 1
push 0
mov ecx, dword [ebp - 4]
push ecx
push 0
lea edx, [ebp - 0x10]
push edx
push 1
mov eax, dword [ebp - 4]
add eax, 0x14
push eax
imul ecx, dword [ebp - 8], 0x4c
mov edx, dword [0x64a4ec]
mov eax, dword [edx + ecx + 4]
push eax
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x598a6f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x598a6d
imul ecx, dword [ebp - 8], 0x4c
mov edx, dword [0x64a4ec]
lea eax, [edx + ecx + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x561
push 0x5f0e44
push 0
call fcn.0059bdc0
add esp, 0x14
mov ecx, dword [ebp - 8]
push ecx
call fcn.0059a510
add esp, 4
imul edx, dword [ebp - 0xc], 0x18
add edx, 0x64a408
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x598aa7
jmp 0x598a84
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x8068]
add ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 0x8068], ecx
mov eax, dword [ebp - 4]
mov dword [eax + 0x402c], 1
imul ecx, dword [ebp - 0xc], 0x18
add ecx, 0x64a408
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov esp, ebp
pop ebp
ret