Function at 0x140001690
Capabilities:
Acquire debug privileges
Enumerate processes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x1e0]
sub rsp, 0x2e0
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
mov rbx, rdx
cmp ecx, 3
je 0x14000170d
lea rdx, str.Usage:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
call fcn.140002e30
mov rcx, rax
mov rdx, qword [rbx]
call fcn.140002e30
mov rcx, rax
lea rdx, str.__process_name___process_id_
call fcn.140002e30
mov rcx, rax
lea rdx, [0x140003010]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov eax, 1
jmp 0x140001a47
mov rdx, qword [rdx + 8]
lea rcx, [rsp + 0x38]
call fcn.1400027a0
nop
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
mov esi, eax
mov edi, 1
xor r14d, r14d
test eax, eax
jne 0x14000183d
mov esi, r14d
xor edx, edx
lea ecx, [rax + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400017f9
mov dword [rbp - 0x70], 0x238
lea rdx, [rbp - 0x70]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x1400017f0
nop
lea rcx, [rbp - 0x44]
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], si
jne 0x140001780
lea r9, [rsp + 0x38]
cmp qword [rsp + 0x50], 7
cmova r9, qword [rsp + 0x38]
mov r10, qword [rsp + 0x48]
mov r8, r10
cmp rax, r10
cmovb r8, rax
lea rdx, [rbp - 0x44]
test r8, r8
je 0x1400017d3
lea rcx, [rbp - 0x44]
sub r9, rcx
nop dword [rax]
movzx ecx, word [rdx]
cmp word [r9 + rdx], cx
jne 0x1400017da
add rdx, 2
sub r8, rdi
jne 0x1400017c0
cmp r10, rax
jb 0x1400017da
jbe 0x1400017ed
lea rdx, [rbp - 0x70]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140001770
jmp 0x1400017f0
mov esi, dword [rbp - 0x68]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x14000183d
lea rdx, str.Process
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
call fcn.140002e30
lea rdx, [rsp + 0x38]
cmp qword [rsp + 0x50], 7
cmova rdx, qword [rsp + 0x38]
mov r8, qword [rsp + 0x48]
mov rcx, rax
call fcn.140003300
lea rdx, str._not_found.
mov rcx, rax
jmp 0x1400019ea
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x30]
mov edx, 0x28
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1400019dc
lea r8, [rsp + 0x7c]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x30]
test eax, eax
je 0x1400019d6
mov dword [rsp + 0x78], edi
mov dword [rbp - 0x7c], 2
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
mov r9d, 0x10
lea r8, [rsp + 0x78]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x30]
test eax, eax
je 0x1400019d6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, str.Found
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140002e30
lea rdx, [rsp + 0x38]
cmp qword [rsp + 0x50], 7
cmova rdx, qword [rsp + 0x38]
mov r8, qword [rsp + 0x48]
mov rcx, rax
call fcn.140003300
lea rdx, str._process_with_PID:
mov rcx, rax
call fcn.140002e30
mov rcx, rax
mov edx, esi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140003010]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
lea rdx, str.memory_output.bin
lea rcx, [rsp + 0x58]
call fcn.1400027a0
nop
lea rdx, [rsp + 0x58]
mov ecx, esi
call fcn.140001290
test al, al
je 0x14000197b
lea rdx, str.Memory_dump_created_successfully_at
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140002e30
lea rdx, [rsp + 0x58]
cmp qword [rsp + 0x70], 7
cmova rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x68]
mov rcx, rax
call fcn.140003300
mov rcx, rax
lea rdx, [0x140003010]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov edi, r14d
mov rdx, qword [rsp + 0x70]
cmp rdx, 7
jbe 0x1400019c0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400019bb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400019bb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000358c
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x70], 7
mov word [rsp + 0x58], r14w
jmp 0x140001a00
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, str.Failed_to_enable_debug_privilege.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
call fcn.140002e30
lea rdx, [0x140003010]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 7
jbe 0x140001a45
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001a40
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001a40
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000358c
mov eax, edi
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.140003530
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret