Function at 0x4adfa0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xec
mov eax, dword [0x59c388]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0xec], eax
mov dword [ebp - 0xdc], esi
mov edi, dword [esi]
mov dword [eax], 0xffffffff
mov eax, dword [ecx + 4]
mov ebx, dword [esi]
mov dword [ebp - 0xd4], eax
mov eax, dword [esi + 0x94]
cmp eax, 2
mov dword [ebp - 0xd0], eax
mov eax, 0x11
mov byte [ebp - 0xd6], 0
mov dword [ebp - 0xe0], edi
mov dword [ebp - 0xe4], ebx
je 0x4ae00a
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0xcc], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0xc8], eax
cmp eax, 0x80
jbe 0x4ae02f
mov dword [ebp - 0xc8], 0x80
mov eax, 0x80
push eax
push dword [ecx + 0x18]
lea eax, [ebp - 0xc4]
push eax
call fcn.0050b2a0
add esp, 0xc
cmp dword [ebx + 0x1e0], 0
je 0x4ae07e
push 1
push ebx
call fcn.0049c3b0
lea eax, [ebp - 0xd4]
push eax
mov eax, dword [ebx + 0x1e0]
push 0
push dword [ebx + 0x1e4]
call eax
push 0
push dword [ebp - 0xe4]
mov ebx, eax
call fcn.0049c3b0
add esp, 0x1c
jmp 0x4ae098
push dword [ebp - 0xcc]
push dword [ebp - 0xd0]
push dword [ebp - 0xd4]
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
xor eax, eax
cmp ebx, 0xffffffff
je 0x4ae516
mov dword [ebp - 0xe8], eax
lea eax, [ebp - 0xe4]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0xc4]
push eax
call fcn.004ace80
add esp, 0xc
test al, al
jne 0x4ae112
call fcn.0051ed71
mov esi, dword [eax]
call fcn.0051ed71
push esi
mov esi, dword [ebp - 0xdc]
mov edi, eax
push esi
call fcn.00497e70
push eax
push dword [edi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0xe0]
call fcn.004ac0c0
push ebx
push esi
call fcn.004acb40
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x34]
push eax
push str.__Trying__s..._n
push edi
call fcn.004ac1a0
mov eax, dword [ebp - 0xd4]
add esp, 0xc
cmp eax, 2
je 0x4ae134
cmp eax, 0x17
jne 0x4ae1af
cmp dword [ebp - 0xd0], 1
jne 0x4ae1af
cmp byte [edi + 0x51e], 0
mov byte [ebp - 0xd5], 1
je 0x4ae1b6
mov eax, dword [esi]
push 4
mov dword [ebp - 0xdc], eax
lea eax, [ebp - 0xe0]
push eax
push 1
push 6
push ebx
mov dword [ebp - 0xe0], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4ae19a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00497e70
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push dword [ebp - 0xdc]
call fcn.004ac1a0
add esp, 0x14
jmp 0x4ae1b6
push str.TCP_NODELAY_set_n
push dword [ebp - 0xdc]
call fcn.004ac1a0
add esp, 8
jmp 0x4ae1b6
mov byte [ebp - 0xd5], 0
mov eax, dword [0x5a0ab8]
mov dword [ebp - 0xe4], 0x4020
mov dword [ebp - 0xdc], 0
mov dword [ebp - 0xe0], 4
test eax, eax
jne 0x4ae208
push 3
push 2
push eax
push 6
call fcn.004bc840
add esp, 0x10
test al, al
je 0x4ae1fc
mov dword [0x5a0ab8], 2
jmp 0x4ae258
mov dword [0x5a0ab8], 1
jmp 0x4ae20d
cmp eax, 2
je 0x4ae258
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0xdc]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4ae23e
mov eax, dword [ebp - 0xdc]
cmp eax, dword [ebp - 0xe4]
jg 0x4ae258
push 4
lea eax, [ebp - 0xe4]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [ebp - 0xd5], 0
je 0x4ae321
cmp byte [edi + 0x660], 0
je 0x4ae321
push 4
lea eax, [ebp - 0xdc]
mov dword [ebp - 0xdc], 1
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4ae2a8
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push edi
call fcn.004ac1a0
add esp, 0xc
jmp 0x4ae321
push dword [edi + 0x664]
mov dword [ebp - 0x40], 1
call fcn.004ae610
push dword [edi + 0x668]
imul eax, eax, 0x3e8
mov dword [ebp - 0xdc], eax
mov dword [ebp - 0x3c], eax
call fcn.004ae610
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0xdc], eax
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0xe0]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x40]
push eax
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4ae321
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push edi
call fcn.004ac1a0
add esp, 0x10
cmp dword [edi + 0x1d8], 0
je 0x4ae366
push 1
push edi
call fcn.0049c3b0
mov eax, dword [edi + 0x1d8]
push 0
push ebx
push dword [edi + 0x1dc]
call eax
push 0
push edi
mov dword [ebp - 0xe0], eax
call fcn.0049c3b0
mov eax, dword [ebp - 0xe0]
add esp, 0x1c
cmp eax, 2
jne 0x4ae3c9
mov byte [ebp - 0xd6], 1
mov eax, dword [ebp - 0xd4]
cmp eax, 2
je 0x4ae376
cmp eax, 0x17
jne 0x4ae3ed
lea eax, [ebp - 0xc4]
push eax
call fcn.004d12d0
push eax
push dword [ebp - 0xd4]
push ebx
push esi
call fcn.004ada50
add esp, 0x14
mov dword [ebp - 0xe8], eax
test eax, eax
je 0x4ae3ed
push ebx
push esi
call fcn.004acb40
mov eax, dword [ebp - 0xe8]
add esp, 8
cmp eax, 1
mov ecx, 7
cmove eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x4ae366
push ebx
push esi
call fcn.004acb40
add esp, 8
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
push 1
push ebx
call fcn.004d1370
lea eax, [ebp - 0x44]
push eax
call fcn.004b06f0
add esp, 0xc
cmp dword [esi + 0x2b8], 1
movups xmm0, xmmword [eax]
movups xmmword [esi + 0x2a8], xmm0
jle 0x4ae42b
push 3
push dword [esi + 0x2c4]
push dword [esi + 0x2c0]
push edi
call fcn.0049bea0
add esp, 0x10
cmp byte [ebp - 0xd6], 0
jne 0x4ae50c
cmp dword [esi + 0x94], 1
jne 0x4ae50c
cmp byte [esi + 0x29e], 0
jne 0x4ae48e
push dword [ebp - 0xc8]
lea eax, [ebp - 0xc4]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4ae48e
mov eax, dword [ebp - 0xe8]
test eax, eax
jne 0x4ae516
mov ecx, dword [ebp - 0xec]
pop edi
pop esi
mov dword [ecx], ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0xe0], eax
sub ecx, 0xb
je 0x4ae4f1
sub ecx, 0x2728
je 0x4ae4f1
sub ecx, 1
je 0x4ae4f1
push eax
push esi
call fcn.00497e70
push eax
lea eax, [ebp - 0x34]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push edi
call fcn.004ac1a0
mov eax, dword [ebp - 0xe0]
push ebx
push esi
mov dword [edi + 0x48dc], eax
call fcn.004acb40
add esp, 0x20
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xec]
xor eax, eax
pop edi
pop esi
mov dword [ecx], ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xec]
xor eax, eax
mov dword [ecx], ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f3d68
mov esp, ebp
pop ebp
ret