CasualX / apexdream

Apex Legends external cheat for UnKnoWnCheaTs in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error while extracting offsets on Ubuntu

rivolity opened this issue · comments

commented

cargo run --release -- "r5apex.exe" human > stdout.md

warning: `apexdumper` (bin "apexdumper") generated 2 warnings Finished release [optimized] target(s) in 4.87s Running `target/release/apexdumper r5apex.exe human` thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:31:56 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

commented

I've harded coded the path file, on which i found the error, but the can't get the right apex binary,
do you have any idea where can i find the r5apex.bin file.

here is my hard code in ubuntu > file main.rs

use std::{env, fmt};
use std::path::PathBuf;

mod analysis;

fn parse_arg() -> Option<(PathBuf, bool)> {
	let mut args_os = env::args_os();
	args_os.next()?;
	let path = PathBuf::from("/home/hyouka/tmp/apexbot/offsets/game.bin");
	let human = true;

	Some((path, human))
}

pub fn print_error(error: impl fmt::Display) {
	eprintln!("{}", error);
}

fn main() {
	match parse_arg() {
		None => {
			eprintln!("Give the path to a dump apex binary.");
			return;
		},
		Some((path, human)) => {
			let filemap = pelite::FileMap::open(&path).unwrap();
			let mut output = analysis::Output::default();
			analysis::parse(&mut output, filemap.as_ref());
			let s = if human { &output.human } else { &output.ini };
			print!("{}", s);
		}
	}
}
commented

r5apex.exe is obfuscated on Windows, it must be dumped from memory by yourself. I don't know if the apex binary is different on ubuntu, if it is then I don't really expect this to work.

commented

Hello,
Thanks for the prompt response, I've taken the exe from a windows installation, I didn't find the bin r5apex.bin in the installation directory of Apex in windows, I've checked inside a new installation on a new laptop but I couldn't find any apex bin, no idea if they have changed the bin file on last update.
If you can check on your installation it will be a pleasure.

commented

r5apex.bin does not exist in the installation folder. You must extract it by reading the virtual memory of the game process. This is because r5apex.exe is obfuscated on disk and unusable to extract information from. To get around the expected workflow is to run the game, bypass any security mechanism (this repo provides no support for this part) and after waiting for the game to deobfuscate itself (eg. on the main menu) then read it from memory and write the result to a file r5apex.bin (some details are missing about file vs memory alignment). I use the .bin extension to prevent me from accidentally running the executable.

commented

Thanks for this detailed description, and for taking time to explain the process, it's loud and clear now, I will try to test on windows.

any update last offset ?