Function at 0x6cb12b40
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, 0x2ec
mov edx, dword [0x6cb22040]
mov dword [esp + 0x30], 1
mov esi, dword [esp + 0x300]
mov dword [esp + 0x34], 0x20000
mov ebx, dword [esp + 0x304]
mov dword [esp + 0x38], 1
test edx, edx
je 0x6cb12ce0
cmp word [esi], 2
jne 0x6cb12e98
movzx eax, bx
mov dword [esp + 0x2c], eax
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htons]
sub esp, 4
mov word [esi + 2], ax
mov dword [esp + 8], 6
mov dword [esp + 4], 1
movzx eax, word [esi]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
mov ebx, eax
cmp eax, 0xffffffff
je 0x6cb12ef1
lea ebp, [esp + 0x30]
mov dword [esp + 0x10], 4
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 4
mov dword [esp + 4], 0xffff
mov dword [esp], eax
call edi
sub esp, 0x14
cmp eax, 0xffffffff
je 0x6cb12ecf
lea eax, [esp + 0x38]
mov dword [esp + 4], 0x8004667e
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
sub esp, 0xc
mov dword [esp + 8], 0x10
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
cmp eax, 0xffffffff
je 0x6cb12d18
test ebx, ebx
js 0x6cb12e34
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov dword [esp], ebx
call edi
sub esp, 0x14
cmp eax, 0xffffffff
je 0x6cb12dd0
lea esi, [esp + 0x34]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x1001
mov dword [esp + 4], 0xffff
mov dword [esp], ebx
call edi
sub esp, 0x14
cmp eax, 0xffffffff
je 0x6cb12de8
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x1002
mov dword [esp + 4], 0xffff
mov dword [esp], ebx
call edi
sub esp, 0x14
cmp eax, 0xffffffff
je 0x6cb12e00
add esp, 0x2ec
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0x150]
mov dword [esp], 0x202
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
sub esp, 8
test eax, eax
jne 0x6cb12f02
mov dword [0x6cb22040], 1
jmp 0x6cb12b7e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x6cb12e28
lea eax, [esp + 0x44]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x4c]
mov dword [esp + 8], eax
lea eax, [ebx + 1]
mov dword [esp + 0x4c], 1
mov dword [esp + 0x44], 5
mov dword [esp + 0x48], 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 0x6cb12e28
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 4
mov dword [esp + 0x10], eax
lea eax, [esp + 0x3c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1007
mov dword [esp + 4], 0xffff
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
sub esp, 0x14
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x6cb12e19
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0
jmp 0x6cb12c3d
mov dword [esp], str.Could_not_set_TCP_NODELAY_on_socket
call sym._perror
jmp 0x6cb12c72
mov dword [esp], str.Could_not_set_send_buffer_for_socket
call sym._perror
jmp 0x6cb12ca3
mov dword [esp], str.Could_not_set_receive_buffer_for_socket
call sym._perror
add esp, 0x2ec
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.msvcrt.dll__errno]
mov edx, dword [esp + 0x3c]
mov dword [eax], edx
lea esi, [esi]
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_closesocket]
sub esp, 4
cmp dword [0x6cb2203c], 1
mov ebx, 0xffffffff
jle 0x6cb12cd0
lea edi, [esp + 0x4c]
mov dword [esp + 8], 0x30
mov dword [esp + 4], edi
mov dword [esp], esi
call sym.libimobiledevice_1.0_6.dll_socket_addr_to_string
mov dword [esp], 2
call dword [0x6cb1802c]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], str.socket_connect_addr
mov dword [esp + 0x10], ecx
mov dword [esp + 4], str._s:_Could_not_connect_to__s_port__d_n
mov dword [esp], eax
call sym._fprintf
jmp 0x6cb12cd0
mov dword [esp], 2
mov ebx, 0xffffffff
call dword [0x6cb1802c]
mov dword [esp + 8], 0x21
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.ERROR:_Unsupported_address_family
call sym._fwrite
jmp 0x6cb12cd0
mov dword [esp], str.setsockopt__
call sym._perror
mov dword [esp], ebx
mov ebx, 0xffffffff
call dword [sym.imp.WS2_32.dll_closesocket]
sub esp, 4
jmp 0x6cb12cd0
mov dword [esp], str.socket__
call sym._perror
jmp 0x6cb12cd0
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]