Jump to content


Highest Reputation Content


#8 WoW Binary Collection

Posted by Apoc on 22 November 2014 - 04:14 PM

1.0.0.3368 ALPHA Includes PDB + Symbols
 
Totally useless these days, but something to have anyway.
  • 2


#6 WoW Binary Collection

Posted by Master674 on 22 November 2014 - 03:10 PM

Leaked OSX Symbol Builds:

 

6.0.1.18179 x64 incl. full HR Decompiler Output (WoD Beta)

- 5.0.1.15662 x86/x64 (MoP Beta)

- 5.0.1.15464 x86 (MoP Beta)

- 4.1.0.13860 x86 (Cata PTR)


  • 2


#7 [WoW x64] [6.0.3 19116] Release Info Dump Thread

Posted by JuJuBoSc on 22 November 2014 - 03:11 PM

Lua functions (rebased) :

3775016 lua_toguid
377c016 lua_isguid
10607016 luaA_indexAcceptable
1061f016 lua_checkstack
10643016 lua_gettop
10646016 lua_settop
1065a016 lua_insert
10690016 lua_type
10698016 lua_isnumber
1069b016 lua_isstring
106a9016 lua_tonumber
106ad016 lua_tointeger
106b5016 lua_toboolean
106b8016 lua_tolstring
106ca016 lua_touserdata
106d9016 lua_pushnumber
106e6016 lua_pushstring
1070b016 lua_pushboolean
1070e016 lua_pushlightuserdata
1071e016 lua_rawget
1072a016 lua_rawgeti
10736016 lua_createtable
10770016 lua_rawset
1078e016 lua_setmetatable
107ae016 lua_pcall
107b7016 lua_load
1082b016 luaL_error
1088c016 luaL_ref
108c9016 luaL_loadbuffer
1093e016 lua_getstack
10a28016 lua_getinfo
111af016 luaV_tostring

Bunch of functions (rebased) :

24d016 WowClientDB_Base__GetRecordDataUnsafe
4c6016 ClntObjMgrGetActivePlayerObj
2346016 ConsoleCommandRegister
2657016 CVar__Register
33ff016 FrameScript_RegisterFunctions
35bb016 FrameScript_GetContext
35f3016 FrameScript_RegisterFunction
35f8016 FrameScript_UnregisterFunction
36b1016 FrameScript_ExecuteBuffer
37ad016 FrameScript_Object__RegisterScriptObject
380d016 FrameScript_Initialize
3c11016 FrameXML_GetScopedModifiers
16370016 OsGetAsyncTimeMs
2230d016 DBC__LockType__GetRow
23dee016 j_DBC__GetRow
2c45d016 SCritSect__Enter
2e3aa016 ActivateNextModule
2e3ba016 WardenClient_HandlePacket
2e3c2016 WardenClient_Process
2e3c7016 WardenClient_Destroy
3a940016 CGUnit_C__GetAuraCount
3e31d016 NetClient__GetSessionKey
3e8a8016 ObjectAllocAddHeap
3e8fb016 ClntObjMgrGetActivePlayer
3e9b0016 GarbageCollectIdleUpdate
3e9f4016 ClntObjMgrEnumVisibleObjectsPtr
3ea18016 GetObjectByGUID
3ea59016 ClntObjMgrInitializeShared
3ea97016 ClntObjMgrObjectPtr
3eeaa016 ClntObjMgr__ClntObjMgr
3f0a0016 ClntObjMgrInitializeStd
3f19a016 CPassenger__GetPosition
40f5e016 CGPlayer_C__SetAFK
41655016 CGPlayer_C__GetPossessedUnit
424df016 CGPlayer_C__ChangeStandState
42772016 CGPlayer_C__OnAutoAFK
451ea016 CGGameObject_C__GetName
477bc016 CAnimKitManager__GetExpressingAnim
4ab98016 CGGameObject_C__GetPosition
4b6df016 CGUnit_C__IsLocalClientControlled
4b81f016 CGUnit_C__OnFlightLocal
4ba43016 CGUnit_C__ChangeStandState
4bac6016 CGUnit_C__OnSwimStartLocal
4bb68016 CGUnit_C__GetCanFly
4c0ea016 CGUnit_C__IsAutoTracking
4c49d016 CGUnit_C__GetAuraIndex
4cd35016 CGUnit_C__PlayEmoteAnim
4d24e016 CGUnit_C__OnJumpLocal
4ef2e016 CGUnit_C__CanAttack
4ef56016 CGUnit_C__CanAttackNow
4ef82016 CGUnit_C__IsValidFollowTarget
4f050016 CGUnit_C__SetTrackingTarget
4fcb3016 CGObject_C__SetTypeID
4fcd2016 CGObject_C__SetInteractIconVisible
52f10016 CUnitDisplay__GetCurrentAnimation
5590c016 j_j_FrameScript_GetContext
55af0016 j_FrameScript_GetContext
585ff016 CGUnit_C__PlayEmoteAnimKit
58be4016 CMovement_C__GetFacetQueryFlags
58c80016 CMovement_C__CanHover
593bd016 CMovement_C__CollideRequestMove
5b3da016 CGInputControl__SetControlBit
5b5d3016 MovementCancelSpells
5b646016 Script_JumpOrAscendStart
5b7eb016 Script_GetUnitAuraInfo
5c8e7016 PushUnitAura
6283d016 ToggleInteractModelIcon
631ea016 CGGameUI__UpdatePlayerAFK
6327f016 CGGameUI__DisplayError
6399e016 CGGameUI__UpdateUnitHighlights
6421d016 CGGameUI__Target
668bb016 CGChat__AddChatMessage
68486016 CGTutorial__TriggerTutorial
6a5ef016 GetSlotFromLua
7877a016 Script_CommentatorSetCamera
87edd016 CGLCD__IdleDisconnectWarning
8856a016 World__IsValidPosition
922e3016 WSACleanup int __stdcall()
9370a016 Warden__RawModule__FindExportInternal
9370d016 WardenLoader__Win32Loader__Load
93748016 Warden__RawModule__Destroy
9374e016 Warden__RawModule__Create
9377a016 Warden__RawModule__DecryptAndCreate
937d9016 Warden__GetDefaultModule
93958016 j_OsGetAsyncTimeMs
93a03016 AssertAndCrash
9451d016 ClientConnection__CharacterLoggingOut
946cc016 ClientServices__Connection
946e9016 ClientServices__Send
9479d016 ClientConnection__CharacterLogout
951dd016 AccountData_Initialize

  • 1


#3 So... what do we do with this place?

Posted by JuJuBoSc on 21 November 2014 - 09:17 PM

I'll have some stuff to post for WoW x64 :)


  • 1


#22 Some warden stuff (unfinished)

Posted by JuJuBoSc on 22 November 2014 - 07:57 PM

the copy memory pattern for x64 : (PBYTE)"\x48\x83\xEC\x08\x56\x57\xFC\x48\x8B\xF9", "xxxxxxxxxx"


  • 1


#20 Some warden stuff (unfinished)

Posted by Master674 on 22 November 2014 - 05:41 PM

Some warden stuff I was implementing... not tested and unfinished (I just started with it)

 

WardenClient.h:

/**************************************
 *    This file is part of Genesis    *
 *       Copyright (C) 2012-2014      *
 **************************************/

#pragma once

namespace Genesis {
namespace Game {
    class WardenClient {
        SINGLETON_CLASS(WardenClient) = default;

    public:
        #pragma pack(push, 4)
        struct RawModule {
           /**
            * Warden header that describes the size and base of the module.
            */
            struct Win32Loader {
                uintptr_t  modBaseAddr;   // @0
                size_t     moduleSize;    // @4 / @8 (x64)
            } *win32Loader;
        };

        struct ImportTable {
            const char  *moduleName;      // @0
            const void **importProc;      // @4 / @8 (x64)
        };
        #pragma pack(pop)

       /**
        * \brief    Initialize and attach hooks (if a module is present).
        *           If no module is present, the static hooks are applied.
        */
        void initialize();

       /**
        * \brief    Remove all warden hooks and shutdown.
        */
        void shutdown();

       /**
        * \brief    Get a pointer to the current RawModule structure.
        * \returns  A pointer to the RawModule structure or nullptr.
        */
        RawModule* getRawModule() const;

       /**
        * \brief    Get a pointer to the current ImportTable structure.
        * \returns  A pointer to the ImportTable structure or nullptr.
        */
        ImportTable* getImports(RawModule *rawModule, size_t *count) const;

       /**
        * \brief    Sets the log level of this class.
        * \param    level  The log level to set.
        */
        void setLogLevel(LogLevel level) const {
            getLogger()->setLogLevel(level);
        }

    private:
       /**
        * \brief    Attach hooks to the given warden module.
        * \param    rawModule  The raw warden module.
        * \returns  True if successful, false otherwise.
        */
        bool attachModuleHooks(RawModule *rawModule);

       /**
        * \brief    Detach hooks if present.
        */
        void detachModuleHooks();

       /**
        * \brief    Scans the warden module for the internal memcpy function.
        * \returns  A pointer to the memcpy function or nullptr.
        */
        uintptr_t findCopyMemory(RawModule* rawModule) const;

    private:
        typedef RawModule* (__cdecl *Warden__RawModule__Create_t) (const void *buffer, size_t size);
        Warden__RawModule__Create_t Warden__RawModule__Create = nullptr;
        static RawModule* __cdecl Warden__RawModule__CreateHook(const void *buffer, size_t size);

        typedef void (__cdecl *Warden__RawModule__Destroy_t) (RawModule *rawModule);
        Warden__RawModule__Destroy_t Warden__RawModule__Destroy = nullptr;
        static void __cdecl Warden__RawModule__DestroyHook(RawModule *rawModule);

        typedef void* (__cdecl *WardenModule__CopyMemory_t) (void *dst, const void *src, size_t size);
        WardenModule__CopyMemory_t WardenModule__CopyMemory = nullptr;
        static void* __cdecl WardenModule__CopyMemoryHook(void *dst, const void *src, size_t size);

    private:
        DEF_LOGGER(getLogger, "WardenClient", LogLevel::Error);

        template <typename T>
        void attachDetour(T *pDelegate, void *pRedirect) const {
            if (*pDelegate != nullptr && pRedirect != nullptr)
                sMemory.detourFunction(reinterpret_cast<void**>(pDelegate), pRedirect);
        }

        template <typename T>
        void removeDetour(T *pDelegate) const {
            if (*pDelegate != nullptr)
                sMemory.removeDetour(reinterpret_cast<void**>(pDelegate));
        }
    };
} //--> Game
} //--> Genesis

#define sWardenClient Genesis::Game::WardenClient::Instance()

WardenClient.cpp:

 

/**************************************
 *    This file is part of Genesis    *
 *       Copyright (C) 2012-2014      *
 **************************************/

#include "PCH/StdAfx.h"
#include "WardenClient.h"
#include "GameOffsets.h"
#include "Utils/SharkMemory.h"

namespace Genesis {
namespace Game {
    void WardenClient::initialize() {
        Warden__RawModule__Create = (Warden__RawModule__Create_t) sGameOffsets.Warden.RawModule.Create;
        Warden__RawModule__Destroy = (Warden__RawModule__Destroy_t) sGameOffsets.Warden.RawModule.Destroy;

        attachDetour(&Warden__RawModule__Create, Warden__RawModule__CreateHook);
        attachDetour(&Warden__RawModule__Destroy, Warden__RawModule__DestroyHook);

        if (RawModule *rawModule = getRawModule()) {
            if (!attachModuleHooks(rawModule))
                throw NX(Utils::RuntimeError, "Failed to attach warden hooks!");
        }
    }

    void WardenClient::shutdown() {
        removeDetour(&Warden__RawModule__Create);
        removeDetour(&Warden__RawModule__Destroy);
        detachModuleHooks();
    }

    bool WardenClient::attachModuleHooks(RawModule *rawModule) {
        uintptr_t copyMemory = findCopyMemory(rawModule);
        if (!copyMemory)
            return false;

        WardenModule__CopyMemory = (WardenModule__CopyMemory_t) copyMemory;
        attachDetour(&WardenModule__CopyMemory, WardenModule__CopyMemoryHook);
        return true;
    }

    void WardenClient::detachModuleHooks() {
        removeDetour(&WardenModule__CopyMemory);
        WardenModule__CopyMemory = nullptr;
    }

    WardenClient::RawModule* WardenClient::getRawModule() const {
        return sMemory.getMemory<RawModule*>(sGameOffsets.Warden.CurrentModule);
    }

    WardenClient::ImportTable* WardenClient::getImports(RawModule *rawModule, size_t *count) const {
        RawModule::Win32Loader* ldr = rawModule->win32Loader;
        if (!ldr || !ldr->modBaseAddr)
            return nullptr;

#ifdef _M_IX86
        *count = sMemory.getMemory<uint32_t>(ldr->modBaseAddr + 0x2C);
        uintptr_t offImportRel = sMemory.getMemory<uintptr_t>(ldr->modBaseAddr + 0x28);
#elif _M_X64

#endif
        if (!offImportRel)
            return nullptr;
        return reinterpret_cast<ImportTable*>(offImportRel + ldr->modBaseAddr);
    }

    uintptr_t WardenClient::findCopyMemory(RawModule *rawModule) const {
#ifdef _M_IX86
        const byte pattern[] = {
            0x56,                    /* push esi          */
            0x57,                    /* push edi          */
            0xFC,                    /* cld               */
            0x8B, 0x54, 0x24, 0x14,  /* mov edx, [esp+14] */
            0x8B, 0x74, 0x24, 0x10   /* mov esi, [esp+10] */
        };

        const char mask[] = "xxxxxxxxxxx";
#elif _M_X64

#endif
        if (RawModule::Win32Loader* l = rawModule->win32Loader)
            return sMemory.findPattern(l->modBaseAddr, l->moduleSize, pattern, mask);
        return 0;
    }

    WardenClient::RawModule* __cdecl WardenClient::Warden__RawModule__CreateHook(const void *buffer, size_t size) {
        RawModule *rawModule = sWardenClient.Warden__RawModule__Create(buffer, size);
        if (rawModule && !sWardenClient.attachModuleHooks(rawModule))
            throw NX(Utils::RuntimeError, "Failed to attach warden hooks!");

        return rawModule;
    }

    void __cdecl WardenClient::Warden__RawModule__DestroyHook(RawModule *rawModule) {
        sWardenClient.detachModuleHooks();
        sWardenClient.Warden__RawModule__Destroy(rawModule);
    }

    void* __cdecl WardenClient::WardenModule__CopyMemoryHook(void *dst, const void *src, size_t size) {
        if (src != nullptr && size != 0) {
            uintptr_t scanStart = reinterpret_cast<uintptr_t>(src);
            uintptr_t imageBase = sGameOffsets.getAppImageBase();
            uintptr_t imageSize = sGameOffsets.getAppImageSize();

            if (scanStart + size > imageBase && scanStart < imageBase + imageSize) {
                std::ostringstream message;

                void* ofsScanStart = reinterpret_cast<void*>(scanStart - imageBase);
                message << "Scanned offset 0x" << ofsScanStart << ", size: " << size << " (";

                const byte* buffer = static_cast<const byte*>(src);
                for (size_t i = 0; i < size; ++i) {
                    if (i != 0)
                        message << ' ';

                    message << std::hex << std::setfill('0') << std::setw(2)
                            << std::uppercase << static_cast<int>(buffer[i]);
                }

                message << ')';
                getLogger()->fine(message.str());
            }
        }

        return sWardenClient.WardenModule__CopyMemory(dst, src, size);
    }
} //--> Game
} //--> Genesis

Feel free to use it/add some new stuff.


  • 1