Return room pointers from the two Windows tile-coordinate searches
Ghidra v1797 · 3bccb89
Win 00619b10 and 00619b60 return D2RoomStrc* or null, currently int32_t. The first loads the typed act's room head at +16, follows each room's +124 next link and returns the selected pointer. The second loads an element of the typed room-pointer array at +0, preserves it across the coordinate test, and explicitly moves it to EAX; exhausted scans clear full EAX. Complete CFGs prove no other returning values. Existing layouts and independent producers agree: AllocRoom allocates 128 bytes and links that same object into act+16/room+124; the adjacency producer fills entries from RoomEx+48, an existing D2RoomStrc* field. Restore only the return types, preserving three dword stack inputs, names, stdcall and RET12. Both functions have no incoming references, so no current caller or runtime benefit is claimed. Complete target, predicate and producer bodies are independently decoded from the original Windows PE; error paths terminate through the verified CRT ExitProcess chain.
Changes 2, applied together
Set prototype
win 0x00619b10signatureint32_t FindRoomByTileCoordinates(D2DrlgActStrc * pDrlgAct, int32_t nX, int32_t nY)→D2RoomStrc * FindRoomByTileCoordinates(D2DrlgActStrc * pDrlgAct, int32_t nX, int32_t nY)convention__stdcallSet prototype
win 0x00619b60signatureint32_t GetAdjacentRoomByCoordinates(D2RoomStrc * pRoom, int32_t nX, int32_t nY)→D2RoomStrc * GetAdjacentRoomByCoordinates(D2RoomStrc * pRoom, int32_t nX, int32_t nY)convention__stdcall