[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.
loksmith is a fucking moron
Very nice work, great contribution. Will most definitely come in handy. Thanked