Function at 0x1802aff40
Capabilities:
Create thread

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rdi
push r14
push r15
sub rsp, 0x50
mov qword [rax - 0x30], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov esi, r9d
mov r14, r8
mov r15, rdx
mov rdi, rcx
mov dword [rax - 0x44], 0
call fcn.1802b0590
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea rcx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov ecx, RegisterTypeLib
call fcn.18011da30
mov rbx, rax
mov qword [rsp + 0x40], rax
test rax, rax
je 0x1802affb4
xor edx, edx
mov r8d, RegisterTypeLib
mov rcx, rax
call fcn.1802c7550
jmp 0x1802affb6
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov rax, qword [rsp + 0x28]
lock inc dword [rax + 0x80]
mov rax, qword [rsp + 0x28]
mov qword [rax + 8], rdi
mov rax, qword [rsp + 0x28]
mov qword [rax], r15
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x10], r14
mov rax, qword [rsp + 0x28]
mov dword [rax + 0x18], esi
mov rsi, qword [rsp + 0x90]
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], rsi
mov rcx, qword [rsp + 0xa0]
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x48], rcx
mov ecx, dword [rsp + 0xa8]
mov rax, qword [rsp + 0x28]
mov dword [rax + 0x50], ecx
cmp byte [rdi + 0x68], 0
je 0x1802b00fb
mov rbx, qword [rsp + 0x28]
mov qword [rsp + 0x48], rbx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x60], rax
mov rax, qword [rsp + 0x28]
lock inc dword [rax + 0x80]
mov r8, qword [rsp + 0x28]
xor edx, edx
lea rcx, [0x1802b0190]
call fcn.1802d0e40
mov edx, dword [rsi + 4]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x60]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
sete r14b
mov byte [rsp + 0x20], r14b
mov rsi, qword [rsp + 0x98]
test r14b, r14b
jne 0x1802b00d0
test rsi, rsi
je 0x1802b00b0
mov rax, qword [rsp + 0x28]
xor ecx, ecx
xchg dword [rax + 0x40], ecx
neg ecx
sbb eax, eax
and eax, 0x2ed9
mov dword [rsi], eax
movzx r14d, byte [rsp + 0x20]
mov rbx, qword [rsp + 0xb0]
test rbx, rbx
je 0x1802b00c3
mov dword [rbx], 0x2ed9
mov dword [rsp + 0x24], 0xffff
inc dword [rdi + 0x24]
jmp 0x1802b00d8
mov rbx, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x60], 0
test r14b, r14b
je 0x1802b014c
jmp 0x1802b0115
mov rcx, qword [rsp + 0x28]
call fcn.1802afc90
mov rbx, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0x98]
test rsi, rsi
je 0x1802b0124
mov rax, qword [rsp + 0x28]
mov ecx, dword [rax + 0x40]
mov dword [rsi], ecx
mov rax, qword [rsp + 0x28]
test rbx, rbx
je 0x1802b0133
mov ecx, dword [rax + 0x54]
mov dword [rbx], ecx
mov ecx, dword [rax + 0x58]
mov dword [rsp + 0x24], ecx
cmp dword [rax + 0x54], 0
je 0x1802b0145
inc dword [rdi + 0x24]
jmp 0x1802b014c
mov dword [rdi + 0x24], 0
mov rcx, qword [rsp + 0x28]
test rcx, rcx
je 0x1802b0161
mov edx, RegisterTypeLib
call fcn.1802b8d50
nop
jmp 0x1802b0168
lea rcx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [rsp + 0x24]
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x50
pop r15
pop r14
pop rdi
ret