Function at 0x4b0920
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf0
mov eax, dword [0x7c0ab4]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0xec], eax
push esi
push edi
mov byte [ebp - 0xd6], 0
mov esi, dword [ebx]
mov dword [eax], 0xffffffff
lea eax, [ebp - 0xdc]
push eax
lea eax, [ebp - 0xd4]
mov dword [ebp - 0xe4], esi
push eax
call fcn.004b0ff0
add esp, 8
mov dword [ebp - 0xe8], eax
test eax, eax
jne 0x4b0d71
movzx eax, word [ebp - 0xc4]
sub eax, 2
jne 0x4b0d39
lea eax, [ebp - 0x38]
mov ecx, 2
push 0x2e
push eax
lea edx, [ebp - 0xc0]
call fcn.004bb7e0
add esp, 8
test eax, eax
je 0x4b0d39
push dword [ebp - 0xc2]
call dword [sym.imp.WS2_32.dll_ntohs]
lea eax, [ebp - 0x38]
push eax
push str.__Trying__s..._n
push esi
call fcn.004aee40
mov edi, dword [ebp - 0xdc]
add esp, 0xc
cmp dword [ebp - 0xd4], 2
jne 0x4b0a55
cmp dword [ebp - 0xd0], 1
jne 0x4b0a55
cmp byte [esi + 0x386], 0
mov byte [ebp - 0xd5], 1
je 0x4b0a5c
mov eax, dword [ebx]
push 4
mov dword [ebp - 0xdc], eax
lea eax, [ebp - 0xe0]
push eax
push 1
push 6
push edi
mov dword [ebp - 0xe0], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4b0a40
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, ebx
call fcn.004bafa0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push dword [ebp - 0xdc]
call fcn.004aee40
add esp, 0xc
jmp 0x4b0a5c
push str.TCP_NODELAY_set_n
push dword [ebp - 0xdc]
call fcn.004aee40
add esp, 8
jmp 0x4b0a5c
mov byte [ebp - 0xd5], 0
mov ecx, edi
call fcn.004b0880
cmp byte [ebp - 0xd5], 0
je 0x4b0b23
cmp byte [esi + 0x4bc], 0
je 0x4b0b23
push 4
lea eax, [ebp - 0xdc]
mov dword [ebp - 0xdc], 1
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4b0ab3
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.004aee40
add esp, 0xc
jmp 0x4b0b23
mov eax, dword [esi + 0x4c0]
and eax, 0x7fffffff
mov dword [ebp - 0x44], 1
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 0x4c4]
and eax, 0x7fffffff
imul eax, eax, 0x3e8
mov dword [ebp - 0xdc], eax
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0xe0]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x44]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4b0b23
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.004aee40
add esp, 0x10
mov eax, dword [esi + 0x1b8]
mov dword [ebp - 0xe0], eax
test eax, eax
je 0x4b0b59
push 0
push edi
push dword [esi + 0x1bc]
mov ecx, eax
call dword [0x70d440]
call dword [ebp - 0xe0]
add esp, 0xc
cmp eax, 2
jne 0x4b0ba4
mov byte [ebp - 0xd6], 1
cmp dword [ebp - 0xd4], 2
jne 0x4b0bc7
push ecx
push 2
mov edx, edi
mov ecx, ebx
call fcn.004afb50
mov esi, eax
add esp, 8
mov dword [ebp - 0xe8], esi
test esi, esi
je 0x4b0bc7
mov edx, edi
mov ecx, ebx
call fcn.004b0f90
mov eax, 7
cmp esi, 1
cmove esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x4b0b59
mov edx, edi
mov ecx, ebx
call fcn.004b0f90
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xe0]
mov dword [ebp - 0xe0], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov eax, 0x10624dd3
mul esi
shr edx, 6
imul ecx, edx, 0x3e8
mov dword [ebx + 0x2b0], edx
sub esi, ecx
imul eax, esi, 0x3e8
cmp dword [ebx + 0x2b8], 1
mov esi, dword [ebp - 0xe4]
mov dword [ebx + 0x2b4], eax
jle 0x4b0c3a
push dword [ebx + 0x2c4]
mov edx, 3
mov ecx, esi
push dword [ebx + 0x2c0]
call fcn.004aeb30
add esp, 8
cmp byte [ebp - 0xd6], 0
jne 0x4b0d1e
cmp dword [ebx + 0x94], 1
jne 0x4b0d1e
cmp byte [ebx + 0x2aa], 0
jne 0x4b0c9d
push dword [ebp - 0xc8]
lea eax, [ebp - 0xc4]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4b0c9d
mov eax, dword [ebp - 0xe8]
test eax, eax
jne 0x4b0d73
mov ecx, dword [ebp - 0xec]
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xe0], eax
cmp eax, 0xb
je 0x4b0d03
cmp eax, 0x2732
jle 0x4b0cbc
cmp eax, 0x2734
jle 0x4b0d03
mov edx, eax
mov ecx, ebx
call fcn.004bafa0
push eax
lea eax, [ebp - 0x38]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.004aee40
mov eax, dword [ebp - 0xe0]
add esp, 0x10
mov edx, edi
mov dword [esi + 0x46b4], eax
mov ecx, ebx
call fcn.004b0f90
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xec]
xor eax, eax
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xec]
xor eax, eax
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x38], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
call fcn.004bafa0
push eax
push esi
mov esi, dword [ebp - 0xe4]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push esi
call fcn.004aef10
mov edx, dword [ebp - 0xdc]
add esp, 0x10
mov ecx, ebx
call fcn.004b0f90
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006d0856
mov esp, ebp
pop ebp
ret