460c61df43
Five-stage Ghidra headless decompile traces the byte-to-MXSTATUS_PROXY synthesis path end-to-end across LmxProxy.dll and Lmx.dll. New evidence files committed alongside R3/R4 verdict update: - analysis/ghidra/exports/LmxProxy.dll.fire-event-xrefs.md - analysis/ghidra/exports/LmxProxy.dll.status-synthesis-decompile.md - analysis/ghidra/exports/LmxProxy.dll.mxstatus-safearray-decompile.md - analysis/ghidra/exports/Lmx.dll.set-attribute-result-decompile.md Layer-by-layer findings (bytes flow inward; synthesis flows outward): 1. `Lmx.aaDCT` at 0x10178fc0 is `SysAllocString(L"Lmx.aaDCT")` — a tracing category BSTR, not a table. 2. `MXSTATUS_PROXY` is a 16-byte marshalled struct (4 × i16 padded to i32 boundaries with Pack=4) — the OUTPUT of synthesis, not a lookup entry. 3. `LmxProxy.dll` Fire_* event handlers receive already-populated `MXSTATUS_PROXY[]` and forward through ATL dispatch — no synthesis. 4. `LmxProxy.dll` Fire_* CALLERS (FUN_1001657f / FUN_10016b50 / FUN_10016d4b) call FUN_10003f60(out_safearray, in_status_ptr, count=1) which is a VERBATIM memcpy of an existing 14-byte buffer into the SAFEARRAY — no transformation. 5. `Lmx.dll`'s `PreboundReference::OnSetAttributeResult` (FUN_10114a90) receives an already-populated `short *param_7` status buffer. Log line confirms the layout: `<success %d category %d detectedBy %d detail %d>`. Dispatches on typed values — synthesis is upstream of this function too. The synthesizer is the NMX-frame decoder in Lmx.dll that calls OnSetAttributeResult / OnGetAttributeResult / equivalent OperationComplete handler. The decoder takes raw NMX bytes plus operation context (item handle, engine state, retry state, correlation id) and computes the populated MXSTATUS_PROXY. There is NO static lookup table — synthesis is per-message contextual. Two viable paths to typed promotion (both substantial; neither a small codec patch): - Path A: port the synthesizer. ~1-2 weeks. Requires extending the Rust session to track per-operation context (handles, retries, correlation ids). Out of V1 scope. - Path B: empirical capture pairs. ~30 min × 6-10 scenarios. Output is a (byte, context → status) mapping that approximates without re-implementing. Risk: mapping is only valid for captured contexts. R3/R4 stay settled at verbatim-preserve. The .NET reference does the same for the same reason: the synthesizer is too context- dependent to mirror without porting the entire operation-tracking state machine. Reopen criteria sharpened: either (a) a consumer files a concrete use case for typed promotion of a specific byte+context combination (Path B's empirical capture for that one combination is the cheapest answer); or (b) a major-version bump justifies the state-machine port (Path A). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.1 KiB
4.1 KiB
LmxProxy.dll selected decompile
FUN_10003f60 at 10003f60
Signature: HRESULT __cdecl FUN_10003f60(undefined4 * param_1, undefined2 * param_2, ULONG param_3)
HRESULT __cdecl FUN_10003f60(undefined4 *param_1,undefined2 *param_2,ULONG param_3)
{
basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> bVar1;
HRESULT HVar2;
basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *pbVar3;
SAFEARRAY *pSVar4;
HRESULT HVar5;
_func_basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>_ptr_basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>_ptr
*p_Var6;
SAFEARRAYBOUND local_18;
LONG local_10;
IRecordInfo *local_c;
undefined2 *local_8;
local_c = (IRecordInfo *)0x0;
HVar2 = GetRecordInfoFromGuids((GUID *)&DAT_1001c2d0,1,0,0,(GUID *)&DAT_1001b530,&local_c);
if (HVar2 < 0) {
if ((HVar2 != -0x7ffd7fe3) &&
(bVar1 = FUN_10003f01(*(basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> **)
(DAT_100294e0 + 4)),
bVar1 != (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>)0x0)) {
HVar5 = HVar2;
p_Var6 = endl_exref;
pbVar3 = (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *)
FUN_10002dbf(*(int **)(DAT_100294e0 + 4),L"GetRecordInfoFromGuids failed - hr = ");
pbVar3 = std::basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>::operator<<
(pbVar3,HVar5);
std::basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>::operator<<(pbVar3,p_Var6);
}
}
else {
local_18.lLbound = 0;
local_18.cElements = param_3;
pSVar4 = SafeArrayCreateEx(0x24,1,&local_18,local_c);
*param_1 = pSVar4;
(*local_c->lpVtbl->Release)(local_c);
if ((SAFEARRAY *)*param_1 == (SAFEARRAY *)0x0) {
HVar2 = -0x7fffbffb;
}
else {
HVar2 = SafeArrayGetLBound((SAFEARRAY *)*param_1,1,&local_10);
if ((-1 < HVar2) && (HVar2 = SafeArrayAccessData((SAFEARRAY *)*param_1,&local_8), -1 < HVar2))
{
*local_8 = *param_2;
*(undefined4 *)(local_8 + 2) = *(undefined4 *)(param_2 + 2);
*(undefined4 *)(local_8 + 4) = *(undefined4 *)(param_2 + 4);
local_8[6] = param_2[6];
SafeArrayUnaccessData((SAFEARRAY *)*param_1);
HVar2 = 0;
}
}
}
return HVar2;
}
FUN_10015db2 at 10015db2
Signature: void * __thiscall FUN_10015db2(void * this, int * param_1, undefined4 param_2, undefined4 param_3, undefined4 param_4, undefined4 param_5, undefined4 param_6)
/* WARNING: Function: __EH_prolog3 replaced with injection: EH_prolog3 */
/* WARNING: Function: __EH_epilog3 replaced with injection: EH_epilog3 */
void * __thiscall
FUN_10015db2(void *this,int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
undefined4 param_5,undefined4 param_6)
{
*(undefined4 *)this = 1;
FUN_10015d38((void *)((int)this + 4),param_1);
*(undefined4 *)((int)this + 8) = 0;
*(undefined4 *)((int)this + 0x10) = param_2;
*(undefined4 *)((int)this + 0x14) = param_3;
*(undefined4 *)((int)this + 0x18) = param_4;
*(undefined4 *)((int)this + 0xc) = param_6;
*(undefined4 *)((int)this + 0x1c) = param_5;
*(undefined4 *)((int)this + 0x20) = 0;
return this;
}
FUN_10015e4e at 10015e4e
Signature: void * __thiscall FUN_10015e4e(void * this, int * param_1, undefined4 param_2, undefined4 param_3, undefined4 param_4, undefined4 param_5, undefined4 param_6)
/* WARNING: Function: __EH_prolog3 replaced with injection: EH_prolog3 */
/* WARNING: Function: __EH_epilog3 replaced with injection: EH_epilog3 */
void * __thiscall
FUN_10015e4e(void *this,int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
undefined4 param_5,undefined4 param_6)
{
*(undefined4 *)this = 2;
*(undefined4 *)((int)this + 4) = 0;
FUN_10015d38((void *)((int)this + 8),param_1);
*(undefined4 *)((int)this + 0x20) = 0;
*(undefined4 *)((int)this + 0x10) = param_2;
*(undefined4 *)((int)this + 0x14) = param_3;
*(undefined4 *)((int)this + 0x18) = param_4;
*(undefined4 *)((int)this + 0xc) = param_6;
*(undefined4 *)((int)this + 0x1c) = param_5;
return this;
}