diff --git a/profile/3.3.5a-windows-386/ida/batch/import_data_types.idc b/profile/3.3.5a-windows-386/ida/batch/import_data_types.idc index cddf25a..7d452be 100644 --- a/profile/3.3.5a-windows-386/ida/batch/import_data_types.idc +++ b/profile/3.3.5a-windows-386/ida/batch/import_data_types.idc @@ -5,6 +5,7 @@ static import_data_types() { apply_type(0x00401010, "void* __stdcall func(uint32_t count)"); apply_type(0x00401030, "void __stdcall func(void* ptr)"); apply_type(0x00401050, "CDataStore* __thiscall func(CDataStore* this)"); + apply_type(0x004033B0, "void __stdcall ClientKillTimer(uint32_t timerId, void* handlerAddress, char* handlerName)"); apply_type(0x00403600, "void __stdcall func(char* manifest@)"); apply_type(0x00408070, "void __stdcall func(float* minX, float* maxX, float* minY, float* maxY, float* minZ, float* maxZ)"); apply_type(0x00409670, "void __thiscall func(CGxDevice* this)"); @@ -87,6 +88,11 @@ static import_data_types() { apply_type(0x0047B700, "char* __stdcall func(CMDOPT)"); apply_type(0x0047B720, "int32_t __stdcall func()"); apply_type(0x0047B9E0, "int __stdcall func(char* dst, uint32_t dstMaxChars, uint16_t* src, uint32_t srcMaxChars, uint32_t* dstChars, uint32_t* srcChars)"); + apply_type(0x0047D0E0, "EvtContext* __thiscall func(TInstanceIdTable_EvtContext* this, uint32_t id, int32_t lockMode, int32_t* findMask)"); + apply_type(0x0047D620, "void __stdcall func(uint32_t timerId, void* handlerFunction, char* functionName)"); + apply_type(0x0047E2F0, "void __usercall func(EvtContext* context@)"); + apply_type(0x0047E5A0, "EvtContext* __usercall func@(uint32_t hThread@)"); + apply_type(0x0047ED30, "void __stdcall func(uint32_t hThread, EvtContext* context)"); apply_type(0x004804F0, "void __cdecl func(EvtContext* context, EVENTID id, void* handler, void* param, float priority)"); apply_type(0x004806A0, "int32_t __cdecl func(EvtContext* context, EVENTID id, void *data, size_t bytes)"); apply_type(0x00482C20, "void __thiscall func(CSimpleRegion* this)"); @@ -537,11 +543,14 @@ static import_data_types() { apply_type(0x009E5398, "uint8_t[256]"); apply_type(0x009E5630, "Blizzard__File__FileInfo"); apply_type(0x009E9EC8, "uint32_t[7]"); + apply_type(0x009EA04C, "TInstanceId_EvtContext__v_table"); apply_type(0x00A2DDC0, "CGxDevice__vtable"); apply_type(0x00AB6350, "WowClientDB_Startup_StringsRec"); apply_type(0x00AB90AC, "Blizzard__File__Filesystem*"); apply_type(0x00AB91C0, "Blizzard__File__Filesystem"); apply_type(0x00AB92C0, "Blizzard__File__Filesystem"); + apply_type(0x00AC0DC0, "int32_t"); + apply_type(0x00AC0DC4, "TSList_EvtThread"); apply_type(0x00AC1B9C, "TSExplicitList_CILayer"); apply_type(0x00AD2808, "char*[53]"); apply_type(0x00AD305C, "WowClientDB_AchievementRec"); @@ -808,8 +817,15 @@ static import_data_types() { apply_type(0x00B38181, "bool"); apply_type(0x00B38A5C, "Blizzard__Lock__DoOnceData"); apply_type(0x00B38A64, "Blizzard__Lock__DoOnceData"); + apply_type(0x00B41670, "TInstanceIdTable_EvtContext"); apply_type(0x00B417C8, "uint32_t"); + apply_type(0x00B417CC, "int32_t"); apply_type(0x00B417D0, "int32_t"); + apply_type(0x00B417D4, "int32_t"); + apply_type(0x00B417D8, "EvtThread**"); + apply_type(0x00B417DC, "SCritSect*"); + apply_type(0x00B417E8, "SCritSect"); + apply_type(0x00B41824, "SEvent"); apply_type(0x00B41850, "CDataRecycler"); apply_type(0x00B6A9DC, "MipBits*"); apply_type(0x00BD08F0, "CVar*"); diff --git a/profile/3.3.5a-windows-386/ida/batch/import_functions.idc b/profile/3.3.5a-windows-386/ida/batch/import_functions.idc index 3cce1b9..6381eaf 100644 --- a/profile/3.3.5a-windows-386/ida/batch/import_functions.idc +++ b/profile/3.3.5a-windows-386/ida/batch/import_functions.idc @@ -13,7 +13,6 @@ static import_functions() { set_func_cmt(0x004038A0, "CDataStore::~CDataStore()", 0); set_func_cmt(0x00405A10, "int __cdecl PatchFiles::EnumPatchArchives(OS_FILE_DATA *fileData, PatchOnDemand__Cache *cbParam)", 0); set_func_cmt(0x00405AB0, "int __thiscall PatchFiles::LoadArchives(PatchFiles *this, const char *localeCode, char a3)", 0); - set_func_cmt(0x004066D0, "00005400C", 0); set_func_cmt(0x00427130, "Blizzard::File::Delete(char const*)", 0); set_func_cmt(0x00427500, "Blizzard::File::MakeAbsolutePath(char const*, char*, int, bool)", 0); set_func_cmt(0x00427560, "Blizzard::File::Move(char const*, char const*)", 0); @@ -151,6 +150,7 @@ static import_functions() { set_func_cmt(0x0081B5F0, "FrameScript_CreateEvents(char const**, unsigned int)", 0); set_func_cmt(0x0086B9A0, "OsGetProcessorFeaturesEx(int&)", 0); set_func_cmt(0x0086BBA0, "Invented name", 0); + set_func_cmt(0x0086F5F0, "00005410", 0); set_func_cmt(0x008A1420, "known names: System_File::Shutdown, CVGxVideoOptionsVersionCallback", 0); set_func_cmt(0x008E5250, "Script_ToggleTris", 0); set_func_cmt(0x0095D110, "CDataAllocator::GetData(int, char const*, int)", 0); diff --git a/profile/3.3.5a-windows-386/ida/batch/import_symbols.idc b/profile/3.3.5a-windows-386/ida/batch/import_symbols.idc index bc70e54..52664cb 100644 --- a/profile/3.3.5a-windows-386/ida/batch/import_symbols.idc +++ b/profile/3.3.5a-windows-386/ida/batch/import_symbols.idc @@ -21,10 +21,11 @@ static import_symbols() { set_name(0x00403600, "StartupStreaming"); set_name(0x004038A0, "CDataStore__destructor"); set_name(0x00404130, "WowClientInit"); + set_name(0x004047E0, "InitializeEngineCallback"); set_name(0x004052F0, "WowClientDB_StartupStringsRec__Load"); set_name(0x00405A10, "PatchFiles__EnumPatchArchives"); set_name(0x00405AB0, "PatchFiles__LoadArchives"); - set_name(0x004066D0, "DestroyHandlerPlayer"); + set_name(0x004066D0, "DestroyEngineCallback"); set_name(0x004067F0, "InitializeGlobal"); set_name(0x00406B70, "DestroyGlobal"); set_name(0x00406C70, "CommonMain"); @@ -234,7 +235,7 @@ static import_symbols() { set_name(0x0047D030, "EventDestroy"); set_name(0x0047D080, "EventCreateContextEx"); set_name(0x0047D090, "EventSetConfirmCloseCallback"); - set_name(0x0047D0E0, "CSRWLock__Enter"); + set_name(0x0047D0E0, "TInstanceIdTable_EvtContext__Ptr"); set_name(0x0047D1D0, "EventIsButtonDown"); set_name(0x0047D230, "EventIsKeyDown"); set_name(0x0047D290, "EventPostCloseEx"); @@ -248,18 +249,24 @@ static import_symbols() { set_name(0x0047D770, "EventRegister"); set_name(0x0047D790, "EventUnregister"); set_name(0x0047D990, "IEvtSchedulerShutdown"); + set_name(0x0047DB40, "SynthesizeInitialize"); set_name(0x0047DBC0, "SynthesizeIdle"); set_name(0x0047DC20, "SynthesizePoll"); set_name(0x0047DC50, "SynthesizePaint"); set_name(0x0047DCA0, "EventForceIdleProcessing"); set_name(0x0047DEA0, "IEvtSchedulerDestroy"); + set_name(0x0047E2F0, "SynthesizeDestroy"); + set_name(0x0047E5A0, "GetNextContext"); set_name(0x0047E910, "InitializeSchedulerThread"); set_name(0x0047EC10, "AttachContextToThread"); + set_name(0x0047ED30, "DetachContextFromThread"); set_name(0x0047EFF0, "SchedulerThreadProcProcess"); set_name(0x0047F230, "SchedulerThreadProc"); set_name(0x0047F2D0, "EventDoMessageLoop"); set_name(0x0047F2F0, "IEvtSchedulerInitialize"); set_name(0x0047F5C0, "IEvtSchedulerCreateContext"); + set_name(0x0047F6C0, "TInstanceId_EvtContext__destructor"); + set_name(0x0047F920, "TInstanceId_EvtContext__scalar_deleting_destructor"); set_name(0x0047FAC0, "PostMouseModeChanged"); set_name(0x0047FB80, "IEvtInputDestroy"); set_name(0x0047FBA0, "IEvtInputInitialize"); @@ -3078,6 +3085,8 @@ static import_symbols() { set_name(0x0076F7E0, "SStrStrUTF8I"); set_name(0x0076F9E0, "SStrDupA"); set_name(0x0076FB80, "SStrToFloat"); + set_name(0x0076FDD0, "SGetCurrentThreadPriority"); + set_name(0x0076FDE0, "SSetCurrentThreadPriority"); set_name(0x0076FE00, "SSetCurrentProcessAffinityMask"); set_name(0x007703A0, "ILoadValue"); set_name(0x00770490, "InternalLoadEntry"); @@ -3103,10 +3112,11 @@ static import_symbols() { set_name(0x00774630, "SCritSect__destructor"); set_name(0x00774640, "SCritSect__Enter"); set_name(0x00774650, "SCritSect__Leave"); - set_name(0x00774660, "CSRWLock__Leave"); + set_name(0x00774660, "TInstanceIdTable_EvtContext__Unlock"); set_name(0x00774690, "SSyncObject__Wait"); set_name(0x00774720, "SEvent__Set"); set_name(0x00774730, "SEvent__Reset"); + set_name(0x00774740, "SThread__Create"); set_name(0x007750D0, "PathGetRootChars"); set_name(0x00775140, "FlushLog"); set_name(0x00775190, "LockLog"); @@ -3317,6 +3327,7 @@ static import_symbols() { set_name(0x0086D6D0, "OsTlsGetValue"); set_name(0x0086E200, "TSExplicitList_CGxBuf__LinkToTail"); set_name(0x0086F5A0, "OsCallSetContext"); + set_name(0x0086F5F0, "OsCallResetContext"); set_name(0x0086F760, "OsCallInitialize"); set_name(0x0086F880, "OsCallInitializeContext"); set_name(0x00872280, "OsClipboardGetString"); @@ -3560,6 +3571,7 @@ static import_symbols() { set_name(0x009E5398, "bytesFromUTF8"); set_name(0x009E5630, "s_noinfo"); set_name(0x009E9EC8, "firstByteMark@2"); + set_name(0x009EA04C, "TInstanceId_EvtContext__v_table"); set_name(0x009F1074, "s_pixelFormatToMipBitsCache"); set_name(0x00A2DDC0, "CGxDevice__vtable"); set_name(0x00A2E198, "CGxDeviceOpenGl__vtable"); @@ -3571,6 +3583,8 @@ static import_symbols() { set_name(0x00AB91B4, "System_File__write_func"); set_name(0x00AB91C0, "System_File__Stacked__s_nullstack"); set_name(0x00AB92C0, "System_File__Stacked__s_basestack"); + set_name(0x00AC0DC0, "s_threadListContention"); + set_name(0x00AC0DC4, "s_threadList"); set_name(0x00AC1B9C, "s_zorderlist"); set_name(0x00AC3DA4, "ClientServices__m_loginState"); set_name(0x00AC80A8, "CGGameUI__m_visible"); @@ -3841,8 +3855,16 @@ static import_symbols() { set_name(0x00B38A5C, "System_File__s_read_init"); set_name(0x00B38A64, "System_File__s_write_init"); set_name(0x00B38A88, "OsFileGetDownloadFolder__s_downloadfolder"); + set_name(0x00B41670, "TSingletonInstanceId_EvtContext__s_idTable"); set_name(0x00B417C8, "s_mainThread"); + set_name(0x00B417CC, "s_originalThreadPriority"); set_name(0x00B417D0, "s_interactiveCount"); + set_name(0x00B417D4, "s_threadSlotCount"); + set_name(0x00B417D8, "s_threadSlots"); + set_name(0x00B417DC, "s_threadSlotCritsects"); + set_name(0x00B417E0, "s_netServer"); + set_name(0x00B417E8, "s_threadListCritsect"); + set_name(0x00B41824, "s_shutdownEvent"); set_name(0x00B41850, "s_messageRecycler"); set_name(0x00B6A180, "CGlueMgr__m_ffxActive"); set_name(0x00B6A184, "CGlueMgr__m_deathEffect"); diff --git a/profile/3.3.5a-windows-386/include/common/instance.h b/profile/3.3.5a-windows-386/include/common/instance.h index c4ca8fe..ac1e471 100644 --- a/profile/3.3.5a-windows-386/include/common/instance.h +++ b/profile/3.3.5a-windows-386/include/common/instance.h @@ -12,9 +12,14 @@ // TSingletonInstanceId #define COMMON_INSTANCE_ID(T) \ STORM_TS_LIST(T); \ +typedef struct TInstanceId_##T##__v_table TInstanceId_##T##__v_table; \ typedef struct TInstanceId_##T TInstanceId_##T; \ typedef struct TSingletonInstanceId_##T TSingletonInstanceId_##T; \ +struct TInstanceId_##T##__v_table { \ + void* v_fn_00_scalar_deleting_destructor; \ +}; \ struct TInstanceId_##T { \ + TInstanceId_##T##__v_table* v_table; \ TSLinkedNode_##T b_base; \ uint32_t m_id; \ }; \ diff --git a/profile/3.3.5a-windows-386/include/event/context.h b/profile/3.3.5a-windows-386/include/event/context.h index f77f329..a3773fb 100644 --- a/profile/3.3.5a-windows-386/include/event/context.h +++ b/profile/3.3.5a-windows-386/include/event/context.h @@ -15,6 +15,7 @@ DECLARE_ENUM(SCHEDSTATE); DECLARE_STRUCT(EvtContext); +DECLARE_STRUCT(EvtContextQueue); DECLARE_STRUCT(EvtTimer); DECLARE_HANDLE(HPROPCONTEXT); DECLARE_HANDLE(HEVENTCONTEXT); @@ -32,7 +33,6 @@ COMMON_INSTANCE_ID(EvtContext); // class EvtContext : public TSingletonInstanceId, m_id)> struct EvtContext { TSingletonInstanceId_EvtContext b_base; - uint32_t unkA; // Member variables SCritSect m_critsect; uint32_t m_currTime; @@ -45,11 +45,6 @@ struct EvtContext { uint32_t m_schedWeight; uint32_t m_schedSmoothWeight; int32_t m_schedRebalance; - int32_t unkXX; - int32_t unkXY; - int32_t unkXZ; - int32_t unkYY; - int32_t unkYZ; // TSExplicitList m_queueHandlerList[EVENTIDS]; TSExplicitList_EvtHandler m_queueHandlerList[36]; // TSExplicitList m_queueMessageList; @@ -60,8 +55,17 @@ struct EvtContext { EvtIdTable_pointer_to_EvtTimer m_timerIdTable; EvtTimerQueue m_timerQueue; HPROPCONTEXT m_propContext; + int32_t unk264; + int32_t unk268; + int32_t unk26C; void* m_callContext; uint32_t m_startWatchdog; }; +STORM_TS_PRIORITY_QUEUE(EvtContext); + +// class EvtContextQueue : public TSPriorityQueue +struct EvtContextQueue { + TSPriorityQueue_EvtContext b_base; +}; #endif \ No newline at end of file diff --git a/profile/3.3.5a-windows-386/include/event/thread.h b/profile/3.3.5a-windows-386/include/event/thread.h new file mode 100644 index 0000000..0d63688 --- /dev/null +++ b/profile/3.3.5a-windows-386/include/event/thread.h @@ -0,0 +1,25 @@ +#ifndef EVENT_THREAD_H +#define EVENT_THREAD_H + +DECLARE_STRUCT(EvtThread); + +#include "storm/thread.h" +#include "storm/list.h" +#include "storm/queue.h" + +STORM_TS_LIST(EvtThread); + +// class EvtThread : public TSLinkedNode +struct EvtThread { + TSLinkedNode_EvtThread b_base; + uint32_t m_threadSlot; + uint32_t m_threadCount; + uint32_t m_weightTotal; + uint32_t m_weightAvg; + uint32_t m_contextCount; + uint32_t m_rebalance; + SEvent m_wakeEvent; + EvtContextQueue m_contextQueue; +}; + +#endif \ No newline at end of file diff --git a/profile/3.3.5a-windows-386/include/main.h b/profile/3.3.5a-windows-386/include/main.h index 9ab5b84..578687e 100644 --- a/profile/3.3.5a-windows-386/include/main.h +++ b/profile/3.3.5a-windows-386/include/main.h @@ -44,6 +44,7 @@ #include "event/keydown.h" #include "event/message.h" #include "event/timer.h" +#include "event/thread.h" #include "framescript/object.h" #include "framescript/event_object.h" diff --git a/profile/3.3.5a-windows-386/include/storm/queue.h b/profile/3.3.5a-windows-386/include/storm/queue.h index 145a7bf..1721ef8 100644 --- a/profile/3.3.5a-windows-386/include/storm/queue.h +++ b/profile/3.3.5a-windows-386/include/storm/queue.h @@ -21,11 +21,15 @@ struct CSBasePriority { #define STORM_TS_TIMER_PRIORITY(T) \ typedef struct TSTimerPriority_##T TSTimerPriority_##T; \ struct TSTimerPriority_##T { \ + void** v_table; \ CSBasePriority b_base; \ T m_val; \ } #define STORM_TS_PRIORITY_QUEUE(T) \ -typedef CSBasePriorityQueue TSPriorityQueue_##T +typedef struct TSPriorityQueue_##T TSPriorityQueue_##T; \ +struct TSPriorityQueue_##T { \ + CSBasePriority b_base; \ +} #endif \ No newline at end of file diff --git a/profile/3.3.5a-windows-386/include/storm/thread.h b/profile/3.3.5a-windows-386/include/storm/thread.h index 30785fb..d707276 100644 --- a/profile/3.3.5a-windows-386/include/storm/thread.h +++ b/profile/3.3.5a-windows-386/include/storm/thread.h @@ -11,7 +11,7 @@ DECLARE_STRUCT(SThread); typedef struct CSRWLock CSRWLock; struct SCritSect { - uint8_t m_critsect[24]; + uint8_t m_critsect[40]; }; struct CSRWLock { diff --git a/profile/3.3.5a-windows-386/symbol/client/func.sym b/profile/3.3.5a-windows-386/symbol/client/func.sym index aefcce5..03c352a 100644 --- a/profile/3.3.5a-windows-386/symbol/client/func.sym +++ b/profile/3.3.5a-windows-386/symbol/client/func.sym @@ -2,13 +2,14 @@ PatchFiles__qsortpatchfiles 00401200 f ; int __cdecl PatchFiles::qsortpatchfiles SetPaths 00402B20 f end=00402B8B TimingMethodCallback 00403200 f end=00403294 CCommand_TimingInfo 004032A0 f end=004032FF -ClientKillTimer 004033B0 f end=004033B9 +ClientKillTimer 004033B0 f end=004033B9 type="void __stdcall ClientKillTimer(uint32_t timerId, void* handlerAddress, char* handlerName)" ClientPostClose 004033C0 f end=004033D1 StartupStreaming 00403600 f end=004036A4 type="void __stdcall func(char* manifest@)" WowClientInit 00404130 f end=004042BC +InitializeEngineCallback 004047E0 f end=00404923 PatchFiles__EnumPatchArchives 00405A10 f ; int __cdecl PatchFiles::EnumPatchArchives(OS_FILE_DATA *fileData, PatchOnDemand__Cache *cbParam) PatchFiles__LoadArchives 00405AB0 f ; int __thiscall PatchFiles::LoadArchives(PatchFiles *this, const char *localeCode, char a3) -DestroyHandlerPlayer 004066D0 f end=0040673F ; 00005400C +DestroyEngineCallback 004066D0 f end=0040673F InitializeGlobal 004067F0 f end=00406B67 DestroyGlobal 00406B70 f end=00406C65 CommonMain 00406C70 f end=00406D64 diff --git a/profile/3.3.5a-windows-386/symbol/event/func.sym b/profile/3.3.5a-windows-386/symbol/event/func.sym index c9d69f0..555a105 100644 --- a/profile/3.3.5a-windows-386/symbol/event/func.sym +++ b/profile/3.3.5a-windows-386/symbol/event/func.sym @@ -5,6 +5,7 @@ EventInitialize 0047CFF0 f end=0047D02D EventDestroy 0047D030 f end=0047D04E EventCreateContextEx 0047D080 f end=0047D089 EventSetConfirmCloseCallback 0047D090 f end=0047D099 +TInstanceIdTable_EvtContext__Ptr 0047D0E0 f end=0047D16A type="EvtContext* __thiscall func(TInstanceIdTable_EvtContext* this, uint32_t id, int32_t lockMode, int32_t* findMask)" EventIsButtonDown 0047D1D0 f end=0047D230 EventIsKeyDown 0047D230 f end=0047D290 EventPostCloseEx 0047D290 f end=0047D305 @@ -12,24 +13,30 @@ EventQueuePost 0047D310 f end=0047D3AF EventRegisterEx 0047D3C0 f end=0047D443 EventUnregisterEx 0047D450 f end=0047D4B7 EventSetTimer 0047D530 f end=0047D59C -EventKillTimer 0047D620 f end=0047D683 +EventKillTimer 0047D620 f end=0047D683 type="void __stdcall func(uint32_t timerId, void* handlerFunction, char* functionName)" EventSetMouseMode 0047D690 f end=0047D6FD EventPostClose 0047D760 f end=0047D769 EventRegister 0047D770 f end=0047D78D EventUnregister 0047D790 f end=0047D7A9 IEvtSchedulerShutdown 0047D990 f end=0047D9EB +SynthesizeInitialize 0047DB40 f end=0047DB6B SynthesizeIdle 0047DBC0 f end=0047DC14 SynthesizePoll 0047DC20 f end=0047DC50 SynthesizePaint 0047DC50 f end=0047DC8D EventForceIdleProcessing 0047DCA0 f end=0047DE09 IEvtSchedulerDestroy 0047DEA0 f end=0047E117 +SynthesizeDestroy 0047E2F0 f end=0047E3C5 type="void __usercall func(EvtContext* context@)" +GetNextContext 0047E5A0 f end=0047E5FA type="EvtContext* __usercall func@(uint32_t hThread@)" InitializeSchedulerThread 0047E910 f end=0047EA69 AttachContextToThread 0047EC10 f +DetachContextFromThread 0047ED30 f end=0047EDED type="void __stdcall func(uint32_t hThread, EvtContext* context)" SchedulerThreadProcProcess 0047EFF0 f end=0047F225 SchedulerThreadProc 0047F230 f end=0047F2C1 ; IEvtSchedulerProcess as an independent function appears to be optimized out EventDoMessageLoop 0047F2D0 f end=0047F2EC IEvtSchedulerInitialize 0047F2F0 f end=0047F5BA IEvtSchedulerCreateContext 0047F5C0 f end=0047F6B9 +TInstanceId_EvtContext__destructor 0047F6C0 f +TInstanceId_EvtContext__scalar_deleting_destructor 0047F920 f end=0047F94B PostMouseModeChanged 0047FAC0 f end=0047FB22 IEvtInputDestroy 0047FB80 f end=0047FB92 IEvtInputInitialize 0047FBA0 f end=0047FBA5 @@ -51,3 +58,4 @@ IEvtTimerGetNextTime 00480F70 f end=00480FCA IEvtTimerDispatch 00481100 f end=00481289 IEvtTimerKill 00481290 f end=0048138F IEvtTimerSet 00481390 f end=004814E4 +TInstanceIdTable_EvtContext__Unlock 00774660 f end=00774675 diff --git a/profile/3.3.5a-windows-386/symbol/event/label.sym b/profile/3.3.5a-windows-386/symbol/event/label.sym index 7afc348..dfeee20 100644 --- a/profile/3.3.5a-windows-386/symbol/event/label.sym +++ b/profile/3.3.5a-windows-386/symbol/event/label.sym @@ -1,3 +1,13 @@ +TInstanceId_EvtContext__v_table 009EA04C l type="TInstanceId_EvtContext__v_table" +s_threadListContention 00AC0DC0 l type="int32_t" +s_threadList 00AC0DC4 l type="TSList_EvtThread" +TSingletonInstanceId_EvtContext__s_idTable 00B41670 l type="TInstanceIdTable_EvtContext" s_mainThread 00B417C8 l type="uint32_t" s_interactiveCount 00B417D0 l type="int32_t" +s_threadSlotCount 00B417D4 l type="int32_t" +s_threadSlots 00B417D8 l type="EvtThread**" +s_threadSlotCritsects 00B417DC l type="SCritSect*" +s_netServer 00B417E0 l +s_threadListCritsect 00B417E8 l type="SCritSect" +s_shutdownEvent 00B41824 l type="SEvent" s_messageRecycler 00B41850 l type="CDataRecycler" diff --git a/profile/3.3.5a-windows-386/symbol/lock/func.sym b/profile/3.3.5a-windows-386/symbol/lock/func.sym deleted file mode 100644 index f35fa29..0000000 --- a/profile/3.3.5a-windows-386/symbol/lock/func.sym +++ /dev/null @@ -1,2 +0,0 @@ -CSRWLock__Enter 0047D0E0 f end=0047D16A -CSRWLock__Leave 00774660 f end=00774675 diff --git a/profile/3.3.5a-windows-386/symbol/main.sym b/profile/3.3.5a-windows-386/symbol/main.sym index c57d56c..da7002d 100644 --- a/profile/3.3.5a-windows-386/symbol/main.sym +++ b/profile/3.3.5a-windows-386/symbol/main.sym @@ -12,15 +12,16 @@ AsyncFileReadHandlerTimeoutCallback 00402690 f end=004026A9 SetPaths 00402B20 f end=00402B8B TimingMethodCallback 00403200 f end=00403294 CCommand_TimingInfo 004032A0 f end=004032FF -ClientKillTimer 004033B0 f end=004033B9 +ClientKillTimer 004033B0 f end=004033B9 type="void __stdcall ClientKillTimer(uint32_t timerId, void* handlerAddress, char* handlerName)" ClientPostClose 004033C0 f end=004033D1 StartupStreaming 00403600 f end=004036A4 type="void __stdcall func(char* manifest@)" CDataStore__destructor 004038A0 f ; CDataStore::~CDataStore() WowClientInit 00404130 f end=004042BC +InitializeEngineCallback 004047E0 f end=00404923 WowClientDB_StartupStringsRec__Load 004052F0 f end=0040553D PatchFiles__EnumPatchArchives 00405A10 f ; int __cdecl PatchFiles::EnumPatchArchives(OS_FILE_DATA *fileData, PatchOnDemand__Cache *cbParam) PatchFiles__LoadArchives 00405AB0 f ; int __thiscall PatchFiles::LoadArchives(PatchFiles *this, const char *localeCode, char a3) -DestroyHandlerPlayer 004066D0 f end=0040673F ; 00005400C +DestroyEngineCallback 004066D0 f end=0040673F InitializeGlobal 004067F0 f end=00406B67 DestroyGlobal 00406B70 f end=00406C65 CommonMain 00406C70 f end=00406D64 @@ -230,7 +231,7 @@ EventInitialize 0047CFF0 f end=0047D02D EventDestroy 0047D030 f end=0047D04E EventCreateContextEx 0047D080 f end=0047D089 EventSetConfirmCloseCallback 0047D090 f end=0047D099 -CSRWLock__Enter 0047D0E0 f end=0047D16A +TInstanceIdTable_EvtContext__Ptr 0047D0E0 f end=0047D16A type="EvtContext* __thiscall func(TInstanceIdTable_EvtContext* this, uint32_t id, int32_t lockMode, int32_t* findMask)" EventIsButtonDown 0047D1D0 f end=0047D230 EventIsKeyDown 0047D230 f end=0047D290 EventPostCloseEx 0047D290 f end=0047D305 @@ -238,24 +239,30 @@ EventQueuePost 0047D310 f end=0047D3AF EventRegisterEx 0047D3C0 f end=0047D443 EventUnregisterEx 0047D450 f end=0047D4B7 EventSetTimer 0047D530 f end=0047D59C -EventKillTimer 0047D620 f end=0047D683 +EventKillTimer 0047D620 f end=0047D683 type="void __stdcall func(uint32_t timerId, void* handlerFunction, char* functionName)" EventSetMouseMode 0047D690 f end=0047D6FD EventPostClose 0047D760 f end=0047D769 EventRegister 0047D770 f end=0047D78D EventUnregister 0047D790 f end=0047D7A9 IEvtSchedulerShutdown 0047D990 f end=0047D9EB +SynthesizeInitialize 0047DB40 f end=0047DB6B SynthesizeIdle 0047DBC0 f end=0047DC14 SynthesizePoll 0047DC20 f end=0047DC50 SynthesizePaint 0047DC50 f end=0047DC8D EventForceIdleProcessing 0047DCA0 f end=0047DE09 IEvtSchedulerDestroy 0047DEA0 f end=0047E117 +SynthesizeDestroy 0047E2F0 f end=0047E3C5 type="void __usercall func(EvtContext* context@)" +GetNextContext 0047E5A0 f end=0047E5FA type="EvtContext* __usercall func@(uint32_t hThread@)" InitializeSchedulerThread 0047E910 f end=0047EA69 AttachContextToThread 0047EC10 f +DetachContextFromThread 0047ED30 f end=0047EDED type="void __stdcall func(uint32_t hThread, EvtContext* context)" SchedulerThreadProcProcess 0047EFF0 f end=0047F225 SchedulerThreadProc 0047F230 f end=0047F2C1 ; IEvtSchedulerProcess as an independent function appears to be optimized out EventDoMessageLoop 0047F2D0 f end=0047F2EC IEvtSchedulerInitialize 0047F2F0 f end=0047F5BA IEvtSchedulerCreateContext 0047F5C0 f end=0047F6B9 +TInstanceId_EvtContext__destructor 0047F6C0 f +TInstanceId_EvtContext__scalar_deleting_destructor 0047F920 f end=0047F94B PostMouseModeChanged 0047FAC0 f end=0047FB22 IEvtInputDestroy 0047FB80 f end=0047FB92 IEvtInputInitialize 0047FBA0 f end=0047FBA5 @@ -3074,6 +3081,8 @@ SStrCmp 0076F770 f end=0076F7D2 SStrStrUTF8I 0076F7E0 f end=0076F852 SStrDupA 0076F9E0 f end=0076FA35 SStrToFloat 0076FB80 f end=0076FDA9 +SGetCurrentThreadPriority 0076FDD0 f end=0076FDDE +SSetCurrentThreadPriority 0076FDE0 f end=0076FDF8 SSetCurrentProcessAffinityMask 0076FE00 f end=0076FE18 ILoadValue 007703A0 f end=00770483 type="int32_t __usercall func@(void* parentKey, char* subKeyName@, char* valuename, uint32_t* datatype, uint8_t* buffer@, uint32_t bytes@, uint32_t* bytesread@)" InternalLoadEntry 00770490 f end=00770575 type="int32_t __usercall func@(char* keyname, char* valuename, uint32_t flags, uint32_t* datatype, void* buffer, uint32_t bytes, uint32_t* bytesread@)" @@ -3099,10 +3108,11 @@ SCritSect__SCritSect 00774620 f end=0077462E type="SCritSect* __thiscall func(SC SCritSect__destructor 00774630 f end=00774638 type="void __thiscall func(SCritSect *this)" SCritSect__Enter 00774640 f end=00774648 type="void __thiscall func(SCritSect *this)" SCritSect__Leave 00774650 f end=00774658 type="void __thiscall func(SCritSect *this)" -CSRWLock__Leave 00774660 f end=00774675 +TInstanceIdTable_EvtContext__Unlock 00774660 f end=00774675 SSyncObject__Wait 00774690 f end=007746A4 SEvent__Set 00774720 f end=0077472A SEvent__Reset 00774730 f end=0077473A +SThread__Create 00774740 f end=0077476F PathGetRootChars 007750D0 f end=00775138 FlushLog 00775140 f end=0077518E LockLog 00775190 f end=00775250 @@ -3313,6 +3323,7 @@ OsTimeShutdown 0086D440 f end=0086D445 OsTlsGetValue 0086D6D0 f end=0086D6DF TSExplicitList_CGxBuf__LinkToTail 0086E200 f end=0086E25F type="void __thiscall func(TSExplicitList_CGxBuf* this, CGxBuf* ptr)" OsCallSetContext 0086F5A0 f end=0086F5EA +OsCallResetContext 0086F5F0 f end=0086F64E ; 00005410 OsCallInitialize 0086F760 f end=0086F875 OsCallInitializeContext 0086F880 f end=0086F902 OsClipboardGetString 00872280 f end=00872297 @@ -3556,6 +3567,7 @@ firstByteMark 009E537C l type="uint32_t[7]" bytesFromUTF8 009E5398 l type="uint8_t[256]" s_noinfo 009E5630 l type="Blizzard__File__FileInfo" firstByteMark 009E9EC8 l type="uint32_t[7]" +TInstanceId_EvtContext__v_table 009EA04C l type="TInstanceId_EvtContext__v_table" s_pixelFormatToMipBitsCache 009F1074 l CGxDevice__vtable 00A2DDC0 l type="CGxDevice__vtable" CGxDeviceOpenGl__vtable 00A2E198 l @@ -3567,6 +3579,8 @@ System_File__read_func 00AB912C l ; type="int32_t (*)(Blizzard__File__Filesystem System_File__write_func 00AB91B4 l ; type="int32_t (*)(Blizzard__File__Filesystem* fs, System_File__Stacked__FileParms* parms)" System_File__Stacked__s_nullstack 00AB91C0 l type="Blizzard__File__Filesystem" System_File__Stacked__s_basestack 00AB92C0 l type="Blizzard__File__Filesystem" +s_threadListContention 00AC0DC0 l type="int32_t" +s_threadList 00AC0DC4 l type="TSList_EvtThread" s_zorderlist 00AC1B9C l type="TSExplicitList_CILayer" ClientServices__m_loginState 00AC3DA4 l CGGameUI__m_visible 00AC80A8 l @@ -3837,8 +3851,16 @@ Blizzard__Streaming__s_isStreamingTrial 00B38181 l type="bool" System_File__s_read_init 00B38A5C l type="Blizzard__Lock__DoOnceData" System_File__s_write_init 00B38A64 l type="Blizzard__Lock__DoOnceData" OsFileGetDownloadFolder__s_downloadfolder 00B38A88 l ; OsFileGetDownloadFolder()::s_downloadfolder; +TSingletonInstanceId_EvtContext__s_idTable 00B41670 l type="TInstanceIdTable_EvtContext" s_mainThread 00B417C8 l type="uint32_t" +s_originalThreadPriority 00B417CC l type="int32_t" s_interactiveCount 00B417D0 l type="int32_t" +s_threadSlotCount 00B417D4 l type="int32_t" +s_threadSlots 00B417D8 l type="EvtThread**" +s_threadSlotCritsects 00B417DC l type="SCritSect*" +s_netServer 00B417E0 l +s_threadListCritsect 00B417E8 l type="SCritSect" +s_shutdownEvent 00B41824 l type="SEvent" s_messageRecycler 00B41850 l type="CDataRecycler" CGlueMgr__m_ffxActive 00B6A180 l CGlueMgr__m_deathEffect 00B6A184 l diff --git a/profile/3.3.5a-windows-386/symbol/os/func.sym b/profile/3.3.5a-windows-386/symbol/os/func.sym index ec3843a..08f41f3 100644 --- a/profile/3.3.5a-windows-386/symbol/os/func.sym +++ b/profile/3.3.5a-windows-386/symbol/os/func.sym @@ -42,6 +42,7 @@ OsIMEInitialize 0086D0A0 f end=0086D0B8 OsIMEDestroy 0086D0C0 f end=0086D0Df OsTlsGetValue 0086D6D0 f end=0086D6DF OsCallSetContext 0086F5A0 f end=0086F5EA +OsCallResetContext 0086F5F0 f end=0086F64E ; 00005410 OsCallInitialize 0086F760 f end=0086F875 OsCallInitializeContext 0086F880 f end=0086F902 OsClipboardGetString 00872280 f end=00872297 diff --git a/profile/3.3.5a-windows-386/symbol/storm/func.sym b/profile/3.3.5a-windows-386/symbol/storm/func.sym index ed00661..61fa679 100644 --- a/profile/3.3.5a-windows-386/symbol/storm/func.sym +++ b/profile/3.3.5a-windows-386/symbol/storm/func.sym @@ -28,6 +28,8 @@ SStrCmp 0076F770 f end=0076F7D2 SStrStrUTF8I 0076F7E0 f end=0076F852 SStrDupA 0076F9E0 f end=0076FA35 SStrToFloat 0076FB80 f end=0076FDA9 +SGetCurrentThreadPriority 0076FDD0 f end=0076FDDE +SSetCurrentThreadPriority 0076FDE0 f end=0076FDF8 SSetCurrentProcessAffinityMask 0076FE00 f end=0076FE18 ILoadValue 007703A0 f end=00770483 type="int32_t __usercall func@(void* parentKey, char* subKeyName@, char* valuename, uint32_t* datatype, uint8_t* buffer@, uint32_t bytes@, uint32_t* bytesread@)" InternalLoadEntry 00770490 f end=00770575 type="int32_t __usercall func@(char* keyname, char* valuename, uint32_t flags, uint32_t* datatype, void* buffer, uint32_t bytes, uint32_t* bytesread@)" @@ -56,6 +58,7 @@ SCritSect__Leave 00774650 f end=00774658 type="void __thiscall func(SCritSect *t SSyncObject__Wait 00774690 f end=007746A4 SEvent__Set 00774720 f end=0077472A SEvent__Reset 00774730 f end=0077473A +SThread__Create 00774740 f end=0077476F PathGetRootChars 007750D0 f end=00775138 FlushLog 00775140 f end=0077518E LockLog 00775190 f end=00775250 diff --git a/profile/3.3.5a-windows-386/symbol/storm/label.sym b/profile/3.3.5a-windows-386/symbol/storm/label.sym index 381d4fa..24c6513 100644 --- a/profile/3.3.5a-windows-386/symbol/storm/label.sym +++ b/profile/3.3.5a-windows-386/symbol/storm/label.sym @@ -1,3 +1,4 @@ +s_originalThreadPriority 00B417CC l type="int32_t" s_alloccount 00CAE950 l type="uint32_t" s_freecount 00CAE954 l type="uint32_t" g_opt 00CAE958 l type="STORMOPTIONS" diff --git a/profile/3.3.5a-windows-386/x64dbg/game.dd32 b/profile/3.3.5a-windows-386/x64dbg/game.dd32 index d45e749..0a90567 100644 Binary files a/profile/3.3.5a-windows-386/x64dbg/game.dd32 and b/profile/3.3.5a-windows-386/x64dbg/game.dd32 differ diff --git a/profile/3.3.5a-windows-386/x64dbg/types.json b/profile/3.3.5a-windows-386/x64dbg/types.json index 5a130c4..e4e70c2 100644 --- a/profile/3.3.5a-windows-386/x64dbg/types.json +++ b/profile/3.3.5a-windows-386/x64dbg/types.json @@ -396,10 +396,6 @@ "type": "HDATAMGR", "name": "HCAMERA" }, - { - "type": "CSBasePriorityQueue", - "name": "TSPriorityQueue_EvtTimer" - }, { "type": "TSList_CAsyncObject", "name": "TSExplicitList_CAsyncObject" @@ -448,6 +444,10 @@ "type": "TSList_EvtContext", "name": "TSExplicitList_EvtContext" }, + { + "type": "TSList_EvtThread", + "name": "TSExplicitList_EvtThread" + }, { "type": "TSList_SIMPLEFRAMENODE", "name": "TSExplicitList_SIMPLEFRAMENODE" @@ -22325,12 +22325,12 @@ }, { "name": "SCritSect", - "size": 24, + "size": 40, "members": [ { "type": "uint8_t", "name": "m_critsect", - "arrsize": 24, + "arrsize": 40, "offset": 0 } ] @@ -26064,6 +26064,17 @@ } ] }, + { + "name": "TInstanceId_EvtContext__v_table", + "size": 4, + "members": [ + { + "type": "void*", + "name": "v_fn_00_scalar_deleting_destructor", + "offset": 0 + } + ] + }, { "name": "TRefCnt", "size": 8, @@ -27501,6 +27512,22 @@ } ] }, + { + "name": "TSLink_EvtThread", + "size": 8, + "members": [ + { + "type": "TSLink_EvtThread*", + "name": "m_prevlink", + "offset": 0 + }, + { + "type": "EvtThread*", + "name": "m_next", + "offset": 4 + } + ] + }, { "name": "TSLink_FrameScript_EventObject", "size": 8, @@ -30682,17 +30709,44 @@ }, { "name": "TSTimerPriority_uint32_t", - "size": 12, + "size": 16, + "members": [ + { + "type": "void**", + "name": "v_table", + "offset": 0 + }, + { + "type": "CSBasePriority", + "name": "b_base", + "offset": 4 + }, + { + "type": "uint32_t", + "name": "m_val", + "offset": 12 + } + ] + }, + { + "name": "TSPriorityQueue_EvtContext", + "size": 8, "members": [ { "type": "CSBasePriority", "name": "b_base", "offset": 0 - }, + } + ] + }, + { + "name": "TSPriorityQueue_EvtTimer", + "size": 8, + "members": [ { - "type": "uint32_t", - "name": "m_val", - "offset": 8 + "type": "CSBasePriority", + "name": "b_base", + "offset": 0 } ] }, @@ -33969,6 +34023,17 @@ } ] }, + { + "name": "TSLinkedNode_EvtThread", + "size": 8, + "members": [ + { + "type": "TSLink_EvtThread", + "name": "m_link", + "offset": 0 + } + ] + }, { "name": "TSHashObject_FrameScript_EventObject_HASHKEY_STRI", "size": 24, @@ -37603,6 +37668,22 @@ } ] }, + { + "name": "TSList_EvtThread", + "size": 12, + "members": [ + { + "type": "ptrdiff_t", + "name": "m_linkoffset", + "offset": 0 + }, + { + "type": "TSLink_EvtThread", + "name": "m_terminator", + "offset": 4 + } + ] + }, { "name": "TSList_SIMPLEFRAMENODE", "size": 12, @@ -38704,7 +38785,7 @@ }, { "name": "EvtTimer", - "size": 48, + "size": 56, "members": [ { "type": "uint32_t", @@ -38719,32 +38800,54 @@ { "type": "float", "name": "timeout", - "offset": 16 + "offset": 20 }, { "type": "void**", "name": "handler", - "offset": 20 + "offset": 24 }, { "type": "void*", "name": "param", - "offset": 24 + "offset": 28 }, { "type": "void**", "name": "guidHandler", - "offset": 28 + "offset": 32 }, { "type": "uint64_t", "name": "guidParam", - "offset": 32 + "offset": 40 }, { "type": "void*", "name": "guidParam2", - "offset": 40 + "offset": 48 + } + ] + }, + { + "name": "EvtContextQueue", + "size": 8, + "members": [ + { + "type": "TSPriorityQueue_EvtContext", + "name": "b_base", + "offset": 0 + } + ] + }, + { + "name": "EvtTimerQueue", + "size": 8, + "members": [ + { + "type": "TSPriorityQueue_EvtTimer", + "name": "b_base", + "offset": 0 } ] }, @@ -39804,17 +39907,22 @@ }, { "name": "TInstanceId_EvtContext", - "size": 12, + "size": 16, "members": [ + { + "type": "TInstanceId_EvtContext__v_table*", + "name": "v_table", + "offset": 0 + }, { "type": "TSLinkedNode_EvtContext", "name": "b_base", - "offset": 0 + "offset": 4 }, { "type": "uint32_t", "name": "m_id", - "offset": 8 + "offset": 12 } ] }, @@ -45906,6 +46014,57 @@ } ] }, + { + "name": "EvtThread", + "size": 44, + "members": [ + { + "type": "TSLinkedNode_EvtThread", + "name": "b_base", + "offset": 0 + }, + { + "type": "uint32_t", + "name": "m_threadSlot", + "offset": 8 + }, + { + "type": "uint32_t", + "name": "m_threadCount", + "offset": 12 + }, + { + "type": "uint32_t", + "name": "m_weightTotal", + "offset": 16 + }, + { + "type": "uint32_t", + "name": "m_weightAvg", + "offset": 20 + }, + { + "type": "uint32_t", + "name": "m_contextCount", + "offset": 24 + }, + { + "type": "uint32_t", + "name": "m_rebalance", + "offset": 28 + }, + { + "type": "SEvent", + "name": "m_wakeEvent", + "offset": 32 + }, + { + "type": "EvtContextQueue", + "name": "m_contextQueue", + "offset": 36 + } + ] + }, { "name": "M2ModelCamera", "size": 56, @@ -46148,17 +46307,6 @@ } ] }, - { - "name": "EvtTimerQueue", - "size": 20, - "members": [ - { - "type": "TSPriorityQueue_EvtTimer", - "name": "b_base", - "offset": 0 - } - ] - }, { "name": "BigData", "size": 360, @@ -46203,7 +46351,7 @@ }, { "name": "TSingletonInstanceId_EvtContext", - "size": 12, + "size": 16, "members": [ { "type": "TInstanceId_EvtContext", @@ -47693,11 +47841,6 @@ "name": "b_base", "offset": 0 }, - { - "type": "uint32_t", - "name": "unkA", - "offset": 12 - }, { "type": "SCritSect", "name": "m_critsect", @@ -47706,76 +47849,51 @@ { "type": "uint32_t", "name": "m_currTime", - "offset": 40 + "offset": 56 }, { "type": "SCHEDSTATE", "name": "m_schedState", - "offset": 48 + "offset": 64 }, { "type": "TSTimerPriority_uint32_t", "name": "m_schedNextWakeTime", - "offset": 56 - }, - { - "type": "uint32_t", - "name": "m_schedLastIdle", - "offset": 68 - }, - { - "type": "uint32_t", - "name": "m_schedFlags", "offset": 72 }, + { + "type": "uint32_t", + "name": "m_schedLastIdle", + "offset": 88 + }, + { + "type": "uint32_t", + "name": "m_schedFlags", + "offset": 92 + }, { "type": "uint32_t", "name": "m_schedIdleTime", - "offset": 76 + "offset": 96 }, { "type": "uint32_t", "name": "m_schedInitialIdleTime", - "offset": 80 + "offset": 100 }, { "type": "uint32_t", "name": "m_schedWeight", - "offset": 84 + "offset": 104 }, { "type": "uint32_t", "name": "m_schedSmoothWeight", - "offset": 88 - }, - { - "type": "int32_t", - "name": "m_schedRebalance", - "offset": 92 - }, - { - "type": "int32_t", - "name": "unkXX", - "offset": 96 - }, - { - "type": "int32_t", - "name": "unkXY", - "offset": 100 - }, - { - "type": "int32_t", - "name": "unkXZ", - "offset": 104 - }, - { - "type": "int32_t", - "name": "unkYY", "offset": 108 }, { "type": "int32_t", - "name": "unkYZ", + "name": "m_schedRebalance", "offset": 112 }, { @@ -47812,6 +47930,21 @@ { "type": "HPROPCONTEXT", "name": "m_propContext", + "offset": 616 + }, + { + "type": "int32_t", + "name": "unk264", + "offset": 620 + }, + { + "type": "int32_t", + "name": "unk268", + "offset": 624 + }, + { + "type": "int32_t", + "name": "unk26C", "offset": 628 }, {