Function at 0x180008b30
Capabilities:
Terminate thread

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0xc8
mov qword [rsp + 0x48], 0
mov byte [rsp + 0x44], 0
movzx eax, byte [0x18004cad8]
test eax, eax
je 0x180008f21
lea rcx, [0x18004cb00]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov qword [rsp + 0x48], 0
mov eax, dword [0x18004caf0]
mov dword [rsp + 0x6c], eax
mov dword [rsp + 0x40], 0
jmp 0x180008b8e
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x6c]
cmp dword [rsp + 0x40], eax
jge 0x180008bf2
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [0x18004cae8]
lea rax, [rcx + rax*8]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov rax, qword [rax]
mov rdx, qword [rsp + 0xd0]
mov rcx, qword [rax]
call fcn.180024424
test eax, eax
jne 0x180008bf0
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [0x18004cae8]
mov rax, qword [rcx + rax*8]
mov qword [rsp + 0x48], rax
mov edx, dword [rsp + 0x40]
lea rcx, [0x18004cae8]
call fcn.18000ab30
jmp 0x180008bf2
jmp 0x180008b84
lea rcx, [0x18004cb00]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [rsp + 0x48], 0
je 0x180008f21
mov rax, qword [rsp + 0x48]
mov dword [rax + 0x60], 1
xor r8d, r8d
mov edx, 1
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x58]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
lea rdx, [rsp + 0x98]
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax]
call fcn.180007950
mov r8d, 0xc
xor edx, edx
lea rcx, [rsp + 0xa8]
call fcn.180024170
mov qword [rsp + 0x88], 0
mov dword [rsp + 0x68], 0
lea rax, [rsp + 0x68]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0x88]
call qword [0x18004cab8]
mov edx, eax
lea rcx, [0x180031918]
call fcn.180007b50
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, 0x64
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x68]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor edx, edx
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x68]
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x64
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x70]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor edx, edx
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x70]
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x48]
cmp qword [rax + 0x78], 0
je 0x180008f21
mov dword [rsp + 0x40], 0
jmp 0x180008d5a
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x48]
mov rax, qword [rax + 0x78]
mov eax, dword [rax + 8]
mov dword [rsp + 0x70], eax
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x40], eax
jge 0x180008e72
mov rax, qword [rsp + 0x48]
mov rax, qword [rax + 0x78]
movsxd rcx, dword [rsp + 0x40]
mov rax, qword [rax]
cmp qword [rax + rcx*8], 0
je 0x180008e6d
mov rax, qword [rsp + 0x48]
mov rax, qword [rax + 0x78]
movsxd rcx, dword [rsp + 0x40]
mov rax, qword [rax]
mov rax, qword [rax + rcx*8]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x58], 0
mov rax, qword [rsp + 0x50]
lea rcx, [rsp + 0x58]
mov qword [rax + 0x28], rcx
mov rax, qword [rsp + 0x50]
mov dword [rax + 0x24], 1
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, 0x3e8
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [rsp + 0x58], 0
jne 0x180008e6d
lea rcx, [0x18004cb00]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [rsp + 0x58], 0
jne 0x180008e60
xor edx, edx
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x50]
cmp qword [rax + 0x18], 0
je 0x180008e55
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, [0x18004cb00]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x180008d50
mov rax, qword [rsp + 0x48]
mov rax, qword [rax + 0x78]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x180008ec7
mov rcx, qword [rsp + 0x60]
call fcn.18001c610
mov eax, 1
and eax, 1
test eax, eax
je 0x180008eb8
mov rcx, qword [rsp + 0x60]
call fcn.18002283c
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x80], rax
jmp 0x180008ed3
mov qword [rsp + 0x80], 0
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x48]
add rax, 0x30
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [rsp + 0x44], 1
movzx eax, byte [rsp + 0x44]
add rsp, 0xc8
ret