Function at 0x140377040
Capabilities:
Create thread

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
lea rdx, [0x140376400]
mov rax, qword [rcx + 0x70]
mov rbp, qword [rax + 0x20]
mov r11, rcx
movzx eax, byte [rcx + 0x5c]
cmp al, 1
je 0x140377081
lea rdx, [0x140376560]
cmp al, 2
lea rax, [0x1403763a0]
cmovne rdx, rax
movzx ecx, byte [r11 + 0x5b]
test ecx, ecx
mov r9d, ecx
je 0x1403770d8
lea r8d, [rcx - 1]
imul r8, r8, 0x68
lea rax, [r11 + 0xa0]
lea r8, [r11 + r8 + 0x108]
mov r10, r8
sub r10, rax
and r10d, 8
je 0x1403770c0
mov qword [rax], rdx
lea rax, [r11 + 0x108]
cmp r8, rax
je 0x1403770d2
nop
mov qword [rax], rdx
add rax, 0xd0
mov qword [rax - 0x68], rdx
cmp r8, rax
jne 0x1403770c0
cmp r9b, 1
jne 0x1403770e0
xor r14d, r14d
jmp 0x140377106
mov qword [rsp + 0xf0], r11
call fcn.1403750a0
test rax, rax
mov r14, rax
je 0x140377748
mov r11, qword [rsp + 0xf0]
movzx ecx, byte [r11 + 0x5b]
lea rax, [rsp + 0x80]
xor edi, edi
mov rbx, rbp
lea rsi, [r11 + 0x60]
mov qword [rsp + 0x48], rax
mov r10, rdi
mov r13, r11
lea rax, [rsp + 0x88]
mov r15, rsi
mov rdi, r14
mov qword [rsp + 0x50], rax
jmp 0x14037714d
add r10, 1
add r15, 0x68
movzx ecx, byte [r13 + 0x5b]
cmp ecx, r10d
jle 0x1403774b0
mov edx, dword [r15 + 0x38]
test edx, edx
je 0x140377140
cmp edx, 0x10
movsxd rcx, edx
jle 0x1403773b8
xor r8d, r8d
mov eax, 0x10
nop word [rax + rax]
shl rax, 4
mov r14d, r8d
add r8d, 1
cmp rax, rcx
jl 0x140377178
mov ecx, 0x10
mov qword [rsp + 0x30], r10
mov dword [rsp + 0x40], r8d
mov qword [rsp + 0x88], 0
call fcn.1403750a0
test rax, rax
mov rbp, rax
mov qword [rsp + 0x80], rax
je 0x1403774a0
mov edx, dword [r15 + 0x38]
mov r10, qword [rsp + 0x30]
test edx, edx
jle 0x1403773f0
mov r8d, dword [rsp + 0x40]
lea rax, [rsp + 0x88]
xor r12d, r12d
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x98]
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x64], r8d
mov qword [rsp + 0x70], r10
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0xf0], r13
mov ebx, r12d
mov eax, 0x10
mov r9, qword [rsp + 0x38]
mov rcx, r15
shl ebx, 4
mov r8, qword [rsp + 0x30]
sub edx, ebx
cmp edx, eax
cmovg edx, eax
call fcn.140374db0
test eax, eax
je 0x140377290
mov rbx, rbp
mov r14, rdi
mov rcx, rbx
mov dword [rsp + 0x30], eax
call fcn.140374840
mov eax, dword [rsp + 0x30]
mov rcx, r14
mov dword [rsp + 0x30], eax
xor r14d, r14d
call fcn.140374840
mov eax, dword [rsp + 0x30]
mov rcx, r14
mov dword [rsp + 0x30], eax
call fcn.140374840
mov eax, dword [rsp + 0x30]
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8, qword [rsp + 0x58]
lea eax, [r12 + 1]
mov rcx, r15
mov rdx, qword [rsp + 0x90]
mov dword [rsp + 0x60], eax
call fcn.140374180
cmp dword [rsp + 0x64], 1
je 0x140377448
lea edx, [r14 - 1]
mov r13d, 0x10
mov ecx, edx
mov edx, 1
and ecx, 1
cmp r14d, 1
jle 0x1403772fc
test ecx, ecx
je 0x1403772f0
cmp r14d, 2
mov r13d, 0x100
mov edx, 2
jle 0x1403772fc
nop dword [rax + rax]
add edx, 2
shl r13d, 8
cmp r14d, edx
jg 0x1403772f0
test eax, eax
jne 0x140377393
mov rcx, rbp
xor esi, esi
jmp 0x140377331
test r13d, r13d
mov rcx, qword [rax + 8]
lea eax, [r13 + 0xf]
cmovns eax, r13d
add esi, 1
sar eax, 4
cmp r14d, esi
mov r13d, eax
jle 0x140377752
mov eax, r12d
cdq
idiv r13d
cdq
shr edx, 0x1c
add eax, edx
and eax, 0xf
sub eax, edx
cdqe
lea r9, [rax + rax*4]
shl r9, 4
add r9, qword [rcx + 0x18]
mov rax, qword [r9 + 0x48]
test rax, rax
jne 0x140377310
mov ecx, 0x10
mov qword [rsp + 0x40], r9
call fcn.1403750a0
test rax, rax
je 0x140377430
mov r9, qword [rsp + 0x40]
mov rdx, rax
mov rcx, r15
lea r8, [r9 + 0x48]
call fcn.140374180
mov r9, qword [rsp + 0x40]
test eax, eax
je 0x140377728
mov rcx, qword [rsp + 0x98]
mov rbx, rbp
mov r14, rdi
mov dword [rsp + 0x30], eax
call fcn.140374090
mov eax, dword [rsp + 0x30]
jmp 0x140377246
mov r9, qword [rsp + 0x48]
mov rcx, r15
mov qword [rsp + 0x30], r10
mov r8, qword [rsp + 0x50]
mov qword [rsp + 0x88], 0
call fcn.140374db0
mov rbp, qword [rsp + 0x80]
test eax, eax
mov r10, qword [rsp + 0x30]
jne 0x140377240
test rdi, rdi
je 0x140377490
lea r8, [r10 + r10*4]
mov rdx, rbp
mov rcx, r15
mov qword [rsp + 0x30], r10
shl r8, 4
add r8, qword [rdi + 0x18]
add r8, 0x48
call fcn.140374180
test eax, eax
jne 0x1403776e0
mov r10, qword [rsp + 0x30]
jmp 0x140377140
mov rcx, qword [rsp + 0x98]
mov rbx, rbp
mov r14, rdi
mov eax, 7
jmp 0x1403773a1
mov rdx, qword [rsp + 0x98]
test eax, eax
mov rcx, rdx
jne 0x140377881
mov rcx, rbp
and r12d, 0xf
add ebx, 0x10
lea rax, [r12 + r12*4]
shl rax, 4
add rax, qword [rcx + 0x18]
mov qword [rax + 0x48], rdx
mov edx, dword [r15 + 0x38]
cmp edx, ebx
jle 0x140377865
mov r12d, dword [rsp + 0x60]
jmp 0x140377218
add r10, 1
add r15, 0x68
mov rdi, rbp
jmp 0x140377148
mov rbx, rax
mov r14, rdi
mov eax, 7
jmp 0x140377246
cmp byte [r13 + 0x59], 0
mov rbp, rbx
mov r14, rdi
mov r11, r13
je 0x1403776f0
movzx ebx, byte [r11 + 0x5b]
sub ebx, 1
movsxd rbx, ebx
imul rax, rbx, 0x68
add rax, r11
cmp qword [rax + 0x78], 0
je 0x14037775f
mov edx, 0x50
mov rcx, rbp
mov qword [rsp + 0xf0], r11
call fcn.1402e36b0
mov r11, qword [rsp + 0xf0]
test rax, rax
mov rsi, rax
mov qword [r11 + 0x10], rax
je 0x14037773e
imul rbx, rbx, 0x68
mov rdx, r14
mov qword [rsp + 0xf0], r11
lea r8, [rax + 0x48]
lea rcx, [r11 + rbx + 0x60]
call fcn.140374180
test eax, eax
jne 0x14037771a
mov rdx, qword [rsi + 0x48]
mov r11, qword [rsp + 0xf0]
mov rcx, qword [rdx]
mov dword [rdx + 0x20], 1
movsxd rdx, dword [rdx + 0x18]
sub qword [rcx + 0x60], rdx
movzx r8d, byte [r11 + 0x5b]
cmp r8b, 1
jbe 0x1403775a3
mov r9, qword [r14 + 0x18]
lea edx, [r8 - 2]
lea rdx, [rdx + rdx*4]
shl rdx, 4
lea rcx, [r9 + 0x48]
lea r10, [r9 + rdx + 0x98]
nop dword [rax + rax]
mov rdx, qword [rcx]
test rdx, rdx
je 0x14037759a
mov r9, qword [rdx]
mov dword [rdx + 0x20], 1
movsxd rdx, dword [rdx + 0x18]
sub qword [r9 + 0x60], rdx
add rcx, 0x50
cmp rcx, r10
jne 0x140377580
mov qword [rsp + 0x38], rsi
xor edi, edi
mov esi, eax
mov rbx, r11
mov r13, qword [sym.imp.msvcrt.dll__beginthreadex]
lea r12, [fcn.140375830]
lea rbp, [0x14032bac0]
jmp 0x140377698
mov rax, qword [rax]
mov qword [rsp + 0x30], rax
mov qword [rax], 0
mov eax, dword [0x140398100]
test eax, eax
je 0x140377833
mov rcx, qword [0x140397da0]
test rcx, rcx
je 0x1403775f8
call qword [0x140398180]
mov ecx, 0x28
call fcn.140312d00
mov r9, rax
test r9, r9
je 0x14037785d
cmp byte [0x140398104], 0
je 0x1403777e2
mov rax, qword [0x140398290]
test rax, rax
je 0x140377640
mov qword [rsp + 0x40], r9
mov ecx, 0xc8
call rax
mov r9, qword [rsp + 0x40]
test eax, eax
jne 0x1403777e2
lea rax, [r9 + 8]
mov qword [r9 + 0x10], r12
xor edx, edx
xor ecx, ecx
mov qword [r9 + 0x18], r15
mov r8, rbp
mov qword [rsp + 0x40], r9
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
call r13
mov r9, qword [rsp + 0x40]
test rax, rax
mov qword [r9], rax
je 0x1403777e2
cmp qword [r9 + 0x10], 0
je 0x140377809
mov rax, qword [rsp + 0x30]
mov qword [rax], r9
add esi, 1
add rdi, 0x50
movzx r8d, byte [rbx + 0x5b]
cmp r8d, esi
jle 0x140377846
mov r15, qword [r14 + 0x18]
add r15, rdi
mov rax, qword [r15 + 0x48]
test rax, rax
je 0x14037768c
mov edx, dword [rax + 0x20]
test edx, edx
jne 0x1403775c9
mov edx, 1
mov rcx, r15
add esi, 1
call fcn.140375930
add rdi, 0x50
test eax, eax
je 0x140377693
jmp 0x14037771a
mov r14, rdi
jmp 0x140377256
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
mov qword [rsp + 0xf0], r11
call fcn.140374a90
mov r11, qword [rsp + 0xf0]
mov qword [r11 + 0x18], r14
test eax, eax
je 0x140377279
xor r14d, r14d
jmp 0x140377269
mov rax, qword [r9 + 0x48]
jmp 0x140377310
imul rbx, rbx, 0x68
mov qword [r11 + rbx + 0x78], 0
mov eax, 7
jmp 0x140377269
mov eax, 7
jmp 0x140377256
mov rdx, qword [rsp + 0x98]
jmp 0x14037745e
mov rax, qword [rax + 0x70]
mov qword [rsp + 0xf0], r11
mov rsi, qword [rax + 0x28]
movzx edx, word [rsi + 6]
mov rcx, qword [rsi + 0x10]
add edx, 1
imul edx, edx, 0x38
add edx, 0x28
test rcx, rcx
je 0x1403777d0
call fcn.1402e35d0
mov r11, qword [rsp + 0xf0]
test rax, rax
je 0x140377731
lea rdx, [rax + 0x28]
movq xmm0, rsi
movq xmm1, rdx
imul rdx, rbx, 0x68
punpcklqdq xmm0, xmm1
movups xmmword [rax], xmm0
add rdx, r11
mov qword [rdx + 0x78], rax
mov rdx, qword [rdx + 0x70]
mov rdx, qword [rdx + 0x28]
movzx edx, word [rdx + 6]
mov byte [rax + 0x1f], 0
mov word [rax + 0x1c], dx
jmp 0x1403774e1
mov rcx, rdx
call fcn.140312ca0
mov r11, qword [rsp + 0xf0]
jmp 0x140377792
mov qword [r9], 0
mov qword [r9 + 8], 0
mov qword [r9 + 0x10], 0
mov qword [r9 + 0x18], 0
mov qword [r9 + 0x20], 0
mov qword [rsp + 0x40], r9
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r9, qword [rsp + 0x40]
mov rcx, r15
mov dword [r9 + 8], eax
call fcn.140375830
mov r9, qword [rsp + 0x40]
mov qword [r9 + 0x20], rax
jmp 0x140377684
mov ecx, 0x28
call qword [0x140398120]
mov r9, rax
jmp 0x140377605
mov rsi, qword [rsp + 0x38]
mov edx, 2
mov rcx, rsi
call fcn.140375930
jmp 0x140377712
xor r14d, r14d
jmp 0x14037773e
mov rbx, qword [rsp + 0x68]
mov r10, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
mov r13, qword [rsp + 0xf0]
jmp 0x1403773f0
mov rbx, rbp
mov r14, rdi
jmp 0x1403773a1