Function at 0x140037de0
Capabilities:
Create thread

Disassembly:
push rbx
push r12
push r15
sub rsp, 0x40
mov rbx, rcx
lea rcx, [rsp + 0x68]
mov r15d, 1
mov word [rsp + 0x68], r15w
call fcn.140037740
mov edx, dword [0x1401a5f6c]
mov r12, rax
test edx, edx
je 0x140037e1d
mov eax, r15d
add rsp, 0x40
pop r15
pop r12
pop rbx
ret
cmp word [rsp + 0x68], r15w
jbe 0x140037e3a
mov qword [0x140148880], 0x100
mov dword [0x140148888], 0x200
cmp rax, rbx
jbe 0x140037e42
sub r12, rbx
cmp r12, 2
jb 0x140037e10
mov rax, qword [0x140148880]
mov qword [rsp + 0x38], r13
cmp r12, rax
jbe 0x140037e60
mov r12, qword [0x140148880]
xor r13d, r13d
xor r9d, r9d
xor r8d, r8d
mov dword [0x1401a5f70], r13d
mov dword [0x14019854c], r13d
xor edx, edx
xor ecx, ecx
mov dword [0x1401a5f68], r13d
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x140198540], rax
test rax, rax
je 0x140037ee2
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x1401a5758], rax
test rax, rax
je 0x140037ee2
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x1401a5750], rax
test rax, rax
je 0x140037ee2
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x1401a5f60], rax
test rax, rax
jne 0x140037ef3
xor eax, eax
mov r13, qword [rsp + 0x38]
add rsp, 0x40
pop r15
pop r12
pop rbx
ret
mov qword [rsp + 0x78], rdi
lea rdi, [0x140198550]
xor edx, edx
mov rcx, rdi
mov r8d, 0xd000
call fcn.1400a4ea0
mov rbx, r13
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rbx + rdi], r13d
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + rdi + 8], rax
test rax, rax
je 0x14003806d
add rbx, 0x68
cmp rbx, 0xd000
jb 0x140037f12
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x70], rsi
mov dword [0x140198548], r13d
mov qword [rsp + 0x30], r14
test r12, r12
je 0x140038037
movzx esi, word [rsp + 0x68]
lea r14, [0x140000000]
nop dword [rax]
mov r9, r13
cmp si, r15w
jbe 0x140037ff7
lea rcx, str.Kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.GetActiveProcessorCount
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbp, rax
test rax, rax
je 0x140037fde
mov edi, r13d
movzx ebx, r13w
cmp r13w, si
jae 0x140037fd6
nop dword [rax + rax]
movzx ecx, bx
call rbp
mov ecx, dword [0x140198548]
add edi, eax
cmp edi, ecx
jae 0x140037fcb
inc bx
cmp bx, si
jb 0x140037fb0
jmp 0x140037fed
mov word [r14 + rcx*2 + 0x1a5550], bx
jmp 0x140037fed
mov ecx, dword [0x140198548]
jmp 0x140037fed
mov ecx, dword [0x140198548]
mov word [r14 + rcx*2 + 0x1a5550], r13w
mov eax, ecx
lea r9, [r14 + rax*2 + 0x1a5550]
lea r8, [0x140037320]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], r13d
call fcn.1400a820c
mov edx, dword [0x140198548]
mov qword [r14 + rdx*8 + 0x1a5760], rax
test rax, rax
je 0x140038064
inc edx
mov eax, edx
mov dword [0x140198548], edx
cmp rax, r12
jb 0x140037f70
mov dword [0x1401a5f6c], r15d
mov eax, r15d
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
mov r14, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x78]
mov r13, qword [rsp + 0x38]
add rsp, 0x40
pop r15
pop r12
pop rbx
ret
call fcn.140037820
xor eax, eax
jmp 0x140038041
call fcn.140037820
xor eax, eax
jmp 0x140038050