Function at 0x140008870
Capabilities:
Acquire debug privileges
Check if file exists
Execute command
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
sub rsp, 0x450
lea rbp, [rsp + 0x70]
and rbp, 0xffffffffffffffe0
mov qword [rbp + 0x98], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rbp + 0x98], rax
lea rax, [rbp]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 1]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 2]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp]
movzx r8d, byte [rbp + 1]
movzx edx, byte [rbp + 2]
lea rcx, [rbp + 0x3c0]
call fcn.140005630
mov rcx, rax
call fcn.140007480
mov qword [rbp + 0x80], rax
lea rax, [rbp + 0xd8]
lea rcx, str.notepad.exe
mov rdi, rax
mov rsi, rcx
mov ecx, 0x18
rep movsb byte [rdi], byte [rsi]
mov dword [rbp + 0x48], 0
xor eax, eax
cmp eax, 1
je 0x1400089af
lea rcx, [rbp + 0xd8]
call fcn.140006430
mov dword [rbp + 0x48], eax
cmp dword [rbp + 0x48], 0
jne 0x14000899d
lea rax, [rbp + 3]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 4]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 5]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 3]
movzx r8d, byte [rbp + 4]
movzx edx, byte [rbp + 5]
lea rcx, [rbp + 0x2a0]
call fcn.140005790
mov rcx, rax
call fcn.140006ed0
mov rcx, rax
call fcn.140005260
jmp 0x14000899f
jmp 0x1400089af
mov ecx, 0xfa0
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140008921
lea rax, [rbp + 6]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 7]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 8]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 6]
movzx r8d, byte [rbp + 7]
movzx edx, byte [rbp + 8]
lea rcx, [rbp + 0x2c0]
call fcn.140005810
mov rcx, rax
call fcn.140006ed0
mov edx, dword [rbp + 0x48]
mov rcx, rax
call fcn.140005260
lea rax, [rbp + 0x88]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov qword [rbp + 0x78], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp + 0x78]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140008aba
mov dword [rbp + 0x88], 1
mov eax, 0xc
imul rax, rax, 0
mov dword [rbp + rax + 0x94], 2
mov eax, 0xc
imul rax, rax, 0
lea rax, [rbp + rax + 0x8c]
mov r8, rax
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x140008ab0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rbp + 0x88]
xor edx, edx
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rbp + 0x48]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rbp + 0x40], rax
cmp qword [rbp + 0x40], 0
jne 0x140008ba5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x58], eax
lea rax, [rbp + 9]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0xa]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0xb]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 9]
movzx r8d, byte [rbp + 0xa]
movzx edx, byte [rbp + 0xb]
lea rcx, [rbp + 0x2e0]
call fcn.140005890
mov rcx, rax
call fcn.140006ed0
mov edx, dword [rbp + 0x58]
mov rcx, rax
call fcn.140005260
lea rax, [rbp + 0xc]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0xd]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0xe]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0xc]
movzx r8d, byte [rbp + 0xd]
movzx edx, byte [rbp + 0xe]
lea rcx, [rbp + 0x160]
call fcn.140005440
mov rcx, rax
call fcn.140006d90
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov eax, 0xfffffffe
jmp 0x14000935d
mov rcx, qword [rbp + 0x40]
call fcn.1400064c0
movzx eax, al
test eax, eax
jne 0x140008c82
lea rax, [rbp + 0xf]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x10]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x11]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0xf]
movzx r8d, byte [rbp + 0x10]
movzx edx, byte [rbp + 0x11]
lea rcx, [rbp + 0x300]
call fcn.140005910
mov rcx, rax
call fcn.140006ed0
mov rcx, rax
call fcn.140005260
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rbp + 0x12]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x13]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x14]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x12]
movzx r8d, byte [rbp + 0x13]
movzx edx, byte [rbp + 0x14]
lea rcx, [rbp + 0x170]
call fcn.140005440
mov rcx, rax
call fcn.140006d90
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov eax, 0xfffffffd
jmp 0x14000935d
mov rcx, qword [rbp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140008d61
lea rax, [rbp + 0x15]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x16]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x17]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x15]
movzx r8d, byte [rbp + 0x16]
movzx edx, byte [rbp + 0x17]
lea rcx, [rbp + 0x320]
call fcn.140005990
mov rcx, rax
call fcn.140006ed0
mov rcx, rax
call fcn.140005260
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rbp + 0x18]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x19]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x1a]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x18]
movzx r8d, byte [rbp + 0x19]
movzx edx, byte [rbp + 0x1a]
lea rcx, [rbp + 0xf0]
call fcn.140005440
mov rcx, rax
call fcn.140006d90
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov eax, 0xfffffffc
jmp 0x14000935d
mov dword [rsp + 0x20], 1
mov r9d, 0x40
mov r8d, 0x24
mov rdx, qword [rbp + 0x80]
lea rcx, [rbp + 0x180]
call fcn.140005e50
nop
mov rax, qword [rbp + 0x180]
movsxd rax, dword [rax + 4]
lea rax, [rbp + rax + 0x180]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::fail_void_const___ptr64]
movzx eax, al
test eax, eax
je 0x140008e75
mov rax, qword [rbp + 0x180]
movsxd rax, dword [rax + 4]
lea rax, [rbp + rax + 0x180]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::ios_base::rdstate_void_const___ptr64]
mov dword [rbp + 0x5c], eax
lea rax, [rbp + 0x1b]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x1c]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x1d]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x1b]
movzx r8d, byte [rbp + 0x1c]
movzx edx, byte [rbp + 0x1d]
lea rcx, [rbp + 0x340]
call fcn.140005340
mov rcx, rax
call fcn.140006ed0
mov qword [rbp + 0xa0], rax
mov edx, dword [rbp + 0x5c]
mov rcx, qword [rbp + 0xa0]
call fcn.140005260
lea rcx, [rbp + 0x180]
call fcn.140006d30
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.PAUSE
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov dword [rbp + 0x60], 0xfffffffb
lea rcx, [rbp + 0x180]
call fcn.140006340
mov eax, dword [rbp + 0x60]
jmp 0x14000935d
lea rdx, [rbp + 0xc0]
lea rcx, [rbp + 0x180]
call qword [sym.imp.MSVCP140.dll_public:_class_std::fpos_struct__Mbstatet____cdecl_std::basic_istream_char__struct_std::char_traits_char__::tellg_void____ptr64]
lea rcx, [rbp + 0xc0]
call fcn.140006250
cmp rax, 0x1000
jge 0x140008f87
lea rax, [rbp + 0x1e]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x1f]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x20]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x1e]
movzx r8d, byte [rbp + 0x1f]
movzx edx, byte [rbp + 0x20]
lea rcx, [rbp + 0x360]
call fcn.1400053c0
mov rcx, rax
call fcn.140006ed0
mov rcx, rax
call fcn.140005260
lea rcx, [rbp + 0x180]
call fcn.140006d30
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rbp + 0x21]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x22]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x23]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x21]
movzx r8d, byte [rbp + 0x22]
movzx edx, byte [rbp + 0x23]
lea rcx, [rbp + 0x100]
call fcn.140005440
mov rcx, rax
call fcn.140006d90
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov dword [rbp + 0x64], 0xfffffffa
lea rcx, [rbp + 0x180]
call fcn.140006340
mov eax, dword [rbp + 0x64]
jmp 0x14000935d
lea rcx, [rbp + 0xc0]
call fcn.140006250
mov rcx, rax
call fcn.140009444
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0xa8]
mov qword [rbp + 0x50], rax
cmp qword [rbp + 0x50], 0
jne 0x14000909e
lea rax, [rbp + 0x24]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x25]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x26]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x24]
movzx r8d, byte [rbp + 0x25]
movzx edx, byte [rbp + 0x26]
lea rcx, [rbp + 0x380]
call fcn.140005490
mov rcx, rax
call fcn.140006ed0
mov rcx, rax
call fcn.140005260
lea rcx, [rbp + 0x180]
call fcn.140006d30
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rbp + 0x27]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x28]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x29]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x27]
movzx r8d, byte [rbp + 0x28]
movzx edx, byte [rbp + 0x29]
lea rcx, [rbp + 0x110]
call fcn.140005440
mov rcx, rax
call fcn.140006d90
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov dword [rbp + 0x68], 0xfffffff9
lea rcx, [rbp + 0x180]
call fcn.140006340
mov eax, dword [rbp + 0x68]
jmp 0x14000935d
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x180]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int____ptr64]
lea rcx, [rbp + 0xc0]
call fcn.140006250
mov r8, rax
mov rdx, qword [rbp + 0x50]
lea rcx, [rbp + 0x180]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::read_char____ptr64__long_long___int64_____ptr64]
lea rcx, [rbp + 0x180]
call fcn.140006d30
lea rax, [rbp + 0x2a]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x2b]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x2c]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x2a]
movzx r8d, byte [rbp + 0x2b]
movzx edx, byte [rbp + 0x2c]
lea rcx, [rbp + 0x120]
call fcn.140005510
mov rcx, rax
call fcn.140006d90
mov rcx, rax
call fcn.140005260
lea rcx, [rbp + 0xc0]
call fcn.140006250
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x38], 1
mov byte [rsp + 0x30], 1
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
mov r9b, 1
mov r8, rax
mov rdx, qword [rbp + 0x50]
mov rcx, qword [rbp + 0x40]
call fcn.140002bf0
movzx eax, al
test eax, eax
jne 0x140009271
mov rax, qword [rbp + 0x50]
mov qword [rbp + 0xb0], rax
mov rcx, qword [rbp + 0xb0]
call fcn.140009410
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rbp + 0x2d]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x2e]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x2f]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x2d]
movzx r8d, byte [rbp + 0x2e]
movzx edx, byte [rbp + 0x2f]
lea rcx, [rbp + 0x3a0]
call fcn.140005560
mov rcx, rax
call fcn.140006ed0
mov rcx, rax
call fcn.140005260
lea rax, [rbp + 0x30]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x31]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x32]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x30]
movzx r8d, byte [rbp + 0x31]
movzx edx, byte [rbp + 0x32]
lea rcx, [rbp + 0x130]
call fcn.140005440
mov rcx, rax
call fcn.140006d90
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov dword [rbp + 0x6c], 0xfffffff8
lea rcx, [rbp + 0x180]
call fcn.140006340
mov eax, dword [rbp + 0x6c]
jmp 0x14000935d
mov rax, qword [rbp + 0x50]
mov qword [rbp + 0xb8], rax
mov rcx, qword [rbp + 0xb8]
call fcn.140009410
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rbp + 0x33]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x34]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x35]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x33]
movzx r8d, byte [rbp + 0x34]
movzx edx, byte [rbp + 0x35]
lea rcx, [rbp + 0x140]
call fcn.1400055e0
mov rcx, rax
call fcn.140006d90
mov rcx, rax
call fcn.140005260
lea rax, [rbp + 0x36]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x37]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0x38]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 0x36]
movzx r8d, byte [rbp + 0x37]
movzx edx, byte [rbp + 0x38]
lea rcx, [rbp + 0x150]
call fcn.140005440
mov rcx, rax
call fcn.140006d90
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov dword [rbp + 0x70], 0
lea rcx, [rbp + 0x180]
call fcn.140006340
mov eax, dword [rbp + 0x70]
add rsp, 0x450
pop rdi
pop rsi
pop rbp
ret