Function at 0x42ae20
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0xec
mov eax, dword [0x46d060]
xor eax, esp
mov dword [esp + 0xe8], eax
mov edx, dword [esp + 0xf8]
xor eax, eax
mov ecx, dword [esp + 0xf4]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x100]
mov dword [esp + 0x14], eax
mov byte [esp + 0x13], al
mov dword [esp + 0x1c], edx
mov ebp, dword [edi]
mov dword [edx], 0xffffffff
mov eax, dword [ecx + 4]
mov esi, dword [edi]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0x8c]
cmp eax, 2
mov dword [esp + 0x3c], eax
mov eax, 0x11
mov dword [esp + 0x18], 0xffffffff
je 0x42ae8b
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x40], eax
mov edx, 0x80
mov eax, dword [ecx + 0x10]
cmp eax, edx
cmova eax, edx
push eax
push dword [ecx + 0x18]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x50]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esi + 0x1a0]
add esp, 0xc
test eax, eax
je 0x42aecf
lea ecx, [esp + 0x38]
push ecx
push 0
push dword [esi + 0x1a4]
call eax
add esp, 0xc
jmp 0x42aee1
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x42b2c5
mov ecx, dword [edi + 0x88]
test ecx, ecx
je 0x42af06
mov eax, dword [esp + 0x60]
cmp dword [esp + 0x38], 0x17
cmove eax, ecx
mov dword [esp + 0x60], eax
lea eax, [esp + 0x28]
xor esi, esi
push eax
lea eax, [esp + 0xcc]
push eax
lea eax, [esp + 0x50]
push eax
call fcn.0042ad90
add esp, 0xc
test al, al
jne 0x42af51
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
call fcn.00436fa0
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00428f80
push ebx
push edi
call fcn.004299b0
add esp, 0x20
jmp 0x42b2c5
lea eax, [esp + 0xc8]
push eax
push str.__Trying__s..._n
push ebp
call fcn.00429070
mov eax, dword [esp + 0x44]
add esp, 0xc
cmp eax, 2
je 0x42af75
cmp eax, 0x17
jne 0x42afe2
cmp dword [esp + 0x3c], 1
jne 0x42afe2
cmp byte [ebp + 0x356], 0
mov byte [esp + 0x12], 1
je 0x42afe7
mov eax, dword [edi]
push 4
mov dword [esp + 0x24], eax
lea eax, [esp + 0x28]
push eax
push 1
push 6
push ebx
mov dword [esp + 0x38], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x42afcf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00436fa0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push dword [esp + 0x30]
call fcn.00429070
add esp, 0x14
jmp 0x42afe7
push str.TCP_NODELAY_set_n
push dword [esp + 0x24]
call fcn.00429070
add esp, 8
jmp 0x42afe7
mov byte [esp + 0x12], 0
mov eax, dword [0x46dc2c]
mov dword [esp + 0x24], 0x4020
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], 4
test eax, eax
jne 0x42b02f
push 3
push 2
push eax
push 6
call fcn.004362d0
add esp, 0x10
test al, al
je 0x42b023
mov dword [0x46dc2c], 2
jmp 0x42b075
mov dword [0x46dc2c], 1
jmp 0x42b034
cmp eax, 2
je 0x42b075
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x24]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x42b05d
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x24]
jg 0x42b075
push 4
lea eax, [esp + 0x28]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [esp + 0x12], 0
je 0x42b136
cmp byte [ebp + 0x48c], 0
je 0x42b136
push 4
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 1
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x42b0bf
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push ebp
call fcn.00429070
add esp, 0xc
jmp 0x42b136
push dword [ebp + 0x490]
mov dword [esp + 0x30], 1
call fcn.00433720
push dword [ebp + 0x494]
imul eax, eax, 0x3e8
mov dword [esp + 0x28], eax
mov dword [esp + 0x38], eax
call fcn.00433720
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x30]
push eax
push 0
push 0
push 0xc
lea eax, [esp + 0x44]
push eax
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x42b136
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 ebp
call fcn.00429070
add esp, 0x10
mov eax, dword [ebp + 0x198]
test eax, eax
je 0x42b15c
push 0
push ebx
push dword [ebp + 0x19c]
call eax
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jne 0x42b1a5
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x38]
cmp eax, 2
je 0x42b16a
cmp eax, 0x17
jne 0x42b1bd
lea eax, [esp + 0x48]
push eax
call fcn.0044c7e0
push eax
push dword [esp + 0x40]
push ebx
push edi
call fcn.0042a8a0
mov esi, eax
add esp, 0x14
test esi, esi
je 0x42b1bd
push ebx
push edi
call fcn.004299b0
add esp, 8
mov eax, 7
cmp esi, 1
cmove esi, eax
mov eax, esi
jmp 0x42b2c7
test eax, eax
je 0x42b15c
push ebx
push edi
call fcn.004299b0
add esp, 8
mov eax, 0x2a
jmp 0x42b2c7
push 1
push ebx
call fcn.0044c860
add esp, 8
call fcn.0041e0a0
cmp dword [edi + 0x380], 1
mov dword [edi + 0x378], eax
mov dword [edi + 0x37c], edx
jle 0x42b1f7
push dword [edi + 0x38c]
push dword [edi + 0x388]
push ebp
call fcn.004199e0
add esp, 0xc
cmp byte [esp + 0x13], 0
jne 0x42b2bf
cmp dword [edi + 0x8c], 1
jne 0x42b2bf
cmp byte [edi + 0x372], 0
jne 0x42b231
push dword [esp + 0x44]
lea eax, [esp + 0x4c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x42b23f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [esp + 0x14], ecx
jmp 0x42b243
mov ecx, dword [esp + 0x14]
cmp dword [esp + 0x38], 0x17
sete al
cmp dword [esp + 0x18], 0xffffffff
mov byte [edi + 0x35f], al
jne 0x42b2b1
cmp ecx, 0xb
je 0x42b2a5
cmp ecx, 0x2732
jle 0x42b26d
cmp ecx, 0x2734
jle 0x42b2a5
push ecx
push edi
call fcn.00436fa0
push eax
lea eax, [esp + 0xd4]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push ebp
call fcn.00429070
mov eax, dword [esp + 0x2c]
push ebx
push edi
mov dword [ebp + 0x4668], eax
call fcn.004299b0
mov esi, 7
add esp, 0x20
mov eax, esi
jmp 0x42b2c7
mov eax, dword [esp + 0x1c]
xor esi, esi
mov dword [eax], ebx
mov eax, esi
jmp 0x42b2c7
test esi, esi
jne 0x42b2bb
mov eax, dword [esp + 0x1c]
mov dword [eax], ebx
mov eax, esi
jmp 0x42b2c7
mov eax, dword [esp + 0x1c]
mov dword [eax], ebx
xor eax, eax
mov ecx, dword [esp + 0xf8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00456d98
add esp, 0xec
ret