📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  IDA Pro  >>  Typelib 2 IDA Script Convertion Tool

Topic created on: March 15, 2006 13:23 CST by caviola .

Hello!

I just finished a beta version of a tool to convert an OLE typelib to an IDA script file. The tool currently converts enums(AddEnum/AddConstEx) and interfaces(AddStrucEx/AddStrucMember). I'll include support for records/enums very soon.

Anyone interested please drop me a note here.

PD: This simple tool is based on a wrapper library I recently implemented(in Delphi) around the cumbersome/low level MS typelib interface(ITypelib, ITypeInfo, ICreateTypeInfo, etc).

Regards!

  pawalodi   March 31, 2006 21:43.12 CST
Both tools your write I like! Please release them soon and I will do a try.

  caviola   April 4, 2006 11:34.54 CDT
How can I upload it here for everyone to check out?

  caviola   April 5, 2006 11:43.24 CDT
which is the size of these IDA data types?

#define FF_FLOAT 0x80000000L
#define FF_DOUBLE 0x90000000L
#define FF_PACKREAL 0xA0000000L

  pawalodi   April 7, 2006 11:12.25 CDT
What's the diff between yours and COM Interface Helper 1.2?

BTW: Can you send me a beta version to my email? (cheming6150 at google)

  caviola   April 7, 2006 15:53.19 CDT
> What's the diff between yours and COM Interface
> Helper 1.2?

this current version imports enum/interface/record/unions definitions into IDA. for example, when you run my tool on stdole32.tlb, you get something like this:

//
// This file has been generated by TLB2IDC v0.90
//
#define UNLOADED_FILE   1
#include <idc.idc>

static main(void)
{
  auto id;
  // Interfaces
  id = AddStrucEx( -1, "IUnknown_vtbl", 0 );
  AddStrucMember( id, "QueryInterface", 0x0, 0x20500000, -1, 4 );
  AddStrucMember( id, "AddRef", 0x4, 0x20500000, -1, 4 );
  AddStrucMember( id, "Release", 0x8, 0x20500000, -1, 4 );
  id = AddStrucEx( -1, "IDispatch_vtbl", 0 );
  AddStrucMember( id, "QueryInterface", 0x0, 0x20500000, -1, 4 );
  AddStrucMember( id, "AddRef", 0x4, 0x20500000, -1, 4 );
  AddStrucMember( id, "Release", 0x8, 0x20500000, -1, 4 );
  AddStrucMember( id, "GetTypeInfoCount", 0xC, 0x20500000, -1, 4 );
  AddStrucMember( id, "GetTypeInfo", 0x10, 0x20500000, -1, 4 );
  AddStrucMember( id, "GetIDsOfNames", 0x14, 0x20500000, -1, 4 );
  AddStrucMember( id, "Invoke", 0x18, 0x20500000, -1, 4 );
  id = AddStrucEx( -1, "IEnumVARIANT_vtbl", 0 );
  AddStrucMember( id, "QueryInterface", 0x0, 0x20500000, -1, 4 );
  AddStrucMember( id, "AddRef", 0x4, 0x20500000, -1, 4 );
  AddStrucMember( id, "Release", 0x8, 0x20500000, -1, 4 );
  AddStrucMember( id, "Next", 0xC, 0x20500000, -1, 4 );
  AddStrucMember( id, "Skip", 0x10, 0x20500000, -1, 4 );
  AddStrucMember( id, "Reset", 0x14, 0x20500000, -1, 4 );
  AddStrucMember( id, "Clone", 0x18, 0x20500000, -1, 4 );
  // Structs and Unions
  id = AddStrucEx( -1, "GUID", 0 );
  AddStrucMember( id, "Data1", 0x0, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "Data2", 0x4, FF_DATA|FF_WORD, -1, 0x2 );
  AddStrucMember( id, "Data3", 0x6, FF_DATA|FF_WORD, -1, 0x2 );
  AddStrucMember( id, "Data4", 0x8, FF_DATA|FF_BYTE, -1, 0x8 );
  id = AddStrucEx( -1, "DISPPARAMS", 0 );
  AddStrucMember( id, "rgvarg", 0x0, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "rgdispidNamedArgs", 0x4, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "cArgs", 0x8, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "cNamedArgs", 0xC, FF_DATA|FF_DWRD, -1, 0x4 );
  id = AddStrucEx( -1, "EXCEPINFO", 0 );
  AddStrucMember( id, "wCode", 0x0, FF_DATA|FF_WORD, -1, 0x2 );
  AddStrucMember( id, "wReserved", 0x2, FF_DATA|FF_WORD, -1, 0x2 );
  AddStrucMember( id, "bstrSource", 0x4, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "bstrDescription", 0x8, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "bstrHelpFile", 0xC, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "dwHelpContext", 0x10, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "pvReserved", 0x14, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "pfnDeferredFillIn", 0x18, FF_DATA|FF_DWRD, -1, 0x4 );
  AddStrucMember( id, "scode", 0x1C, FF_DATA|FF_DWRD, -1, 0x4 );
}

  knownothing     April 8, 2006 05:00.05 CDT
Hi I am desperately trying to fix my computer's internet connection. I keep getting the prompt: The procedure entry point wscwritenamespaceorder could not be located in the dynamic link library spor.dll  I don't know what to make of it. I tried calling  Microsoft, my Internet Provider and Dell, no one knew how to help me. Could someone please instruct this old fool on what to do? I have scratched my balding header to total baldness and still cannot figure out what to do and I can't afford a new computer. Could one of you computer whiz angels please help this computer illiterate fool? You can also email me at [email protected] Thanks a million. I would greatly appreciate any help

  memo5     February 11, 2007 15:56.24 CST
I Think that every one is interested in such tool so can you share this tool.

  vptrlx   December 13, 2009 12:15.57 CST
Has anything happened since that time (i.e. do i have to write something like this myself)? :)

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit