Function at 0x180020504
Capabilities:
Create thread
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x200
mov rax, qword [0x180066008]
xor rax, rsp
mov qword [rsp + 0x1f0], rax
mov ebx, 0xffff
mov r15, r9
mov ecx, ebx
mov rsi, rdx
call qword [sym.imp.KERNEL32.dll_GetActiveProcessorCount]
mov r14d, eax
lea eax, [rbx - 1]
cmp r14d, ebx
cmovae r14d, eax
xor r12d, r12d
test r15, r15
je 0x18003ee24
test rsi, rsi
je 0x180020579
cmp qword [rsi], r12
je 0x18003ee24
cmp qword [rsi + 8], r12
je 0x18003ee24
mov ecx, 0x202
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov ebx, eax
test eax, eax
jne 0x18003ee2e
mov rcx, qword [0x180069238]
lea eax, [r14 + r14*4]
shl eax, 5
xor edx, edx
sub eax, 0xffffff80
mov r8d, eax
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x18003ee5f
mov r8d, ebx
xor edx, edx
mov rcx, rax
call fcn.180029d60
test rsi, rsi
je 0x1800205d7
movups xmm0, xmmword [rsi]
movdqu xmmword [rdi + 0x38], xmm0
mov word [rdi + 0x74], r14w
xor r9d, r9d
mov r14d, 1
mov dword [rdi + 0x68], 0x30
xor r8d, r8d
mov qword [rdi + 0x28], r14
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rcx, rdi
mov qword [rdi + 0x30], rax
call fcn.180020a90
mov rcx, rdi
call fcn.18002081c
mov ebx, eax
test eax, eax
js 0x18003ef28
mov byte [rdi + 5], r14b
movzx ebx, r12w
mov eax, dword [rdi]
and al, 2
mov dword [rdi + 0x6c], 0x58
neg al
sbb ecx, ecx
and ecx, 0x15a8
add ecx, 0xa0
mov dword [rdi + 0x70], ecx
lea r13d, [rcx + 0xfff7]
cmp r12w, word [rdi + 0x74]
jae 0x1800207dc
mov sil, 4
movzx r14d, bx
lea rcx, [rdi + 0xa0]
lea rbp, [r14 + r14*4]
shl rbp, 5
add rcx, rbp
mov word [rdi + rbp + 0x9c], bx
lea r12, [rdi + rbp]
mov qword [r12 + 0x80], rdi
mov dword [rcx + 0x10], 0x90
mov dword [rcx + 0x14], 0x41316351
call qword [sym.imp.KERNEL32.dll_InitializeSListHead]
lea rcx, [rdi + 0xc0]
add rcx, rbp
mov dword [rcx + 0x10], 0x5c0
mov dword [rcx + 0x14], 0x36306351
call qword [sym.imp.KERNEL32.dll_InitializeSListHead]
lea rcx, [rdi + 0xe0]
add rcx, rbp
mov dword [rcx + 0x10], 0xffff
mov dword [rcx + 0x14], 0x36306351
call qword [sym.imp.KERNEL32.dll_InitializeSListHead]
lea rcx, [rdi + 0x100]
add rcx, rbp
mov dword [rcx + 0x10], r13d
mov dword [rcx + 0x14], 0x36306351
call qword [sym.imp.KERNEL32.dll_InitializeSListHead]
mov r9d, 1
xor r8d, r8d
xor edx, edx
or rcx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov qword [rdi + rbp + 0x88], rax
test rax, rax
je 0x18003eee7
and qword [rsp + 0x28], 0
lea r9, [r12 + 0x80]
and dword [rsp + 0x20], 0
lea r8, [0x18001ba20]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor r12d, r12d
mov qword [rdi + rbp + 0x90], rax
mov r10, rax
test rax, rax
je 0x18003eec5
mov r8, qword [0x180067c40]
lea r9, [r14 + r14*2]
xorps xmm0, xmm0
lea r14d, [r12 + 1]
movups xmmword [rsp + 0x30], xmm0
mov edx, r14d
mov ecx, dword [r8 + r9*8 + 4]
shl rdx, cl
mov rcx, r10
mov qword [rsp + 0x30], rdx
lea rdx, [rsp + 0x30]
movzx eax, word [r8 + r9*8]
xor r8d, r8d
mov word [rsp + 0x38], ax
call qword [sym.imp.KERNEL32.dll_SetThreadGroupAffinity]
test eax, eax
je 0x18003eea3
lea rdx, str.cxplat_datapath
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rdi + rbp + 0x90]
lea r9d, [r12 + 0x10]
lea r8, [rsp + 0x40]
lea edx, [r12 + 0x26]
call qword [sym.imp.ntdll.dll_NtSetInformationThread]
test eax, eax
js 0x18003ee81
add bx, r14w
cmp bx, word [rdi + 0x74]
jb 0x180020656
mov qword [r15], rdi
mov ebx, r12d
mov eax, ebx
mov rcx, qword [rsp + 0x1f0]
xor rcx, rsp
call fcn.180028c10
lea r11, [rsp + 0x200]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
jns 0x1800207e2
jmp 0x18003ef28
mov ebx, 0x80070057
jmp 0x1800207e2
mov sil, 4
test byte [0x180067c70], sil
je 0x18003ee49
lea r9, str.WSAStartup
mov r8d, ebx
call fcn.18004176c
test ebx, ebx
jle 0x1800207e2
movzx ebx, bx
or ebx, 0x80070000
jmp 0x1800207e2
test byte [0x180067c70], 2
je 0x18003ee77
mov r9, rbx
lea r8, str.CXPLAT_DATAPATH
call fcn.180041870
mov ebx, 0x8007000e
jmp 0x18003efc6
test byte [0x180067c70], sil
je 0x1800207ce
lea r9, str.NtSetInformationThread_name_
mov r8d, eax
call fcn.18004176c
nop
jmp 0x1800207ce
call qword [sym.imp.KERNEL32.dll_GetLastError]
test byte [0x180067c70], sil
mov ebx, eax
je 0x18003ef10
lea r9, [0x18005f420]
mov r8d, eax
call fcn.18004176c
jmp 0x18003ef10
call qword [sym.imp.KERNEL32.dll_GetLastError]
test byte [0x180067c70], sil
mov ebx, eax
je 0x18003ef0a
lea r9, [0x18005f410]
mov r8d, eax
call fcn.18004176c
jmp 0x18003ef0a
call qword [sym.imp.KERNEL32.dll_GetLastError]
test byte [0x180067c70], sil
mov ebx, eax
je 0x18003ef07
lea r9, [0x180059d00]
mov r8d, eax
call fcn.18004176c
xor r12d, r12d
mov r14d, 1
test ebx, ebx
jle 0x180020815
movzx ebx, bx
or ebx, 0x80070000
test ebx, ebx
jmp 0x180020815
movzx ebp, r12w
cmp r12w, word [rdi + 0x74]
jae 0x18003efaa
movzx eax, bp
lea rsi, [rax + rax*4]
shl rsi, 5
mov rcx, qword [rsi + rdi + 0x88]
test rcx, rcx
je 0x18003ef51
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsi + rdi + 0x90]
test rcx, rcx
je 0x18003ef64
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rdi + 0xa0]
add rcx, rsi
call fcn.180023464
lea rcx, [rdi + 0xc0]
add rcx, rsi
call fcn.180023464
lea rcx, [rdi + 0xe0]
add rcx, rsi
call fcn.180023464
lea rcx, [rdi + 0x100]
add rcx, rsi
call fcn.180023464
add bp, r14w
cmp bp, word [rdi + 0x74]
jb 0x18003ef33
mov rcx, qword [rdi + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x180069238]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.WS2_32.dll_WSACleanup]
nop
jmp 0x1800207e2