Function at 0x4ebb16
Capabilities:
Connect socket
Get socket status
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
sub esp, 0x1a0
lea ebp, [esp - 4]
mov eax, dword [0x70b744]
xor eax, ebp
mov dword [ebp + 0x1a0], eax
push 0x74
mov eax, 0x5d9fbe
call fcn.005234b0
xor eax, eax
inc eax
mov esi, ecx
mov dword [esi + 0x158], eax
mov dword [esi + 0x15c], eax
lea eax, [ebp]
push eax
push 2
call dword [sym.imp.WSOCK32.dll_WSAStartup]
lea edi, [esi + 0x160]
mov eax, dword [edi]
xor ebx, ebx
cmp eax, 0xffffffff
je 0x4ebbc8
push ebx
push eax
lea ecx, [ebp - 0x54]
call fcn.004ac7aa
mov dword [ebp - 4], ebx
push ebx
push str.nsSocket.ConnTcp.m_Socker.is.not.INVALID_SOCKET_socket:
lea ecx, [ebp - 0x80]
call fcn.004ac9bc
mov byte [ebp - 4], 1
push ebx
sub esp, 0x24
mov eax, esp
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x80]
push ecx
push eax
call fcn.004adc57
add esp, 0xc
mov byte [ebp - 4], 2
mov byte [ebp - 4], 1
mov ecx, 0x721f30
call fcn.00430cd8
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x80]
call fcn.004ac66a
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.004ac66a
push ebx
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [edi], eax
jne 0x4ebc2f
push ebx
sub esp, 0x24
mov ecx, esp
mov dword [ebp - 0x10], esp
push ebx
push str._NC.ConnTcp.NoSocket
call fcn.004ac9bc
mov dword [ebp - 4], 3
or dword [ebp - 4], 0xffffffff
mov ecx, 0x721f30
call fcn.00430cd8
call dword [sym.imp.WSOCK32.dll_WSACleanup]
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1a0]
xor ecx, ebp
call fcn.0051d721
add ebp, 0x1a4
leave
ret
push 4
xor ecx, ecx
lea edx, [ebp - 0x30]
push edx
inc ecx
push ecx
push 6
push eax
mov dword [ebp - 0x30], ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
push 0x10
lea eax, [ebp + 0x190]
push ebx
push eax
call fcn.00522720
movzx eax, word [esi + 0x220]
add esp, 0xc
push eax
mov word [ebp + 0x190], 2
call dword [sym.imp.WSOCK32.dll_htons]
sub esp, 0x24
mov word [ebp + 0x192], ax
lea eax, [esi + 0x224]
mov ecx, esp
mov dword [ebp - 0x10], esp
push eax
mov dword [ebp - 0x18], eax
call fcn.004ac698
mov dword [ebp - 4], 4
lea eax, [ebp - 0x78]
push eax
or dword [ebp - 4], 0xffffffff
call fcn.004ae117
add esp, 0x28
mov dword [ebp - 4], 5
cmp dword [eax + 0x18], 0x10
jb 0x4ebcb5
mov eax, dword [eax + 4]
jmp 0x4ebcb8
add eax, 4
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp + 0x194], eax
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x78]
call fcn.004108b7
mov eax, dword [ebp + 0x194]
cmp eax, 0xffffffff
jne 0x4ebdaf
sub esp, 0x24
mov ecx, esp
mov dword [ebp - 0x10], esp
push dword [ebp - 0x18]
call fcn.004ac698
mov dword [ebp - 4], 6
lea eax, [ebp - 0x78]
push eax
or dword [ebp - 4], 0xffffffff
call fcn.004ae117
add esp, 0x28
mov dword [ebp - 4], 7
cmp dword [eax + 0x18], 0x10
jb 0x4ebd1c
mov eax, dword [eax + 4]
jmp 0x4ebd1f
add eax, 4
push eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov dword [ebp - 0x14], eax
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x78]
call fcn.004108b7
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jne 0x4ebda2
sub esp, 0x24
mov ecx, esp
mov dword [ebp - 0x10], esp
push ebx
push str.connecttcp.ResolveHost
call fcn.004ac9bc
mov dword [ebp - 4], 8
or dword [ebp - 4], 0xffffffff
mov ecx, esi
call fcn.004ea560
push esi
push ebx
sub esp, 0x24
mov ecx, esp
mov dword [ebp - 0x10], esp
push ebx
push str._NC.ConnTcp.Resolve.Failed
call fcn.004ac9bc
mov dword [ebp - 4], 9
or dword [ebp - 4], 0xffffffff
mov ecx, 0x721f18
call fcn.004bc4ff
call dword [sym.imp.WSOCK32.dll_WSACleanup]
push ebx
push edi
call fcn.004c153b
pop ecx
pop ecx
jmp 0x4ebc09
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp + 0x194], eax
push eax
mov dword [esi + 0x1f0], eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x10], esp
push eax
call fcn.00410b44
mov dword [ebp - 4], 0xa
lea eax, [ebp - 0x54]
push eax
or dword [ebp - 4], 0xffffffff
call fcn.004ae0cb
add esp, 0x20
mov dword [ebp - 4], 0xb
push eax
lea ecx, [esi + 0x1f4]
call fcn.004acaa2
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.004ac66a
lea eax, [ebp - 0x1c]
push eax
push 0x8004667e
push dword [edi]
mov dword [ebp - 0x1c], 1
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
push 0x10
lea eax, [ebp + 0x190]
push eax
push dword [edi]
call dword [sym.imp.WSOCK32.dll_connect]
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
cmp eax, 0x2733
je 0x4ebea6
push ebx
call esi
push eax
lea ecx, [ebp - 0x80]
call fcn.004ac6f7
mov dword [ebp - 4], 0xc
push ebx
push str.ncSocket::connecttcp__:_connect.error:
lea ecx, [ebp - 0x54]
call fcn.004ac9bc
mov byte [ebp - 4], 0xd
push ebx
sub esp, 0x24
mov eax, esp
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x80]
push ecx
lea ecx, [ebp - 0x54]
push ecx
push eax
call fcn.004adc57
add esp, 0xc
mov byte [ebp - 4], 0xe
mov byte [ebp - 4], 0xd
mov ecx, 0x721f30
call fcn.00430cd8
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x54]
call fcn.004ac66a
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.004ac66a
jmp 0x4ebd94
push 0x104
call fcn.0051d97d
pop ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.004eab6f
mov dword [ebp - 4], 0xf
mov eax, dword [ebp - 0x2c]
mov dword [eax], ebx
mov eax, dword [ebp - 0x2c]
cmp dword [eax], ebx
mov dword [ebp - 0x14], ebx
jbe 0x4ebeee
lea ecx, [eax + 4]
jmp 0x4ebed8
mov ecx, dword [ebp - 0x10]
mov edx, dword [edi]
cmp dword [ecx], edx
je 0x4ebeee
inc dword [ebp - 0x14]
add ecx, 4
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax]
jb 0x4ebed5
mov ecx, dword [eax]
mov edx, dword [ebp - 0x14]
cmp edx, ecx
jne 0x4ebf07
cmp ecx, 0x40
jae 0x4ebf07
mov ecx, dword [edi]
mov dword [eax + edx*4 + 4], ecx
mov eax, dword [ebp - 0x2c]
inc dword [eax]
push 0x104
call fcn.0051d97d
pop ecx
push eax
lea ecx, [ebp - 0x24]
call fcn.004eab6f
mov byte [ebp - 4], 0x10
mov eax, dword [ebp - 0x24]
mov dword [eax], ebx
mov eax, dword [ebp - 0x24]
cmp dword [eax], ebx
mov dword [ebp - 0x14], ebx
jbe 0x4ebf4c
lea ecx, [eax + 4]
jmp 0x4ebf36
mov ecx, dword [ebp - 0x10]
mov edx, dword [edi]
cmp dword [ecx], edx
je 0x4ebf4c
inc dword [ebp - 0x14]
add ecx, 4
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax]
jb 0x4ebf33
mov ecx, dword [eax]
mov edx, dword [ebp - 0x14]
cmp edx, ecx
jne 0x4ebf68
cmp ecx, 0x40
jae 0x4ebf68
mov ecx, dword [edi]
mov dword [eax + edx*4 + 4], ecx
mov eax, dword [ebp - 0x24]
inc dword [eax]
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x5c]
push ecx
push eax
push dword [ebp - 0x2c]
mov dword [ebp - 0x5c], 8
push ebx
push ebx
mov dword [ebp - 0x58], ebx
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 0xffffffff
jne 0x4ec013
push ebx
call esi
push eax
lea ecx, [ebp - 0x80]
call fcn.004ac6f7
mov byte [ebp - 4], 0x11
push ebx
push str.ncSocket::connectTcp__:_select.SOCKET_ERROR:
lea ecx, [ebp - 0x54]
call fcn.004ac9bc
mov byte [ebp - 4], 0x12
push ebx
sub esp, 0x24
mov eax, esp
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x80]
push ecx
lea ecx, [ebp - 0x54]
push ecx
push eax
call fcn.004adc57
add esp, 0xc
mov byte [ebp - 4], 0x13
mov byte [ebp - 4], 0x12
mov ecx, 0x721f18
call fcn.0041122b
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x54]
call fcn.004ac66a
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x80]
call fcn.004ac66a
or ebx, 0xffffffff
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x24]
call fcn.004fc03d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004fc03d
mov eax, ebx
jmp 0x4ebc0c
push dword [ebp - 0x24]
push dword [edi]
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4ec076
push ebx
push str.ncSocket::connectTcp__:_failed_connect_to:
lea ecx, [ebp - 0x54]
call fcn.004ac9bc
mov byte [ebp - 4], 0x14
push ebx
sub esp, 0x24
mov eax, esp
mov dword [ebp - 0x10], esp
push dword [ebp - 0x18]
lea ecx, [ebp - 0x54]
push ecx
push eax
call fcn.004adc57
add esp, 0xc
mov byte [ebp - 4], 0x15
mov byte [ebp - 4], 0x14
mov ecx, 0x721f18
call fcn.0041122b
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x54]
call fcn.004ac66a
push ebx
push edi
call fcn.004c153b
or ebx, 0xffffffff
jmp 0x4ec0ed
push dword [ebp - 0x2c]
push dword [edi]
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4ec09a
lea eax, [ebp - 0x1c]
push eax
push 0x8004667e
push dword [edi]
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
jmp 0x4ec0ef
push ebx
push str.ncSocket::connectTcp__:_connect_timedOut_to:
lea ecx, [ebp - 0x54]
call fcn.004ac9bc
mov byte [ebp - 4], 0x16
push ebx
sub esp, 0x24
mov eax, esp
mov dword [ebp - 0x10], esp
push dword [ebp - 0x18]
lea ecx, [ebp - 0x54]
push ecx
push eax
call fcn.004adc57
add esp, 0xc
mov byte [ebp - 4], 0x17
mov byte [ebp - 4], 0x16
mov ecx, 0x721f18
call fcn.0041122b
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x54]
call fcn.004ac66a
push ebx
push edi
call fcn.004c153b
xor ebx, ebx
inc ebx
pop ecx
pop ecx
call dword [sym.imp.WSOCK32.dll_WSACleanup]
jmp 0x4ebff4