Function at 0x493480
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ec
mov eax, dword [0x599850]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
add eax, 0x72
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [esi + eax*4]
mov dword [ebp - 0x1e0], esi
mov dword [ebp - 0x1ec], eax
push edi
mov edi, dword [esi]
mov dword [eax], 0xffffffff
mov eax, dword [edx + 4]
mov ecx, dword [esi + 0x90]
mov ebx, dword [esi]
mov dword [ebp - 0x1d4], eax
xor eax, eax
cmp ecx, 3
mov byte [ebp - 0x1d6], 0
mov dword [ebp - 0x1dc], edi
setne al
mov dword [ebp - 0x1e4], ebx
inc eax
mov dword [ebp - 0x1d0], eax
mov eax, 0x11
cmp ecx, 3
jne 0x4934f9
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x1cc], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x1c8], eax
cmp eax, 0x80
jbe 0x49351e
mov dword [ebp - 0x1c8], 0x80
mov eax, 0x80
push eax
push dword [edx + 0x18]
lea eax, [ebp - 0x1c4]
push eax
call fcn.00504640
add esp, 0xc
cmp dword [ebx + 0x618], 0
je 0x49356d
push 1
push ebx
call fcn.00483800
lea eax, [ebp - 0x1d4]
push eax
mov eax, dword [ebx + 0x618]
push 0
push dword [ebx + 0x61c]
call eax
push 0
push dword [ebp - 0x1e4]
mov ebx, eax
call fcn.00483800
add esp, 0x1c
jmp 0x493587
push dword [ebp - 0x1cc]
push dword [ebp - 0x1d0]
push dword [ebp - 0x1d4]
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x493a58
cmp dword [esi + 0x90], 5
jne 0x4935a4
push 1
push ebx
call fcn.0049f8e0
add esp, 8
xor eax, eax
mov dword [ebp - 0x1e8], eax
lea eax, [ebp - 0x1e4]
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
push eax
call fcn.00491f60
add esp, 0x10
test al, al
jne 0x493625
call fcn.0050f6ae
mov esi, dword [eax]
call fcn.0050f6ae
mov edi, eax
lea eax, [ebp - 0xb4]
push 0x80
push eax
push esi
call fcn.0047fa40
push eax
push dword [edi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x1dc]
call fcn.00491510
push ebx
push dword [ebp - 0x1e0]
call fcn.00492000
add esp, 0x24
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff754
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x1e4]
lea eax, [ebp - 0x34]
push eax
push str.__Trying__s:_ld..._n
push edi
call fcn.004915f0
mov eax, dword [ebp - 0x1d4]
add esp, 0x10
cmp eax, 2
je 0x493651
cmp eax, 0x17
jne 0x4936d7
cmp dword [ebp - 0x1d0], 1
jne 0x4936d7
cmp byte [edi + 0xabe], 0
mov byte [ebp - 0x1d5], 1
je 0x4936de
mov eax, dword [esi]
push 4
mov dword [ebp - 0x1dc], eax
lea eax, [ebp - 0x1e0]
push eax
push 1
push 6
push ebx
mov dword [ebp - 0x1e0], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4936c2
push 0x80
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0047fa40
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push dword [ebp - 0x1dc]
call fcn.004915f0
add esp, 0x18
jmp 0x4936de
push str.TCP_NODELAY_set_n
push dword [ebp - 0x1dc]
call fcn.004915f0
add esp, 8
jmp 0x4936de
mov byte [ebp - 0x1d5], 0
mov eax, dword [0x5a0a0c]
mov dword [ebp - 0x1e4], 0x4020
mov dword [ebp - 0x1dc], 0
mov dword [ebp - 0x1e0], 4
test eax, eax
jne 0x493730
push 3
push 2
push eax
push 6
call fcn.00493f50
add esp, 0x10
test al, al
je 0x493724
mov dword [0x5a0a0c], 2
jmp 0x493780
mov dword [0x5a0a0c], 1
jmp 0x493735
cmp eax, 2
je 0x493780
lea eax, [ebp - 0x1e0]
push eax
lea eax, [ebp - 0x1dc]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x493766
mov eax, dword [ebp - 0x1dc]
cmp eax, dword [ebp - 0x1e4]
jg 0x493780
push 4
lea eax, [ebp - 0x1e4]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [ebp - 0x1d5], 0
je 0x493858
cmp byte [edi + 0xac7], 0
je 0x493858
push 4
lea eax, [ebp - 0x1dc]
mov dword [ebp - 0x1dc], 1
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4937d3
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push edi
call fcn.004915f0
add esp, 0xc
jmp 0x493858
push dword [edi + 0xa64]
mov dword [ebp - 0x140], 1
call fcn.00493bb0
push dword [edi + 0xa68]
imul eax, eax, 0x3e8
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x13c], eax
call fcn.00493bb0
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x138], eax
lea eax, [ebp - 0x1e0]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x140]
push eax
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x493858
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.004915f0
add esp, 0x10
cmp dword [edi + 0x610], 0
je 0x49389d
push 1
push edi
call fcn.00483800
mov eax, dword [edi + 0x610]
push 0
push ebx
push dword [edi + 0x614]
call eax
push 0
push edi
mov dword [ebp - 0x1e0], eax
call fcn.00483800
mov eax, dword [ebp - 0x1e0]
add esp, 0x1c
cmp eax, 2
jne 0x493900
mov byte [ebp - 0x1d6], 1
mov eax, dword [ebp - 0x1d4]
cmp eax, 2
je 0x4938ad
cmp eax, 0x17
jne 0x493924
lea eax, [ebp - 0x1c4]
push eax
call fcn.004a9a50
push eax
push dword [ebp - 0x1d4]
push ebx
push esi
call fcn.00492ef0
add esp, 0x14
mov dword [ebp - 0x1e8], eax
test eax, eax
je 0x493924
push ebx
push esi
call fcn.00492000
mov eax, dword [ebp - 0x1e8]
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.004ff754
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x49389d
push ebx
push esi
call fcn.00492000
add esp, 8
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff754
mov esp, ebp
pop ebp
ret
push 1
push ebx
call fcn.0049f8e0
lea eax, [ebp - 0x144]
push eax
call fcn.00497370
add esp, 0xc
cmp dword [esi + 0x2d8], 1
movups xmm0, xmmword [eax]
movups xmmword [esi + 0x2c8], xmm0
jle 0x493965
push 3
push dword [esi + 0x2e4]
push dword [esi + 0x2e0]
push edi
call fcn.00482d80
add esp, 0x10
cmp byte [ebp - 0x1d6], 0
jne 0x493a50
cmp dword [esi + 0x90], 4
je 0x493a50
cmp byte [esi + 0x2bd], 0
jne 0x4939c8
push dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4939c8
mov eax, dword [ebp - 0x1e8]
test eax, eax
jne 0x493a5a
mov ecx, dword [ebp - 0x1ec]
pop edi
pop esi
mov dword [ecx], ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff754
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1e0], eax
cmp eax, 0xb
je 0x493a35
cmp eax, 0x2732
jle 0x4939e7
cmp eax, 0x2734
jle 0x493a35
push 0x80
lea ecx, [ebp - 0xb4]
push ecx
push eax
call fcn.0047fa40
push eax
lea eax, [ebp - 0x34]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push edi
call fcn.004915f0
mov eax, dword [ebp - 0x1e0]
push ebx
push esi
mov dword [edi + 0xcec], eax
call fcn.00492000
add esp, 0x24
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff754
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x1ec]
xor eax, eax
pop edi
pop esi
mov dword [ecx], ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff754
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x1ec]
mov dword [ecx], ebx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ff754
mov esp, ebp
pop ebp
ret