REDIVIVUS

Proposals / #1126

The corpse-assign flag of both Send_0x8E packet builders is a bool

applied · by Nugwa628 · submitted 2026-11-03, applied 2026-11-04

Ghidra v1898 · 8222e32

Both builders copy the stack byte unchanged into the packet's bool field D2GSPacketSrv0x8E.nAssign (+1): Sender 0053df8c MOV DL,byte ptr [EBP+0xc] / 0053df95 MOV byte ptr [EBP-0xb],DL; CorpseAssign 0053dfc0 MOV DL,byte ptr [EBP+0xc] / 0053dfcf MOV byte ptr [EBP-0xb],DL. A byte stored into a bool needs normalisation (CMP byte ptr [EBP+0xc],0 / SETNE DL); there is none, so the argument already is a bool. Every caller passes a 0/1 constant: 0053538d PUSH 0x1 (PLAYER_PlaceCorpse), 00533950 PUSH 0x1, 0056a9c3 PUSH 0x1 (PLRSAVE_LoadCorpseFromBuffer), 0057facd PUSH 0x1 (PLRMODES_CreateDeadBody), 0057fc16 PUSH 0x0 (PLRMODES_PickupCorpse), 0052c4ab PUSH 0x1 (BroadcastPlayerJoin -> 0053dfb0). Mac twins (001b3d78, 001b3dfa) also copy the byte raw (001b3e10 MOV AL,byte ptr [EBP+0x14] / 001b3e13 MOV byte ptr [EBP-0xf],AL). Type only; names kept.

Changes 2, applied together

  1. Set prototype win 0x0053df80

    signaturevoid NET_D2GS_SERVER_Send_0x8E_CorpseAssign_Sender(SGAMEDATA * pGame, int32_t nUnitGUID, int32_t nCorpseGUID, byte byCorpseFlagArg)→void NET_D2GS_SERVER_Send_0x8E_CorpseAssign_Sender(SGAMEDATA * pGame, int32_t nUnitGUID, int32_t nCorpseGUID, bool byCorpseFlagArg)
    convention__fastcall
  2. Set prototype win 0x0053dfb0

    signaturevoid NET_D2GS_SERVER_Send_0x8E_CorpseAssign(D2ClientStrc * pClient, uint32_t dwUnitGUID_param, uint32_t dwCorpseGUIDArg, byte byCorpseFlagArg)→void NET_D2GS_SERVER_Send_0x8E_CorpseAssign(D2ClientStrc * pClient, uint32_t dwUnitGUID_param, uint32_t dwCorpseGUIDArg, bool byCorpseFlagArg)
    convention__fastcall