Need help finding lua_createtable menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Ellesar1's Avatar Member
    Reputation
    20
    Join Date
    Feb 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help finding lua_createtable

    I want to push a new table on the lua stack as return value for a custom function I register in WoW. However, since the Info dump thread didn't mention lua_createtable which is needed for this purpose, I tried to find it myself but failed epically.

    My attempt was to create a new project which only included the sample LUA project, and to insert debug strings inside of the lua_createtable function to find it later via OllyDbg => Search for... => All referenced strings.
    Afterwards, I've noticed that the functions which were already found by the MMOwned community lie all in some address range. I've looked through every function in that range manually but couldn't find a similar one than the one from the sample project.

    I know that my reversing skills are not really what they should be (everyone has to start once) but I'ld like to know what the correct approach is to find such a function.
    Problem is that you cannot make WoW call lua_createtable using the lua-interpreter since lua_createtable is part of the c-api and is therefore only called by C-/C++-functions.

    Anybody some hints?

    Need help finding lua_createtable
  2. #2
    ostapus's Avatar Active Member
    Reputation
    58
    Join Date
    Nov 2008
    Posts
    176
    Thanks G/R
    2/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow 3.2.2.10505
    lua_createtable - 0x00803E50

  3. #3
    zzgw's Avatar Member
    Reputation
    6
    Join Date
    Mar 2008
    Posts
    31
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your best bet is to compile lua with debugging symbols (still run optimizations though) and then try a bytecode search in WoW for the function's body. If you get lucky they both are the same. If not, the order usually stays the same so you can derive its positions from other known lua functions.
    Or you could look at the C function of a WoW API function that returns a table, etc.

  4. #4
    Ellesar1's Avatar Member
    Reputation
    20
    Join Date
    Feb 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your last point sounds very interesting. A C-function which is registered to WoW's LUA host and returns a table has to use lua_createtable to create it since it's the only possibility (other one would be to take one as an argument but let's ignore this).

    Byte code search didn't work for me, but I was looking in the correct address range. Seems that the code differs too much that it can be seen by scrolling through the assembler. How is "adding debugging symbols" done in VS? will try tomorrow. Didn't think that it is common that functions stay in the same order. Will also check tomorrow.

    Thanks both of you for your posts. @ostapus: thanks for the solution. Will also confirm it if it is correct. Would you mind telling us how you found it?

  5. #5
    ostapus's Avatar Active Member
    Reputation
    58
    Join Date
    Nov 2008
    Posts
    176
    Thanks G/R
    2/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function's order is pretty close to lua sources.
    i am just looking into lua sources, found some easy to identify functions and then cross-referenced from them to unknown ones.
    ex to find - lua_createtable :
    from lua source you can see that lua_createtable is called from luaL_findtable
    luaL_findtable is called from luaI_openlib
    luaI_openlib can be found by searching string "name conflict for module"
    once you found luaI_openlib - by looking in source - you can identify bunch of functions (including createtable)

Similar Threads

  1. [Question] Need help finding texture names..
    By GlowBug in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 10-13-2007, 11:43 AM
  2. need help finding
    By Jacar007 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 09-15-2007, 09:56 PM
  3. Need help finding shrubs and bushes
    By blah7 in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 07-27-2007, 03:41 AM
  4. Need help finding some textures...
    By sooos in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 12-24-2006, 02:25 PM
  5. Replies: 4
    Last Post: 09-18-2006, 06:38 PM
All times are GMT -5. The time now is 04:49 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search