Function at 0x584690
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2ec
mov eax, dword [0x78efc4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
add eax, 0x4e
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [edi + eax*4]
mov dword [ebp - 0x2e8], edi
mov dword [eax], 0xffffffff
mov edx, dword [ebx + 0xc]
mov dword [ebp - 0x2ec], eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0x2d4], eax
mov al, byte [edx + 0x455]
mov byte [ebp - 0x2d6], 0
mov dword [ebp - 0x2e4], edx
cmp al, 3
je 0x584713
cmp al, 6
je 0x584707
mov dword [ebp - 0x2d0], 2
mov dword [ebp - 0x2cc], 0x11
jmp 0x584727
mov dword [ebp - 0x2cc], 0
jmp 0x58471d
mov dword [ebp - 0x2cc], 6
mov dword [ebp - 0x2d0], 1
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x2c8], eax
cmp eax, 0x80
jbe 0x584746
mov dword [ebp - 0x2c8], 0x80
mov eax, 0x80
push eax
push dword [ecx + 0x18]
lea eax, [ebp - 0x2c4]
push eax
call fcn.00679930
add esp, 0xc
cmp dword [ebx + 0x1b8], 0
je 0x584796
push 1
push ebx
call fcn.005729d0
lea eax, [ebp - 0x2d4]
push eax
mov eax, dword [ebx + 0x1b8]
push 0
push dword [ebx + 0x1bc]
call eax
mov esi, eax
push 0
push ebx
mov dword [ebp - 0x2e0], esi
call fcn.005729d0
add esp, 0x1c
jmp 0x5847b6
push dword [ebp - 0x2cc]
push dword [ebp - 0x2d0]
push dword [ebp - 0x2d4]
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp - 0x2e0], eax
cmp esi, 0xffffffff
je 0x584b31
mov eax, dword [ebp - 0x2e4]
cmp byte [eax + 0x455], 5
jne 0x5847df
push 1
push esi
call fcn.0059f290
mov eax, dword [ebp - 0x2e4]
add esp, 8
mov ecx, dword [eax + 0x44c]
test ecx, ecx
je 0x5847ff
mov eax, dword [ebp - 0x2ac]
cmp dword [ebp - 0x2d4], 0x17
cmove eax, ecx
mov dword [ebp - 0x2ac], eax
xor eax, eax
mov dword [ebp - 0x2e4], eax
lea eax, [ebp - 0x2dc]
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x2c8]
lea eax, [ebp - 0x2c4]
push eax
call fcn.00582ec0
add esp, 0x10
test al, al
jne 0x584881
call fcn.00683c71
mov esi, dword [eax]
call fcn.00683c71
mov edi, eax
lea eax, [ebp - 0x134]
push 0x100
push eax
push esi
call fcn.0056e890
push eax
push dword [edi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00582490
push dword [ebp - 0x2e0]
push dword [ebp - 0x2e8]
push ebx
call fcn.00582f70
add esp, 0x28
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006773ff
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x2d4], 0x17
mov ecx, str.__Trying__s:_d...
push dword [ebp - 0x2dc]
mov eax, str.__Trying___s_:_d...
cmovne eax, ecx
lea ecx, [ebp - 0x34]
push ecx
push eax
push ebx
call fcn.00582550
mov eax, dword [ebp - 0x2d4]
add esp, 0x10
cmp eax, 2
je 0x5848b9
cmp eax, 0x17
jne 0x58491d
cmp dword [ebp - 0x2d0], 1
jne 0x58491d
cmp byte [ebx + 0x6ac], 0
mov byte [ebp - 0x2d5], 1
je 0x584924
push 4
lea eax, [ebp - 0x2dc]
mov dword [ebp - 0x2dc], 1
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x584924
push 0x100
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0056e890
push eax
push str.Could_not_set_TCP_NODELAY:__s
push ebx
call fcn.00582550
add esp, 0x18
jmp 0x584924
mov byte [ebp - 0x2d5], 0
mov eax, dword [0x7a4f44]
mov dword [ebp - 0x2e8], 0x4020
mov dword [ebp - 0x2e0], 0
mov dword [ebp - 0x2dc], 4
test eax, eax
jne 0x584977
push 3
push 2
push eax
push eax
push 6
call fcn.0059f2c0
add esp, 0x14
test al, al
je 0x58496b
mov dword [0x7a4f44], 2
jmp 0x5849c7
mov dword [0x7a4f44], 1
jmp 0x58497c
cmp eax, 2
je 0x5849c7
lea eax, [ebp - 0x2dc]
push eax
lea eax, [ebp - 0x2e0]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x5849ad
mov eax, dword [ebp - 0x2e0]
cmp eax, dword [ebp - 0x2e8]
jg 0x5849c7
push 4
lea eax, [ebp - 0x2e8]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [ebp - 0x2d5], 0
je 0x584a9f
cmp byte [ebx + 0x6b3], 0
je 0x584a9f
push 4
lea eax, [ebp - 0x2e0]
mov dword [ebp - 0x2e0], 1
push eax
push 8
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x584a1a
push esi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d
push ebx
call fcn.00582550
add esp, 0xc
jmp 0x584a9f
push dword [ebx + 0x660]
mov dword [ebp - 0x240], 1
call fcn.00584d60
push dword [ebx + 0x664]
imul eax, eax, 0x3e8
mov dword [ebp - 0x2e0], eax
mov dword [ebp - 0x23c], eax
call fcn.00584d60
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0x2e0], eax
mov dword [ebp - 0x238], eax
lea eax, [ebp - 0x2dc]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x240]
push eax
push 0x98000004
push esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x584a9f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d
push ebx
call fcn.00582550
add esp, 0x10
cmp dword [ebx + 0x1b0], 0
je 0x584ae4
push 1
push ebx
call fcn.005729d0
mov eax, dword [ebx + 0x1b0]
push 0
push esi
push dword [ebx + 0x1b4]
call eax
push 0
push ebx
mov dword [ebp - 0x2dc], eax
call fcn.005729d0
mov eax, dword [ebp - 0x2dc]
add esp, 0x1c
cmp eax, 2
jne 0x584b47
mov byte [ebp - 0x2d6], 1
mov eax, dword [ebp - 0x2d4]
cmp eax, 2
je 0x584af4
cmp eax, 0x17
jne 0x584b6c
lea eax, [ebp - 0x2c4]
push eax
call fcn.0059f1f0
push eax
push dword [ebp - 0x2d4]
push esi
push ebx
call fcn.00583f50
add esp, 0x14
mov dword [ebp - 0x2e4], eax
test eax, eax
je 0x584b6c
push esi
push edi
push ebx
call fcn.00582f70
mov eax, dword [ebp - 0x2e4]
add esp, 0xc
cmp eax, 1
jne 0x584b36
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006773ff
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x584ae4
push esi
push edi
push ebx
call fcn.00582f70
add esp, 0xc
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006773ff
mov esp, ebp
pop ebp
ret
push 1
push esi
call fcn.0059f290
lea eax, [ebp - 0x244]
push eax
call fcn.00588c10
add esp, 0xc
cmp dword [edi + 0x43c], 1
movups xmm0, xmmword [eax]
movups xmmword [edi + 0x260], xmm0
jle 0x584bc1
push 3
push dword [edi + 0x274]
push dword [edi + 0x270]
push ebx
call fcn.00572430
push 4
push dword [edi + 0x27c]
push dword [edi + 0x278]
push ebx
call fcn.00572430
add esp, 0x20
cmp byte [ebp - 0x2d6], 0
jne 0x584c9d
cmp byte [edi + 0x455], 4
je 0x584c9d
cmp byte [edi + 0x255], 0
jne 0x584c24
push dword [ebp - 0x2c8]
lea eax, [ebp - 0x2c4]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x584c24
mov eax, dword [ebp - 0x2e4]
test eax, eax
jne 0x584b36
mov ecx, dword [ebp - 0x2ec]
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006773ff
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0x2dc], eax
sub ecx, 0xb
je 0x584c82
sub ecx, 0x2728
je 0x584c82
sub ecx, 1
je 0x584c82
push 0x100
lea ecx, [ebp - 0x134]
push ecx
push eax
call fcn.0056e890
push eax
lea eax, [ebp - 0x34]
push eax
push str.Immediate_connect_fail_for__s:__s
push ebx
call fcn.00582550
mov eax, dword [ebp - 0x2dc]
push esi
push edi
push ebx
mov dword [ebx + 0x8f8], eax
call fcn.00582f70
add esp, 0x28
jmp 0x584b31
mov ecx, dword [ebp - 0x2ec]
xor eax, eax
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006773ff
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x2ec]
xor eax, eax
pop edi
mov dword [ecx], esi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.006773ff
mov esp, ebp
pop ebp
ret