Function at 0x140072a3c
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 [0x140147c28], edi
lea r12d, [rdi + 1]
mov r14d, eax
jne 0x140072a85
lea rcx, [0x140147c30]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x140147c28], r12d
lea rcx, [0x140147c30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140147c20]
test rbx, rbx
je 0x140072af3
test edi, edi
jne 0x140072c97
mov edx, r12d
mov rcx, r12
lea rax, [rbx + 0x224]
cmp r14d, dword [rax]
je 0x140072aca
add rcx, r12
add edx, r12d
add rax, 4
cmp rcx, 0x40
jl 0x140072ab3
jmp 0x140072ae3
movsxd rcx, edx
mov r8, rsi
mov rdx, rbp
add rcx, 0x64
lea rcx, [rbx + rcx*8]
call fcn.1400729a4
mov edi, r12d
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140072a9e
test edi, edi
jne 0x140072c97
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 0x140072c97
mov rbx, qword [0x140147c20]
jmp 0x140072b4f
cmp dword [rbx + 0x18], 0x3f
jl 0x140072c1c
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140072b42
mov rcx, qword [0x140146d3c]
lea edx, [rbx + 8]
mov r8d, 0x520
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x140072c8c
xor r9d, r9d
mov r8d, r12d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov qword [rbx + 0x10], rax
test rax, rax
je 0x140072c7a
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
mov qword [rbx + 0x20], rax
mov rax, qword [rsp + 0x70]
mov dword [rbx + 0x224], r14d
lea rdi, [rbx + 0x328]
and qword [rdi], 0
mov qword [rbx + 0x28], rax
lea r8, [0x140072cc0]
mov r9, rbx
mov edx, 0x1000
xor ecx, ecx
mov dword [rbx + 0x18], 2
call qword [sym.imp.KERNEL32.dll_CreateThread]
test rax, rax
je 0x140072c70
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8, rsi
mov rdx, rbp
mov rcx, rdi
call fcn.1400729a4
mov rax, qword [0x140147c20]
and qword [rbx + 8], 0
mov qword [rbx], rax
test rax, rax
je 0x140072c13
mov qword [rax + 8], rbx
mov qword [0x140147c20], rbx
jmp 0x140072c97
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], r14d
movsxd rax, dword [rbx + 0x18]
and qword [rbx + rax*8 + 0x320], 0
movsxd rcx, dword [rbx + 0x18]
add rcx, 0x64
lea rcx, [rbx + rcx*8]
call fcn.1400729a4
mov rcx, qword [rbx + 0x10]
add dword [rbx + 0x18], r12d
xor r8d, r8d
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x140072c97
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140146d3c]
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, [0x140147c30]
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