Function at 0x1403be580
Capabilities:
Terminate thread

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0xa8
mov edi, edx
movups xmmword [rsp + 0x90], xmm12
mov ebp, r9d
mov qword [rsp + 0x58], 0
mov r15d, r8d
mov rsi, rcx
cmp edi, 0xfffffffd
je 0x1403be5f9
cmp edi, 0xfffffffe
je 0x1403be5f9
mov rcx, qword [rsi + 0x30]
add rcx, 0x30
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, r15d
xor ebx, ebx
and eax, 9
mov dword [rsp + 0x30], eax
sete bl
test edi, edi
jl 0x1403be608
mov rax, qword [rsi + 0x30]
movsxd rdi, edi
mov r8, qword [rax]
lea r9, [rdi + rdi*4]
test byte [r8 + r9*8 + 0x20], 4
je 0x1403be608
mov r14d, 1
jmp 0x1403be60b
mov eax, r15d
xor ebx, ebx
and eax, 9
mov dword [rsp + 0x30], eax
sete bl
xor r14d, r14d
mov ecx, 0x1001
xor edx, edx
mov r13d, dword [rsi + 0x1e0]
lea r8, [rsp + 0x58]
call fcn.14035a450
mov r12d, eax
test r12d, r12d
je 0x1403be64b
movups xmm12, xmmword [rsp + 0x90]
mov eax, r12d
add rsp, 0xa8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov r9, qword [rsp + 0x58]
mov r8d, 0x1001
mov byte [r9 + 0x1000], 0
mov rcx, qword [rsp + 0x58]
mov rdx, qword [rsi + 0xd0]
call fcn.1403815f0
cmp ebp, 0xfffffffe
je 0x1403becb6
cmp ebp, 0x10c
je 0x1403becb6
cmp ebp, 0x2f6
je 0x1403becb6
cmp ebp, 0xffffffff
je 0x1403be816
cmp ebp, 0x18
je 0x1403be816
cmp ebp, 0x1b
je 0x1403be816
cmp ebp, 0x265
je 0x1403be816
cmp ebp, 0x3f
jne 0x1403be77f
test r14d, r14d
jne 0x1403be6d2
test byte [rsi + 0x297], 8
je 0x1403be8cf
mov ebx, dword [rsp + 0x110]
test ebx, ebx
mov r9d, ebx
cmovne ebp, r9d
cmp qword [rsi + 0x1c0], 0
je 0x1403be8d3
mov edx, 2
mov r8d, r13d
mov r9, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x110]
call fcn.140384c50
mov r9, rax
mov rdx, r9
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x1403be737
mov rax, rdx
add rdx, rcx
call fcn.14042af70
movsxd rbx, eax
mov r8, qword [rsi + 0x1c0]
cmp rbx, r8
jae 0x1403be802
mov rdx, r9
mov r8, rbx
mov rcx, qword [rsi + 0x118]
call fcn.14042ae90
mov rcx, qword [rsi + 0x118]
mov edx, 0x20
mov r8, qword [rsi + 0x1c0]
add rcx, rbx
sub r8, rbx
call fcn.14042ad60
jmp 0x1403be8d3
or r14d, dword [rsp + 0x30]
je 0x1403be8cf
mov ebx, dword [rsp + 0x110]
test ebx, ebx
mov r9d, ebx
cmovne ebp, r9d
cmp qword [rsi + 0x1c0], 0
je 0x1403be8d3
mov edx, 2
mov r8d, r13d
mov r9, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x110]
call fcn.140384c50
mov r9, rax
mov rdx, r9
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x1403be7ef
mov rax, rdx
add rdx, rcx
call fcn.14042af70
movsxd rbx, eax
mov r8, qword [rsi + 0x1c0]
cmp rbx, r8
jb 0x1403be74a
mov rdx, r9
mov rcx, qword [rsi + 0x118]
call fcn.14042ae90
jmp 0x1403be8d3
and r15d, 0xa
or r14d, r15d
je 0x1403be8ca
xor ebx, ebx
cmp qword [rsi + 0x1c0], 0
je 0x1403be8ca
mov edx, 2
mov r8d, r13d
mov r9, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x110]
call fcn.140384c50
mov r9, rax
mov rdx, r9
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x1403be87a
mov rax, rdx
add rdx, rcx
call fcn.14042af70
movsxd rbp, eax
mov r8, qword [rsi + 0x1c0]
cmp rbp, r8
jb 0x1403be89a
mov rdx, r9
mov rcx, qword [rsi + 0x118]
call fcn.14042ae90
jmp 0x1403be8ca
mov rdx, r9
mov r8, rbp
mov rcx, qword [rsi + 0x118]
call fcn.14042ae90
mov rcx, qword [rsi + 0x118]
mov edx, 0x20
mov r8, qword [rsi + 0x1c0]
add rcx, rbp
sub r8, rbp
call fcn.14042ad60
mov ebp, 0xffffffff
test ebx, ebx
jne 0x1403be903
cmp edi, 0xfffffffe
je 0x1403bec6b
cmp edi, 0xfffffffd
je 0x1403bec32
mov rcx, qword [rsi + 0x30]
add rcx, 0x30
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [rsi + 0x1e0]
call fcn.1403c0ed0
jmp 0x1403bec32
pxor xmm12, xmm12
movdqu xmmword [rsp + 0x60], xmm12
movq qword [rsp + 0x70], xmm12
mov rbx, qword [rsi + 0x1c0]
mov rdi, qword [rsi + 0x118]
mov rcx, qword [rsi + 0x30]
add rcx, 0x30
mov qword [0x141a58468], rbx
mov qword [0x141a58460], rdi
or byte [rsi + 0x295], 0x80
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdx, rsi
lea rcx, [rsp + 0x60]
call fcn.1403dee30
lea rcx, [0x141a59830]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp r13d, 0xfffffff9
lea rbx, [0x140000000]
lea edx, [r13 + 6]
cmovle edx, r13d
and edx, 0x7f
mov rdi, qword [rbx + rdx*8 + 0x1a6d6c0]
test rdi, rdi
je 0x1403bec8a
cmp r13d, dword [rdi + 0x40]
je 0x1403be9a1
mov rdi, qword [rdi + 0x38]
test rdi, rdi
je 0x1403bec8a
cmp r13d, dword [rdi + 0x40]
jne 0x1403be98e
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x1403bec7b
add rcx, 0x30
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test byte [rdi + 0x291], 0x18
jne 0x1403bea4d
mov esi, dword [rdi + 0x40]
cmp esi, 0xfffffff9
lea rbx, [0x140000000]
lea edx, [rsi + 6]
cmovle edx, esi
and edx, 0x7f
mov r9, qword [rbx + rdx*8 + 0x1a6d6c0]
cmp esi, dword [r9 + 0x40]
jne 0x1403bea15
cmp esi, 0xfffffff9
lea rbx, [0x140000000]
mov r11, rbx
lea edx, [rsi + 6]
cmovg esi, edx
and esi, 0x7f
mov r9, qword [rbx + rsi*8 + 0x1a6d6c0]
mov r10, qword [r9 + 0x38]
mov qword [r11 + rsi*8 + 0x1a6d6c0], r10
jmp 0x1403bea4d
cmp esi, 0xfffffff9
lea rbx, [0x140000000]
lea edx, [rsi + 6]
cmovle edx, esi
and edx, 0x7f
mov rdx, qword [rbx + rdx*8 + 0x1a6d6c0]
mov rbx, qword [rdx + 0x38]
cmp esi, dword [rbx + 0x40]
je 0x1403bea45
mov rdx, rbx
mov rbx, qword [rbx + 0x38]
cmp esi, dword [rbx + 0x40]
jne 0x1403bea39
mov rbx, qword [rbx + 0x38]
mov qword [rdx + 0x38], rbx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [0x141a59830]
mov dword [0x141a59870], eax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdx, qword [rdi + 0xd8]
mov qword [rdi + 0xd8], 0
test rdx, rdx
je 0x1403bea85
mov qword [rdx + 8], 0
mov r9, qword [rdi + 0x30]
movups xmm0, xmmword [r9 + 0x30]
movups xmm1, xmmword [r9 + 0x40]
mov rdx, qword [r9 + 0x50]
mov qword [rsp + 0x50], rdx
mov rdx, qword [r9 + 0x60]
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x40], xmm1
test rdx, rdx
je 0x1403beaf4
mov rbx, qword [rdx]
mov qword [r9 + 0x60], rbx
cmp qword [rdx + 8], 0
je 0x1403beae7
movups xmm0, xmmword [rdx + 8]
movups xmmword [rsp + 0x80], xmm0
mov rcx, qword [rsp + 0x80]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r9, qword [rdi + 0x30]
mov rdx, qword [r9 + 0x60]
test rdx, rdx
jne 0x1403beaaf
xor ebx, ebx
mov rdx, qword [r9 + 8]
xor esi, esi
test rdx, rdx
jle 0x1403beb3c
mov r10, qword [r9]
test byte [rsi + r10 + 0x20], 4
je 0x1403beb30
mov rdx, qword [rsi + r10 + 8]
mov dword [rdx], 1
mov r9, qword [rdi + 0x30]
mov r10, qword [r9]
mov rcx, qword [r10 + rsi]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov r9, qword [rdi + 0x30]
mov rdx, qword [r9 + 8]
inc rbx
add rsi, 0x28
cmp rbx, rdx
jl 0x1403beb01
cmp dword [r9 + 0x18], 0
je 0x1403beb7a
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rdx, qword [rdi + 0x30]
cmp eax, dword [rdx + 0x18]
je 0x1403beb7a
cmp qword [rdx + 0x10], 0
je 0x1403beb7a
movups xmm0, xmmword [rdx + 0x10]
movups xmmword [rsp + 0x20], xmm0
mov rcx, qword [rsp + 0x20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [rdi + 0x30]
mov rcx, qword [rdx]
call fcn.14035a530
mov rcx, qword [rdi + 0x30]
call fcn.14035a530
test byte [rdi + 0x291], 0x18
je 0x1403bec00
mov ebx, dword [rdi + 0x1e0]
mov edx, 0x2a0
movq qword [rdi + 0x2a0], xmm12
movdqu xmmword [rdi + rdx - 0x10], xmm12
movdqu xmmword [rdi + rdx - 0x20], xmm12
movdqu xmmword [rdi + rdx - 0x30], xmm12
movdqu xmmword [rdi + rdx - 0x40], xmm12
movdqu xmmword [rdi + rdx - 0x50], xmm12
movdqu xmmword [rdi + rdx - 0x60], xmm12
sub rdx, 0x60
jne 0x1403bebac
mov dl, byte [rdi + 0x291]
and dl, 0xe7
add dl, 8
or byte [rdi + 0x29a], 4
mov byte [rdi + 0x291], dl
mov dword [rdi + 0x1e0], ebx
mov dword [rdi + 0x40], ebx
jmp 0x1403bec08
mov rcx, rdi
call fcn.14035a530
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, ebp
mov edx, 2
mov r8d, r13d
mov r9, qword [rsp + 0x58]
call fcn.140383960
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1403bec44
call fcn.14035a530
mov r12d, eax
test r12d, r12d
movups xmm12, xmmword [rsp + 0x90]
cmove r12d, ebp
mov eax, r12d
add rsp, 0xa8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rcx, qword [rsi + 0x30]
add rcx, 0x30
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1403bec32
lea rcx, [0x141a59830]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1403bec1e
cmp dword [0x141a59870], 0
je 0x1403bec7b
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x141a59870]
je 0x1403bec7b
lea rcx, [0x141a59830]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitThread]
and r15d, 0xc
or r14d, r15d
je 0x1403bed6a
xor ebx, ebx
cmp qword [rsi + 0x1c0], 0
je 0x1403bed6a
mov edx, 2
mov r8d, r13d
mov r9, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x110]
call fcn.140384c50
mov r9, rax
mov rdx, r9
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x1403bed1a
mov rax, rdx
add rdx, rcx
call fcn.14042af70
movsxd rbp, eax
mov r8, qword [rsi + 0x1c0]
cmp rbp, r8
jb 0x1403bed3a
mov rdx, r9
mov rcx, qword [rsi + 0x118]
call fcn.14042ae90
jmp 0x1403bed6a
mov rdx, r9
mov r8, rbp
mov rcx, qword [rsi + 0x118]
call fcn.14042ae90
mov rcx, qword [rsi + 0x118]
mov edx, 0x20
mov r8, qword [rsi + 0x1c0]
add rcx, rbp
sub r8, rbp
call fcn.14042ad60
mov ebp, 0xfffffffe
jmp 0x1403be8cf