Function at 0x497c40
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov r11, rsp
sub rsp, reloc.MFC42u.dll_CMiniFrameWnd::CMiniFrameWnd
mov rax, qword [0x005c3458]
mov qword [rsp + 0x150], rax
mov eax, dword [rdx + 4]
mov qword [r11 - 8], rbx
mov qword [r11 - 0x18], rsi
mov rsi, qword [rcx]
mov dword [rsp + 0x40], eax
mov eax, dword [rcx + 0x8c]
mov dword [rsp + 0x44], eax
mov eax, dword [rdx + 0xc]
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov dword [rsp + 0x48], eax
mov eax, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
mov qword [r11 - 0x30], r13
mov ebx, 0x80
cmp eax, ebx
mov r12, rcx
mov r13d, r8d
cmova eax, ebx
mov qword [r11 - 0x38], r14
lea rcx, [rsp + 0x50]
mov r8d, eax
mov r14, r9
mov dword [rsp + 0x4c], eax
call sub.msvcrt.dll_memcpy
mov byte [r14], 0
mov rax, qword [rsi + 0x1f0]
test rax, rax
je 0x497cdc
mov rcx, qword [rsi + 0x1f8]
lea r8, [rsp + 0x40]
xor edx, edx
call rax
mov rdi, rax
jmp 0x497cf2
mov r8d, dword [rsp + 0x48]
mov edx, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rdi, 0xffffffffffffffff
je 0x497e82
mov ecx, dword [rsp + 0x40]
lea r8, [rsp + 0xd0]
lea rdx, [rsp + 0x54]
mov r9, rbx
call fcn.00498720
test rax, rax
je 0x497d6e
lea r8, [rsp + 0xd0]
lea rdx, str.__Trying__s...
mov rcx, rsi
call fcn.00496cb0
lea rbx, [rsi + 0x8860]
lea r9, [rsp + 0xd0]
lea r8, [0x005754ec]
mov rcx, rbx
mov edx, 0x2e
call fcn.0048ae70
lea rcx, [r12 + 0x58]
sub rcx, rbx
nop
movzx eax, byte [rbx]
inc rbx
test al, al
mov byte [rcx + rbx - 1], al
jne 0x497d60
cmp byte [rsi + 0x3b6], 0
je 0x497ddc
mov rbx, qword [r12]
mov edx, 6
lea r9, [rsp + 0x30]
movzx eax, byte [rbx + 0x3b6]
lea r8d, [rdx - 5]
mov rcx, rdi
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x497dcd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r12
mov edx, eax
call fcn.0048a2b0
lea rdx, str.Could_not_set_TCP_NODELAY:__s_n
mov rcx, rbx
mov r8, rax
call fcn.00496cb0
jmp 0x497ddc
lea rdx, str.TCP_NODELAY_set_n
mov rcx, rbx
call fcn.00496cb0
lea rax, [rsp + 0x34]
lea r9, [rsp + 0x38]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rdi
mov dword [rsp + 0x30], 0x4020
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x34], 4
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x497e25
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x38], eax
jg 0x497e46
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rdi
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [rsi + 0x1e0]
test rax, rax
je 0x497e65
mov rcx, qword [rsi + 0x1e8]
xor r8d, r8d
mov rdx, rdi
call rax
test eax, eax
jne 0x497e79
mov r8d, dword [rsp + 0x40]
mov rdx, rdi
mov rcx, r12
call fcn.004976f0
test eax, eax
je 0x497e8e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, 0xffffffffffffffff
jmp 0x497fff
mov edx, 1
mov rcx, rdi
mov qword [rsp + 0x188], rbp
call fcn.004b6200
cmp dword [r12 + 0x8c], 1
jne 0x497f0f
mov r8d, dword [rsp + 0x4c]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
mov ebx, eax
jne 0x497f23
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xb
mov ebp, eax
je 0x497f13
cmp eax, 0x2732
jle 0x497ee3
cmp eax, 0x2734
jle 0x497f13
mov edx, eax
mov rcx, r12
call fcn.0048a2b0
lea r8, [rsp + 0xd0]
lea rdx, str.Failed_to_connect_to__s:__s
mov r9, rax
mov rcx, rsi
call fcn.00496db0
mov dword [rsi + 0x86cc], ebp
jmp 0x497f31
xor ebx, ebx
jmp 0x497f31
mov r8d, r13d
mov rdx, rdi
mov rcx, r12
call fcn.00497620
mov ebx, eax
cmp ebx, 1
jne 0x497f31
cmp dword [rsi + 0x648], 2
je 0x497faa
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x34], 4
call qword [sym.imp.KERNEL32.dll_SleepEx]
lea r11, [rsp + 0x34]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, rdi
mov qword [rsp + 0x20], r11
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x497f7a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x497f7e
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x497f8d
cmp eax, 0x2748
je 0x497f8d
xor cl, cl
jmp 0x497f8f
mov cl, 1
test ebx, ebx
jne 0x497faf
test cl, cl
je 0x497fc5
lea rdx, str.connected_n
mov rcx, rsi
mov byte [r14], 1
call fcn.00496cb0
mov rax, rdi
jmp 0x497ff7
cmp ebx, 1
jne 0x497fc5
lea rdx, str.Timeout_n
mov rcx, rsi
call fcn.00496cb0
jmp 0x497fe7
mov edx, eax
mov rcx, r12
mov dword [rsi + 0x86cc], eax
call fcn.0048a2b0
lea rdx, [0x00575694]
mov rcx, rsi
mov r8, rax
call fcn.00496cb0
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, 0xffffffffffffffff
mov rbp, qword [rsp + 0x188]
mov r14, qword [rsp + 0x160]
mov r13, qword [rsp + 0x168]
mov r12, qword [rsp + 0x170]
mov rdi, qword [rsp + 0x178]
mov rsi, qword [rsp + 0x180]
mov rbx, qword [rsp + 0x190]
mov rcx, qword [rsp + 0x150]
call fcn.005555b0
add rsp, reloc.MFC42u.dll_CMiniFrameWnd::CMiniFrameWnd
ret