and the decompiler has misinterpreted it as a longlong because of the access patterns (64bit pointers).
So I think this might be part of an initialization function for some property on top of a object that exists at *param_1. The 0x2b part I'm not sure about myself but it looks like some other kind of similar checks.Īnd actually then thinking about the way it's calling it, i'm wondering if this is actually from some C++ standard library code for doing stuff with a vtable, looking up the vtable entry and checking it's validity before calling it (in this case, location 0x18, and checking some kind of RTTI at 0x28 and 0x2b) and storing that it's been initialized in 0x21. From my memory, the windows ABI uses the first two bytes of functions for installing hooks/debugging by patching the first two bytes into some kind of jump (while originally being nops). This particular one looks like it's taking a function pointer in and checking if it's a valid function (not null) and then checking the first two bytes of the function. The sibling comment covers it a bit more in detail, but it's largely just some guessing and as much an art to figuring out what the types are or could be. (disclosure: per the child post, my original assumption that OpenRCT2 was copied out of Hex-Rays was inaccurate, since it was originally written in assembler it didn't follow a standard C ABI and the decompiler wouldn't work properly anyway). For example, OpenRCT2 started as a repository full of manually created source with Hex-Rays names and slowly evolved module-by-module into readable source code. Highly manual process, for some files it's just pattern matching / renaming and goes really quickly, for others it's full reimplementation and a bit harder.Īnd, if you look at most "decompiled game" projects, I think this is the industry standard way to do this. When I've done this in the past, it basically consists of:ġ) Decompile project using Ghidra/IDA, first pass.Ģ) Load symbols if present (sounds like there was a PDB for this one, which makes things a lot easier).ģ) Read decompilation/asm for unnamed subs and try to name them based on what they do.Ĥ) Export all decompiled source into an editor and start copy/paste/editing into readable source. 3D Pinball for Windows: Space Cadet (referred to as 3D Pinball or simply Pinball) is the version of the game bundled with various Microsoft products. With not even Notepad immune to the whims of the Windows 11 design team, shoving something into the OS that is not resizable and has a skin that dates back to the last century is unlikely to fly.Įven if the Windows code fairies did come in the night all those years ago to fix the collision bug that killed off the poor thing in the first place.I'm not aware of any good general-case automation for this.
When you see it next to Windows 11 it's pretty jarring."įor sure. "More important, though, is the fact that it's highly visually dated.
I don't know that younger Windows user are really clamoring for it. Whatever the problem was, somebody fixed it, and then they went back and re-tested Pinball with this fix, and everything worked great, so they put Pinball back." "Or maybe there was a compiler bug, and the compiler team fixed that.