-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- new little legends added. - x86RetSpoof added. - Localization done for little legend names.
- Loading branch information
1 parent
ef90524
commit 2015562
Showing
17 changed files
with
497 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
#include "x86RetSpoof.hpp" | ||
|
||
class RetSpoofInvoker { | ||
private: | ||
std::uintptr_t gadgetAddress{ 0 }; | ||
public: | ||
void init(std::uintptr_t gadgetAddress) noexcept | ||
{ | ||
this->gadgetAddress = gadgetAddress; | ||
} | ||
|
||
template <typename ReturnType, typename... Args> | ||
ReturnType invokeFastcall(std::uintptr_t ecx, std::uintptr_t edx, std::uintptr_t functionAddress, Args... args) const noexcept | ||
{ | ||
return x86RetSpoof::invokeFastcall<ReturnType, Args...>(ecx, edx, functionAddress, this->gadgetAddress, args...); | ||
} | ||
|
||
template <typename ReturnType, typename... Args> | ||
ReturnType invokeThiscall(std::uintptr_t ecx, std::uintptr_t functionAddress, Args... args) const noexcept | ||
{ | ||
return x86RetSpoof::invokeThiscall<ReturnType, Args...>(ecx, functionAddress, this->gadgetAddress, args...); | ||
} | ||
|
||
template <typename ReturnType, std::size_t index, typename... Args> | ||
ReturnType invokeThiscall(std::uintptr_t ecx, Args... args) const noexcept | ||
{ | ||
return x86RetSpoof::invokeThiscall<ReturnType, Args...>(ecx, (*reinterpret_cast<std::uintptr_t**>(ecx))[index], this->gadgetAddress, args...); | ||
} | ||
|
||
template <typename ReturnType, typename... Args> | ||
ReturnType invokeStdcall(std::uintptr_t functionAddress, Args... args) const noexcept | ||
{ | ||
return x86RetSpoof::invokeStdcall<ReturnType, Args...>(functionAddress, this->gadgetAddress, args...); | ||
} | ||
|
||
template <typename ReturnType, typename... Args> | ||
ReturnType invokeCdecl(std::uintptr_t functionAddress, Args... args) const noexcept | ||
{ | ||
return x86RetSpoof::invokeCdecl<ReturnType, Args...>(functionAddress, this->gadgetAddress, args...); | ||
} | ||
}; | ||
|
||
inline RetSpoofInvoker invoker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
#include <Windows.h> | ||
#include <cstdint> | ||
|
||
#include "CharacterDataStack.hpp" | ||
#include "../CheatManager.hpp" | ||
#include "../RetSpoofInvoker.hpp" | ||
#include "../offsets.hpp" | ||
|
||
#include "CharacterDataStack.hpp" | ||
|
||
void CharacterDataStack::push(const char* model, const std::int32_t skin) noexcept | ||
{ | ||
using FnPush = int(__thiscall*)(void*, const char* model, std::int32_t skinid, std::int32_t, bool update_spells, bool dont_update_hud, bool, bool, bool change_particle, bool, char, const char*, std::int32_t, const char*, std::int32_t, bool, std::int32_t); | ||
static const auto Push{ reinterpret_cast<FnPush>(std::uintptr_t(::GetModuleHandle(nullptr)) + offsets::functions::FnCharacterDataStack__Push) }; | ||
Push(this, model, skin, 0, false, false, false, false, true, false, -1, "\x00", 0, "\x00", 0, false, 1); | ||
{ | ||
invoker.invokeThiscall<int>(std::uintptr_t(this), cheatManager.memory->moduleBase + offsets::functions::FnCharacterDataStack__Push, model, skin, 0, false, false, false, false, true, false, std::int8_t(-1), "\x00", 0, "\x00", 0, false, 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.