Function at 0x4769b0
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
xor eax, eax
mov rbp, qword [rsp + 0x138]
cmp qword [rdx + 8], 0
mov r12, qword [rsp + 0x130]
movzx r14d, byte [rsp + 0x128]
lea rbx, [rsp + 0x80]
mov r10, rcx
mov ecx, 6
mov r13, qword [rbp + 8]
mov rdi, rbx
rep stosq qword [rdi], rax
mov dword [rsp + 0x88], 1
je 0x476d10
mov dword [rsp + 0x80], 4
mov rsi, qword [rdx]
lea rax, [rsp + 0x60]
mov dword [rsp + 0x20], r8d
mov r8d, 0x10
lea r9, [0x00515206]
mov rcx, rax
mov qword [rsp + 0x38], rax
lea rdx, [sym.vsnprintf]
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char______gnu_cxx::__to_xstring_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____char__int____char__unsigned_long_long__char_const__char___unsigned_long_long__char_const__::___clone_constprop3709_
lea r9, [rsp + 0x50]
mov r8, rbx
mov rcx, rsi
mov rdx, qword [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x476c4d
mov rbx, qword [rsp + 0x50]
test rbx, rbx
je 0x476c44
mov r15, qword [sym.imp.WS2_32.dll_WSASocketW]
mov rdi, qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r8d, dword [rbx + 0xc]
xor r9d, r9d
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
mov dword [rsp + 0x28], 0x81
mov dword [rsp + 0x20], 0
call r15
cmp rax, 0xffffffffffffffff
mov rsi, rax
je 0x476cc0
test r14b, r14b
jne 0x476c90
cmp qword [r12 + 0x10], 0
je 0x476ad1
mov qword [rsp + 0x58], rsi
lea rdx, [rsp + 0x58]
mov rcx, r12
call qword [r12 + 0x18]
cmp dword [rbx + 4], 0x17
je 0x476c60
mov dword [rsp + 0x40], 1
lea r8, [rsp + 0x40]
mov edx, 0x8004667e
mov rcx, rsi
call rdi
mov rdx, qword [rbx + 0x20]
mov rcx, rsi
mov r8d, dword [rbx + 0x10]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
js 0x476c10
mov dword [rsp + 0x44], 0
lea r8, [rsp + 0x44]
mov edx, 0x8004667e
mov rcx, rsi
call rdi
mov rax, qword [rbp + 0x20]
lea r9, [rsp + 0x48]
movabs rdx, 0x20c49ba5e353f7cf
mov rbx, qword [sym.imp.WS2_32.dll_setsockopt]
imul r8d, dword [rax], 0x3e8
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax]
mov dword [rsp + 0x20], 4
mov rax, rcx
sar rcx, 0x3f
imul rdx
sar rdx, 7
sub rdx, rcx
mov rcx, rsi
add edx, r8d
mov r8d, 0x1006
mov dword [rsp + 0x48], edx
mov edx, 0xffff
call rbx
mov rax, qword [rbp + 0x30]
lea r9, [rsp + 0x4c]
movabs rdx, 0x20c49ba5e353f7cf
imul r8d, dword [rax], 0x3e8
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax]
mov dword [rsp + 0x20], 4
mov rax, rcx
sar rcx, 0x3f
imul rdx
sar rdx, 7
sub rdx, rcx
mov rcx, rsi
add edx, r8d
mov r8d, 0x1005
mov dword [rsp + 0x4c], edx
mov edx, 0xffff
call rbx
mov dword [r13], 0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
add rax, 0x10
cmp rcx, rax
je 0x476bf6
call sym.operator_delete_void_
mov rax, rsi
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x476ce2
mov dword [r13], 2
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x476a81
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rsi, 0xffffffffffffffff
jmp 0x476bde
mov dword [rsp + 0x58], 0
lea r9, [rsp + 0x58]
mov r8d, 0x1b
mov rcx, rsi
mov dword [rsp + 0x20], 4
mov edx, 0x29
call qword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x476adb
mov dword [rsp + 0x58], 1
lea r9, [rsp + 0x58]
mov r8d, 1
mov rcx, rsi
mov dword [rsp + 0x20], 4
mov edx, 6
call qword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x476ab7
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
mov r8d, dword [rbx + 0xc]
call qword [sym.imp.WS2_32.dll_socket]
cmp rax, 0xffffffffffffffff
mov rsi, rax
je 0x476c32
jmp 0x476aae
mov rdx, qword [rbp + 0x18]
mov rcx, rsi
mov rax, qword [rbp + 0x10]
mov r8, qword [rdx]
mov rdx, qword [rax]
call method.httplib::detail.wait_until_socket_is_ready_unsigned_long_long__long_long__long_long_
test eax, eax
mov dword [r13], eax
je 0x476b0b
jmp 0x476c29
xor esi, esi
cmp qword [r10 + 8], 0
je 0x476d1c
mov rsi, qword [r10]
mov eax, dword [rsp + 0x120]
mov dword [rsp + 0x84], r9d
mov dword [rsp + 0x80], eax
jmp 0x476a1c