Function at 0x140031750
Capabilities:
Terminate thread

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov r14, rdx
mov rbp, rcx
lea r13, [rcx + 8]
xor r15d, r15d
nop word [rax + rax]
or r12d, 0xffffffff
mov qword [rsp + 0x30], r13
mov rcx, qword [r13]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rsp + 0x28], 1
mov rax, qword [rbp + 0x40]
mov rbx, qword [rax]
mov rsi, qword [rbp + 0x10]
mov rdi, qword [rbp + 0x40]
test rsi, rsi
je 0x1400317c2
cmp rsi, qword [rbp + 0x10]
je 0x1400317c7
call fcn.1400deebc
cmp rbx, rdi
je 0x14003186b
test rsi, rsi
jne 0x1400317df
call fcn.1400deebc
mov r11, r15
jmp 0x1400317e2
mov r11, qword [rsi]
cmp rbx, qword [r11 + 0x30]
jne 0x1400317ed
call fcn.1400deebc
or edx, 0xffffffff
mov rcx, qword [rbx + 0x40]
call fcn.140031d90
cmp r12d, eax
cmova r12d, eax
test rsi, rsi
jne 0x14003180a
call fcn.1400deebc
cmp byte [rbx + 0x49], 0
je 0x140031817
call fcn.1400deebc
jmp 0x1400317b3
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x49], 0
jne 0x140031841
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x49], 0
jne 0x1400317b3
nop dword [rax]
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x49], 0
je 0x140031830
jmp 0x1400317b3
mov rax, qword [rbx + 8]
cmp byte [rax + 0x49], 0
jne 0x140031863
nop dword [rax + rax]
cmp rbx, qword [rax + 0x10]
jne 0x140031863
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x49], 0
je 0x140031850
mov rbx, rax
jmp 0x1400317b3
mov byte [rsp + 0x28], 0
mov rcx, qword [r13]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [r14]
test rcx, rcx
je 0x1400318a2
cmp byte [rcx + 0x20], 0
jne 0x140031895
mov edx, r12d
mov rcx, qword [rcx + 0x18]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rax, qword [r14]
cmp byte [rax + 0x20], 0
je 0x140031790
mov rax, qword [rbp + 0x40]
mov rbx, qword [rax]
mov rsi, qword [rbp + 0x10]
nop dword [rax]
mov rdi, qword [rbp + 0x40]
test rsi, rsi
je 0x1400318bf
cmp rsi, qword [rbp + 0x10]
je 0x1400318c4
call fcn.1400deebc
cmp rbx, rdi
je 0x14003199b
test rsi, rsi
jne 0x1400318dc
call fcn.1400deebc
mov r11, r15
jmp 0x1400318df
mov r11, qword [rsi]
cmp rbx, qword [r11 + 0x30]
jne 0x1400318ea
call fcn.1400deebc
mov rdi, qword [rbx + 0x40]
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r8, qword [rdi + 0x19038]
test r8, r8
je 0x14003191b
lea rdx, [rdi + 0x38]
mov rcx, rdi
call fcn.140031cb0
test al, al
je 0x14003191b
mov qword [rdi + 0x19038], r15
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test rsi, rsi
jne 0x14003192f
call fcn.1400deebc
cmp byte [rbx + 0x49], 0
je 0x14003193f
call fcn.1400deebc
jmp 0x1400318b0
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x49], 0
jne 0x140031971
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x49], 0
jne 0x1400318b0
nop dword [rax]
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x49], 0
je 0x140031960
jmp 0x1400318b0
mov rax, qword [rbx + 8]
cmp byte [rax + 0x49], 0
jne 0x140031993
nop dword [rax + rax]
cmp rbx, qword [rax + 0x10]
jne 0x140031993
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x49], 0
je 0x140031980
mov rbx, rax
jmp 0x1400318b0
mov rcx, qword [r14]
test rcx, rcx
je 0x140031a2c
call fcn.1400379f0
mov rbx, rax
test rax, rax
je 0x140031a25
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x1400319f5
cmp qword [rax + 8], 0
je 0x1400319eb
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, 0x32
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1400319eb
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], r15
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140031a13
mov edx, 1
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, rbx
call fcn.1400ddb14
mov qword [r14], r15
xor eax, eax
jmp 0x140031a2e
xor eax, eax
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret