[DiscordArchive] Do you know the offset?
[DiscordArchive] Do you know the offset?
Archived author: robinsch • Posted: 2023-03-21T19:06:17.945000+00:00
Original source
Do you know the offset?
etour> & detours()
etour> _detours;
tring const& name
tring const& filenameArchived author: Thiaz • Posted: 2023-03-21T19:07:11.157000+00:00
Original source
xD
```C++
#include "ClientDetours.h"
#include "Logger.h"
#include "FSRoot.h"
#include "windows.h"
#include "detours.h"
#include <vector>
std::vector<ClientDetours:
etour> & detours()
{
static std::vector<ClientDetours:
etour> _detours;
return _detours;
}
int ClientDetours::Add(
std:
tring const& name
, void* clientFun
, void* yourFun
, std:
tring const& filename
, size_t lineno
) {
detours().push_back({
name
, clientFun
, yourFun
, filename
, lineno
});
return 0;
}
void ClientDetours::Apply()
{
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
for (Detour const& detour : detours())
{
LOG_INFO
<< "Detour: "
<< detour.m_name
<< "@"
<< detour.m_oldFn
<< " -> "
<< relProjectPath(detour.m_filename)
<< ":"
<< detour.m_lineno
;
DetourAttach((PVOID*)detour.m_oldFn, detour.m_newFn);
}
detours().clear();
DetourTransactionCommit();
}
```
Archived author: robinsch • Posted: 2023-03-21T19:07:44.395000+00:00
Original source
And how does your newFn looks?
Archived author: tester • Posted: 2023-03-21T19:09:14.876000+00:00
Original source
for reference, tswow detours should be as follows
```
CLIENT_DETOUR(GameObjectInitialize, 0x007140A0, __cdecl, int, ()) {
LOG_DEBUG << "GameObject Initialization";
return GameObjectInitialize();
}
```
Archived author: Thiaz • Posted: 2023-03-21T19:09:54.171000+00:00
Original source
CLIENT_DETOUR(HandleSlotModel, 0x004F2640, __thiscall, int, (int* a1, int a2, DWORD* a3, uint32_t a4))
no problem on this part
Archived author: robinsch • Posted: 2023-03-21T19:10:32.079000+00:00
Original source
???
Archived author: robinsch • Posted: 2023-03-21T19:10:36.780000+00:00
Original source
Where is the function.
Archived author: Thiaz • Posted: 2023-03-21T19:10:47.616000+00:00
Original source
Ah you want the whole func
Archived author: Thiaz • Posted: 2023-03-21T19:10:58.483000+00:00
Original source
was more answering to tester
Archived author: Thiaz • Posted: 2023-03-21T19:11:01.976000+00:00
Original source
dming u