Function at 0x180041b90
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x438]
sub rsp, 0x510
mov r13d, edx
xor r14d, r14d
xor edx, edx
mov qword [rcx], r14
mov rbx, rcx
mov qword [rcx + 8], r14
mov r12d, r8d
lea ecx, [rdx + 4]
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180041cb0
lea esi, [r14 + 0x1c]
mov rcx, rax
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], esi
call sub.KERNEL32.dll_Thread32First
jmp 0x180041c9f
cmp dword [rsp + 0x20], 0x10
jb 0x180041c8e
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [rsp + 0x2c], eax
jne 0x180041c8e
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rsp + 0x28], eax
je 0x180041c8e
mov rdx, qword [rbx]
test rdx, rdx
jne 0x180041c4c
mov dword [rbx + 8], 0x80
mov r8d, 0x200
mov rcx, qword [0x180053678]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx], rax
mov rdx, rax
test rax, rax
je 0x180041ca7
jmp 0x180041c81
mov eax, dword [rbx + 8]
cmp dword [rbx + 0xc], eax
jb 0x180041c81
mov rcx, qword [0x180053678]
lea r9d, [rax + rax]
mov r8, rdx
shl r9, 2
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rdx, rax
test rax, rax
je 0x180041ca7
mov eax, dword [rbx + 8]
add eax, eax
mov qword [rbx], rdx
mov dword [rbx + 8], eax
mov ecx, dword [rbx + 0xc]
mov eax, dword [rsp + 0x28]
mov dword [rdx + rcx*4], eax
inc dword [rbx + 0xc]
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], esi
mov rcx, rdi
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x180041bfa
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rbx], r14
je 0x180041e2b
mov edi, r14d
cmp dword [rbx + 0xc], r14d
jbe 0x180041e2b
mov rax, qword [rbx]
xor edx, edx
mov ecx, edi
mov r8d, dword [rax + rcx*4]
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x180041e20
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SuspendThread]
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x70], 0x100001
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x180041e17
mov ecx, dword [0x180094c2c]
cmp r13d, 0xffffffff
je 0x180041d1d
lea ecx, [r13 + 1]
mov edx, r14d
cmovne edx, r13d
cmp edx, ecx
jae 0x180041e17
mov r10, qword [rbp + 0x38]
mov eax, edx
imul r14, rax, 0x38
sub ecx, edx
mov r15d, ecx
mov rcx, qword [0x180094c20]
mov eax, r12d
add rcx, r14
test r12d, r12d
je 0x180041d65
cmp eax, 1
je 0x180041d5e
movzx edx, byte [rcx + 0x20]
shr edx, 2
and edx, 1
jmp 0x180041d67
mov edx, 1
jmp 0x180041d67
xor edx, edx
movzx r8d, byte [rcx + 0x20]
mov eax, r8d
shr eax, 1
and eax, 1
cmp eax, edx
je 0x180041e06
test edx, edx
je 0x180041daf
mov r8d, dword [rcx + 0x24]
xor edx, edx
and r8d, 0xf
jbe 0x180041da0
movzx eax, byte [rdx + rcx + 0x28]
add rax, qword [rcx]
cmp r10, rax
je 0x180041da4
inc edx
cmp edx, r8d
jb 0x180041d8c
xor edx, edx
jmp 0x180041deb
movzx edx, byte [rdx + rcx + 0x30]
add rdx, qword [rcx + 0x10]
jmp 0x180041deb
test r8b, 1
je 0x180041dc1
mov rdx, qword [rcx]
lea rax, [rdx - 5]
cmp r10, rax
je 0x180041deb
mov r8d, dword [rcx + 0x24]
xor edx, edx
and r8d, 0xf
jbe 0x180041de2
movzx eax, byte [rdx + rcx + 0x30]
add rax, qword [rcx + 0x10]
cmp r10, rax
je 0x180041e4c
inc edx
cmp edx, r8d
jb 0x180041dcd
cmp r10, qword [rcx + 8]
jne 0x180041e06
mov rdx, qword [rcx]
test rdx, rdx
je 0x180041e06
mov qword [rbp + 0x38], rdx
mov rcx, rsi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
mov r10, qword [rbp + 0x38]
add r14, 0x38
sub r15, 1
jne 0x180041d3b
xor r14d, r14d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [rbx + 0xc]
jb 0x180041cc6
lea r11, [rsp + 0x510]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
movzx edx, byte [rdx + rcx + 0x28]
add rdx, qword [rcx]
jmp 0x180041deb