Function at 0x6cb12f40
Capabilities:
Connect socket
Get socket status
Initialize winsock library
Resolve dns
Set socket configuration
Terminate process
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x31c
mov ecx, dword [0x6cb22040]
mov dword [esp + 0x34], 1
mov ebx, dword [esp + 0x334]
mov dword [esp + 0x38], 0x20000
mov dword [esp + 0x40], 1
test ecx, ecx
je 0x6cb13270
mov edx, dword [esp + 0x330]
test edx, edx
je 0x6cb13370
xor edx, edx
xor eax, eax
mov dword [esp + eax + 0x5c], edx
add eax, 4
cmp eax, 0x20
jb 0x6cb12f8a
movzx eax, bx
lea ebx, [esp + 0x54]
mov dword [esp + 4], 0x6cb1b1dc
mov dword [esp + 8], eax
mov dword [esp], ebx
mov dword [esp + 0x64], 1
mov dword [esp + 0x68], 6
mov dword [esp + 0x2c], eax
call sym._sprintf
lea eax, [esp + 0x3c]
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
lea eax, [esp + 0x5c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x330]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
sub esp, 0x10
test eax, eax
jne 0x6cb13333
mov ebp, dword [esp + 0x3c]
test ebp, ebp
je 0x6cb1324c
mov esi, dword [sym.imp.WS2_32.dll_socket]
jmp 0x6cb13027
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_closesocket]
sub esp, 4
mov ebp, dword [ebp + 0x1c]
test ebp, ebp
je 0x6cb13248
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp + 4]
mov dword [esp], eax
call esi
sub esp, 0xc
mov edi, eax
mov ebx, eax
cmp eax, 0xffffffff
je 0x6cb1301c
lea eax, [esp + 0x34]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 4
mov dword [esp + 4], 0xffff
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
cmp eax, 0xffffffff
je 0x6cb13220
lea eax, [esp + 0x40]
mov dword [esp + 4], 0x8004667e
mov dword [esp + 8], eax
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp + 0x10]
sub esp, 0xc
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x18]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x6cb13168
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x6cb13010
lea eax, [esp + 0x4c]
mov dword [esp + 0x80], edi
mov dword [esp + 0x10], eax
lea eax, [esp + 0x7c]
mov dword [esp + 8], eax
lea eax, [edi + 1]
mov dword [esp + 0x7c], 1
mov dword [esp + 0x4c], 5
mov dword [esp + 0x50], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
cmp eax, 1
jne 0x6cb13010
lea eax, [esp + 0x48]
mov dword [esp + 0x48], 4
mov dword [esp + 0x10], eax
lea eax, [esp + 0x44]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1007
mov dword [esp + 4], 0xffff
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_getsockopt]
sub esp, 0x14
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x6cb13010
lea esi, [esi]
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
sub esp, 4
lea eax, [esp + 0x34]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
cmp eax, 0xffffffff
je 0x6cb132e0
lea esi, [esp + 0x38]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x1001
mov dword [esp + 4], 0xffff
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
cmp eax, 0xffffffff
je 0x6cb132c8
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x1002
mov dword [esp + 4], 0xffff
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
cmp eax, 0xffffffff
je 0x6cb132a8
add esp, 0x31c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.setsockopt__
call sym._perror
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ebp, dword [ebp + 0x1c]
sub esp, 4
test ebp, ebp
jne 0x6cb13027
lea esi, [esi]
nop
mov ebp, dword [esp + 0x3c]
mov dword [esp], ebp
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
sub esp, 4
cmp dword [0x6cb2203c], 1
jg 0x6cb132f1
mov ebx, 0xffffffff
jmp 0x6cb13213
lea eax, [esp + 0x180]
mov dword [esp], 0x202
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
sub esp, 8
test eax, eax
jne 0x6cb13386
mov dword [0x6cb22040], 1
jmp 0x6cb12f77
mov dword [esp], str.Could_not_set_receive_buffer_for_socket
call sym._perror
add esp, 0x31c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.Could_not_set_send_buffer_for_socket
call sym._perror
jmp 0x6cb131e2
mov dword [esp], str.Could_not_set_TCP_NODELAY_on_socket
call sym._perror
jmp 0x6cb131ad
mov dword [esp], 2
mov ebx, 0xffffffff
call dword [0x6cb1802c]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 8], str.socket_connect
mov dword [esp + 4], str._s:_Could_not_connect_to__s:_d_n
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x330]
mov dword [esp], eax
mov dword [esp + 0xc], ecx
call sym._fprintf
jmp 0x6cb13213
mov dword [esp], eax
call dbg.gai_strerrorA
mov dword [esp], 2
mov ebx, eax
call dword [0x6cb1802c]
mov dword [esp + 0xc], ebx
mov ebx, 0xffffffff
mov dword [esp + 8], str.socket_connect
mov dword [esp + 4], str._s:_getaddrinfo:__s_n
mov dword [esp], eax
call sym._fprintf
jmp 0x6cb13213
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, 0xffffffff
mov dword [eax], 0x16
jmp 0x6cb13213
mov dword [esp], 2
call dword [0x6cb1802c]
mov dword [esp + 8], 0x13
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.WSAStartup_failed__n
call sym._fwrite
mov dword [esp], 0xffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]