IDA Vtable walker and 'reconstructor'

Posts 1–2 of 2 · Page 1 of 1
IDA Vtable walker and 'reconstructor'
[php]
//
// - IDA Pro script -
// Name: VTableWalk.idc
// Desc: Attempts to determine vtable function count and encourages IDA to create functions at those function locations
//
// Ver: 1.0a - October 13, 2010 - HL-SDK [TEAM METALSLAVE]
//

#include <idc.idc>

static GetNumMethods(vtbl)
{
auto a, x;
a = 0;
x = Dword(vtbl + a);

while ((x) && (x != BADADDR) && (Dword(x) != BADADDR))
{
a = a + 4;
x = Dword(vtbl + a);
}
return (a-4) / 4;
}

static ParseVtbl()
{
auto a, b, c;
a = ScreenEA();
b = GetNumMethods(a);
Message("%d Vfuncs found\n", b);
for (c = a; c < a + (b*4); c = c + 4)
{
if (c != BADADDR)
{
Message("Trying to make Function at: %X\n", c);
MakeData(c, FF_DWRD, 4, 0);
}
}

}

static main()
{
AddHotkey("Alt-F7","ParseVtbl");
Message("Use Alt-F7 to parse vtable\n");
}

[/php]

Explanation: If you do not know what this does, you don't need it.
Very nice work, great contribution. Will most definitely come in handy. Thanked
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us