Forum > Coding >

[REL/RELUPDATE] C++ Memory editing library for beginners.

Posts: 224

Threads: 43

Joined: May, 2022

Reputation: -5

Posted

I am once again here on WRD posting about my library to gain traction for the use of beginners.

 

The library features functions which make the editing of memory easy, simple, and functional.

 

It's a relatively small, concise simple lib with basically all the functions you'll need to be able to develop your basic game trainers and cheats with ease.

Not only does it manipulate data but also has code overwriting features! 

 

I recently added structured memory editing / manipulation by adding classes with specified purposes for better organization and identification of different locations in memory to read and write to.

The library consists of multiple functions that facilitate editing and reading memory while maintaining functionality and readability for the user.

 

The library's purpose is to show how easy it can be to manipulate and read memory and how it works.

Any questions can be directed to expression#9999

 

Primary Features:

 

  template<std::size_t sz>
    manipulated_code mem_tramp_hook(const std::uint32_t func_addr) const;

    template<std::size_t sz>
    manipulated_code mem_set_byte(std::uint8_t byte) const;

    template<std::size_t sz>
    manipulated_code mem_set_bytes(std::span<std::uint8_t> bytes) const;

    template<typename stl_container_t>
    stl_container_t mem_read_bytes() const;

    template<typename value_t>
    manipulated_data<value_t> mem_set_data(value_t val) const;

    template<typename ret_t>
    ret_t mem_read_data() const;

    template<typename data_t, std::size_t sz>
    std::array<data_t, sizeof(data_t) * sz> mem_read_dyn() const;

    template<typename data_t>
    std::vector<data_t> mem_read_dyn(const std::size_t sz) const;

    template<typename value_t, std::size_t sz>
    manipulated_array_data<value_t, sz> mem_set_dyn(value_t val) const;

    template<std::size_t sz>
    manipulated_code mem_set_nop() const;

    std::uint32_t get_va() const;
    std::uint32_t get_rva() const;

    std::string mem_read_string(const std::size_t string_sz) const;
    std::uint8_t mem_read_byte(bool signednesss) const;

    std::vector<std::uint8_t> mem_read_func_bytes() const;

    void reloc_rva(const std::uint32_t mem_address);
    void set_va(const std::uint32_t mem_address);

    void set_page_flags(const std::size_t sz, DWORD new_page_flags);
    void restore_page_flags(const std::size_t sz);
    void unload_dll() const;

Code restoration and overwriting class

	void replace_new_code(bool overwrite, std::span<std::uint8_t> _new_code);
	void replace_overwritten_code(std::span<std::uint8_t> _overwritten_code);
	void restore_code();

	void overwrite_code();
	void* ret_address();

Data restoration and overwriting classes

Manipulated data:

	void restore_data();
	void set_data(data_t new_data);

	data_t read_data() const;
	data_t* ret_data_address() const;
	

Manipulated array data:

	void set_overwritten_array(std::span<array_data_t> array);
	void set_new_array(std::span<array_data_t> array);
	void set_array_index(const std::uint32_t index, array_data_t value) const;

	void overwrite_array() const;
	void restore_array() const;

	array_data_t read_array_index(const std::uint32_t index) const;
	std::vector<array_data_t> read_array() const;

	array_data_t* ret_array_address() const;

 

Thank you for taking the time to read.

If you have any feature suggestions or code suggestions feel free to contact me!

 

Github link to the library: https://github.com/expressiongz/memory-manipulation-library

  • 0

https://media.discordapp.net/attachments/1044764388546068510/1051935933836050482/Signature_4.png

Posts: 271

Threads: 6

Joined: Mar, 2021

Reputation: 10

Replied

i am learning c++ game hacking so this is actually very useful for someone like me. thanks for this

  • 0

Website: HERE

Exploits I own: SynX

Contact: not ROVER6#5842 (my old one got termed)

Posts: 224

Threads: 43

Joined: May, 2022

Reputation: -5

Replied

@ROVER6

 

no problem! any questions feel free to dm me

expression#9999

  • 0

https://media.discordapp.net/attachments/1044764388546068510/1051935933836050482/Signature_4.png

Posts: 1658

Threads: 10

Joined: Sep, 2020

Reputation: 59

Replied

Too lazy to read anything but cool it does stuff

  • 0

Discord : Doctor Doom#0550

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )