Function at 0x14001c4b4
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r14
sub rsp, 0x40
mov rsi, rdx
mov rbp, rcx
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1400cd5a8], edi
lea r14d, [rdi + 1]
mov r12d, eax
jne 0x14001c4fd
lea rcx, [0x1400cd578]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x1400cd5a8], r14d
lea rcx, [0x1400cd578]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400cd5a0]
test rbx, rbx
je 0x14001c56b
test edi, edi
jne 0x14001c710
mov edx, r14d
mov rcx, r14
lea rax, [rbx + 0x224]
cmp r12d, dword [rax]
je 0x14001c542
add rcx, r14
add edx, r14d
add rax, 4
cmp rcx, 0x40
jl 0x14001c52b
jmp 0x14001c55b
movsxd rax, edx
mov r8, rsi
mov rdx, rbp
lea rcx, [rbx + rax*8 + 0x320]
call fcn.14001c264
mov edi, r14d
mov rbx, qword [rbx]
test rbx, rbx
jne 0x14001c516
test edi, edi
jne 0x14001c710
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
lea r9, [rsp + 0x70]
mov r8, rdi
mov rcx, rax
mov rdx, rbx
mov dword [rsp + 0x20], 0x100000
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x14001c710
mov rbx, qword [0x1400cd5a0]
jmp 0x14001c5c7
cmp dword [rbx + 0x18], 0x3f
jl 0x14001c695
mov rbx, qword [rbx]
test rbx, rbx
jne 0x14001c5ba
mov rcx, qword [0x1400cc720]
lea edx, [rbx + 8]
mov r8d, 0x520
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x14001c705
xor r9d, r9d
mov r8d, r14d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov qword [rbx + 0x10], rax
test rax, rax
je 0x14001c6f3
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
mov qword [rbx + 0x20], rax
mov rax, qword [rsp + 0x70]
and qword [rbx + 0x328], 0
lea r8, [0x14001c2fc]
mov r9, rbx
mov edx, 0x1000
xor ecx, ecx
mov qword [rbx + 0x28], rax
mov dword [rbx + 0x224], r12d
mov dword [rbx + 0x18], 2
call qword [sym.imp.KERNEL32.dll_CreateThread]
test rax, rax
je 0x14001c6e9
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x328]
mov r8, rsi
mov rdx, rbp
call fcn.14001c264
mov rax, qword [0x1400cd5a0]
and qword [rbx + 8], 0
mov qword [rbx], rax
test rax, rax
je 0x14001c68c
mov qword [rax + 8], rbx
mov qword [0x1400cd5a0], rbx
jmp 0x14001c710
movsxd r8, dword [rbx + 0x18]
mov rax, qword [rsp + 0x70]
mov rdx, rbp
mov qword [rbx + r8*8 + 0x20], rax
movsxd rax, dword [rbx + 0x18]
mov r8, rsi
mov dword [rbx + rax*4 + 0x220], r12d
movsxd rax, dword [rbx + 0x18]
and qword [rbx + rax*8 + 0x320], 0
movsxd rax, dword [rbx + 0x18]
lea rcx, [rbx + rax*8 + 0x320]
call fcn.14001c264
mov rcx, qword [rbx + 0x10]
add dword [rbx + 0x18], r14d
xor r8d, r8d
mov edx, r14d
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x14001c710
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1400cc720]
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [0x1400cd578]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop r12
pop rdi
ret