From 37db7dc3b2568a5f19cec3e29b5eaf698cd15e14 Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Sat, 5 Sep 2026 07:47:48 +0700 Subject: [PATCH] [saco] Add `FUNC_1000EC30`; caching the global inside the guard keeps it in `eax` and copies to `ecx` --- saco/net/netrpc.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/saco/net/netrpc.cpp b/saco/net/netrpc.cpp index 404d8ce..d7db6d4 100644 --- a/saco/net/netrpc.cpp +++ b/saco/net/netrpc.cpp @@ -6,6 +6,21 @@ extern CGame * pGame; extern CChatWindow *pChatWindow; extern RakNetStatisticsStruct RakServerStats; +// the download list global lives in main.cpp's data; only the touched fields are known +class CDownloadListDispatch +{ +public: + + char _gap0[0x221]; + char field_221; + + void FUNC_1000BD60(); // .text:1000BD60 + void FUNC_1000DB30(DWORD dwIndex); // .text:1000DB30 + void FUNC_1000C0C0(); // .text:1000C0C0 +}; + +extern CDownloadListDispatch *dword_1026EB98; + // MATCH BYTE Checksum(BYTE *pData, WORD wLen) { @@ -553,6 +568,21 @@ void UnkAA(RPCParameters *rpcParams) } void ClientCheck(RPCParameters *rpcParams) {} void UnkAB(RPCParameters *rpcParams) {} +// not registered, kept alive only by the rest of the section +void FUNC_1000EC30(RPCParameters *rpcParams) +{ + PCHAR Data = reinterpret_cast(rpcParams->input); + int iBitLength = rpcParams->numberOfBitsOfData; + + RakNet::BitStream bsData(Data,(iBitLength/8)+1,false); + + if(dword_1026EB98) + { + CDownloadListDispatch *pDownloadList = dword_1026EB98; + pDownloadList->field_221 = 1; + pDownloadList->FUNC_1000C0C0(); + } +} // MATCH void UnkAC(RPCParameters *rpcParams) {