gnUICtrlConfigScrollOffset (0x007c02ac) is a signed int: compared with the int row count by JGE
Ghidra v1846 · 4ca0e98
The scroll offset is undefined4 (emitted as uint32_t), while the row count it is compared with, gnUICtrlConfigTotalRows (0x007c0274), is already int. UI_GetControlConfigRowAtY compares the two signed: 004a4720 MOV ECX,[0x007c02ac]; 004a4727 MOV ESI,[0x007c0274]; 004a4730 CMP ECX,ESI; 004a4732 JGE. An unsigned offset makes that comparison unsigned (JAE); UI_UpdateConfigControlsState clamps it signed as well (004a4d89 CMP EBX,EDI; 004a4d8d JGE). Recompiled with VC8 SP1 (oracle, tree 3dba660), the control-configuration code comes closer to the original: UI_ScrollConfigListVertical 0.553 -> 0.596, CONTROLCONFIG_CalculateColumnBounds 0.490 -> 0.552, UI_UpdateConfigControlsState 0.427 -> 0.433; no function lost.
Changes 1, applied together
Retype global
win 0x007c02actypeundefined4 (4 bytes)→int