Function at 0x180020f10
Capabilities:
Create thread

Disassembly:
mov rax, rsp
push r14
sub rsp, 0xf0
mov qword [rax - 0x30], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x180118b10]
xor rax, rsp
mov qword [rsp + 0xe8], rax
mov r14, rcx
cmp edx, 1
jne 0x180021203
call fcn.18001f730
test al, al
jne 0x180020f5e
xor eax, eax
jmp 0x180021208
mov cl, 1
call fcn.180084f24
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x58]
call fcn.18004b220
nop
lea r8, [rsp + 0x38]
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.180006da0
mov rcx, rax
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xc0], 8
mov r10, qword [rax + 0x10]
mov qword [rsp + 0xb0], r10
cmp qword [rax + 0x18], 8
jb 0x180020fb4
mov rcx, qword [rax]
mov eax, 8
cmp r10, rax
cmovb rax, r10
mov qword [rsp + 0xb8], rax
test rax, rax
je 0x180021026
mov qword [rsp + 0x48], rax
lea rdx, str.wajam_64
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x40], rcx
test rax, rax
je 0x180021026
movzx r8d, word [rcx]
movzx r9d, word [rdx]
cmp r8w, r9w
je 0x18002100a
mov eax, 1
or rdi, 0xffffffffffffffff
cmp r8w, r9w
cmovb eax, edi
xor ebx, ebx
jmp 0x18002102e
add rcx, 2
mov qword [rsp + 0x40], rcx
add rdx, 2
mov qword [rsp + 0x50], rdx
dec rax
mov qword [rsp + 0x48], rax
jmp 0x180020fe3
xor ebx, ebx
or rdi, 0xffffffffffffffff
mov eax, ebx
movsxd rcx, eax
mov qword [rsp + 0xa0], rcx
test eax, eax
je 0x180021043
mov dword [rsp + 0x34], ecx
jmp 0x180021060
cmp r10, 8
jae 0x180021051
mov ecx, edi
mov dword [rsp + 0x34], ecx
jmp 0x180021060
mov eax, ebx
cmp r10, 8
setne al
mov ecx, eax
mov dword [rsp + 0x34], eax
test ecx, ecx
sete sil
mov byte [rsp + 0x30], sil
cmp qword [rsp + 0x90], 8
jb 0x180021080
mov rcx, qword [rsp + 0x78]
call fcn.180089ef8
mov qword [rsp + 0x90], 7
mov qword [rsp + 0x88], rbx
mov word [rsp + 0x78], bx
cmp qword [rsp + 0x70], 8
jb 0x1800210ab
mov rcx, qword [rsp + 0x58]
call fcn.180089ef8
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], rbx
mov word [rsp + 0x58], bx
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1800210e9
mov rax, qword [rcx]
call qword [rax + select]
mov qword [rsp + 0xa8], rax
test rax, rax
je 0x1800210e9
mov r8, qword [rax]
mov edx, 1
mov rcx, rax
call qword [r8]
test sil, sil
je 0x1800210f8
mov eax, 1
jmp 0x180021208
mov qword [0x180126b28], r14
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x180126b20], eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
call fcn.180021240
cmp word [rax], 0
jne 0x180021124
mov r8, rbx
jmp 0x18002113b
mov r8, rdi
nop word [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x180021130
mov rdx, rax
lea rcx, [0x18011a2e0]
call fcn.180006180
mov rcx, r14
call fcn.18004bdb0
mov dword [rsp + 0xd0], ebx
xor eax, eax
mov qword [rsp + 0xd8], rax
mov qword [rsp + 0xe0], rax
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
xor r9d, r9d
lea r8, [0x180020e90]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdx, rax
lea rcx, [rsp + 0xd8]
call fcn.180065ac0
nop
mov rax, qword [rsp + 0xd8]
test rax, rax
je 0x1800211b1
mov rbx, qword [rax]
mov edx, select
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov ecx, 0x5dc
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov rbx, qword [rsp + 0xe0]
test rbx, rbx
je 0x180021203
mov eax, edi
lock xadd dword [rbx + 8], eax
dec eax
jne 0x180021203
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
dec edi
jne 0x180021203
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + ioctlsocket]
jmp 0x180021203
mov eax, 1
mov rcx, qword [rsp + 0xe8]
xor rcx, rsp
call fcn.180089cd0
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret