Function at 0x140004a70
Capabilities:
Check if file exists
Execute command
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x280]
sub rsp, 0x380
mov rax, qword [0x14000c010]
xor rax, rsp
mov qword [rbp + 0x270], rax
xor esi, esi
lea rcx, [rbp + 0x118]
call fcn.1400045a0
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x38], rsi
lea r8d, [rsi + 0xd]
lea rdx, str.Hijacked.dll
lea rcx, [rbp - 0x50]
call fcn.140005250
nop
lea rax, [rbp + 0x118]
cmp qword [rbp + 0x130], 8
cmovae rax, qword [rbp + 0x118]
mov qword [rsp + 0x60], rax
mov rax, qword [rbp + 0x128]
mov qword [rsp + 0x68], rax
call fcn.140005bb8
movaps xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x60], xmm0
lea r8, [rsp + 0x60]
mov edx, eax
lea rcx, [rsp + 0x70]
call fcn.140005a30
nop
lea rdx, [rsp + 0x70]
cmp qword [rbp - 0x78], 0x10
cmovae rdx, qword [rsp + 0x70]
xorps xmm0, xmm0
movups xmmword [rbp - 0x70], xmm0
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x58], rsi
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], 0
jne 0x140004b43
lea rcx, [rbp - 0x70]
call fcn.140005250
nop
lea r9, [rbp - 0x50]
lea r8, [rbp - 0x70]
lea rcx, [rbp + 0xf8]
call fcn.140005840
nop
mov rdx, qword [rbp - 0x58]
cmp rdx, 0x10
jb 0x140004bab
inc rdx
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004ba5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004ba5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005e10
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 0x10
jb 0x140004bea
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004be5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004be5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005e10
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], 0xf
mov byte [rsp + 0x70], 0
mov rdx, qword [rbp - 0x38]
cmp rdx, 0x10
jb 0x140004c39
inc rdx
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004c34
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004c34
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005e10
lea rdi, [rbp + 0xf8]
cmp qword [rbp + 0x110], 0x10
cmovae rdi, qword [rbp + 0xf8]
mov rdx, rdi
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140002540
mov rcx, rax
lea rdx, [0x140007ce0]
call fcn.140002540
lea rdx, str.MANUAL_MAP_HANDLE_HIJACKER_v1.0.0_n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140002540
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rbx, rax
test rax, rax
je 0x140004ce6
cmp rax, 0xffffffffffffffff
je 0x140004ce6
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp + 0x16c]
call sub.VCRUNTIME140.dll_memset
nop
lea rdx, str.cs2.exe
lea rcx, [rbp + 0x16c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x140004cde
lea rdx, [rbp + 0x140]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
je 0x140004cee
jmp 0x140004cb0
mov ecx, dword [rbp + 0x148]
jmp 0x140004cea
mov ecx, dword [rsp + 0x50]
test ecx, ecx
jne 0x140004cfa
lea rdx, str.Make_sure_counter_strike_2_is_launched_
jmp 0x140004f72
call fcn.1400045f0
mov rbx, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140004f6b
lea rdx, str.Successfully_hijacked_handle:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140002540
mov rdx, rbx
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___void_const____ptr64____ptr64]
lea rdx, [0x140002710]
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x140004d79
lea rcx, str.Dll_file_doesnt_exist_n
call fcn.140001020
mov rcx, rbx
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 ebx, 0xfffffffc
jmp 0x140004f9d
xor edx, edx
mov r8d, 0x110
lea rcx, [rbp - 0x30]
call sub.VCRUNTIME140.dll_memset
mov rdx, rdi
lea rcx, [rbp - 0x30]
call fcn.140001ff0
nop
mov rax, qword [rbp - 0x30]
movsxd rcx, dword [rax + 4]
mov edx, dword [rbp + rcx - 0x20]
test dl, 6
je 0x140004dfe
lea rcx, str.Opening_the_file_failed:__X_n
call fcn.140001020
lea rcx, [rbp - 0x20]
call fcn.140002410
test rax, rax
jne 0x140004dde
mov rax, qword [rbp - 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x30]
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, rbx
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 ebx, 0xfffffffb
jmp 0x140004f60
lea rdx, [rbp + 0xe0]
lea rcx, [rbp - 0x30]
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 + 0xe8]
add rcx, qword [rbp + 0xe0]
cmp rcx, 0x1000
jge 0x140004e7c
lea rcx, str.Filesize_invalid._n
call fcn.140001020
lea rcx, [rbp - 0x20]
call fcn.140002410
test rax, rax
jne 0x140004e5c
mov rax, qword [rbp - 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x30]
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, rbx
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 ebx, 0xfffffffa
jmp 0x140004f60
call fcn.140005e5c
mov rdi, rax
xor r8d, r8d
xor edx, edx
lea rcx, [rbp - 0x30]
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 + 0xe0]
add r8, qword [rbp + 0xe8]
mov rdx, rdi
lea rcx, [rbp - 0x30]
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 - 0x20]
call fcn.140002410
test rax, rax
jne 0x140004ed8
mov rax, qword [rbp - 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x30]
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]
lea rcx, str.Mapping..._n
call fcn.140001020
mov r8, qword [rbp + 0xe0]
add r8, qword [rbp + 0xe8]
mov qword [rsp + 0x40], rsi
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, rdi
mov rcx, rbx
call fcn.1400029f0
test al, al
jne 0x140004f51
mov rcx, rdi
call fcn.140005e10
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.Error_while_mapping._n
call fcn.140001020
lea rcx, str.PAUSE
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov ebx, 0xfffffff8
jmp 0x140004f60
lea rcx, str.pause
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov ebx, esi
lea rcx, [rbp - 0x30]
call fcn.140001300
jmp 0x140004f9d
lea rdx, str.Handle_hijacking_failed.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140002540
lea rdx, [0x140002710]
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rcx, str.pause
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov ebx, esi
mov rdx, qword [rbp + 0x110]
cmp rdx, 0x10
jb 0x140004fe1
inc rdx
mov rcx, qword [rbp + 0xf8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004fdc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004fdc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005e10
mov qword [rbp + 0x108], rsi
mov qword [rbp + 0x110], 0xf
mov byte [rbp + 0xf8], 0
mov rdx, qword [rbp + 0x130]
cmp rdx, 8
jb 0x140005043
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x118]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000503e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000503e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005e10
mov eax, ebx
mov rcx, qword [rbp + 0x270]
xor rcx, rsp
call fcn.140005df0
lea r11, [rsp + 0x380]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret