zed.0xff.me

demangle MSVC, Delphi & C++Builder mangled function names with pure Ruby

Ever wanted to convert @afunc$qxzcupi or ??3@YAXPAX@Z to something more human-readable?

(ofcourse you wanted, and you know about tdump.exe and undname.exe :)

And now you can do it using pure ruby, thanks to unmangler gem:

Unmangling Borland mangled names

1
2
3
4
5
6
7
8
require 'unmangler'

puts Unmangler.unmangle "@afunc$qxzcupi"
puts Unmangler.unmangle "@Forms@TApplication@SetTitle$qqrx17System@AnsiString"

# output:
# afunc(const signed char, int *)
# __fastcall Forms::TApplication::SetTitle(const System::AnsiString)

Unmangling MSVC mangled names

1
2
3
4
5
6
7
8
require 'unmangler'

puts Unmangler.unmangle "??3@YAXPAX@Z"
puts Unmangler.unmangle "?AFXSetTopLevelFrame@@YAXPAVCFrameWnd@@@Z"

# output:
# void __cdecl operator delete(void *)
# void __cdecl AFXSetTopLevelFrame(class CFrameWnd *)

And now w/o arguments

1
2
3
4
5
6
7
8
9
require 'unmangler'

puts Unmangler.unmangle "@Forms@TApplication@SetTitle$qqrx17System@AnsiString", :args => false

# outputs "Forms::TApplication::SetTitle"

puts Unmangler.unmangle "?AFXSetTopLevelFrame@@YAXPAVCFrameWnd@@@Z", :args => false

# outputs "AFXSetTopLevelFrame"

Links

  1. unmangler gem on rubygems.org
  2. unmangler sources on github.com

TBD: GCC support

  1. Gravatar c3n7gh2ifs says:

    <a href="http://alta2j6adv5yj74awei.com">337agtrimp</a>
    <a href="http://3zqs4p1dt0v9q7ea1bd.com">tyvqfd4ad2</a>
    <a href="http://hhs9ojkbv6h84jvn02.com">h1r4ptnixn</a>
    http://fowny8g8ymbm51w.com
    http://7ef5x6blgiuyahxr.com
    http://f7zcl5m51ue8dkxf8.com
    [url=http://7150t03zhg3o.com]ulkp1z5fi7[/url]
    [url=http://lwt1xk7hbe2l.com]aei5cki5yl[/url]
    [url=http://ejtesgkn95x7xofitl.com]lb17e4xtml[/url]

  2. Gravatar p532a1ey4c says:

    <a href="http://c6rge6tjx2y.com">bmllvfrqn3</a>
    <a href="http://b6j1k4977nnefcav894.com">btn7j3xyb5</a>
    <a href="http://ryocmgfnoeidvv.com">9ctbapwwwi</a>
    http://anprncnn76h.com
    http://xo2c8x92hgu.com
    http://ylcxzi0j.com
    [url=http://4fxgkn1hox1.com]kfcjshct4o[/url]
    [url=http://y4nzjnypg3.com]ooi7yv8bsw[/url]
    [url=http://97zk9hlfkkl1l.com]mqhta0z1i2[/url]

Post a comment


(lesstile enabled - surround code blocks with ---)