Function at 0x180040378
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x458]
sub rsp, 0x530
mov rax, qword [0x180053010]
xor rax, rsp
mov qword [rbp + 0x420], rax
xor ebx, ebx
mov qword [rsp + 0x28], rcx
mov r13d, edx
mov qword [rcx], rbx
mov rdi, rcx
mov qword [rcx + 8], rbx
xor edx, edx
mov dword [rsp + 0x20], r8d
lea ecx, [rbx + 4]
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x180040679
lea r15d, [rbx + 0x1c]
mov rcx, rax
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], r15d
call qword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
je 0x1800404d6
lea esi, [rbx + 1]
cmp dword [rsp + 0x30], 0x10
jb 0x180040494
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [rsp + 0x3c], eax
jne 0x180040494
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rsp + 0x38], eax
je 0x180040494
mov rdx, qword [rdi]
test rdx, rdx
jne 0x180040456
mov rcx, qword [0x180059f70]
mov r8d, 0x200
mov dword [rdi + 8], 0x80
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rdi], rax
mov rdx, rax
test rax, rax
je 0x1800404ba
jmp 0x180040487
mov eax, dword [rdi + 8]
cmp dword [rdi + 0xc], eax
jb 0x180040487
mov rcx, qword [0x180059f70]
add eax, eax
mov r9d, eax
mov r8, rdx
shl r9, 2
xor edx, edx
mov dword [rdi + 8], eax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rdx, rax
test rax, rax
je 0x1800404ba
mov qword [rdi], rax
mov ecx, dword [rdi + 0xc]
mov eax, dword [rsp + 0x38]
mov dword [rdx + rcx*4], eax
inc dword [rdi + 0xc]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], r15d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x180040404
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x1800404d6
mov esi, ebx
cmp qword [rdi], rbx
je 0x1800404d6
mov r8, qword [rdi]
xor edx, edx
mov rcx, qword [0x180059f70]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rdi], rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x180040679
cmp qword [rdi], rbx
je 0x18004067e
mov esi, ebx
cmp dword [rdi + 0xc], ebx
jbe 0x18004067e
mov rax, qword [rdi]
xor edx, edx
mov ecx, esi
mov r8d, dword [rax + rcx*4]
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov r14, rax
test rax, rax
je 0x180040661
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SuspendThread]
lea rdx, [rsp + 0x50]
mov dword [rbp - 0x80], 0x100001
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x180040658
mov ecx, dword [0x18005a06c]
cmp r13d, 0xffffffff
je 0x180040551
lea ecx, [r13 + 1]
mov edx, ebx
cmovne edx, r13d
cmp edx, ecx
jae 0x180040658
mov r10, qword [rbp + 0x48]
mov edi, dword [rsp + 0x20]
mov eax, edx
imul r15, rax, 0x38
sub ecx, edx
mov r12d, ecx
mov rcx, qword [0x18005a060]
mov eax, edi
add rcx, r15
test edi, edi
je 0x18004059a
cmp eax, 1
je 0x180040593
movzx edx, byte [rcx + 0x20]
shr edx, 2
and edx, 1
jmp 0x18004059c
mov edx, 1
jmp 0x18004059c
mov edx, ebx
movzx r8d, byte [rcx + 0x20]
mov eax, r8d
shr eax, 1
and eax, 1
cmp eax, edx
je 0x180040645
test edx, edx
je 0x1800405ea
mov r8d, dword [rcx + 0x24]
mov edx, ebx
and r8d, 0xf
jbe 0x1800405d9
mov r9d, edx
movzx eax, byte [r9 + rcx + 0x28]
add rax, qword [rcx]
cmp r10, rax
je 0x1800405de
inc edx
cmp edx, r8d
jb 0x1800405c1
mov rdx, rbx
jmp 0x18004062a
movzx edx, byte [r9 + rcx + 0x30]
add rdx, qword [rcx + 0x10]
jmp 0x18004062a
test r8b, 1
je 0x1800405fc
mov rdx, qword [rcx]
lea rax, [rdx - 5]
cmp r10, rax
je 0x18004062a
mov r8d, dword [rcx + 0x24]
mov edx, ebx
and r8d, 0xf
jbe 0x180040621
mov r9d, edx
movzx eax, byte [r9 + rcx + 0x30]
add rax, qword [rcx + 0x10]
cmp r10, rax
je 0x18004066e
inc edx
cmp edx, r8d
jb 0x180040608
cmp r10, qword [rcx + 8]
jne 0x180040645
mov rdx, qword [rcx]
test rdx, rdx
je 0x180040645
mov qword [rbp + 0x48], rdx
mov rcx, r14
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
mov r10, qword [rbp + 0x48]
add r15, 0x38
sub r12, 1
jne 0x180040572
mov rdi, qword [rsp + 0x28]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [rdi + 0xc]
jb 0x1800404fb
jmp 0x18004067e
movzx edx, byte [r9 + rcx + 0x28]
add rdx, qword [rcx]
jmp 0x18004062a
mov ebx, 9
mov eax, ebx
mov rcx, qword [rbp + 0x420]
xor rcx, rsp
call fcn.1800418b0
lea r11, [rsp + 0x530]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret