Function at 0x10008240
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Print debug messages
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [0x10013150]
mov dword [ebp - 8], eax
push edi
mov dword [ebp - 4], 5
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
jne 0x10008275
xor eax, eax
jmp 0x10008481
mov dword [ebp - 0x28], 0x3e8
push 4
lea eax, [ebp - 0x28]
push eax
push 0x1005
push 0xffff
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x100082ad
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x10008481
mov dword [ebp - 0x28], 0x3e8
push 4
lea eax, [ebp - 0x28]
push eax
push 0x1006
push 0xffff
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x100082e5
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x10008481
mov dword [ebp - 0x34], 1
lea eax, [ebp - 0x34]
push eax
push 0x8004667e
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0xffffffff
jne 0x1000830f
xor eax, eax
jmp 0x10008481
mov word [ebp - 0x18], 2
mov ecx, dword [ebp + 8]
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x14], eax
mov dx, word [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x16], ax
push 0x10
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jge 0x1000838d
mov byte [ebp - 0x1a0], 0
mov ecx, 0x16
xor eax, eax
lea edi, [ebp - 0x19f]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov edx, dword [ebp - 0x1c]
push edx
push str.connect_br:_d
lea eax, [ebp - 0x1a0]
push eax
call dword [sym.imp.MSVCR71.dll_sprintf]
add esp, 0xc
lea ecx, [ebp - 0x1a0]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x1a4], 0
jmp 0x100083b2
mov edx, dword [ebp - 0x1a4]
add edx, 1
mov dword [ebp - 0x1a4], edx
mov eax, dword [ebp - 0x1a4]
cmp eax, dword [ebp - 0x140]
jae 0x100083d6
mov ecx, dword [ebp - 0x1a4]
mov edx, dword [ebp + ecx*4 - 0x13c]
cmp edx, dword [ebp - 0x24]
jne 0x100083d4
jmp 0x100083d6
jmp 0x100083a3
mov eax, dword [ebp - 0x1a4]
cmp eax, dword [ebp - 0x140]
jne 0x1000840c
cmp dword [ebp - 0x140], 0x40
jae 0x1000840c
mov ecx, dword [ebp - 0x1a4]
mov edx, dword [ebp - 0x24]
mov dword [ebp + ecx*4 - 0x13c], edx
mov eax, dword [ebp - 0x140]
add eax, 1
mov dword [ebp - 0x140], eax
xor ecx, ecx
jne 0x10008397
mov edx, dword [ebp - 4]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x30]
push eax
push 0
lea ecx, [ebp - 0x140]
push ecx
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jg 0x1000844c
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x10008481
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x20]
push eax
push 0x8004667e
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0xffffffff
jne 0x1000847e
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x10008481
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 8]
call fcn.1000e3ed
pop edi
mov esp, ebp
pop ebp
ret