Function at 0x10003150
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10009e61
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x1000e018]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x1000e018]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
cmp dword [ecx + 4], ebx
jne 0x100031f1
lea edi, [ebx + 3]
mov eax, 0x1000b2d0
lea esi, [esp + 0x40]
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
call fcn.10002290
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x20]
mov dword [esp + 0x98], ebx
mov esi, dword [eax + 4]
push ecx
lea edi, [esp + 0x44]
mov dword [esp + 0x18], 1
call fcn.10002090
mov byte [esp + 0x13], 1
cmp dword [eax], esi
jne 0x100031f5
mov byte [esp + 0x13], bl
mov dword [esp + 0x98], 0xffffffff
test byte [esp + 0x14], 1
je 0x10003221
and dword [esp + 0x14], 0xfffffffe
cmp dword [esp + 0x54], 0x10
jb 0x10003221
mov edx, dword [esp + 0x40]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp byte [esp + 0x13], bl
je 0x10003347
push 0x144
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x98], 1
cmp eax, ebx
je 0x100032e6
mov edi, 3
mov eax, 0x1000b2d0
lea esi, [esp + 0x24]
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.10002290
mov byte [esp + 0x98], 2
or dword [esp + 0x14], 2
mov eax, 0x1000b2d0
lea esi, [esp + 0x40]
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
call fcn.10002290
mov esi, dword [esp + 0x18]
mov dword [esp + 0x98], edi
or dword [esp + 0x14], 4
lea edx, [esp + 0x24]
mov ecx, esi
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x100032c3
mov edi, dword [eax]
jmp 0x100032c5
mov edi, eax
lea edx, [esp + 0x40]
mov ecx, esi
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x100032d8
mov eax, dword [eax]
push edi
push eax
mov eax, dword [esp + 0x28]
push eax
call fcn.10004a60
jmp 0x100032e8
xor eax, eax
test byte [esp + 0x14], 4
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 4], eax
je 0x10003320
and dword [esp + 0x14], 0xfffffffb
cmp dword [esp + 0x54], 0x10
jb 0x10003310
mov edx, dword [esp + 0x40]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
mov dword [esp + 0x98], 0xffffffff
test byte [esp + 0x14], 2
je 0x10003347
cmp dword [esp + 0x38], 0x10
jb 0x10003347
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 7
mov eax, str.timeout
lea esi, [esp + 0x24]
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0x98], 6
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x10003388
mov eax, dword [eax]
mov esi, dword [esp + 0x1c]
mov edi, dword [esi]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
mov edx, dword [edi + 4]
add esp, 4
push eax
mov ecx, esi
call edx
test al, al
sete byte [esp + 0x13]
mov dword [esp + 0x98], 0xffffffff
cmp dword [esp + 0x38], 0x10
jb 0x100033c7
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp byte [esp + 0x13], bl
je 0x100033d7
mov eax, 0xfffffffc
jmp 0x10003624
cmp dword [esi + 4], ebx
je 0x100034c4
mov edi, 4
mov eax, str.port
lea esi, [esp + 0x24]
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.10002290
mov dword [esp + 0x98], 7
mov eax, str.host
lea esi, [esp + 0x40]
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
call fcn.10002290
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x24]
mov ecx, esi
mov byte [esp + 0x98], 8
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x1000344d
mov edi, dword [eax]
jmp 0x1000344f
mov edi, eax
lea edx, [esp + 0x40]
mov ecx, esi
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x10003462
mov eax, dword [eax]
mov ecx, dword [esp + 0x1c]
mov esi, dword [ecx + 4]
push edi
push eax
push str.Connect_to__s:_s_...
call fcn.10005340
mov esi, 0x10
add esp, 0xc
cmp dword [esp + 0x54], esi
jb 0x10003491
mov edx, dword [esp + 0x40]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x98], 0xffffffff
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
cmp dword [esp + 0x38], esi
jb 0x100034c0
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov esi, dword [esp + 0x1c]
or edi, 0xffffffff
cmp dword [esi + 8], edi
jne 0x100034e6
push 6
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov dword [esi + 8], eax
cmp eax, edi
jne 0x100034e6
mov eax, edi
jmp 0x10003624
mov ecx, 2
lea edi, [ecx + 2]
mov eax, str.host
lea esi, [esp + 0x24]
mov word [esp + 0x78], cx
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0x98], 9
call fcn.10001f10
mov esi, 0x10
cmp dword [eax + 0x14], esi
jb 0x10003533
mov eax, dword [eax]
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [esp + 0x98], 0xffffffff
mov dword [esp + 0x7c], eax
cmp dword [esp + 0x38], esi
jb 0x1000355d
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 4
mov eax, str.port
lea esi, [esp + 0x5c]
mov dword [esp + 0x70], 0xf
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0x98], 0xa
call fcn.10001f10
mov esi, 0x10
cmp dword [eax + 0x14], esi
jb 0x100035a2
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov dword [esp + 0x98], 0xffffffff
mov word [esp + 0x7a], ax
cmp dword [esp + 0x70], esi
jb 0x100035d7
mov eax, dword [esp + 0x5c]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
push esi
mov esi, dword [esp + 0x20]
mov edx, dword [esi + 8]
lea ecx, [esp + 0x7c]
push ecx
push edx
mov dword [esp + 0x7c], 0xf
mov dword [esp + 0x78], ebx
mov byte [esp + 0x68], bl
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
jne 0x1000360e
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov ecx, esi
call edx
or eax, 0xffffffff
jmp 0x10003624
cmp dword [esi + 4], ebx
je 0x10003622
push ebx
push str.Connect_OK
xor edx, edx
mov ecx, esi
call fcn.10001040
xor eax, eax
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.10008c0e
mov esp, ebp
pop ebp
ret 4