Function at 0x140374a90
Capabilities:
Create thread

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
movsxd rax, dword [rdx]
test eax, eax
mov rsi, rcx
mov rbx, rdx
mov qword [rdx + 8], rcx
jle 0x140374cb8
cmp r8d, 2
je 0x140374d70
lea r12, [rax + rax*4]
xor edi, edi
shl r12, 4
nop word [rax + rax]
mov rbp, qword [rbx + 0x18]
add rbp, rdi
mov rax, qword [rbp + 0x48]
test rax, rax
je 0x140374bb0
mov edx, dword [rax + 0x20]
test edx, edx
je 0x140374c90
mov r14, qword [rax]
mov eax, dword [0x140398100]
mov qword [r14], 0
test eax, eax
je 0x140374d40
mov rcx, qword [0x140397da0]
test rcx, rcx
je 0x140374b19
call qword [0x140398180]
mov ecx, 0x28
call fcn.140312d00
mov r13, rax
test r13, r13
je 0x140374d57
cmp byte [0x140398104], 0
je 0x140374ce0
mov rax, qword [0x140398290]
test rax, rax
je 0x140374b57
mov ecx, 0xc8
call rax
test eax, eax
jne 0x140374ce0
lea rax, [fcn.140375830]
mov qword [r13 + 0x18], rbp
xor edx, edx
xor ecx, ecx
mov qword [r13 + 0x10], rax
lea rax, [r13 + 8]
mov r9, r13
mov qword [rsp + 0x28], rax
lea r8, [0x14032bac0]
mov dword [rsp + 0x20], 0
call qword [sym.imp.msvcrt.dll__beginthreadex]
test rax, rax
mov qword [r13], rax
je 0x140374ce0
cmp qword [r13 + 0x10], 0
je 0x140374d08
mov qword [r14], r13
nop word cs:[rax + rax]
add rdi, 0x50
cmp rdi, r12
jne 0x140374ad0
mov edx, dword [rbx]
lea ebp, [rdx - 1]
test ebp, ebp
jle 0x140374cb8
lea rdi, [rsp + 0x3c]
movsxd r12, ebp
shl r12, 2
jmp 0x140374c62
mov r13d, ebp
sub r13d, eax
add r13d, r13d
lea r14d, [r13 + 1]
mov rdx, qword [rbx + 0x18]
movsxd rax, r13d
lea rax, [rax + rax*4]
shl rax, 4
add rax, rdx
cmp qword [rax + 0x18], 0
je 0x140374c4f
movsxd rcx, r14d
lea rcx, [rcx + rcx*4]
shl rcx, 4
add rdx, rcx
cmp qword [rdx + 0x18], 0
je 0x140374cd0
mov r9d, dword [rax + 0x14]
mov dword [rsp + 0x3c], 0
mov r8, qword [rax + 0x28]
mov eax, dword [rdx + 0x14]
mov rcx, qword [rbx + 8]
mov dword [rsp + 0x28], eax
mov rax, qword [rdx + 0x28]
mov rdx, rdi
mov qword [rsp + 0x20], rax
call qword [rcx + 0x40]
test eax, eax
cmovle r14d, r13d
mov rax, qword [rbx + 0x10]
mov dword [rax + r12], r14d
sub r12, 4
sub ebp, 1
je 0x140374cb8
mov edx, dword [rbx]
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
cmp eax, ebp
jle 0x140374be0
mov rax, qword [rbx + 0x10]
lea edx, [rbp + rbp]
mov r13d, dword [rax + rdx*4]
mov r14d, dword [rax + rdx*4 + 4]
jmp 0x140374bed
xor edx, edx
mov rcx, rbp
call fcn.140375930
test eax, eax
je 0x140374bb0
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rax, qword [rsi + 0x18]
movzx eax, byte [rax + 0x1f]
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov r14d, r13d
jmp 0x140374c4f
mov qword [r13], 0
mov qword [r13 + 8], 0
mov qword [r13 + 0x10], 0
mov qword [r13 + 0x18], 0
mov qword [r13 + 0x20], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, 1
mov rcx, rbp
mov dword [r13 + 8], eax
call fcn.140375930
mov rdx, qword [rbp + 0x48]
cdqe
mov rdx, qword [rdx]
mov dword [rdx + 8], 1
mov qword [r13 + 0x20], rax
jmp 0x140374ba3
mov ecx, 0x28
call qword [0x140398120]
mov r13, rax
test r13, r13
jne 0x140374b2f
mov eax, 7
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
lea rdi, [rax + rax*4]
shl rdi, 4
sub rdi, 0x50
jmp 0x140374d8e
sub rdi, 0x50
cmp rdi, 0xffffffffffffffb0
je 0x140374bbd
mov rcx, qword [rbx + 0x18]
add rcx, rdi
call fcn.140375a60
test eax, eax
je 0x140374d80
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret