Function at 0x140109fa0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rsi, rdx
mov rdi, rcx
lea rbx, [0x140497a28]
mov rcx, rbx
call fcn.1400e8130
or rbx, 1
mov qword [rsp + 0x50], rbx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x140497a30]
jne 0x140109fe9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14010a21d
mov rax, qword [0x14048d260]
mov edx, dword [rax + 8]
btr edx, 0x1f
mov r8d, dword [rax + 4]
inc r8d
mov ecx, dword [rax]
cmp ecx, 1
ja 0x14010a00c
cmp edx, r8d
jb 0x14010a00f
jmp 0x14010a03d
cmp edx, r8d
sbb ecx, ecx
and ecx, 8
mov rax, qword [0x14048d260]
cmp r8d, edx
jbe 0x14010a027
mov edx, dword [rax + 4]
inc edx
jmp 0x14010a02e
mov edx, dword [rax + 8]
btr edx, 0x1f
mov r8d, ecx
lea rcx, [0x14048d260]
call fcn.14004e7b0
mov rax, qword [0x14048d260]
movsxd rdx, dword [rax + 4]
mov rcx, qword [rax + 0x10]
lea rdx, [rcx + rdx*8]
mov qword [rdx + rax], rdi
mov rax, qword [0x14048d260]
inc dword [rax + 4]
mov rax, qword [0x14048d268]
mov edx, dword [rax + 8]
btr edx, 0x1f
mov r8d, dword [rax + 4]
inc r8d
mov ecx, dword [rax]
cmp ecx, 1
ja 0x14010a081
cmp edx, r8d
jb 0x14010a084
jmp 0x14010a0b2
cmp edx, r8d
sbb ecx, ecx
and ecx, 8
mov rax, qword [0x14048d268]
cmp r8d, edx
jbe 0x14010a09c
mov edx, dword [rax + 4]
inc edx
jmp 0x14010a0a3
mov edx, dword [rax + 8]
btr edx, 0x1f
mov r8d, ecx
lea rcx, [0x14048d268]
call fcn.14010a240
mov rax, qword [0x14048d268]
movsxd rdx, dword [rax + 4]
mov rcx, qword [rax + 0x10]
lea rdx, [rcx + rdx*8]
mov qword [rdx + rax], rsi
mov rax, qword [0x14048d268]
inc dword [rax + 4]
cmp dword [0x140497a30], 0
jne 0x14010a20b
cmp qword [0x140497a38], 0
jne 0x14010a1d8
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x140497a38], rax
mov rax, qword [0x14048d260]
mov ecx, dword [rax]
cmp ecx, 1
jbe 0x14010a152
mov rax, qword [0x14048d260]
mov edx, dword [rax + 8]
and edx, 0x7fffffff
jne 0x14010a143
mov r9d, 2
xor r8d, r8d
mov edx, 8
mov ecx, edx
call fcn.1400afdf0
mov qword [0x14048d260], rax
jmp 0x14010a152
xor r8d, r8d
lea rcx, [0x14048d260]
call fcn.14004e7b0
mov rsi, qword [0x140497a38]
mov rax, qword [0x14048d260]
mov ecx, dword [rax]
mov rax, qword [0x14048d260]
cmp ecx, 1
ja 0x14010a181
mov r9d, dword [rax + 8]
btr r9d, 0x1f
mov edx, dword [rax + 4]
inc edx
cmp edx, r9d
jle 0x14010a19f
mov edx, dword [rax + 4]
inc edx
mov r8d, 8
lea rcx, [0x14048d260]
call fcn.14004e7b0
mov rax, qword [0x14048d260]
mov rdi, qword [rax + 0x10]
add rdi, rax
lea rbx, [rdi + 8]
movsxd r8, dword [rax + 4]
shl r8, 3
mov rdx, rdi
mov rcx, rbx
call fcn.140258d60
cmp rbx, rdi
je 0x14010a1ce
sub rbx, 8
mov qword [rbx], rsi
cmp rbx, rdi
jne 0x14010a1c2
mov rax, qword [0x14048d260]
inc dword [rax + 4]
lea rax, [0x140497a30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x140109ac0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14010a218
mov rcx, qword [0x140497a38]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rbx, qword [rsp + 0x50]
test bl, 1
je 0x14010a22e
and rbx, 0xfffffffffffffffe
mov rcx, rbx
call fcn.1400e8640
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret