made little FOV cheat

master
xerox 4 years ago
parent 7fb4f9484c
commit 7a4b1f06f2

@ -42,7 +42,7 @@ namespace bedaisy
GetModuleHandleA("lsasrv.dll"));
// 0f 1f 44 00 ? 8b f0 48 8b 0d ? ? ? ? 49 3b cd (proper return)
return { ioctl_handle, reinterpret_cast<void*>(lsasrv + 0x36E3B) }; // windows 10 2004 RVA you will need to update for your winver! :)
return { ioctl_handle, reinterpret_cast<void*>(lsasrv + 0x3B2AD) }; // windows 10 2004 RVA you will need to update for your winver! :)
}
return { {}, {} };
}
@ -114,7 +114,7 @@ namespace bedaisy
return {};
T buffer{};
read(proc_handle, addr, static_cast<void*>(&buffer), sizeof(T));
read(proc_handle, addr, (void*)&buffer, sizeof(T));
return buffer;
}
@ -124,6 +124,6 @@ namespace bedaisy
if (!proc_handle || !addr)
return;
write(proc_handle, addr, static_cast<void*>(&data), sizeof(T));
write(proc_handle, addr, (void*)&data, sizeof(T));
}
}

@ -1,28 +1,18 @@
#include "bedaisy.hpp"
#include "utils.hpp"
#include "rust.hpp"
void read_demo()
void example()
{
OutputDebugStringA("[lsass] main thread created!");
const auto rust_handle =
const auto proc_handle =
OpenProcess(
PROCESS_QUERY_INFORMATION, FALSE,
utils::get_pid(L"RustClient.exe")
);
if (rust_handle)
if (proc_handle)
{
const auto game_base = utils::get_proc_base(rust_handle);
if (bedaisy::read<std::uint16_t>(rust_handle, game_base) == 0x5A4D)
OutputDebugStringA("[lsass] read rust MZ!");
else
OutputDebugStringA("[lsass] didnt read rust MZ!");
const auto asm_base = utils::get_module_base(rust_handle, L"GameAssembly.dll");
if (bedaisy::read<std::uint16_t>(rust_handle, asm_base) == 0x5A4D)
OutputDebugStringA("[lsass] read game assembly MZ!");
else
OutputDebugStringA("[lsass] didnt game assembly MZ!");
rust::set_fov(proc_handle, 120.f);
OutputDebugStringA("[lsass] set fov!");
}
}
@ -32,7 +22,7 @@ extern "C" NTSTATUS nt_close(void* handle)
if (!init.exchange(true))
{
OutputDebugStringA("[lsass] creating thread!");
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)&read_demo, NULL, NULL, NULL);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)&example, NULL, NULL, NULL);
}
return NULL;
}

@ -165,6 +165,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="bedaisy.hpp" />
<ClInclude Include="rust.hpp" />
<ClInclude Include="utils.hpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

@ -21,5 +21,8 @@
<ClInclude Include="utils.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="rust.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

@ -0,0 +1,30 @@
#pragma once
#include "utils.hpp"
#define GFX_MANAGER 0x28C6F30
#define CAMERA_MANAGER 0xB8
#define CAMERA_FOV 0x18
namespace rust
{
void set_fov(HANDLE proc_handle, float fov_value)
{
const auto asm_base = utils::get_module_base(proc_handle, L"GameAssembly.dll");
if (!asm_base)
return;
const auto gfx_manager = bedaisy::read<std::uintptr_t>(
proc_handle, asm_base + GFX_MANAGER);
if (!gfx_manager)
return;
const auto camera_manager = bedaisy::read<std::uintptr_t>(
proc_handle, gfx_manager + CAMERA_MANAGER);
if (!camera_manager)
return;
bedaisy::write<float>(proc_handle, camera_manager + CAMERA_FOV, fov_value);
}
}
Loading…
Cancel
Save