Function at 0x14000a540
Capabilities:
Connect socket
Create thread
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x160]
sub rsp, 0x260
mov rax, qword [0x140017010]
xor rax, rsp
mov qword [rbp + 0x150], rax
xor edi, edi
lea r13, [0x140017f20]
lea rsi, [0x140017c84]
lea r14, [0x140017068]
lea r15, [0x14000a970]
lea r12, [0x14000b760]
nop dword [rax]
lea rdx, str.Initializing_Winsock...
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001560
lea rdx, [0x140003490]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov ecx, 0x202
lea rdx, [rbp - 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [0x140017c84], eax
test eax, eax
je 0x14000a5ea
mov edx, eax
lea rcx, str.WSAStartup_failed:__d_n
call fcn.140009ff0
mov qword [rsp + 0x30], rdi
mov qword [rbp - 0x80], rdi
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x60], xmm1
mov dword [rbp - 0x78], 1
mov dword [rbp - 0x74], 6
lea rcx, [rsp + 0x40]
call fcn.14000b870
lea rdx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rdx, qword [rsp + 0x40]
mov rcx, r13
cmp qword [0x140017f38], 0x10
cmovae rcx, qword [0x140017f20]
lea r9, [rsp + 0x30]
lea r8, [rbp - 0x80]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [0x140017c84], eax
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x10
jb 0x14000a697
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000a68c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000a917
call fcn.14000e04c
mov eax, dword [0x140017c84]
test eax, eax
je 0x14000a6af
mov edx, eax
lea rcx, str.getaddrinfo_failed:__d_n
call fcn.140009ff0
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rbx, qword [rsp + 0x30]
mov r8d, dword [rbx + 0xc]
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [0x140017068], rax
cmp rax, 0xffffffffffffffff
jne 0x14000a6fd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.Error_at_socket__:__ld_n
call fcn.140009ff0
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rax, qword [0x140017068]
mov r8d, dword [rbx + 0x10]
mov rdx, qword [rbx + 0x20]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_connect]
mov dword [0x140017c84], eax
cmp eax, 0xffffffff
jne 0x14000a731
mov rcx, qword [0x140017068]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [0x140017068], 0xffffffffffffffff
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp qword [0x140017068], 0xffffffffffffffff
jne 0x14000a75d
lea rcx, str.Unable_to_connect_to_server__n
call fcn.140009ff0
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x14000a870
call fcn.14000b220
mov ecx, 0x18
call fcn.14000e010
mov qword [rax], rsi
mov qword [rax + 8], r14
mov qword [rax + 0x10], r15
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], edi
mov r9, rax
lea r8, [0x14000bcb0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0x60], rax
test rax, rax
je 0x14000a95f
cmp dword [rsp + 0x68], 0
je 0x14000a953
movaps xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x40], xmm0
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll__Thrd_detach]
test eax, eax
jne 0x14000a94a
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x60], xmm0
lea ecx, [rax + 0x18]
call fcn.14000e010
mov qword [rax], rsi
mov qword [rax + 8], r14
mov qword [rax + 0x10], r12
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], edi
mov r9, rax
lea r8, [0x14000bcb0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0x70], rax
test rax, rax
je 0x14000a93a
cmp dword [rsp + 0x78], 0
je 0x14000a92e
movaps xmm0, xmmword [rsp + 0x70]
movdqa xmmword [rsp + 0x40], xmm0
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll__Thrd_detach]
test eax, eax
jne 0x14000a925
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x70], xmm0
mov byte [0x140017c83], 1
cmp dword [rsp + 0x68], eax
jne 0x14000a91e
nop dword [rax]
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 8
mov rcx, qword [0x140017068]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, 0x3e8
cmp eax, 0xffffffff
je 0x14000a8af
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14000a870
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 1
mov rcx, qword [0x140017068]
call qword [sym.imp.WS2_32.dll_shutdown]
mov dword [0x140017c84], eax
cmp eax, 0xffffffff
jne 0x14000a907
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.shutdown_failed:__d_n
call fcn.140009ff0
mov byte [0x140017c83], 0
mov byte [0x140017c82], 0
mov rcx, qword [0x140017068]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14000a5a0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
nop
mov ecx, eax
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
int3
mov ecx, 1
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
nop
mov dword [rsp + 0x78], edi
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
nop
mov ecx, eax
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
int3
mov ecx, 1
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
nop
mov dword [rsp + 0x68], edi
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3