DRLGPRESET_SetPickedFileInDrlgMap returns the picked file it stores
Ghidra v1846 · 4ca0e98
The whole function is 00666ec0 MOV EAX,EDX; 00666ec2 MOV dword ptr [ECX+0x4],EAX; 00666ec5 RET. A void setter compiles to MOV dword ptr [ECX+0x4],EDX; RET - VC8 routes the value through EAX only because EAX is also the return value, as in return pDrlgMap->nPickedFile = nPickedFile. Typed int32_t returning nPickedFile, the function recompiles byte-identical with VC8 SP1 (oracle, tree 3dba660: OUR-1, similarity 0.400 -> MATCH); its only caller, DRLGOUTDOOR_CreateOutdoorRoomExGrid (call 006751db), does not read the result and is unchanged; no function lost.
Changes 1, applied together
Set prototype
win 0x00666ec0signaturevoid DRLGPRESET_SetPickedFileInDrlgMap(D2DrlgMapStrc * pDrlgMap, int32_t nPickedFile)→int32_t DRLGPRESET_SetPickedFileInDrlgMap(D2DrlgMapStrc * pDrlgMap, int32_t nPickedFile)convention__fastcall