The Yakuza 1 and 2 rereleases on the Wii U export function symbols,
preserving their names, and some debug data was also available in a PS2
release, providing some struct definitions. These have been used to
rename analogous classes, functions, and member variables to the same
names used by Smilebit, plus a more general imitation of their naming
and typing conventions (i.e. Win32 style).
Strings in the .rdata portion of the Smilebit in-house library code
suggest that this was its name, with its contents having names beginning
with an M (whence MMATRIX, for example).
We now have generation of an import library for linking against the Xbox
kernel, linking together an .exe, and converting it to an .xbe via cxbe.
Some further development of tooling aside (including filling in some
features in cxbe to better match the original JSRF executable), all that
remains now is to write decompiled code.
The /O2 used before was actually a preset for a bunch of more specific
flags, which are now written explicitly for clarity and easier
modification later.
JSRF appears to have it disabled despite other optimizations. Even if
it was enabled, anyways, we'd still be decompiling the post-inlining
functions and wouldn't want any further inlining to take place (we want
the compiler to compile each function the way we write it).
We can now create a fresh Ghidra project, import the JSRF executable
into it, import symbols into it, delink object files from it, and then
decompile with objdiff. Just needs some documentation.