Function at 0x1800140c0
Capabilities:
Initialize winsock library
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x138]
sub rsp, 0x238
mov rax, qword [0x1800b7160]
xor rax, rsp
mov qword [rbp + 0x120], rax
mov rbx, r8
movzx r14d, r9w
mov r13d, edx
mov qword [rsp + 0x40], rbx
mov r12d, ecx
xor edx, edx
mov r8d, 0x198
lea rcx, [rbp - 0x80]
call sub.api_ms_win_core_crt_l1_1_0.dll_memset
xor edi, edi
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x4c], edi
test byte [0x1800b78f0], 8
mov r15d, dword [rbp + 0x1a8]
mov esi, dword [rbp + 0x1a0]
jne 0x18003dfe2
mov ecx, 0x202
lea rdx, [rbp - 0x80]
call qword [sym.imp.WS2_32.dll_WSAStartup]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jne 0x18003e010
mov eax, 0x11
mov dword [rsp + 0x28], esi
mov r8d, 6
mov dword [rsp + 0x20], edi
cmp r13d, 1
mov edx, r13d
mov ecx, r12d
cmovne r8d, eax
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_WSASocketW]
nop dword [rax + rax]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x18003e037
lea r9, [rsp + 0x50]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x3005
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x18003e067
lea eax, [rbx + 0x29]
and r15d, 1
je 0x1800141fc
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], edi
lea r8d, [rbx + 0x1b]
mov dword [rsp + 0x20], 4
mov edx, eax
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x18003e0b8
test byte [0x1800b78f0], 8
mov rbx, qword [rsp + 0x40]
jne 0x18003e0d6
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], edi
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0xfffffffb
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
nop dword [rax + rax]
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], 1
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 4
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
nop dword [rax + rax]
test rbx, rbx
jne 0x18003e0fd
xor eax, eax
xorps xmm0, xmm0
mov qword [rsp + 0x68], rax
cmp r12d, 0x17
mov dword [rsp + 0x70], eax
mov ecx, 0x10
mov eax, 0x1c
movups xmmword [rsp + 0x58], xmm0
cmovne eax, ecx
mov word [rsp + 0x58], r12w
test r14w, r14w
jne 0x1800143b5
movzx r14d, word [rsp + 0x5a]
mov r8d, eax
lea rdx, [rsp + 0x58]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_bind]
nop dword [rax + rax]
mov ebx, eax
test r14w, r14w
jne 0x1800143c0
test eax, eax
jne 0x18003e150
test byte [0x1800b78f0], 8
jne 0x18003e18a
test ebx, ebx
jne 0x18003e092
cmp r13d, 2
jne 0x180014367
mov edx, edi
mov dword [rsp + 0x4c], 1
mov eax, 0x29
mov dword [rsp + 0x20], 4
cmp r12d, r13d
lea r9, [rsp + 0x4c]
lea r8d, [rbx + 0x13]
mov rcx, rsi
cmovne edx, eax
call qword [sym.imp.WS2_32.dll_setsockopt]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x18003e1bd
test r15d, r15d
je 0x180014367
lea r9, [rsp + 0x4c]
mov dword [rsp + 0x4c], 1
xor edx, edx
mov dword [rsp + 0x20], 4
lea r8d, [rbx + 0x13]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x18003e1fe
mov rdi, rsi
test ebx, ebx
jne 0x180014373
test rdi, rdi
je 0x1800143cd
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
test byte [0x1800b78f0], 8
jne 0x18003e21b
mov rax, rdi
mov rcx, qword [rbp + 0x120]
xor rcx, rsp
call fcn.18002d5c0
add rsp, 0x238
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov word [rsp + 0x5a], r14w
jmp 0x1800142ab
test eax, eax
je 0x1800142d6
jmp 0x18003e110
mov ebx, 0x267b
jmp 0x180014373
mov dword [rsp + 0x38], r15d
test rbx, rbx
mov dword [rsp + 0x30], esi
mov rcx, rbx
cmove rcx, rdi
mov dword [rsp + 0x28], r14d
mov r9d, r13d
mov qword [rsp + 0x20], rcx
mov r8d, r12d
call fcn.18008bcd8
nop
jmp 0x180014138
test byte [0x1800b78f0], 8
je 0x18001436a
mov ecx, 0xe
lea rdx, [0x18009f218]
mov r8d, eax
call fcn.1800876bc
nop
jmp 0x18001436a
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test byte [0x1800b78f0], 8
je 0x18003e0a6
mov ecx, 0xf
lea rdx, [0x18009f218]
mov r9d, eax
mov r8d, r13d
call fcn.180087020
jmp 0x18003e0a6
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test byte [0x1800b78f0], 8
je 0x18003e092
mov ecx, 0x10
mov r8d, eax
lea rdx, [0x18009f218]
call fcn.1800876bc
test rsi, rsi
je 0x18003e0a6
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
nop dword [rax + rax]
call qword [sym.imp.WS2_32.dll_WSACleanup]
nop dword [rax + rax]
nop
jmp 0x18001436a
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test byte [0x1800b78f0], 8
je 0x18003e092
mov ecx, 0x11
jmp 0x18003e083
mov ecx, 0x28
mov dword [rsp + 0x28], r14d
mov r9d, r12d
mov qword [rsp + 0x20], rbx
mov r8d, esi
lea rdx, [0x18009f218]
call fcn.1800894d4
nop
jmp 0x18001420e
mov r8, rbx
lea rcx, [rsp + 0x58]
call fcn.18006f454
nop
jmp 0x18001429b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
test byte [0x1800b78f0], 8
je 0x18003e146
mov dword [rsp + 0x30], eax
mov r9d, r12d
lea rax, [rsp + 0x58]
movzx ecx, r14w
mov qword [rsp + 0x28], rax
mov r8d, esi
mov dword [rsp + 0x20], ecx
call fcn.18008bdc4
mov ebx, 0x267b
jmp 0x18003e092
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test byte [0x1800b78f0], 8
je 0x1800142e3
mov dword [rsp + 0x28], eax
mov r9d, r12d
lea rax, [rsp + 0x58]
mov r8d, esi
mov qword [rsp + 0x20], rax
call fcn.18008bb48
nop
jmp 0x1800142e3
movzx ecx, word [rsp + 0x5a]
call qword [sym.imp.WS2_32.dll_ntohs]
nop dword [rax + rax]
movzx eax, ax
mov r9d, r12d
mov dword [rsp + 0x28], eax
mov r8d, esi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
call fcn.18008bc10
nop
jmp 0x1800142e3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test byte [0x1800b78f0], 8
je 0x18003e092
mov ecx, 0x12
jmp 0x18003e1e4
mov ecx, 0x13
mov r9d, eax
lea rdx, [0x18009f218]
mov r8d, 2
call fcn.180087020
jmp 0x18003e092
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test byte [0x1800b78f0], 8
je 0x18003e092
jmp 0x18003e1df
mov ecx, 0x14
lea rdx, [0x18009f218]
mov r9d, ebx
mov r8d, edi
call fcn.180087020
nop
jmp 0x18001438e