REDIVIVUS

Proposals / #1030

gnUICtrlConfigColumnWidth (0x007c027c) is a signed int: the scroll position is divided by IDIV after multiplying by it

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

Ghidra v1841 · 4ca0e98

The global is written twice with constants (UI_InitializeStatDescriptionPointers, 004a444b and 004a44af: 0x2f / 0x24) and read once, in UI_UpdateConfigControlsState, as a factor of a signed division: 004a4ea7 MOV ECX,[0x007c027c] / ADD ECX,1 / 004a4eb0 IMUL EAX,ECX / ... / 004a4ec7 CDQ / 004a4ec8 IDIV ECX. As undefined4 the generator declares it uint32_t, which makes the product unsigned and the division DIV. Compiled on the oracle bench with VC8 SP1 (the 1.14d compiler, main f26206a) with the global read as int: that division comes out as the original's IDIV and UI_UpdateConfigControlsState goes from OUR-10 (0.427) to OUR-9 (0.433). Its other two DIVs divide gnUICtrlConfigScrollOffset, which #984 covers.

Changes 1, applied together

  1. Retype global win 0x007c027c

    typeundefined4 (4 bytes)→int