Function at 0x1401393b0
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x240
mov rax, qword [0x1402c8b58]
xor rax, rsp
mov qword [rsp + 0x230], rax
mov rdi, rcx
cmp byte [0x1402c6364], 0
jne 0x1401393e2
mov al, 1
jmp 0x1401396a3
xor edx, edx
mov r8d, 0x198
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memset
nop
mov ecx, 0x909
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rsp + 0x30], eax
cmp eax, 0x276c
jne 0x1401394d1
mov eax, 5
mov dword [rsp + 0x38], eax
mov ecx, 2
mov dword [rsp + 0x34], ecx
cmp eax, 1
jl 0x14013948a
sub ecx, 1
mov dword [rsp + 0x34], ecx
jns 0x140139444
mov dword [rsp + 0x34], 9
dec eax
mov dword [rsp + 0x38], eax
mov cl, 9
test eax, eax
je 0x14013948a
movzx ebx, cl
shl bx, 8
movzx eax, al
or bx, ax
xor edx, edx
mov r8d, 0x198
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x40]
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rsp + 0x30], eax
cmp eax, 0x276c
jne 0x14013948a
mov eax, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x34]
jmp 0x140139426
cmp dword [rsp + 0x30], 0
jne 0x1401394dc
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
lea r8, str.Using_ws2_32.dll_version__d__d
mov edx, 0x50
lea rcx, [rsp + 0x1e0]
call fcn.140051960
mov rax, qword [rdi]
lea r8, [rsp + 0x1e0]
lea rdx, str.ws2_32_DLL_Version
mov rcx, rdi
call qword [rax + 0x58]
cmp dword [rsp + 0x30], 0
je 0x14013956a
cmp dword [rsp + 0x30], 0x276b
jne 0x1401394ef
lea rdx, str.The_underlying_network_subsystem_is_not_ready_for_network_communication.
jmp 0x140139561
cmp dword [rsp + 0x30], 0x276c
jne 0x140139502
lea rdx, str.The_version_of_Windows_Sockets_support_requested_is_not_provided_by_this_particular_Windows_Sockets_implementation.
jmp 0x140139561
cmp dword [rsp + 0x30], 0x2734
jne 0x140139515
lea rdx, str.A_blocking_Windows_Sockets_1.1_operation_is_in_progress.
jmp 0x140139561
cmp dword [rsp + 0x30], 0x2753
jne 0x140139528
lea rdx, str.Limit_on_the_number_of_tasks_supported_by_the_Windows_Sockets_implementation_has_been_reached.
jmp 0x140139561
cmp dword [rsp + 0x30], 0x271e
jne 0x14013953b
lea rdx, str.The_lpWSAData_is_not_a_valid_pointer.
jmp 0x140139561
lea r9, [rsp + 0x30]
lea r8, str.WSAStartup_error:_0x_x
mov edx, gethostbyname
lea rcx, [rsp + 0x1e0]
call fcn.140051890
lea rdx, [rsp + 0x1e0]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x28]
mov byte [0x1402c6364], 0
cmp byte [0x1402cdba1], 0
jne 0x140139697
cmp qword [0x1402cdba8], 0
jne 0x140139697
lea rcx, str.ws2_32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x1402cdba8], rax
test rax, rax
jne 0x1401395d1
mov byte [0x1402cdba1], 1
mov rcx, rdi
call fcn.140054450
mov rax, qword [rdi]
lea rdx, str.Failed_to_load_ws2_32.dll
mov rcx, rdi
call qword [rax + 0x28]
cmp dword [rsp + 0x30], 0
sete al
jmp 0x1401396a3
lea rdx, str.getaddrinfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1402cdbb0], rax
test rax, rax
jne 0x140139605
mov rcx, rdi
call fcn.140054450
mov rax, qword [rdi]
lea rdx, str.Failed_to_find_getaddrinfo_function_in_ws2_32.dll
mov rcx, rdi
call qword [rax + 0x28]
lea rdx, str.freeaddrinfo
mov rcx, qword [0x1402cdba8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1402cdbb8], rax
test rax, rax
jne 0x14013963d
mov rcx, rdi
call fcn.140054450
mov rax, qword [rdi]
lea rdx, str.Failed_to_find_freeaddrinfo_function_in_ws2_32.dll
mov rcx, rdi
call qword [rax + 0x28]
lea rdx, str.gethostbyname
mov rcx, qword [0x1402cdba8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1402cdbc0], rax
test rax, rax
jne 0x140139675
mov rcx, rdi
call fcn.140054450
mov rax, qword [rdi]
lea rdx, str.Failed_to_find_gethostbyname_function_in_ws2_32.dll
mov rcx, rdi
call qword [rax + 0x28]
cmp qword [0x1402cdbb0], 0
je 0x140139690
cmp qword [0x1402cdbb8], 0
mov byte [0x1402cdba0], 1
jne 0x140139697
mov byte [0x1402cdba0], 0
cmp dword [rsp + 0x30], 0
sete al
jmp 0x1401396a3
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.1401e12d0
mov rbx, qword [rsp + 0x258]
add rsp, 0x240
pop rdi
ret