Function at 0x140002040
Capabilities:
Acquire debug privileges
Enumerate processes

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x1e8]
sub rsp, 0x2e8
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xor ebx, ebx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], 0xf
lea ecx, [rbx + 0x20]
call fcn.140003de0
mov rcx, rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x60], 0x11
mov qword [rsp + 0x68], 0x1f
movups xmm0, xmmword [str.D:_realhello.dll]
movups xmmword [rax], xmm0
movzx eax, byte [0x1400059a0]
mov byte [rcx + 0x10], al
mov byte [rcx + 0x11], bl
lea rdx, str._Enter_dll_path:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140003750
lea rdx, [rsp + 0x50]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
call fcn.140003920
xor edx, edx
mov r8d, 0x12c
lea rcx, [rbp + 0xb4]
call sub.VCRUNTIME140.dll_memset
mov dword [rbp + 0xb0], 0x130
xor edx, edx
lea ecx, [rbx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rsi, rax
mov edi, ebx
cmp rax, 0xffffffffffffffff
je 0x14000214a
lea rdx, [rbp + 0xb0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x140002141
lea rdx, [rbp + 0xdc]
lea rcx, str.Telegram.exe
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
cmove edi, dword [rbp + 0xb8]
lea rdx, [rbp + 0xb0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
jne 0x140002111
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rbp + 0x210], edi
lea rdx, str._Enter_pID:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140003750
lea rdx, [rbp + 0x210]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
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__::operator___unsigned_long_int____ptr64____ptr64]
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
mov qword [rbp + 0x228], rbx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp + 0x228]
mov edx, 0x28
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1400021fb
mov dword [rsp + 0x70], 1
mov dword [rsp + 0x7c], 2
lea r8, [rsp + 0x74]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x1400021ee
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea r8, [rsp + 0x70]
xor edx, edx
mov rcx, qword [rbp + 0x228]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rbp + 0x228]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rbp + 0x210]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
jne 0x140002225
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea ebx, [rdi - 2]
jmp 0x14000242f
mov dword [rbp + 0x220], ebx
lea rdx, [rbp + 0x220]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x140002421
mov dword [rbp + 0x218], ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rbp + 0x218]
call qword [sym.imp.KERNEL32.dll_IsWow64Process]
mov eax, dword [rbp + 0x218]
cmp dword [rbp + 0x220], eax
jne 0x140002421
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 0x10
cmovae rdx, qword [rsp + 0x50]
lea rcx, [rbp - 0x60]
call fcn.140003440
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x60], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx - 0x64], edx
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x60]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::fail_void_const___ptr64]
test al, al
je 0x140002307
lea rcx, [rbp - 0x50]
call fcn.140003380
test rax, rax
jne 0x1400022f4
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x60]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 0xfffffffb
jmp 0x140002416
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x60]
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]
mov rcx, qword [rbp - 0x80]
add rcx, qword [rbp - 0x78]
cmp rcx, 0x1000
jge 0x140002363
lea rcx, [rbp - 0x50]
call fcn.140003380
test rax, rax
jne 0x140002350
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x60]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 0xfffffffa
jmp 0x140002416
call fcn.140003e1c
mov rsi, rax
xor r8d, r8d
xor edx, edx
lea rcx, [rbp - 0x60]
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]
mov r8, qword [rbp - 0x78]
add r8, qword [rbp - 0x80]
mov rdx, rsi
lea rcx, [rbp - 0x60]
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 - 0x50]
call fcn.140003380
test rax, rax
jne 0x1400023b9
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x60]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov r8, qword [rbp - 0x78]
add r8, qword [rbp - 0x80]
mov qword [rsp + 0x40], rbx
mov dword [rsp + 0x38], 1
mov byte [rsp + 0x30], 1
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
mov r9b, 1
mov rdx, rsi
mov rcx, rdi
call fcn.140001080
mov rcx, rsi
test al, al
jne 0x140002407
call fcn.140003dd8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 0xfffffff8
jmp 0x140002416
call fcn.140003dd8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rbp - 0x60]
call fcn.140002480
jmp 0x14000242f
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 0xfffffffd
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x14000246f
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000246a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000246a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003dd8
mov eax, ebx
add rsp, 0x2e8
pop rdi
pop rsi
pop rbx
pop rbp
ret