REDIVIVUS

Proposals / #1027

gnBetaScreenCount (0x0070f024) is a signed int: DrawBetaScreen tests the screen index against it with JGE/JL

applied · by Niehztog · submitted 2026-11-02, applied 2026-11-02

Ghidra v1841 · 4ca0e98

The beta-screen count is read only by DrawBetaScreen, and every compare against it is signed: 0044d13a CMP EAX,[0x0070f024] / 0044d140 JGE; 0044d288 MOV EAX,[0x0070f024] ... 0044d290 CMP EDX,EAX / 0044d292 JGE; 0044d2c3 CMP ECX,EAX / 0044d2c5 JL; and the reset loop's guard 0044d2c9 CMP EAX,EBX / 0044d2cb JLE (EBX = 0). As undefined4 the generator declares it uint32_t, so the recompile tests the index with JAE/JB. Recompiled with VC8 SP1 (the 1.14d compiler) on main f26206a with the global as int: those compares come out as the original's JGE/JGE/JL, and no function in the TU changes status.

Changes 1, applied together

  1. Retype global win 0x0070f024

    typeundefined4 (4 bytes)→int