Function at 0x1400f23a0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
push r12
push r14
sub rsp, 0x30
xor r12d, r12d
mov r14d, r9d
mov edi, r8d
mov rbx, rcx
test rcx, rcx
je 0x1400f2698
mov r8, rdx
mov qword [rsp + 0x50], rbp
mov edx, 0x104
mov qword [rsp + 0x58], rsi
add rcx, 0x30
call fcn.14014a538
test eax, eax
jne 0x1400f2601
mov eax, dword [rsp + 0x80]
mov dword [rbx + 0x248], eax
mov dword [rbx + 0x268], r12d
mov qword [rbx + 0x270], r12
mov dword [rbx + 0x238], edi
mov dword [rbx + 0x23c], r14d
mov qword [rbx + 0x240], r12
mov qword [rbx + 0x258], r12
mov qword [rbx + 0x260], r12
mov dword [rbx + 0x24c], 0x40030
mov dword [rbx + 0x250], 0x40030
call fcn.140035f70
mov qword [rbx + 0x18], rax
test rax, rax
je 0x1400f2601
mov rcx, rbx
mov qword [rsp + 0x60], r15
call qword [sym.imp.KERNEL32.DLL_InitializeSRWLock]
lea rdi, [rbx + 0x278]
mov qword [rbx + 8], r12
mov rcx, rdi
mov dword [rbx + 0x10], r12d
call qword [sym.imp.KERNEL32.DLL_InitializeSRWLock]
xor r9d, r9d
mov qword [rdi + 8], r12
xor edx, edx
mov dword [rdi + 0x10], r12d
xor ecx, ecx
mov r8d, 0x7fffffff
call qword [sym.imp.KERNEL32.DLL_CreateSemaphoreW]
mov rcx, rdi
mov dword [rdi + 0x18], r12d
mov qword [rdi + 0x20], rax
mov byte [rdi + 0x14], r12b
call qword [sym.imp.KERNEL32.DLL_AcquireSRWLockExclusive]
mov rcx, rdi
mov byte [rdi + 0x14], r12b
call qword [sym.imp.KERNEL32.DLL_ReleaseSRWLockExclusive]
mov r15d, dword [rbx + 0x248]
mov ecx, r15d
call fcn.1401120e8
mov rsi, rax
test rax, rax
je 0x1400f24d0
mov r8d, r15d
xor edx, edx
mov rcx, rax
call fcn.140104310
mov r15, qword [rsp + 0x60]
mov qword [rbx + 0x240], rsi
test rsi, rsi
je 0x1400f2601
mov ecx, 0x298
call fcn.1400f2250
mov qword [rbx + 0x28], rax
test rax, rax
je 0x1400f2601
lea rdx, [rbx + 0x30]
mov dword [rsp + 0x20], r14d
mov r9d, 1
mov rcx, rax
cmp dword [rbx + 0x238], r12d
jne 0x1400f251c
xor r8d, r8d
jmp 0x1400f251f
mov r8d, r9d
call fcn.1400f4650
test eax, eax
je 0x1400f2601
cmp qword [rbx + 0x240], r12
je 0x1400f2601
mov rax, qword [rsp + 0x70]
mov qword [rbx + 0x258], rax
mov rax, qword [rsp + 0x78]
mov qword [rbx + 0x260], rax
cmp qword [rbx + 0x28], r12
je 0x1400f257c
mov qword [rsp + 0x28], r12
lea r8, [0x1400f29c0]
mov r9, rbx
mov dword [rsp + 0x20], r12d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateThread]
mov qword [rbx + 0x270], rax
cmp qword [rbx + 0x270], r12
je 0x1400f2601
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_AcquireSRWLockExclusive]
mov rcx, rdi
cmp byte [rdi + 0x14], r12b
je 0x1400f259f
call qword [sym.imp.KERNEL32.DLL_ReleaseSRWLockExclusive]
jmp 0x1400f25e3
inc dword [rdi + 0x18]
call qword [sym.imp.KERNEL32.DLL_ReleaseSRWLockExclusive]
mov rcx, qword [rdi + 0x20]
mov edx, 0x1f4
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov esi, eax
test eax, eax
je 0x1400f25e3
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_AcquireSRWLockExclusive]
mov eax, dword [rdi + 0x18]
test eax, eax
je 0x1400f25d2
dec eax
mov dword [rdi + 0x18], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_ReleaseSRWLockExclusive]
cmp esi, 0x102
jne 0x1400f2601
mov eax, 1
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x68]
add rsp, 0x30
pop r14
pop r12
pop rdi
ret
mov rcx, qword [rbx + 0x28]
mov dword [rbx + 0x268], 1
test rcx, rcx
je 0x1400f2619
call fcn.1400f35c0
mov rcx, qword [rbx + 0x270]
test rcx, rcx
je 0x1400f2644
mov edx, 0x7d0
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov rcx, qword [rbx + 0x270]
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov qword [rbx + 0x270], r12
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1400f2664
call fcn.1400f48b0
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1400f2660
call fcn.1401120d4
mov qword [rbx + 0x28], r12
mov rcx, qword [rbx + 0x240]
test rcx, rcx
je 0x1400f267c
call fcn.1401120d4
mov qword [rbx + 0x240], r12
mov rcx, qword [rbx + 0x18]
lea rdx, [0x1400f2dd0]
call fcn.140036140
mov eax, r12d
mov qword [rbx + 0x18], r12
jmp 0x1400f25e8
mov rbx, qword [rsp + 0x68]
mov eax, r12d
add rsp, 0x30
pop r14
pop r12
pop rdi
ret