Function at 0x407b60
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x3b0
push esi
lea eax, [esp + 0x224]
push edi
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, dword [esp + 0x3bc]
mov word [esp + 0x14], 2
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edx, dword [esp + 0x3c0]
mov dword [esp + 0x18], eax
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov edi, 1
push 6
push edi
push 2
mov word [esp + 0x22], ax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x407be8
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.socket_Error_id_d_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
mov eax, 0xfffffffe
pop edi
pop esi
add esp, 0x3b0
ret
lea eax, [esp + 8]
mov dword [esp + 8], edi
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x407c2b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.error___d_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov eax, 0xfffffffe
pop esi
add esp, 0x3b0
ret
push ebx
push ebp
lea ecx, [esp + 0x1c]
push 0x10
push ecx
push esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], edi
call dword [sym.imp.WS2_32.dll_connect]
mov ecx, dword [0x4167a0]
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov dword [esp + 0x14], edx
mov eax, ecx
xor edx, edx
mov ecx, 0x3e8
div ecx
mov ebp, dword [sym.imp.WS2_32.dll_select]
lea eax, [esp + 0x2c]
mov ebx, 0xfffffffe
mov dword [esp + 0x18], edx
lea edx, [esp + 0x14]
push edx
push 0
push eax
push 0
push 0
call ebp
xor ecx, ecx
test eax, eax
setg cl
mov edi, ecx
test edi, edi
je 0x407d81
mov eax, dword [esp + 0x3d0]
or ebx, 0xffffffff
test eax, eax
jle 0x407cbd
mov edx, dword [esp + 0x3cc]
push 0
push eax
push edx
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x407d81
mov eax, dword [0x416dd8]
test eax, eax
je 0x407d81
cmp edi, 1
jne 0x407d81
lea eax, [esp + 0x14]
lea ecx, [esp + 0x2c]
push eax
push 0
push 0
push ecx
push 0
call ebp
test eax, eax
jle 0x407d7e
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x131]
mov byte [esp + 0x130], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
lea edx, [esp + 0x134]
push 0x100
push edx
push esi
stosb byte es:[edi], al
call dword [sym.imp.WS2_32.dll_recv]
push esi
mov edi, eax
call dword [sym.imp.WS2_32.dll_closesocket]
xor esi, esi
mov eax, dword [0x41665c]
test eax, eax
je 0x407d81
mov ecx, dword [0x416660]
sub ecx, eax
sar ecx, 2
cmp esi, ecx
jae 0x407d81
mov edx, dword [eax + esi*4]
lea eax, [esp + 0x130]
mov ecx, dword [edx + 0xa0]
add edx, 0x20
push ecx
push edi
push edx
push eax
call fcn.0040eaa0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jge 0x407d69
inc esi
jmp 0x407d29
mov ebx, esi
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, ebx
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x3b0
ret
or ebx, 0xffffffff
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, ebx
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x3b0
ret