Function at 0x140006320
Capabilities:
Create thread

Disassembly:
push rdi
sub rsp, 0x50
cmp byte [rcx + 0x1f], 0
mov rdi, rcx
je 0x1400065e4
cmp byte [rcx + 0x14], 0
jne 0x140006343
cmp dword [rcx + 0x24], 5
jne 0x1400065e4
cmp dword [rcx + 0x24], 5
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r15
movaps xmmword [rsp + 0x20], xmm6
mov byte [rcx + 0x7d], 1
jne 0x140006370
call fcn.140005fa0
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x78], rsi
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
movsxd r15, dword [rdi + 0x70]
xor r14b, r14b
movsxd rbp, dword [rdi + 0x40]
mov rcx, rax
movabs rax, 0x6666666666666667
imul rcx
sar rdx, 2
mov rax, rdx
shr rax, 0x3f
add rdx, rax
add r15, rdx
add rbp, rdx
cmp dword [rdi + 0x28], 2
jne 0x1400063ba
mov sil, 1
jmp 0x1400063f1
mov ebx, dword [rdi + 0x88]
test ebx, ebx
jne 0x1400063c9
xor sil, sil
jmp 0x1400063f1
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov r8d, eax
mov eax, 0x288df0cb
imul r8d
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul ecx, edx, 0x65
sub r8d, ecx
cmp r8d, ebx
setle sil
movss xmm6, dword [0x14008cfbc]
movabs r13, 0x7ffffffffff0bdbf
movabs r12, 0x7fffffffffffffff
nop dword [rax]
cmp byte [rdi + 0x14], 0
jne 0x140006420
cmp dword [rdi + 0x24], 5
jne 0x1400065b8
cmp byte [rdi + 0x1f], 0
je 0x1400065b8
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rbx, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp rbx, 0x989680
jne 0x140006448
imul rax, rax, 0x64
jmp 0x140006466
cqo
idiv rbx
mov rcx, rax
imul rax, rdx, 0x3b9aca00
imul rcx, rcx, 0x3b9aca00
cqo
idiv rbx
add rax, rcx
cmp rax, r13
jge 0x140006478
add rax, 0xf4240
mov qword [rsp + 0x60], rax
jmp 0x14000647d
mov qword [rsp + 0x60], r12
lea rcx, [rsp + 0x60]
call fcn.140009a00
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
mov rcx, rax
movabs rax, 0x6666666666666667
imul rcx
mov rbx, rdx
sar rbx, 2
mov rax, rbx
shr rax, 0x3f
add rbx, rax
cmp byte [rdi + 0x7c], 0
je 0x1400064dc
test r14b, r14b
jne 0x1400064dc
cmp rbx, rbp
jl 0x1400064dc
test sil, sil
je 0x1400064d9
mov rcx, rdi
call fcn.140005fa0
cmp byte [rdi + 0x21], r14b
jne 0x1400064d9
mov rcx, rdi
call fcn.140005f10
mov r14b, 1
cmp rbx, r15
jl 0x140006410
mov rcx, rdi
call fcn.140005fa0
cmp byte [rdi + 0xc1], 0
je 0x140006546
mov ecx, dword [rdi + 0xc4]
test ecx, ecx
je 0x140006518
sub ecx, 1
je 0x14000651e
sub ecx, 1
je 0x140006534
cmp ecx, 1
jne 0x140006546
lea rcx, [0x14007c4c0]
jmp 0x14000653b
cmp byte [rdi + 0x7c], 0
je 0x140006527
lea rcx, [0x14007b8b0]
jmp 0x14000653b
comiss xmm6, dword [rdi + 0x64]
lea rcx, [0x14007c4c0]
ja 0x14000653b
lea rcx, [0x14007c070]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthread]
cmp byte [rdi + 0x21], 0
jne 0x140006554
mov rcx, rdi
call fcn.140005f10
movsxd rax, dword [rdi + 0x70]
xor r14b, r14b
add r15, rax
imul eax, dword [rdi + 0x40], 0x3e8
movsxd rbp, eax
add rbp, rbx
cmp dword [rdi + 0x28], 2
jne 0x140006579
mov sil, 1
jmp 0x140006410
mov ebx, dword [rdi + 0x88]
test ebx, ebx
jne 0x14000658b
xor sil, sil
jmp 0x140006410
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov r8d, eax
mov eax, 0x288df0cb
imul r8d
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul ecx, edx, 0x65
sub r8d, ecx
cmp r8d, ebx
setle sil
jmp 0x140006410
movaps xmm6, xmmword [rsp + 0x20]
mov r15, qword [rsp + 0x30]
mov r14, qword [rsp + 0x38]
mov r13, qword [rsp + 0x40]
mov r12, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x68]
mov byte [rdi + 0x7d], 0
add rsp, 0x50
pop rdi
ret