Function at 0x1801599c0
Capabilities:
Initialize winsock library

Disassembly:
push rdi
sub rsp, 0x250
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x268], rbx
mov rax, qword [0x18036d060]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rdi, rcx
cmp byte [reloc.WS2_32.dll_accept], 0
jne 0x1801599ff
mov al, 1
jmp 0x180159cb5
xor edx, edx
mov r8d, 0x198
lea rcx, [rsp + 0x50]
call fcn.180211600
nop
mov ecx, 0x909
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rsp + 0x38], eax
cmp eax, 0x276c
jne 0x180159aef
mov ecx, 5
mov dword [rsp + 0x40], ecx
mov edx, 2
mov dword [rsp + 0x3c], edx
cmp ecx, 1
jl 0x180159aa7
sub edx, 1
mov dword [rsp + 0x3c], edx
jns 0x180159a61
mov dword [rsp + 0x3c], 9
dec ecx
mov dword [rsp + 0x40], ecx
mov dl, 9
test ecx, ecx
je 0x180159aa7
movzx ebx, dl
shl bx, 8
movzx eax, cl
or bx, ax
xor edx, edx
mov r8d, 0x198
lea rcx, [rsp + 0x50]
call fcn.180211600
lea rdx, [rsp + 0x50]
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rsp + 0x38], eax
cmp eax, 0x276c
jne 0x180159aa7
mov ecx, dword [rsp + 0x40]
mov edx, dword [rsp + 0x3c]
jmp 0x180159a43
test eax, eax
jne 0x180159af7
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
lea r8, str.Using_ws2_32.dll_version__d__d
mov edx, 0x50
lea rcx, [rsp + 0x1f0]
call fcn.180103970
mov rax, qword [rdi]
lea r8, [rsp + 0x1f0]
lea rdx, str.ws2_32_DLL_Version
mov rcx, rdi
call qword [rax + 0x58]
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x180159b7a
cmp eax, 0x276b
jne 0x180159b07
lea rdx, str.The_underlying_network_subsystem_is_not_ready_for_network_communication.
jmp 0x180159b6d
cmp eax, 0x276c
jne 0x180159b17
lea rdx, str.The_version_of_Windows_Sockets_support_requested_is_not_provided_by_this_particular_Windows_Sockets_implementation.
jmp 0x180159b6d
cmp eax, 0x2734
jne 0x180159b27
lea rdx, str.A_blocking_Windows_Sockets_1.1_operation_is_in_progress.
jmp 0x180159b6d
cmp eax, 0x2753
jne 0x180159b37
lea rdx, str.Limit_on_the_number_of_tasks_supported_by_the_Windows_Sockets_implementation_has_been_reached.
jmp 0x180159b6d
cmp eax, 0x271e
jne 0x180159b47
lea rdx, str.The_lpWSAData_is_not_a_valid_pointer.
jmp 0x180159b6d
lea r9, [rsp + 0x38]
lea r8, str.WSAStartup_error:_0x_x
mov edx, gethostbyname
lea rcx, [rsp + 0x1f0]
call fcn.180103890
lea rdx, [rsp + 0x1f0]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x28]
mov eax, dword [rsp + 0x38]
mov byte [reloc.WS2_32.dll_accept], 0
cmp byte [0x180388bc2], 0
jne 0x180159cac
cmp qword [0x180388bc8], 0
jne 0x180159cac
lea rcx, str.ws2_32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x180388bc8], rax
test rax, rax
jne 0x180159be2
mov byte [0x180388bc2], 1
mov rcx, rdi
call fcn.180106a70
mov rax, qword [rdi]
lea rdx, str.Failed_to_load_ws2_32.dll
mov rcx, rdi
call qword [rax + 0x28]
mov eax, dword [rsp + 0x38]
test eax, eax
sete al
jmp 0x180159cb5
lea rdx, str.getaddrinfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180388bd0], rax
test rax, rax
jne 0x180159c16
mov rcx, rdi
call fcn.180106a70
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 [0x180388bc8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180388bd8], rax
test rax, rax
jne 0x180159c4e
mov rcx, rdi
call fcn.180106a70
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 [0x180388bc8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180388be0], rax
test rax, rax
jne 0x180159c86
mov rcx, rdi
call fcn.180106a70
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 [0x180388bd0], 0
je 0x180159ca1
cmp qword [0x180388bd8], 0
mov byte [0x180388bc1], 1
jne 0x180159ca8
mov byte [0x180388bc1], 0
mov eax, dword [rsp + 0x38]
test eax, eax
sete al
jmp 0x180159cb5
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.18007b140
mov rbx, qword [rsp + 0x268]
add rsp, 0x250
pop rdi
ret