Function at 0x10080770
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x101120a8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
mov dword [ebp - 0x24], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
cmp dword [eax + 0x34], 0
mov esi, dword [ebp + 8]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], ebx
jbe 0x10080989
push edi
mov ecx, dword [ebx]
test ecx, ecx
je 0x100807b7
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [ebx], 0
lea eax, [ebp - 0x18]
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0x10]
movlpd qword [ebp - 0x18], xmm0
push eax
xor edi, edi
push esi
mov dword [ebp - 0x10], edi
call fcn.10083610
add esp, 0xc
test al, al
jne 0x100807de
or edi, 0xffffffff
jmp 0x10080848
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x10080842
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x1388
push eax
push 0x1005
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [ebp - 8]
push eax
push 0x1006
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp - 0x28]
push 0x10
add eax, 4
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10080870
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or edi, 0xffffffff
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x24], eax
cmp eax, dword [ecx + 0x34]
jb 0x100807a5
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008bffe
mov esp, ebp
pop ebp
ret 8
xor ebx, ebx
push ebx
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push esi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x10080889
or edi, 0xffffffff
jmp 0x10080905
push 0
push 4
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], ebx
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [ebp - 0xc]
mov edx, eax
lea eax, [ecx - 1]
cmp eax, 0xfffffff
ja 0x100808d7
push ecx
call fcn.1008bff2
push dword [ebp - 0xc]
mov ebx, eax
push 0
push ebx
call fcn.1008da10
add esp, 0x10
push 0
push dword [ebp - 0xc]
push ebx
push esi
call dword [sym.imp.WS2_32.dll_recv]
mov edx, eax
test edx, edx
mov ecx, edx
cmovle ecx, dword [ebp - 0xc]
test ecx, ecx
jg 0x100808e2
mov edi, 0xfffffffe
jmp 0x10080905
mov eax, edx
cdq
push edx
push eax
push ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
call fcn.100830c0
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
test eax, eax
mov dword [ecx], eax
mov eax, 0xfffffffd
cmove edi, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x1008091e
push 1
push eax
call fcn.1008bfe4
add esp, 8
mov dword [ebp - 0x10], 0
test ebx, ebx
je 0x1008092d
push 1
push ebx
call fcn.1008bfe4
add esp, 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ebx, dword [ebp - 0x1c]
test edi, edi
jne 0x10080845
push edi
push 0x10112ad8
push 0x10112ac0
push edi
push dword [ebx]
call fcn.1008dfe4
add esp, 0x14
test eax, eax
je 0x1008096a
mov eax, dword [eax + 0x5c]
cmp eax, 0x7d0
jge 0x1008096a
cmp eax, 0x3e8
jge 0x10080974
mov edi, 0xfffffc17
jmp 0x10080845
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008bffe
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
xor ecx, ebp
pop ebx
call fcn.1008bffe
mov esp, ebp
pop ebp
ret 8