Function at 0x140097810
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push rdi
push r14
sub rsp, 0xb8
mov rax, qword [0x14022e2a0]
xor rax, rsp
mov qword [rsp + 0xa8], rax
mov rbx, rcx
mov rdi, r8
add rcx, 0x30
xor r14d, r14d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
movzx eax, byte [rbx + 0xf1]
test al, al
je 0x140097860
lea rcx, [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [r14 + 5]
jmp 0x140097b7d
lea rcx, [rbx + 0x130]
mov qword [rsp + 0xe8], rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp qword [rbx + 0x128], r14
je 0x1400978bf
nop
mov rcx, qword [rbx + 0x118]
mov rax, qword [rbx + 0x110]
dec rcx
and rcx, qword [rbx + 0x120]
mov rcx, qword [rax + rcx*8]
add rcx, 0x10
call fcn.140066870
sub qword [rbx + 0x128], 1
je 0x1400978b8
inc qword [rbx + 0x120]
jmp 0x140097880
mov qword [rbx + 0x120], r14
lea rcx, [rbx + 0x130]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r10, qword [rdi + 0x18]
mov r8, rdi
cmp r10, 8
jb 0x1400978dc
mov r8, qword [rdi]
mov r9, qword [rdi + 0x10]
lea rcx, [0x1401b8310]
test r9, r9
mov rdx, r9
cmovne rdx, r14
test rdx, rdx
je 0x140097914
sub r8, rcx
nop dword [rax]
movzx eax, word [rcx]
cmp word [r8 + rcx], ax
jne 0x14009791d
add rcx, 2
sub rdx, 1
jne 0x140097900
test r9, r9
je 0x140097ba8
movabs rsi, 0x7ffffffffffffffe
mov rax, rsi
sub rax, r9
cmp rax, 9
jb 0x140097bbf
mov qword [rsp + 0xb0], r15
cmp r10, 8
jb 0x140097948
mov rdi, qword [rdi]
mov qword [rsp + 0x30], r9
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x28], rdi
lea r9, str..pipe_
mov qword [rsp + 0x20], 9
call fcn.14006e000
lea rdx, [rsp + 0x68]
mov rcx, rbx
call fcn.14006dd90
lea rcx, [rsp + 0x68]
call fcn.140066870
mov dword [rbx + 0x20], 3
lea r15, [0x1401bc478]
mov edi, 1
nop word [rax + rax]
mov rax, qword [rbx + 0x158]
inc rax
test rax, 0xfffffffffffffffe
jne 0x140097a1d
lea r8, str._OUT
mov qword [rbx + 0x158], r14
mov rdx, rbx
lea rcx, [rsp + 0x88]
call fcn.14008e4a0
cmp qword [rax + 0x18], 8
jb 0x1400979da
mov rax, qword [rax]
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
lea rcx, [rsp + 0x88]
mov qword [rbx + 0x158], rax
call fcn.140066870
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rax, qword [rbx + 0x160]
inc rax
test rax, 0xfffffffffffffffe
jne 0x140097ac6
mov qword [rbx + 0x160], r14
mov rax, rsi
mov rcx, qword [rbx + 0x10]
sub rax, rcx
cmp rax, 3
jb 0x140097bb9
cmp qword [rbx + 0x18], 8
mov r9, rbx
jb 0x140097a5b
mov r9, qword [rbx]
mov qword [rsp + 0x30], 3
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x48]
call fcn.14006e000
cmp qword [rsp + 0x60], 8
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x30], r14
mov edx, 0x40000000
cmovae rcx, qword [rsp + 0x48]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
lea rcx, [rsp + 0x48]
mov qword [rbx + 0x160], rax
call fcn.140066870
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rax, qword [rbx + 0x158]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140097ae8
mov rax, qword [rbx + 0x160]
inc rax
test rax, 0xfffffffffffffffe
jne 0x140097b09
cmp edi, 0x57e40
je 0x140097b56
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x57e40
jle 0x1400979a0
lea rax, [rsp + 0x40]
mov byte [rbx + 0xf1], 1
mov qword [rsp + 0x28], rax
lea r8, [0x140097560]
mov r9, rbx
mov dword [rsp + 0x20], r14d
xor edx, edx
mov byte [rbx + 0xf0], 1
xor ecx, ecx
mov dword [rsp + 0x40], r14d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x28], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rbx + 0x28], r14
jne 0x140097b9a
mov byte [rbx + 0xf0], r14b
mov rcx, rbx
call fcn.140098140
lea rcx, [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffffa
mov r15, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.14013b390
add rsp, 0xb8
pop r14
pop rdi
pop rbp
pop rbx
ret
lea rcx, [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x140097b6d
lea rcx, [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffff9
jmp 0x140097b75
call fcn.140066660
int3
call fcn.140066660
int3