Function at 0x492550
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe8
mov eax, dword [0x5bc324]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0xe8], eax
push esi
push edi
mov dword [ebp - 0xe4], 0
mov esi, dword [ebx]
mov dword [eax], 0xffffffff
mov eax, dword [edx + 4]
mov edi, dword [ebx]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebx + 0x8c]
cmp eax, 2
mov dword [ebp - 0xd0], eax
mov eax, 0x11
mov dword [ebp - 0xe0], esi
je 0x4925ad
mov eax, dword [edx + 0xc]
mov dword [ebp - 0xcc], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0xc8], eax
cmp eax, 0x80
jbe 0x4925d2
mov dword [ebp - 0xc8], 0x80
mov eax, 0x80
push eax
push dword [edx + 0x18]
lea eax, [ebp - 0xc4]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [edi + 0x1f8]
add esp, 0xc
test eax, eax
je 0x492605
lea ecx, [ebp - 0xd4]
push ecx
push 0
push dword [edi + 0x1fc]
call eax
add esp, 0xc
jmp 0x49261d
push dword [ebp - 0xcc]
push dword [ebp - 0xd0]
push dword [ebp - 0xd4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x4929b6
movzx eax, word [ebp - 0xc4]
sub eax, 2
jne 0x492982
lea eax, [ebp - 0x38]
mov ecx, 2
push 0x2e
push eax
lea edx, [ebp - 0xc0]
call fcn.004aa740
add esp, 8
test eax, eax
je 0x492982
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.00490900
add esp, 0xc
cmp dword [esi + 0x39c], 0
je 0x4926e4
mov eax, dword [ebx]
mov dword [ebp - 0xd8], eax
push 4
mov eax, dword [eax + 0x39c]
mov dword [ebp - 0xdc], eax
lea eax, [ebp - 0xdc]
push eax
push 1
push 6
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4926d1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, ebx
call fcn.0048cc00
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push dword [ebp - 0xd8]
call fcn.00490900
add esp, 0xc
jmp 0x4926e4
push str.TCP_NODELAY_set_n
push dword [ebp - 0xd8]
call fcn.00490900
add esp, 8
mov ecx, edi
call fcn.00492440
cmp dword [esi + 0x4a4], 0
je 0x49279e
push 4
lea eax, [ebp - 0xd8]
mov dword [ebp - 0xd8], 1
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x49272e
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00490900
add esp, 0xc
jmp 0x49279e
mov eax, dword [esi + 0x4a8]
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 + 0x4ac]
and eax, 0x7fffffff
imul eax, eax, 0x3e8
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0xdc]
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 0x49279e
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.00490900
add esp, 0x10
mov eax, dword [esi + 0x1f0]
test eax, eax
je 0x4927c5
push 0
push edi
push dword [esi + 0x1f4]
call eax
add esp, 0xc
cmp eax, 2
jne 0x492808
mov dword [ebp - 0xe4], 1
push dword [ebp - 0xd4]
mov edx, edi
mov ecx, ebx
call fcn.00491680
mov esi, eax
add esp, 4
mov dword [ebp - 0xd8], esi
test esi, esi
je 0x49282b
mov edx, edi
mov ecx, ebx
call fcn.00492cd0
cmp esi, 1
je 0x4929b6
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x4927c5
mov edx, edi
mov ecx, ebx
call fcn.00492cd0
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xdc]
mov dword [ebp - 0xdc], 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 - 0xe0]
mov dword [ebx + 0x2b4], eax
jle 0x492890
mov edx, dword [ebx + 0x2bc]
mov ecx, esi
call fcn.00490390
cmp dword [ebp - 0xe4], 0
jne 0x492967
cmp dword [ebx + 0x8c], 1
jne 0x492967
push dword [ebp - 0xc8]
lea eax, [ebp - 0xc4]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x492948
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xdc], eax
cmp eax, 0xb
je 0x49292d
cmp eax, 0x2732
jle 0x4928e6
cmp eax, 0x2734
jle 0x49292d
mov edx, eax
mov ecx, ebx
call fcn.0048cc00
push eax
lea eax, [ebp - 0x38]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.00490900
mov eax, dword [ebp - 0xdc]
add esp, 0x10
mov edx, edi
mov dword [esi + 0x863c], eax
mov ecx, ebx
call fcn.00492cd0
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xe8]
xor eax, eax
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xe8]
mov eax, dword [ebp - 0xd8]
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xe8]
xor eax, eax
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00523a6a
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.0048cc00
push eax
push esi
mov esi, dword [ebp - 0xe0]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push esi
call fcn.004909c0
add esp, 0x10
mov edx, edi
mov ecx, ebx
call fcn.00492cd0
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00523a6a
mov esp, ebp
pop ebp
ret