Skip to content

Game symbols v3: the game's own names, constructors and class hierarchies

Choose a tag to compare

@Trinculo54 Trinculo54 released this 03 Dec 09:38
eb4594b

The third release of the PDB for forza_durango_release_final.exe, the Forza Horizon 2 build that Azimuth runs
(24 Nov 2015, TimeDateStamp 0x565501ED, SizeOfImage 0x3A18000). It carries the exe's own GUID and age, so tools
accept it as the game's real PDB.

Download: FH2-symbols-pdb.zip (6 MB; the PDB inside is 47 MB). It holds the PDB and a short README. It
replaces v2: same GUID, more names.

New in v3

About 30,000 more real names (72,000 now, 41,700 in v2), read out of the game's own code.

  • The game's own names for methods and properties. The game has a reflection system, and about 1,000 of its
    classes register their methods and properties with it by name. 2,639 functions now carry those names:
    Class::Method, and Class::get_Property and Class::set_Property for a property's accessors. An accessor is
    often one instruction that reads or writes a field, so it also shows where that field sits in the object.
  • Constructors. 5,076 functions read Class::Class, told by the vtables they store into their own object.
  • Destructors. Scalar deleting destructors are now found in any vtable slot, not just slot 0 (9,411, was about
    7,500), and 2,057 destructors read Class::~Class. A destructor is now named after the class whose deleting
    destructor calls it. About 160 that v2 named after a member's or a base's class are corrected.
  • Virtual functions named through their class hierarchy. A name known for one class's vtable slot is given to
    the same slot of every related class, so one known Update names every override of it. 18,047 functions that
    were Class::vfN now have a name. About 16,400 of them are std::function internals (_Do_call, _Copy); the
    rest are the game's own (Update, OnEvent, SaveGameState and so on).
  • More SQLite and zlib. 560 more functions, named from what the byte-matched ones refer to and call.
  • Small functions without a symbol. About 10,500 leaf functions with no unwind data were missing altogether,
    so an address in one showed as the function before it plus an offset. They now have sub_<address> names.
  • Import thunks carry the import's name (memcpy), and virtual-call thunks read `vcall'{N}.

Nine names that came from mod sources give way to the game's own: FH2_GAME_HUD_RESUME, for one, is now
EntityModel::HUDModuleAR::ResumeAll. No address lost its name.

What's in it

  • About 235,000 names:
    • RTTI vtables, virtual functions, constructors and destructors;
    • the methods and properties the game registers with its reflection system;
    • exports and imports;
    • "Class::Method" strings the game logs;
    • names gathered from mod source code and notes;
    • standard library, C runtime, zlib and SQLite functions;
    • sub_ names for everything else.
  • Every function's size, so debuggers know where each one ends. The small functions without unwind data have a
    name but no size.
  • No types, local variables or source lines.

Use it

Azimuth maps the game into azimuth.exe by hand, so the game is not a module and no tool finds this PDB by itself.

  • Crash addresses, no debugger (tried with v3): python lookup.py <pdb folder> <exe> 0x1412CC7A0, using
    lookup.py from symbols/.
  • Ghidra (tried with 12.2 and v2): import the exe, then put the PDB beside it before auto-analysis, or use
    File > Load PDB File.
  • x64dbg (tried with v2), attached to azimuth.exe with the game running:
    virtualmod forza_durango_release_final.exe, 140000000, 3A18000, then
    symload forza_durango_release_final.exe, <path to the pdb>. Leave with Debug > Detach.
  • lldb on a platform minidump (tried with v2): target modules add the exe, then
    target modules load --file forza_durango_release_final.exe --slide 0, then image lookup -a <address>.
  • WinDbg, IDA (not tried yet): put the PDB beside the exe or on your symbol path.

v3 is written the same way as v2, with more names in it.
Chapter 15 of the guide has the
details.

Add names

Found a name? Add it to symbols/names.txt and rebuild with gen.py, or send it as a pull request so the next
release has it. If you know a class's vtable layout, add it to symbols/slots.txt and every class derived from it
gets the names.

Checksums (SHA-256)

  • FH2-symbols-pdb.zip: 2b3072e6aee3236e506c4a8f8a096800627b7e21f419413115c9059d95e504a9
  • forza_durango_release_final.pdb: 2ba20586d3c4cf20bce118d0cc85a3dcc7d2db63f747240f2730145ae44ff56f