REDIVIVUS

Proposals / #1055

MAINMENU_AddRealmToList returns BOOL, not void

checked · by Nugwa628 · submitted 2026-11-02

The slot search 004309f2 XOR EAX,EAX / 004309f8 CMP dword ptr [ECX+EAX*4],0 / 004309fc JE 0x00430a0b / 004309fe ADD EAX,1 / 00430a03 JL ends, when no slot is free, in 00430a05 XOR EAX,EAX / 00430a08 RET 4 (returns 0); a free slot is filled (00430a0e MOV dword ptr [ECX+EAX*4],EDX) and 00430a11 MOV EAX,1 / 00430a17 RET 4. The early 004309cb JNE path also ends at 00430a05. Caller ignores the value (004341b1 CALL 0x004309c0 / 004341b6 SUB dword ptr [EBP-4],1). Same shape as #999. Return type only. Recompiled with VC8, 004309c0 then matches byte for byte.

Changes 1, applied together

  1. Set prototype win 0x004309c0

    signaturevoid MAINMENU_AddRealmToList(D2BNetRealmEntryStrc * pRealmEntry)→BOOL MAINMENU_AddRealmToList(D2BNetRealmEntryStrc * pRealmEntry)
    convention__stdcall