From da8d47619cc8a59e7b9544a5fec4b048a51ccfa2 Mon Sep 17 00:00:00 2001 From: superp00t Date: Fri, 20 Sep 2024 00:13:32 -0400 Subject: [PATCH] feat(profile): add region code --- .../3.3.5a-windows/ida/import_data_types.idc | 8 + profile/3.3.5a-windows/ida/import_symbols.idc | 23 + .../3.3.5a-windows/include/common/handle.h | 6 + profile/3.3.5a-windows/include/gx/d3d9.h | 6 +- profile/3.3.5a-windows/include/gx/device.h | 3 +- profile/3.3.5a-windows/include/main.h | 3 + profile/3.3.5a-windows/include/screen/layer.h | 24 + profile/3.3.5a-windows/include/storm/region.h | 9 + .../include/storm/region/found_param.h | 14 + .../include/storm/region/rect.h | 16 + .../include/storm/region/region.h | 31 ++ .../include/storm/region/source.h | 17 + profile/3.3.5a-windows/symbol/gx/func.sym | 3 +- .../3.3.5a-windows/symbol/gxdevice/func.sym | 2 + .../symbol/gxdeviced3d/func.sym | 3 +- profile/3.3.5a-windows/symbol/gxu/func.sym | 1 + profile/3.3.5a-windows/symbol/main.sym | 10 +- .../3.3.5a-windows/symbol/screen/label.sym | 1 + profile/3.3.5a-windows/symbol/storm/func.sym | 4 +- profile/3.3.5a-windows/x32dbg/game.dd32 | 112 +++++ profile/3.3.5a-windows/x32dbg/types.json | 472 ++++++++++++++++++ 21 files changed, 762 insertions(+), 6 deletions(-) create mode 100644 profile/3.3.5a-windows/include/screen/layer.h create mode 100644 profile/3.3.5a-windows/include/storm/region.h create mode 100644 profile/3.3.5a-windows/include/storm/region/found_param.h create mode 100644 profile/3.3.5a-windows/include/storm/region/rect.h create mode 100644 profile/3.3.5a-windows/include/storm/region/region.h create mode 100644 profile/3.3.5a-windows/include/storm/region/source.h create mode 100644 profile/3.3.5a-windows/symbol/screen/label.sym diff --git a/profile/3.3.5a-windows/ida/import_data_types.idc b/profile/3.3.5a-windows/ida/import_data_types.idc index 45f66b2..c35b150 100644 --- a/profile/3.3.5a-windows/ida/import_data_types.idc +++ b/profile/3.3.5a-windows/ida/import_data_types.idc @@ -1,6 +1,7 @@ #include static import_data_types() { + apply_type(0x00408070, "void __stdcall func(float* minX, float* maxX, float* minY, float* maxY, float* minZ, float* maxZ)"); 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(0x004B5510, "int32_t __stdcall func(uint32_t width, uint32_t height)"); @@ -11,6 +12,9 @@ static import_data_types() { apply_type(0x004B81D0, "MipBits* func(const char* filename, uint32_t* width, uint32_t* height, PIXEL_FORMAT* dataFormat, int32_t* isOpaque, CStatus* status, uint32_t* alphaBits, int32_t a8)"); apply_type(0x006160B0, "int32_t __usercall func@(uint32_t** image@, MipBits* mipImages@, uint32_t width@, uint32_t height)"); apply_type(0x00616800, "void __stdcall func(CURSORMODE mode)"); + apply_type(0x00681F60, "void __stdcall func(float minX, float maxX, float minY, float maxY, float minZ, float maxZ)"); + apply_type(0x00682DC0, "int32_t __thiscall func(CGxDevice* this, int32_t a2)"); + apply_type(0x00682E20, "int32_t __thiscall func(CGxDevice* this, int32_t a2)"); apply_type(0x006A5A30, "void __thiscall func(CGxDeviceD3d* this)"); apply_type(0x006AA3B0, "int32_t __thiscall func(CTgaFile* this)"); apply_type(0x006AA3E0, "uint32_t __thiscall func(CTgaFile* this)"); @@ -42,6 +46,7 @@ static import_data_types() { apply_type(0x006AFCE0, "int32_t __thiscall func(CBLPFile* this, char* fileName, PIXEL_FORMAT format, uint32_t mipLevel, unsigned char* data, uint32_t* stride)"); apply_type(0x006AFF10, "int32_t __thiscall func(CBLPFile* this, char* filename)"); apply_type(0x006AFFD0, "int32_t __thiscall func(CBLPFile* this, char* fileName, PIXEL_FORMAT format, MipBits** images, uint32_t mipLevel, int32_t a6)"); + apply_type(0x006BF4C0, "void __stdcall GxuXformCreateOrtho(float minX, float maxX, float minY, float maxY, float minZ, float maxZ, C44Matrix* dst)"); apply_type(0x0076E540, "void* __stdcall func(uint32_t bytes, char* filename, int32_t linenumber, uint32_t flags)"); apply_type(0x0076E5A0, "int32_t __stdcall func(void* ptr, char* filename, int32_t linenumber, uint32_t flags)"); apply_type(0x0076E5E0, "void* __stdcall func(void* ptr, uint32_t bytes, char* filename, int32_t linenumber, uint32_t flags)"); @@ -50,8 +55,11 @@ static import_data_types() { apply_type(0x00774630, "void __thiscall func(SCritSect *this)"); apply_type(0x00774640, "void __thiscall func(SCritSect *this)"); apply_type(0x00774650, "void __thiscall func(SCritSect *this)"); + apply_type(0x00777420, "void __stdcall func(HSRGN handle, RECTF* rect, void* param, int32_t combinemode)"); + apply_type(0x00777590, "void __stdcall func(HSRGN handle, RECTF* rect)"); apply_type(0x00819EA0, "void __stdcall func(int32_t function, FrameScript_Object* object, int32_t args, char* args_fmt, FrameScript_EventObject* eventObject)"); apply_type(0x00A2DDC0, "CGxDevice__vtable"); + apply_type(0x00AC1B9C, "TSExplicitList_CILayer"); apply_type(0x00AD2808, "char*[53]"); apply_type(0x00AD90B0, "uint8_t[16]"); apply_type(0x00AD90C0, "uint8_t[2]"); diff --git a/profile/3.3.5a-windows/ida/import_symbols.idc b/profile/3.3.5a-windows/ida/import_symbols.idc index 2422309..c5cb7b6 100644 --- a/profile/3.3.5a-windows/ida/import_symbols.idc +++ b/profile/3.3.5a-windows/ida/import_symbols.idc @@ -2091,6 +2091,7 @@ static main() { set_name(0x00681B00, "GxPrimVertexPtr"); set_name(0x00681BE0, "CGxTexFlags__CGxTexFlags"); set_name(0x00681CB0, "GxTexCreate"); + set_name(0x00681F60, "GxXformSetViewport"); set_name(0x00682340, "GxDrawLockedElements"); set_name(0x00682400, "GxPrimVertexPtr_FFP"); set_name(0x006828C0, "GxPrimLockVertexPtrs"); @@ -2100,6 +2101,8 @@ static main() { set_name(0x00682D20, "CGxDevice__DeviceApi"); set_name(0x00682D40, "CGxDevice__IDevIsWindowed"); set_name(0x00682D70, "CGxDevice__DeviceCurWindow"); + set_name(0x00682DC0, "CGxDevice__CapsIsWindowVisible"); + set_name(0x00682E20, "CGxDevice__CapsHasContext"); set_name(0x00682E50, "CGxDevice__ScenePresent"); set_name(0x00682F40, "CGxDevice__PrimCalcCount"); set_name(0x00683080, "CGxDevice__LightEnable"); @@ -2167,6 +2170,7 @@ static main() { set_name(0x0068FCE0, "CGxDeviceD3d__BufLock"); set_name(0x0068FD00, "CGxDeviceD3d__BufData"); set_name(0x0068FD50, "CGxDeviceD3d__CGxDeviceD3d"); + set_name(0x00690150, "CGxDeviceD3d__IReleaseD3dResources"); set_name(0x00690230, "CGxDeviceD3d__DeviceWM"); set_name(0x006904D0, "CGxDeviceD3d__DeviceSetFormat"); set_name(0x00690680, "CGxDeviceD3d__ICreateD3d"); @@ -2298,6 +2302,7 @@ static main() { set_name(0x006BE3E0, "GxuFontUpdate"); set_name(0x006BF160, "GxuFontCreateBatch"); set_name(0x006BF370, "GxuXformCreateProjection_Exact"); + set_name(0x006BF4C0, "GxuXformCreateOrtho"); set_name(0x006BF6D0, "GxuXformCalcFrustumCorners"); set_name(0x006BFDA0, "GxuUpdateSingleColorTexture"); set_name(0x006BFE00, "GxuXformCreateProjection_SG"); @@ -2393,6 +2398,8 @@ static main() { set_name(0x00774690, "SSyncObject__Wait"); set_name(0x00774720, "SEvent__Set"); set_name(0x00774730, "SEvent__Reset"); + set_name(0x00777420, "SRgnCombineRectf"); + set_name(0x00777590, "SRgnGetBoundingRectf"); set_name(0x00777940, "SRgnDelete"); set_name(0x00777980, "SRgnCreate"); set_name(0x007DAB80, "Script_VoiceEnumerateOutputDevices"); @@ -2655,6 +2662,7 @@ static main() { set_name(0x00A2E198, "CGxDeviceOpenGl__vtable"); set_name(0x00A2E718, "CGxDeviceD3d__vtable"); set_name(0x00A2F500, "CGxDeviceD3d9Ex__vtable"); + set_name(0x00AC1B9C, "s_zorderlist"); set_name(0x00AD2808, "s_cursorNames"); set_name(0x00AD90B0, "CBLPFile__s_eightBitAlphaLookup"); set_name(0x00AD90C0, "CBLPFile__s_oneBitAlphaLookup"); @@ -6840,6 +6848,8 @@ static main() { set_func_end(0x00681BE0, 0x00681CAB); set_func_start(0x00681CB0, 0x00681CB0); set_func_end(0x00681CB0, 0x00681D87); + set_func_start(0x00681F60, 0x00681F60); + set_func_end(0x00681F60, 0x00682124); set_func_start(0x00682340, 0x00682340); set_func_end(0x00682340, 0x0068239E); set_func_start(0x00682400, 0x00682400); @@ -6858,6 +6868,10 @@ static main() { set_func_end(0x00682D40, 0x00682D48); set_func_start(0x00682D70, 0x00682D70); set_func_end(0x00682D70, 0x00682D76); + set_func_start(0x00682DC0, 0x00682DC0); + set_func_end(0x00682DC0, 0x00682DE7); + set_func_start(0x00682E20, 0x00682E20); + set_func_end(0x00682E20, 0x00682E47); set_func_start(0x00682E50, 0x00682E50); set_func_end(0x00682E50, 0x00682E66); set_func_start(0x00682F40, 0x00682F40); @@ -6992,6 +7006,8 @@ static main() { set_func_end(0x0068FD00, 0x0068FD49); set_func_start(0x0068FD50, 0x0068FD50); set_func_end(0x0068FD50, 0x0068FE80); + set_func_start(0x00690150, 0x00690150); + set_func_end(0x00690150, 0x00690223); set_func_start(0x00690230, 0x00690230); set_func_end(0x00690230, 0x0069038D); set_func_start(0x006904D0, 0x006904D0); @@ -7250,6 +7266,8 @@ static main() { set_func_end(0x006BF160, 0x006BF202); set_func_start(0x006BF370, 0x006BF370); set_func_end(0x006BF370, 0x006BF4B2); + set_func_start(0x006BF4C0, 0x006BF4C0); + set_func_end(0x006BF4C0, 0x006BF5A4); set_func_start(0x006BF6D0, 0x006BF6D0); set_func_end(0x006BF6D0, 0x006BFB60); set_func_start(0x006BFDA0, 0x006BFDA0); @@ -7436,6 +7454,10 @@ static main() { set_func_end(0x00774720, 0x0077472A); set_func_start(0x00774730, 0x00774730); set_func_end(0x00774730, 0x0077473A); + set_func_start(0x00777420, 0x00777420); + set_func_end(0x00777420, 0x00777588); + set_func_start(0x00777590, 0x00777590); + set_func_end(0x00777590, 0x00777897); set_func_start(0x00777940, 0x00777940); set_func_end(0x00777940, 0x00777971); set_func_start(0x00777980, 0x00777980); @@ -7782,6 +7804,7 @@ static main() { set_func_start(0x009DE1B0, 0x009DE1B0); set_func_start(0x009DE1C0, 0x009DE1C0); set_func_start(0x009DE1D0, 0x009DE1D0); + set_func_start(0x00AC1B9C, 0x00AC1B9C); // Apply data types import_data_types(); } diff --git a/profile/3.3.5a-windows/include/common/handle.h b/profile/3.3.5a-windows/include/common/handle.h index 2e3fb4a..53219a9 100644 --- a/profile/3.3.5a-windows/include/common/handle.h +++ b/profile/3.3.5a-windows/include/common/handle.h @@ -10,4 +10,10 @@ typedef struct name##__ { \ }* name #endif +DECLARE_STRUCT(CHandleObject); + +struct CHandleObject { + int32_t m_refcount; +}; + #endif \ No newline at end of file diff --git a/profile/3.3.5a-windows/include/gx/d3d9.h b/profile/3.3.5a-windows/include/gx/d3d9.h index a362322..f8f2e5a 100644 --- a/profile/3.3.5a-windows/include/gx/d3d9.h +++ b/profile/3.3.5a-windows/include/gx/d3d9.h @@ -18,7 +18,11 @@ struct CGxDeviceD3d { IDirect3DDevice9* m_d3dDevice; D3DCAPS9 m_d3dCaps; int32_t m_d3dIsHwDevice; - uint32_t unk3AB4[11]; + int32_t m_d3dNVAPI; + uint32_t unk3AB8; + uint32_t unk3ABC; + uint32_t m_d3dStereoHandle; + uint32_t unk3AC4[7]; IDirect3DVertexDeclaration9* m_d3dVertexDecl[14]; D3DDISPLAYMODE m_desktopDisplayMode; int32_t m_inScene; diff --git a/profile/3.3.5a-windows/include/gx/device.h b/profile/3.3.5a-windows/include/gx/device.h index 90bad4c..dd87b79 100644 --- a/profile/3.3.5a-windows/include/gx/device.h +++ b/profile/3.3.5a-windows/include/gx/device.h @@ -199,7 +199,8 @@ struct CGxDevice { int32_t m_windowVisible; int32_t intF64; int32_t intF68; - int32_t intF6C; + // Invented name, though seems to have the same place as CGxDeviceD3d::m_d3dNeedsReset + int32_t m_needsUpdate; CBoundingBox m_viewport; C44Matrix m_projection; C44Matrix m_projNative; diff --git a/profile/3.3.5a-windows/include/main.h b/profile/3.3.5a-windows/include/main.h index 0c053a2..b81bc46 100644 --- a/profile/3.3.5a-windows/include/main.h +++ b/profile/3.3.5a-windows/include/main.h @@ -36,9 +36,12 @@ #include "gx/batch.h" #include "gx/d3d9.h" +#include "screen/layer.h" + #include "storm/array.h" #include "storm/list.h" #include "storm/hash.h" +#include "storm/region.h" #include "tempest/box.h" #include "tempest/matrix.h" diff --git a/profile/3.3.5a-windows/include/screen/layer.h b/profile/3.3.5a-windows/include/screen/layer.h new file mode 100644 index 0000000..1769c55 --- /dev/null +++ b/profile/3.3.5a-windows/include/screen/layer.h @@ -0,0 +1,24 @@ +#ifndef SCREEN_LAYER_H +#define SCREEN_LAYER_H + +#include "storm/list.h" +#include "common/handle.h" +#include "storm/region/rect.h" + +DECLARE_HANDLE(HLAYER); + +DECLARE_STRUCT(CILayer); + +STORM_TS_LIST(CILayer); +struct CILayer { + CHandleObject b_base; + RECTF rect; + RECTF visible; + float zorder; + uint32_t flags; + void* param; + void (*paintfunc)(void*, RECTF*, RECTF*, float); + TSLink_CILayer zorderlink; +}; + +#endif diff --git a/profile/3.3.5a-windows/include/storm/region.h b/profile/3.3.5a-windows/include/storm/region.h new file mode 100644 index 0000000..ad100e0 --- /dev/null +++ b/profile/3.3.5a-windows/include/storm/region.h @@ -0,0 +1,9 @@ +#ifndef STORM_REGION_H +#define STORM_REGION_H + +#include "storm/region/found_param.h" +#include "storm/region/rect.h" +#include "storm/region/source.h" +#include "storm/region/region.h" + +#endif \ No newline at end of file diff --git a/profile/3.3.5a-windows/include/storm/region/found_param.h b/profile/3.3.5a-windows/include/storm/region/found_param.h new file mode 100644 index 0000000..0152f01 --- /dev/null +++ b/profile/3.3.5a-windows/include/storm/region/found_param.h @@ -0,0 +1,14 @@ +#ifndef STORM_REGION_FOUND_PARAM_H +#define STORM_REGION_FOUND_PARAM_H + +#include "storm/array.h" + +DECLARE_STRUCT(FOUNDPARAM); + +struct FOUNDPARAM { + void* param; + int32_t sequence; +}; +STORM_TS_GROWABLE_ARRAY(FOUNDPARAM); + +#endif \ No newline at end of file diff --git a/profile/3.3.5a-windows/include/storm/region/rect.h b/profile/3.3.5a-windows/include/storm/region/rect.h new file mode 100644 index 0000000..73b4d8e --- /dev/null +++ b/profile/3.3.5a-windows/include/storm/region/rect.h @@ -0,0 +1,16 @@ +#ifndef STORM_REGION_RECT_H +#define STORM_REGION_RECT_H + +#include "storm/array.h" + +DECLARE_STRUCT(RECTF); + +struct RECTF { + float left; + float bottom; + float right; + float top; +}; +STORM_TS_GROWABLE_ARRAY(RECTF); + +#endif \ No newline at end of file diff --git a/profile/3.3.5a-windows/include/storm/region/region.h b/profile/3.3.5a-windows/include/storm/region/region.h new file mode 100644 index 0000000..a80b8e4 --- /dev/null +++ b/profile/3.3.5a-windows/include/storm/region/region.h @@ -0,0 +1,31 @@ +#ifndef STORM_REGION_REGION_H +#define STORM_REGION_REGION_H + +#include "common/handle.h" +#include "storm/hash.h" +#include "storm/region/source.h" +#include "storm/region/rect.h" +#include "storm/region/found_param.h" + +DECLARE_HANDLE(HSRGN); +DECLARE_HANDLE(HLOCKEDRGN); + +DECLARE_STRUCT(RGN); +DECLARE_STRUCT(CSRgn); + +STORM_TS_HASH(RGN, HASHKEY_NONE); +struct RGN { + TSHashObject_RGN_HASHKEY_NONE b_base; + TSGrowableArray_SOURCE source; + TSGrowableArray_RECTF combined; + TSGrowableArray_FOUNDPARAM foundparams; + RECTF foundparamsrect; + int32_t sequence; + int32_t dirty; +}; + +struct CSRgn { + HSRGN m_handle; +}; + +#endif \ No newline at end of file diff --git a/profile/3.3.5a-windows/include/storm/region/source.h b/profile/3.3.5a-windows/include/storm/region/source.h new file mode 100644 index 0000000..df57172 --- /dev/null +++ b/profile/3.3.5a-windows/include/storm/region/source.h @@ -0,0 +1,17 @@ +#ifndef STORM_REGION_SOURCE_H +#define STORM_REGION_SOURCE_H + +#include "storm/array.h" +#include "storm/region/rect.h" + +DECLARE_STRUCT(SOURCE); + +struct SOURCE { + RECTF rect; + void* param; + int32_t sequence; + uint32_t flags; +}; +STORM_TS_GROWABLE_ARRAY(SOURCE); + +#endif \ No newline at end of file diff --git a/profile/3.3.5a-windows/symbol/gx/func.sym b/profile/3.3.5a-windows/symbol/gx/func.sym index 24dfdd0..d1caf45 100644 --- a/profile/3.3.5a-windows/symbol/gx/func.sym +++ b/profile/3.3.5a-windows/symbol/gx/func.sym @@ -7,7 +7,8 @@ GxTexCreate 00681CB0 f end=00681D87 GxTexUpdate 006813D0 f end=006813EC GxXformProjection 004BEC70 f end=004BEC88 GxXformSetProjection 00408030 f end=00408049 -GxXformViewport 00408070 f end=004080D9 +GxXformViewport 00408070 f end=004080D9 type="void __stdcall func(float* minX, float* maxX, float* minY, float* maxY, float* minZ, float* maxZ)" +GxXformSetViewport 00681F60 f end=00682124 type="void __stdcall func(float minX, float maxX, float minY, float maxY, float minZ, float maxZ)" GxXformProjNativeTranspose 00408110 f end=0040820F GxXformPush_EGxXform_C44Matrix 00616AD0 f end=00616AE8 GxXformPop 0057C420 f end=0057C44A diff --git a/profile/3.3.5a-windows/symbol/gxdevice/func.sym b/profile/3.3.5a-windows/symbol/gxdevice/func.sym index a915a5b..f3d8d32 100644 --- a/profile/3.3.5a-windows/symbol/gxdevice/func.sym +++ b/profile/3.3.5a-windows/symbol/gxdevice/func.sym @@ -55,3 +55,5 @@ CGxDevice__CursorSetVisible 00683640 f end=00683650 CGxDevice__CursorLock 00683650 f end=00683657 CGxDevice__CursorSetDepth 00683660 f end=00683670 CGxDevice__CursorUnlock 00684B50 f end=00684B99 +CGxDevice__CapsHasContext 00682E20 f end=00682E47 type="int32_t __thiscall func(CGxDevice* this, int32_t a2)" +CGxDevice__CapsIsWindowVisible 00682DC0 f end=00682DE7 type="int32_t __thiscall func(CGxDevice* this, int32_t a2)" \ No newline at end of file diff --git a/profile/3.3.5a-windows/symbol/gxdeviced3d/func.sym b/profile/3.3.5a-windows/symbol/gxdeviced3d/func.sym index e7db3c3..16dcf44 100644 --- a/profile/3.3.5a-windows/symbol/gxdeviced3d/func.sym +++ b/profile/3.3.5a-windows/symbol/gxdeviced3d/func.sym @@ -54,4 +54,5 @@ CGxDeviceD3d__IShaderConstantsFlush 006A9FE0 f end=006AA06D CGxDeviceD3d__IShaderCreatePixel 006AA070 f end=006AA0C5 CGxDeviceD3d__IShaderCreateVertex 006AA0D0 f end=006AA125 CGxDeviceD3d__ShaderCreate 006AA130 f end=006AA18A -CGxDeviceD3d__IBindVertexShader 006AA2F0 f end=006AA346 \ No newline at end of file +CGxDeviceD3d__IBindVertexShader 006AA2F0 f end=006AA346 +CGxDeviceD3d__IReleaseD3dResources 00690150 f end=00690223 \ No newline at end of file diff --git a/profile/3.3.5a-windows/symbol/gxu/func.sym b/profile/3.3.5a-windows/symbol/gxu/func.sym index 8df9947..ac150fb 100644 --- a/profile/3.3.5a-windows/symbol/gxu/func.sym +++ b/profile/3.3.5a-windows/symbol/gxu/func.sym @@ -19,4 +19,5 @@ GxuXformCalcFrustumCorners 006BF6D0 f end=006BFB60 GxuUpdateSingleColorTexture 006BFDA0 f end=006BFDFE GxuXformCreateProjection_SG 006BFE00 f end=006BFE5C GxuXformCreateLookAtSgCompat 006BFE60 f end=006C004D +GxuXformCreateOrtho 006BF4C0 f end=006BF5A4 type="void __stdcall GxuXformCreateOrtho(float minX, float maxX, float minY, float maxY, float minZ, float maxZ, C44Matrix* dst)" IGxuFontGlyphRenderGlyph 006C8CC0 f end=006C8E6B \ No newline at end of file diff --git a/profile/3.3.5a-windows/symbol/main.sym b/profile/3.3.5a-windows/symbol/main.sym index da79627..645d828 100644 --- a/profile/3.3.5a-windows/symbol/main.sym +++ b/profile/3.3.5a-windows/symbol/main.sym @@ -11,7 +11,7 @@ CommonMain 00406C70 f end=00406D64 C44Matrix__C44Matrix 00407F40 f end=00407F76 C44Matrix__operator_assign_C44Matrix 00407F80 f end=00407FEA GxXformSetProjection 00408030 f end=00408049 -GxXformViewport 00408070 f end=004080D9 +GxXformViewport 00408070 f end=004080D9 type="void __stdcall func(float* minX, float* maxX, float* minY, float* maxY, float* minZ, float* maxZ)" GxXformProjNativeTranspose 00408110 f end=0040820F GxShaderConstantsSet 00408210 f end=0040823B GxRsSet_CGxShader 00408240 f end=00408258 @@ -2086,6 +2086,7 @@ GxPrimIndexPtr 00681AB0 f end=00681AFB GxPrimVertexPtr 00681B00 f CGxTexFlags__CGxTexFlags 00681BE0 f end=00681CAB ; UC GxTexCreate 00681CB0 f end=00681D87 +GxXformSetViewport 00681F60 f end=00682124 type="void __stdcall func(float minX, float maxX, float minY, float maxY, float minZ, float maxZ)" GxDrawLockedElements 00682340 f end=0068239E GxPrimVertexPtr_FFP 00682400 f end=00682781 ; this is one of the functions named 'GxPrimVertexPtr' that uses the fixed-function pipeline GxPrimLockVertexPtrs 006828C0 f end=006828FE @@ -2095,6 +2096,8 @@ CGxDevice__DeviceSetBaseMipLevel 00682D00 f end=00682D10 CGxDevice__DeviceApi 00682D20 f end=00682D27 CGxDevice__IDevIsWindowed 00682D40 f end=00682D48 CGxDevice__DeviceCurWindow 00682D70 f end=00682D76 +CGxDevice__CapsIsWindowVisible 00682DC0 f end=00682DE7 type="int32_t __thiscall func(CGxDevice* this, int32_t a2)" +CGxDevice__CapsHasContext 00682E20 f end=00682E47 type="int32_t __thiscall func(CGxDevice* this, int32_t a2)" CGxDevice__ScenePresent 00682E50 f end=00682E66 CGxDevice__PrimCalcCount 00682F40 f end=00682F66 CGxDevice__LightEnable 00683080 f end=006830A4 @@ -2162,6 +2165,7 @@ CGxDeviceD3d__IBufLock 0068FB10 f end=0068FCDC CGxDeviceD3d__BufLock 0068FCE0 f end=0068FCFE CGxDeviceD3d__BufData 0068FD00 f end=0068FD49 CGxDeviceD3d__CGxDeviceD3d 0068FD50 f end=0068FE80 +CGxDeviceD3d__IReleaseD3dResources 00690150 f end=00690223 CGxDeviceD3d__DeviceWM 00690230 f end=0069038D CGxDeviceD3d__DeviceSetFormat 006904D0 f end=006905E8 CGxDeviceD3d__ICreateD3d 00690680 f end=00690742 @@ -2293,6 +2297,7 @@ GxuFontDestroyBatch 006BE3B0 f end=006BE3DD GxuFontUpdate 006BE3E0 f end=006BEE87 GxuFontCreateBatch 006BF160 f end=006BF202 GxuXformCreateProjection_Exact 006BF370 f end=006BF4B2 +GxuXformCreateOrtho 006BF4C0 f end=006BF5A4 type="void __stdcall GxuXformCreateOrtho(float minX, float maxX, float minY, float maxY, float minZ, float maxZ, C44Matrix* dst)" GxuXformCalcFrustumCorners 006BF6D0 f end=006BFB60 GxuUpdateSingleColorTexture 006BFDA0 f end=006BFDFE GxuXformCreateProjection_SG 006BFE00 f end=006BFE5C @@ -2388,6 +2393,8 @@ CSRWLock__Leave 00774660 f end=00774675 SSyncObject__Wait 00774690 f end=007746A4 SEvent__Set 00774720 f end=0077472A SEvent__Reset 00774730 f end=0077473A +SRgnCombineRectf 00777420 f end=00777588 type="void __stdcall func(HSRGN handle, RECTF* rect, void* param, int32_t combinemode)" +SRgnGetBoundingRectf 00777590 f end=00777897 type="void __stdcall func(HSRGN handle, RECTF* rect)" SRgnDelete 00777940 f end=00777971 SRgnCreate 00777980 f end=00777A78 Script_VoiceEnumerateOutputDevices 007DAB80 f end=007DAC34 @@ -2648,6 +2655,7 @@ nullsub_150 009DE1D0 f s_pixelFormatToMipBitsCache 009F1074 l CGxDevice__vtable 00A2DDC0 l type="CGxDevice__vtable" CGxDeviceOpenGl__vtable 00A2E198 l +s_zorderlist 00AC1B9C f type="TSExplicitList_CILayer" s_cursorNames 00AD2808 l type="char*[53]" CBLPFile__s_eightBitAlphaLookup 00AD90B0 l type="uint8_t[16]" CBLPFile__s_oneBitAlphaLookup 00AD90C0 l type="uint8_t[2]" diff --git a/profile/3.3.5a-windows/symbol/screen/label.sym b/profile/3.3.5a-windows/symbol/screen/label.sym new file mode 100644 index 0000000..4fb8e79 --- /dev/null +++ b/profile/3.3.5a-windows/symbol/screen/label.sym @@ -0,0 +1 @@ +s_zorderlist 00AC1B9C f type="TSExplicitList_CILayer" \ No newline at end of file diff --git a/profile/3.3.5a-windows/symbol/storm/func.sym b/profile/3.3.5a-windows/symbol/storm/func.sym index 987b836..d40aa57 100644 --- a/profile/3.3.5a-windows/symbol/storm/func.sym +++ b/profile/3.3.5a-windows/symbol/storm/func.sym @@ -34,4 +34,6 @@ SCritSect__Enter 00774640 f end=00774648 type="void __thiscall func(SCritSect *t SCritSect__Leave 00774650 f end=00774658 type="void __thiscall func(SCritSect *this)" SCritSect__destructor 00774630 f end=00774638 type="void __thiscall func(SCritSect *this)" SRgnCreate 00777980 f end=00777A78 -SRgnDelete 00777940 f end=00777971 \ No newline at end of file +SRgnDelete 00777940 f end=00777971 +SRgnCombineRectf 00777420 f end=00777588 type="void __stdcall func(HSRGN handle, RECTF* rect, void* param, int32_t combinemode)" +SRgnGetBoundingRectf 00777590 f end=00777897 type="void __stdcall func(HSRGN handle, RECTF* rect)" \ No newline at end of file diff --git a/profile/3.3.5a-windows/x32dbg/game.dd32 b/profile/3.3.5a-windows/x32dbg/game.dd32 index 86e9201..42bec5e 100644 --- a/profile/3.3.5a-windows/x32dbg/game.dd32 +++ b/profile/3.3.5a-windows/x32dbg/game.dd32 @@ -16704,6 +16704,14 @@ "icount": "0x0", "parent": "0x281cb0" }, + { + "manual": true, + "start": "0x281f60", + "end": "0x282123", + "module": "wow.exe", + "icount": "0x0", + "parent": "0x281f60" + }, { "manual": true, "start": "0x282340", @@ -16776,6 +16784,22 @@ "icount": "0x0", "parent": "0x282d70" }, + { + "manual": true, + "start": "0x282dc0", + "end": "0x282de6", + "module": "wow.exe", + "icount": "0x0", + "parent": "0x282dc0" + }, + { + "manual": true, + "start": "0x282e20", + "end": "0x282e46", + "module": "wow.exe", + "icount": "0x0", + "parent": "0x282e20" + }, { "manual": true, "start": "0x282e50", @@ -17312,6 +17336,14 @@ "icount": "0x0", "parent": "0x28fd50" }, + { + "manual": true, + "start": "0x290150", + "end": "0x290222", + "module": "wow.exe", + "icount": "0x0", + "parent": "0x290150" + }, { "manual": true, "start": "0x290230", @@ -18360,6 +18392,14 @@ "icount": "0x0", "parent": "0x2bf370" }, + { + "manual": true, + "start": "0x2bf4c0", + "end": "0x2bf5a3", + "module": "wow.exe", + "icount": "0x0", + "parent": "0x2bf4c0" + }, { "manual": true, "start": "0x2bf6d0", @@ -19112,6 +19152,22 @@ "icount": "0x0", "parent": "0x374730" }, + { + "manual": true, + "start": "0x377420", + "end": "0x377587", + "module": "wow.exe", + "icount": "0x0", + "parent": "0x377420" + }, + { + "manual": true, + "start": "0x377590", + "end": "0x377896", + "module": "wow.exe", + "icount": "0x0", + "parent": "0x377590" + }, { "manual": true, "start": "0x377940", @@ -21167,6 +21223,14 @@ "module": "wow.exe", "icount": "0x0", "parent": "0x5de1d0" + }, + { + "manual": true, + "start": "0x6c1b9c", + "end": "0x6c1b9c", + "module": "wow.exe", + "icount": "0x0", + "parent": "0x6c1b9c" } ], "labels": [ @@ -33698,6 +33762,12 @@ "text": "GxTexCreate", "address": "0x281cb0" }, + { + "manual": true, + "module": "wow.exe", + "text": "GxXformSetViewport", + "address": "0x281f60" + }, { "manual": true, "module": "wow.exe", @@ -33752,6 +33822,18 @@ "text": "CGxDevice__DeviceCurWindow", "address": "0x282d70" }, + { + "manual": true, + "module": "wow.exe", + "text": "CGxDevice__CapsIsWindowVisible", + "address": "0x282dc0" + }, + { + "manual": true, + "module": "wow.exe", + "text": "CGxDevice__CapsHasContext", + "address": "0x282e20" + }, { "manual": true, "module": "wow.exe", @@ -34154,6 +34236,12 @@ "text": "CGxDeviceD3d__CGxDeviceD3d", "address": "0x28fd50" }, + { + "manual": true, + "module": "wow.exe", + "text": "CGxDeviceD3d__IReleaseD3dResources", + "address": "0x290150" + }, { "manual": true, "module": "wow.exe", @@ -34940,6 +35028,12 @@ "text": "GxuXformCreateProjection_Exact", "address": "0x2bf370" }, + { + "manual": true, + "module": "wow.exe", + "text": "GxuXformCreateOrtho", + "address": "0x2bf4c0" + }, { "manual": true, "module": "wow.exe", @@ -35510,6 +35604,18 @@ "text": "SEvent__Reset", "address": "0x374730" }, + { + "manual": true, + "module": "wow.exe", + "text": "SRgnCombineRectf", + "address": "0x377420" + }, + { + "manual": true, + "module": "wow.exe", + "text": "SRgnGetBoundingRectf", + "address": "0x377590" + }, { "manual": true, "module": "wow.exe", @@ -37082,6 +37188,12 @@ "text": "CGxDeviceD3d9Ex__vtable", "address": "0x62f500" }, + { + "manual": true, + "module": "wow.exe", + "text": "s_zorderlist", + "address": "0x6c1b9c" + }, { "manual": true, "module": "wow.exe", diff --git a/profile/3.3.5a-windows/x32dbg/types.json b/profile/3.3.5a-windows/x32dbg/types.json index 0ab9b02..c792a2f 100644 --- a/profile/3.3.5a-windows/x32dbg/types.json +++ b/profile/3.3.5a-windows/x32dbg/types.json @@ -144,10 +144,22 @@ "type": "void*", "name": "HEVENTCONTEXT" }, + { + "type": "HLAYER__*", + "name": "HLAYER" + }, + { + "type": "HLOCKEDRGN__*", + "name": "HLOCKEDRGN" + }, { "type": "HPROPCONTEXT__*", "name": "HPROPCONTEXT" }, + { + "type": "HSRGN__*", + "name": "HSRGN" + }, { "type": "long long", "name": "KEY" @@ -243,6 +255,14 @@ { "type": "TSList_CGxShader", "name": "TSExplicitList_CGxShader" + }, + { + "type": "TSList_CILayer", + "name": "TSExplicitList_CILayer" + }, + { + "type": "TSList_RGN", + "name": "TSExplicitList_RGN" } ], "structs": [ @@ -1198,6 +1218,17 @@ } ] }, + { + "name": "CHandleObject", + "size": 4, + "members": [ + { + "type": "int32_t", + "name": "m_refcount", + "offset": 0 + } + ] + }, { "name": "CImVector", "size": 4, @@ -1477,6 +1508,22 @@ } ] }, + { + "name": "FOUNDPARAM", + "size": 8, + "members": [ + { + "type": "void*", + "name": "param", + "offset": 0 + }, + { + "type": "int32_t", + "name": "sequence", + "offset": 4 + } + ] + }, { "name": "FrameScript_Object", "size": 16, @@ -1558,6 +1605,28 @@ } ] }, + { + "name": "HLAYER__", + "size": 4, + "members": [ + { + "type": "int32_t", + "name": "unused", + "offset": 0 + } + ] + }, + { + "name": "HLOCKEDRGN__", + "size": 4, + "members": [ + { + "type": "int32_t", + "name": "unused", + "offset": 0 + } + ] + }, { "name": "HPROPCONTEXT__", "size": 4, @@ -1569,6 +1638,17 @@ } ] }, + { + "name": "HSRGN__", + "size": 4, + "members": [ + { + "type": "int32_t", + "name": "unused", + "offset": 0 + } + ] + }, { "name": "IDirect3D9", "size": 4, @@ -1658,6 +1738,32 @@ } ] }, + { + "name": "RECTF", + "size": 16, + "members": [ + { + "type": "float", + "name": "left", + "offset": 0 + }, + { + "type": "float", + "name": "bottom", + "offset": 4 + }, + { + "type": "float", + "name": "right", + "offset": 8 + }, + { + "type": "float", + "name": "top", + "offset": 12 + } + ] + }, { "name": "SCritSect", "size": 24, @@ -1853,6 +1959,84 @@ } ] }, + { + "name": "TSGrowableArray_FOUNDPARAM", + "size": 16, + "members": [ + { + "type": "uint32_t", + "name": "m_alloc", + "offset": 0 + }, + { + "type": "uint32_t", + "name": "m_count", + "offset": 4 + }, + { + "type": "FOUNDPARAM*", + "name": "m_data", + "offset": 8 + }, + { + "type": "uint32_t", + "name": "m_chunk", + "offset": 12 + } + ] + }, + { + "name": "TSGrowableArray_RECTF", + "size": 16, + "members": [ + { + "type": "uint32_t", + "name": "m_alloc", + "offset": 0 + }, + { + "type": "uint32_t", + "name": "m_count", + "offset": 4 + }, + { + "type": "RECTF*", + "name": "m_data", + "offset": 8 + }, + { + "type": "uint32_t", + "name": "m_chunk", + "offset": 12 + } + ] + }, + { + "name": "TSGrowableArray_SOURCE", + "size": 16, + "members": [ + { + "type": "uint32_t", + "name": "m_alloc", + "offset": 0 + }, + { + "type": "uint32_t", + "name": "m_count", + "offset": 4 + }, + { + "type": "SOURCE*", + "name": "m_data", + "offset": 8 + }, + { + "type": "uint32_t", + "name": "m_chunk", + "offset": 12 + } + ] + }, { "name": "TSGrowableArray_TSList_CGxShader", "size": 16, @@ -1905,6 +2089,32 @@ } ] }, + { + "name": "TSGrowableArray_TSList_RGN", + "size": 16, + "members": [ + { + "type": "uint32_t", + "name": "m_alloc", + "offset": 0 + }, + { + "type": "uint32_t", + "name": "m_count", + "offset": 4 + }, + { + "type": "TSList_RGN*", + "name": "m_data", + "offset": 8 + }, + { + "type": "uint32_t", + "name": "m_chunk", + "offset": 12 + } + ] + }, { "name": "TSGrowableArray_pointer_to_EvtTimer", "size": 16, @@ -2057,6 +2267,22 @@ } ] }, + { + "name": "TSLink_CILayer", + "size": 8, + "members": [ + { + "type": "TSLink_CILayer*", + "name": "m_prevlink", + "offset": 0 + }, + { + "type": "CILayer*", + "name": "m_next", + "offset": 4 + } + ] + }, { "name": "TSLink_CStatus__STATUSENTRY", "size": 8, @@ -2169,6 +2395,22 @@ } ] }, + { + "name": "TSLink_RGN", + "size": 8, + "members": [ + { + "type": "TSLink_RGN*", + "name": "m_prevlink", + "offset": 0 + }, + { + "type": "RGN*", + "name": "m_next", + "offset": 4 + } + ] + }, { "name": "TSLink_SIMPLEFRAMENODE", "size": 8, @@ -3294,6 +3536,17 @@ } ] }, + { + "name": "CSRgn", + "size": 4, + "members": [ + { + "type": "HSRGN", + "name": "m_handle", + "offset": 0 + } + ] + }, { "name": "EVENT_DATA_KEY", "size": 24, @@ -3388,6 +3641,32 @@ } ] }, + { + "name": "SOURCE", + "size": 28, + "members": [ + { + "type": "RECTF", + "name": "rect", + "offset": 0 + }, + { + "type": "void*", + "name": "param", + "offset": 16 + }, + { + "type": "int32_t", + "name": "sequence", + "offset": 20 + }, + { + "type": "uint32_t", + "name": "flags", + "offset": 24 + } + ] + }, { "name": "CSBasePriorityQueue", "size": 20, @@ -3479,6 +3758,63 @@ } ] }, + { + "name": "CILayer", + "size": 60, + "members": [ + { + "type": "CHandleObject", + "name": "b_base", + "offset": 0 + }, + { + "type": "RECTF", + "name": "rect", + "offset": 4 + }, + { + "type": "RECTF", + "name": "visible", + "offset": 20 + }, + { + "type": "float", + "name": "zorder", + "offset": 36 + }, + { + "type": "uint32_t", + "name": "flags", + "offset": 40 + }, + { + "type": "void*", + "name": "param", + "offset": 44 + }, + { + "type": "void**", + "name": "paintfunc", + "offset": 48 + }, + { + "type": "TSLink_CILayer", + "name": "zorderlink", + "offset": 52 + } + ] + }, + { + "name": "TSLinkedNode_CILayer", + "size": 8, + "members": [ + { + "type": "TSLink_CILayer", + "name": "m_link", + "offset": 0 + } + ] + }, { "name": "CStatus__STATUSENTRY", "size": 16, @@ -3677,6 +4013,43 @@ } ] }, + { + "name": "TSHashObject_RGN_HASHKEY_NONE", + "size": 24, + "members": [ + { + "type": "uint32_t", + "name": "m_hashval", + "offset": 0 + }, + { + "type": "TSLink_RGN", + "name": "m_linktoslot", + "offset": 4 + }, + { + "type": "TSLink_RGN", + "name": "m_linktofull", + "offset": 12 + }, + { + "type": "HASHKEY_NONE", + "name": "m_key", + "offset": 20 + } + ] + }, + { + "name": "TSLinkedNode_RGN", + "size": 8, + "members": [ + { + "type": "TSLink_RGN", + "name": "m_link", + "offset": 0 + } + ] + }, { "name": "TSLinkedNode_SIMPLEFRAMENODE", "size": 8, @@ -3864,6 +4237,38 @@ } ] }, + { + "name": "TSList_CILayer", + "size": 12, + "members": [ + { + "type": "ptrdiff_t", + "name": "m_linkoffset", + "offset": 0 + }, + { + "type": "TSLink_CILayer", + "name": "m_terminator", + "offset": 4 + } + ] + }, + { + "name": "TSList_RGN", + "size": 12, + "members": [ + { + "type": "ptrdiff_t", + "name": "m_linkoffset", + "offset": 0 + }, + { + "type": "TSLink_RGN", + "name": "m_terminator", + "offset": 4 + } + ] + }, { "name": "ubyte4", "size": 4, @@ -4267,6 +4672,47 @@ } ] }, + { + "name": "RGN", + "size": 96, + "members": [ + { + "type": "TSHashObject_RGN_HASHKEY_NONE", + "name": "b_base", + "offset": 0 + }, + { + "type": "TSGrowableArray_SOURCE", + "name": "source", + "offset": 24 + }, + { + "type": "TSGrowableArray_RECTF", + "name": "combined", + "offset": 40 + }, + { + "type": "TSGrowableArray_FOUNDPARAM", + "name": "foundparams", + "offset": 56 + }, + { + "type": "RECTF", + "name": "foundparamsrect", + "offset": 72 + }, + { + "type": "int32_t", + "name": "sequence", + "offset": 88 + }, + { + "type": "int32_t", + "name": "dirty", + "offset": 92 + } + ] + }, { "name": "SIMPLEFRAMENODE", "size": 12, @@ -4734,6 +5180,32 @@ } ] }, + { + "name": "TSHashTable_RGN_HASHKEY_NONE", + "size": 36, + "members": [ + { + "type": "TSList_RGN", + "name": "m_fulllist", + "offset": 0 + }, + { + "type": "uint32_t", + "name": "m_fullnessIndicator", + "offset": 12 + }, + { + "type": "TSGrowableArray_TSList_RGN", + "name": "m_slotlistarray", + "offset": 16 + }, + { + "type": "uint32_t", + "name": "m_slotmask", + "offset": 32 + } + ] + }, { "name": "CGxVertexPBNT2", "size": 48,