Function at 0x140012fd0
Capabilities:
Acquire debug privileges
Enumerate processes

Disassembly:
push rdi
sub rsp, 0x190
mov rax, qword [0x1403660c0]
xor rax, rsp
mov qword [rsp + 0x180], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x30]
mov edx, Ordinal_41
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140013020
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_open_process_token._n
call fcn.14001c6a0
jmp 0x1400130a1
lea r8, [rsp + 0x38]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x140013041
lea rdx, str.LookupPrivilegeValue_failed._n
jmp 0x14001308a
mov rax, qword [rsp + 0x38]
lea r8, [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
xor edi, edi
mov qword [rsp + 0x28], rdi
mov r9d, reloc.WS2_32.dll_recv
xor edx, edx
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x40], 1
mov qword [rsp + 0x44], rax
mov dword [rsp + 0x4c], 2
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1400130be
lea rdx, str.Failed_to_adjust_token_privileges._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14001c6a0
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_enable_debug_privileges._n
call fcn.14001c6a0
mov eax, 1
jmp 0x140013292
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x1a0], rbx
mov qword [rsp + 0x1a8], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
lea rsi, [0x140cc4cf8]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14001310e
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_take_a_snapshot_of_the_processes._n
call fcn.14001c6a0
jmp 0x14001319b
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x50], 0x130
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x14001318e
nop dword [rax + rax]
lea rcx, [rsp + 0x7c]
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rcx + rax], dil
jne 0x140013140
cmp qword [0x140cc4d10], 0xf
mov rcx, rsi
mov r8, qword [0x140cc4d08]
cmova rcx, qword [0x140cc4cf8]
cmp r8, rax
jne 0x140013176
lea rdx, [rsp + 0x7c]
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x14001318a
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
jne 0x140013130
jmp 0x14001318e
mov edi, dword [rsp + 0x58]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x1400131e9
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Could_not_find_process_with_name
call fcn.14001c6a0
cmp qword [0x140cc4d10], 0xf
mov rcx, rax
mov r8, qword [0x140cc4d08]
cmova rsi, qword [0x140cc4cf8]
mov rdx, rsi
call fcn.14001e040
lea rdx, [0x14018f714]
mov rcx, rax
call fcn.14001c6a0
mov eax, 1
jmp 0x140013282
mov r8d, edi
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
jne 0x14001321b
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_open_process._n
call fcn.14001c6a0
mov eax, 1
jmp 0x140013282
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Process_opened_with_PID:
call fcn.14001c6a0
mov edx, edi
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x14018f714]
call fcn.14001c6a0
mov rcx, rbx
call fcn.140012d20
test al, al
je 0x140013264
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.String_deletion_completed_successfully._n
jmp 0x140013272
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.String_deletion_failed._n
call fcn.14001c6a0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rbx, qword [rsp + 0x1a0]
mov rsi, qword [rsp + 0x1a8]
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.1401237c0
add rsp, 0x190
pop rdi
ret