Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- This is free and unencumbered software released into the public domain by sku.
- Anyone is free to copy, modify, publish, use, compile, sell, or
- distribute this software, either in source code form or as a compiled
- binary, for any purpose, commercial or non-commercial, and by any
- means.
- In jurisdictions that recognize copyright laws, the author or authors
- of this software dedicate any and all copyright interest in the
- software to the public domain. We make this dedication for the benefit
- of the public at large and to the detriment of our heirs and
- successors. We intend this dedication to be an overt act of
- relinquishment in perpetuity of all present and future rights to this
- software under copyright law.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
- For more information, please refer to <http://unlicense.org/>
- '''
- import idaapi
- import idautils
- import idc
- def offset(name, pattern, offs=0, nth=0, start=idc.MinEA(), end=idc.MaxEA()):
- address = idaapi.find_binary(start, end, pattern, 16, idc.SEARCH_DOWN)
- if nth == 0:
- print '\t%s = 0x%X,' % (name, address + offs)
- else:
- offset(name, pattern, offs, nth - 1, address + 1, end)
- if idc.MinEA() == 0x400000:
- print '\t// x86'
- offset('kTerrainClick', '55 8b ec 83 ec 0c 53 8b 1d ? ? ? ? 57 33 ff')
- offset('kGetGuidByKeyword', '55 8b ec 51 51 56 e8 ? ? ? ? 89 45 fc')
- offset('kConsoleregister', '55 8b ec 53 8b 5d 08 53 e8 ? ? ? ? 59 83 f8 40')
- offset('kExecuteLua', '55 8b ec 51 ff 05 ? ? ? ? a1 ? ? ? ? 53 56 57')
- offset('kClntObjMgrObjectPtr', '55 8b ec 83 3d ? ? ? ? 00 74 1d')
- offset('kGetUnitPosition', '55 8b ec 8b 89 ? 00 00 00 8d 41 10 50')
- offset('kPointerCheck', '72 05 39 4d 08 72 21')
- elif idc.MinEA() == 0x140000000:
- print '\t// x64'
- offset('kTerrainClick', '40 53 ? 41 ? 48 83 ec 50 48 8b 1d ? ? ? ? 48 8b ?')
- offset('kGetGuidByKeyword', '48 89 5c 24 18 48 89 7c 24 20 48 89 4c 24 08')
- offset('kConsoleregister', '48 89 5c 24 10 48 89 6c 24 18 57 41 54 41 55 48 83 ec 20', nth=1)
- offset('kExecuteLua', '48 89 5c 24 08 48 89 6c 24 10 48 89 74 24 18 57 41 54 41 55 48 83 ec 20 ff 05 ? ? ? ?')
- offset('kClntObjMgrObjectPtr', '48 83 ec 28 48 83 3d ? ? ? ? ? 44 8b ? 75 07 33 c0')
- offset('kGetUnitPosition', '40 53 48 83 ec 20 48 8b 89 ? ? ? ? 48 8b da')
- offset('kPointerCheck', '72 05 48 3b d8 72 22')
- else:
- print 'Unknown architecture?!'
- '''
- Old values:
- // WoW offsets, not rebased. Makes it easier to
- // cross-reference stuff in IDA Pro.
- // WoW version: 17538
- enum : DWORD_PTR
- {
- #if defined(_M_IX86)
- kTerrainClick = 0x00780D00, // 0x00783504, // 0x00783490,
- kGetGuidByKeyword = 0x00892DDF, // 0x00895852, // 0x008957F7,
- kConsoleRegister = 0x00448018, // 0x0044848D, // 0x0044849D,
- kExecuteLua = 0x0044F9EC, // 0x0044FE8C, // 0x0044FEDA,
- kClntObjMgrObjectPtr = 0x00790CDD, // 0x007934C7, // 0x00793453,
- kGetUnitPosition = 0x007B2FE4, // 0x007B5B02, // 0x007B5A8A,
- kPointerCheck = 0x0050C04D, // 0x0050BF4A, // 0x0050BF57
- #elif defined(_M_X64)
- kTerrainClick = 0x0000000140585D20, // 0x000000014058B740,
- kGetGuidByKeyword = 0x0000000140744E60, // 0x000000014074A5F0,
- kConsoleRegister = 0x00000001400780E0, // 0x0000000140078990,
- kExecuteLua = 0x0000000140084C90, // 0x0000000140085490,
- kClntObjMgrObjectPtr = 0x000000014059EC70, // 0x00000001405A4B40,
- kGetUnitPosition = 0x00000001405D9010, // 0x00000001405DF250,
- kPointerCheck = 0x00000001401AA4D7, // 0x00000001401AA957,
- #endif
- };
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement