COMCALLBACK_AppendChatWithColor returns void
Ghidra v1809 · f728564
Its only caller never reads EAX: after 004484cc CALL 0x004481b0 come 004484d1 POP EDI; 004484d2 POP ESI; 004484d3 MOV EAX,0x1 (a write). No table or other reference points at 004481b0. The callee sets no return value: its body is the sprintf (004481c6 CALL 0x006823fd) and the call 004481dc CALL 0x00447b00, then 004481e1 MOV ESP,EBP; 004481e3 POP EBP; 004481e4 RET 0x8; EAX is only used to pass arguments (004481b9 PUSH EAX; 004481ce MOV EAX,dword ptr [EBP+0x8] / 004481d5 PUSH EAX). The declared int return makes the generator emit 'return nResult' from an uninitialised local (an extra MOV EAX before the epilogue). Only the return type changes: the parameters keep their custom storage (szUsername EAX, nColor ESI, szMessage/nParam on the stack). Recompiled with VC8 on main 5501650: 004481b0 becomes a byte match, no function lost.
Changes 1, applied together
Set prototype
win 0x004481b0signatureint COMCALLBACK_AppendChatWithColor(char * szUsername, int nColor, char * szMessage, int nParam)→void COMCALLBACK_AppendChatWithColor(char * szUsername, int nColor, char * szMessage, int nParam)convention__stdcall