Function at 0x140376820
Capabilities:
Create thread

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
movzx ebp, byte [rcx + 0x5b]
sub ebp, 1
mov r12, rcx
mov byte [rcx + 0x58], 1
test ebp, ebp
jle 0x140376b2c
movzx ecx, byte [rcx + 0x5a]
mov r8d, ebp
xor edi, edi
add ecx, 1
lea eax, [rcx + rdi]
cdq
idiv ebp
movsxd rsi, edx
imul rax, rsi, 0x68
add rax, r12
mov edx, dword [rax + 0x68]
mov r13, qword [rax + 0x60]
test edx, edx
je 0x1403768f0
test r13, r13
je 0x140376938
cmp qword [r13 + 0x10], 0
je 0x140376910
mov r14, qword [r13]
nop word [rax + rax]
mov r8d, 1
mov edx, 0xffffffff
mov rcx, r14
call qword [0x140397568]
cmp eax, 0xc0
mov ebx, eax
je 0x140376890
mov rcx, qword [r13]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x140376910
imul rsi, rsi, 0x68
mov rcx, r13
call fcn.14035ad80
mov edx, 1
add rsi, r12
mov dword [rsi + 0x68], 0
mov qword [rsi + 0x60], 0
mov eax, edx
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
test r13, r13
je 0x140376b35
add edi, 1
cmp edi, ebp
jne 0x140376850
mov edi, r8d
jmp 0x140376938
mov rcx, r13
mov rbx, qword [r13 + 0x20]
call fcn.14035ad80
imul rax, rsi, 0x68
mov edx, ebx
add rax, r12
test ebx, ebx
mov dword [rax + 0x68], 0
mov qword [rax + 0x60], 0
jne 0x1403768de
imul rsi, rsi, 0x68
lea rsi, [r12 + rsi + 0x60]
cmp ebp, edi
je 0x140376a84
lea rdx, [r12 + 0x60]
mov rax, rsi
mov rcx, qword [rsi + 0x28]
sub rax, rdx
movabs rdx, 0x4ec4ec4ec4ec4ec5
sar rax, 3
imul rax, rdx
test rcx, rcx
mov byte [r12 + 0x5a], al
mov rax, qword [r12 + 0x38]
mov qword [rsi + 0x20], rax
mov rax, qword [r12 + 0x40]
mov qword [rsi + 0x28], rax
mov rax, qword [r12 + 0x48]
mov qword [rsi + 0x30], rax
mov qword [r12 + 0x38], 0
mov dword [r12 + 0x48], 0
je 0x140376afe
mov qword [r12 + 0x40], rcx
call qword [0x140398138]
mov dword [r12 + 0x54], eax
mov eax, dword [0x140398100]
mov qword [rsi], 0
test eax, eax
jne 0x140376a60
mov ecx, 0x28
call qword [0x140398120]
mov rbx, rax
test rbx, rbx
je 0x140376b22
cmp byte [0x140398104], 0
je 0x140376ab0
mov rax, qword [0x140398290]
test rax, rax
je 0x140376a09
mov ecx, 0xc8
call rax
test eax, eax
jne 0x140376ab0
lea rax, [0x140376b40]
mov qword [rbx + 0x18], rsi
xor edx, edx
xor ecx, ecx
mov qword [rbx + 0x10], rax
lea rax, [rbx + 8]
mov r9, rbx
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 [rbx], rax
je 0x140376ab0
cmp qword [rbx + 0x10], 0
je 0x140376ad7
mov qword [rsi], rbx
xor edx, edx
jmp 0x1403768de
mov rcx, qword [0x140397da0]
test rcx, rcx
je 0x140376a72
call qword [0x140398180]
mov ecx, 0x28
call fcn.140312d00
mov rbx, rax
jmp 0x1403769d8
lea rdx, [r12 + 0x38]
movsxd rax, ebp
imul rax, rax, 0x68
lea rcx, [r12 + rax + 0x60]
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp fcn.140376b60
mov qword [rbx], 0
mov qword [rbx + 8], 0
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], 0
mov qword [rbx + 0x20], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsi + 0x20]
mov rcx, rsi
mov dword [rbx + 8], eax
call fcn.140376b60
mov dword [rsi + 8], 1
cdqe
mov qword [rbx + 0x20], rax
jmp 0x140376a50
cmp qword [r12 + 0x40], 0
je 0x1403769b5
movsxd rcx, dword [r12 + 0x54]
call fcn.140312ca0
test rax, rax
mov qword [r12 + 0x40], rax
jne 0x1403769b5
mov edx, 7
jmp 0x1403768de
xor edi, edi
xor esi, esi
jmp 0x140376941
mov r8d, edi
jmp 0x140376904