Files
mxaccess/analysis/ghidra/exports/LmxProxy.dll.item-record-decompile.md
T
Joseph Doherty fe2a6db786
rust / build / test / clippy / fmt (push) Has been cancelled
Initial project state: .NET reference, design, Rust port (M0+M1), evidence
Layout:
- src/                    .NET 10 x64 reference: MxNativeCodec, MxNativeClient,
                          MxAsbClient, probes, tests, harnesses. Executable spec.
- design/                 Architectural plan for the Rust port (M0–M6), error
                          model, protocol invariants, risks (R1–R16), adversarial
                          review log (review.md).
- rust/                   Rust workspace. M0 skeleton + M1 codec parity.
                          mxaccess-codec: 215 unit tests + 2 cross-implementation
                          parity tests (byte-identical against .NET reference).
                          Other crates are M0 stubs awaiting M2+.
- captures/               Frida + netsh + pcap evidence per CLAUDE.md
                          ("captures are evidence, not throwaway logs").
- analysis/               Decompiled C# (frida/proxy/decompiled-*),
                          Ghidra exports for native DLLs (`exports/` only —
                          working state at `projects/` and AVEVA's input
                          binaries at `input/` are gitignored).
- docs/                   Reverse-engineering reference docs.
- tools/                  Setup-LiveProbeEnv.ps1 (Infisical credential fetcher),
                          Compute-Crc.ps1 (.NET parity helper).
- .github/workflows/      Rust CI: fmt + build + test + clippy on Windows.
- LICENSE                 MIT (Joseph Doherty, 2026).

Verified:
- cargo test --workspace → 217 passed (215 unit + 2 .NET parity), 0 failed
- cargo clippy --workspace -- -D warnings → clean
- cargo fmt --all -- --check → clean
- cargo publish --dry-run -p mxaccess-codec → packages cleanly

Excluded from history (see .gitignore):
- **/bin, **/obj, **/target — build artifacts
- analysis/ghidra/projects/ — Ghidra working state (regenerable)
- analysis/ghidra/input/ — AVEVA proprietary DLLs (vendor IP)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 06:21:00 -04:00

7.9 KiB

LmxProxy.dll selected decompile

FUN_1000ef29 at 1000ef29

Signature: void * __thiscall FUN_1000ef29(void * this, undefined4 * param_1, CComBSTR * param_2)


/* WARNING: Function: __EH_prolog3 replaced with injection: EH_prolog3 */
/* WARNING: Function: __EH_epilog3 replaced with injection: EH_epilog3 */

void * __thiscall FUN_1000ef29(void *this,undefined4 *param_1,CComBSTR *param_2)

{
  *(undefined4 *)this = *param_1;
  FUN_1000e20b((void *)((int)this + 4),param_2);
  return this;
}


FUN_1000f5ef at 1000f5ef

Signature: undefined __thiscall FUN_1000f5ef(void * this, undefined4 * param_1, int * param_2)


void __thiscall FUN_1000f5ef(void *this,undefined4 *param_1,int *param_2)

{
  int *piVar1;
  int *piVar2;
  int **ppiVar3;
  int *local_8;
  
  piVar1 = param_2;
  local_8 = this;
  piVar2 = FUN_1000d755(this,param_2);
  if ((piVar2 == *(int **)((int)this + 4)) || (*piVar1 < piVar2[3])) {
    local_8 = *(int **)((int)this + 4);
    ppiVar3 = &local_8;
  }
  else {
    ppiVar3 = &param_2;
  }
  *param_1 = *ppiVar3;
  return;
}


FUN_1000d781 at 1000d781

Signature: undefined4 * __thiscall FUN_1000d781(void * this, int * param_1)


undefined4 * __thiscall FUN_1000d781(void *this,int *param_1)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  
  puVar2 = *(undefined4 **)((int)this + 4);
  if (*(char *)((int)puVar2[1] + 0x65) == '\0') {
    puVar1 = puVar2;
    puVar3 = (undefined4 *)puVar2[1];
    do {
      puVar2 = puVar3;
      if ((int)puVar2[3] < *param_1) {
        puVar3 = (undefined4 *)puVar2[2];
        puVar2 = puVar1;
      }
      else {
        puVar3 = (undefined4 *)*puVar2;
      }
      puVar1 = puVar2;
    } while (*(char *)((int)puVar3 + 0x65) == '\0');
  }
  return puVar2;
}


FUN_1000e607 at 1000e607

Signature: undefined4 * __fastcall FUN_1000e607(undefined4 * param_1)


undefined4 * __fastcall FUN_1000e607(undefined4 *param_1)

{
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[5] = 0;
  *param_1 = ATL::CComObject<class_CUserConnectionCallback>::vftable;
  param_1[1] = ATL::CComObject<class_CUserConnectionCallback>::vftable;
  (**(code **)(*DAT_100293dc + 4))();
  return param_1;
}


FUN_1000f816 at 1000f816

Signature: undefined4 __cdecl FUN_1000f816(undefined4 * param_1, int param_2, LPCSTR param_3)


/* WARNING: Function: __EH_prolog3 replaced with injection: EH_prolog3 */
/* WARNING: Function: __EH_epilog3 replaced with injection: EH_epilog3 */

undefined4 __cdecl FUN_1000f816(undefined4 *param_1,int param_2,LPCSTR param_3)

{
  basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> bVar1;
  basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *pbVar2;
  undefined3 extraout_var;
  int *piVar3;
  DWORD DVar4;
  undefined1 uVar5;
  wchar_t *pwVar6;
  int iVar7;
  wchar_t *pwVar8;
  wchar_t *pwVar9;
  _func_basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>_ptr_basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>_ptr
  *p_Var10;
  
  pbVar2 = (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *)&LAB_10019887;
  uVar5 = 0;
  if (param_1 == (undefined4 *)0x0) {
    bVar1 = FUN_10003f01(*(basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> **)
                          (DAT_100294e0 + 4));
    pbVar2 = (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *)
             CONCAT31(extraout_var,bVar1);
    if (bVar1 != (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>)0x0) {
      piVar3 = FUN_1000da1d(&param_1,param_3);
      if ((undefined4 *)*piVar3 == (undefined4 *)0x0) {
        pwVar6 = (wchar_t *)0x0;
      }
      else {
        pwVar6 = *(wchar_t **)*piVar3;
      }
      p_Var10 = endl_exref;
      DVar4 = GetLastError();
      pwVar9 = L" LAST ERROR ";
      pwVar8 = L" FILE ";
      iVar7 = param_2;
      pbVar2 = (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *)
               FUN_10002dbf(*(int **)(DAT_100294e0 + 4),L"INVARIANT FAILED LINE ");
      pbVar2 = std::basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>::operator<<
                         (pbVar2,iVar7);
      piVar3 = (int *)FUN_10002dbf((int *)pbVar2,pwVar8);
      piVar3 = (int *)FUN_10002dbf(piVar3,pwVar6);
      pbVar2 = (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *)
               FUN_10002dbf(piVar3,pwVar9);
      pbVar2 = std::basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>::operator<<
                         (pbVar2,DVar4);
      pbVar2 = std::basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>::operator<<
                         (pbVar2,p_Var10);
      if (param_1 != (undefined4 *)0x0) {
        pbVar2 = (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *)FUN_100038c3(param_1);
      }
    }
  }
  else {
    uVar5 = 1;
  }
  return CONCAT31((int3)((uint)pbVar2 >> 8),uVar5);
}


FUN_1000f796 at 1000f796

Signature: undefined __cdecl FUN_1000f796(undefined4 param_1, void * param_2, undefined4 * param_3)


void __cdecl FUN_1000f796(undefined4 param_1,void *param_2,undefined4 *param_3)

{
  FUN_1000f4c5(param_2,param_3);
  return;
}


FUN_1000e196 at 1000e196

Signature: undefined __fastcall FUN_1000e196(int param_1)


void __fastcall FUN_1000e196(int param_1)

{
  undefined4 *puVar1;
  
  puVar1 = FUN_1000d8df((char *)0x1);
  *puVar1 = *(undefined4 *)(param_1 + 4);
  puVar1[1] = *(undefined4 *)(param_1 + 4);
  puVar1[2] = *(undefined4 *)(param_1 + 4);
  *(undefined2 *)(puVar1 + 0xb) = 0;
  return;
}


FUN_1000fe75 at 1000fe75

Signature: undefined __thiscall FUN_1000fe75(void * this, undefined4 * param_1, char param_2, undefined4 * param_3, int * param_4)


void __thiscall
FUN_1000fe75(void *this,undefined4 *param_1,char param_2,undefined4 *param_3,int *param_4)

{
  int *piVar1;
  int *piVar2;
  int iVar3;
  int *piVar4;
  
  if (0x7fffffd < *(uint *)((int)this + 8)) {
    FUN_1000eef5(param_4 + 3,0);
    operator_delete(param_4);
                    /* WARNING: Subroutine does not return */
    std::_Xlength_error("map/set<T> too long");
  }
  *(uint *)((int)this + 8) = *(uint *)((int)this + 8) + 1;
  param_4[1] = (int)param_3;
  if (param_3 == *(undefined4 **)((int)this + 4)) {
    (*(undefined4 **)((int)this + 4))[1] = param_4;
    **(undefined4 **)((int)this + 4) = param_4;
    *(int **)(*(int *)((int)this + 4) + 8) = param_4;
  }
  else if (param_2 == '\0') {
    param_3[2] = param_4;
    if (param_3 == *(undefined4 **)(*(int *)((int)this + 4) + 8)) {
      *(int **)(*(int *)((int)this + 4) + 8) = param_4;
    }
  }
  else {
    *param_3 = param_4;
    if (param_3 == (undefined4 *)**(int **)((int)this + 4)) {
      **(int **)((int)this + 4) = (int)param_4;
    }
  }
  iVar3 = param_4[1];
  piVar4 = param_4;
  do {
    if (*(char *)(iVar3 + 0x2c) != '\0') {
      *(undefined1 *)(*(int *)(*(int *)((int)this + 4) + 4) + 0x2c) = 1;
      *param_1 = param_4;
      return;
    }
    piVar1 = (int *)piVar4[1];
    piVar2 = (int *)piVar1[1];
    if (piVar1 == (int *)*piVar2) {
      iVar3 = piVar2[2];
      if (*(char *)(iVar3 + 0x2c) == '\0') {
LAB_1000ff40:
        *(undefined1 *)(piVar1 + 0xb) = 1;
        *(undefined1 *)(iVar3 + 0x2c) = 1;
        *(undefined1 *)(*(int *)(piVar4[1] + 4) + 0x2c) = 0;
        piVar4 = *(int **)(piVar4[1] + 4);
      }
      else {
        if (piVar4 == (int *)piVar1[2]) {
          FUN_1000dea8(this,(int)piVar1);
          piVar4 = piVar1;
        }
        *(undefined1 *)(piVar4[1] + 0x2c) = 1;
        *(undefined1 *)(*(int *)(piVar4[1] + 4) + 0x2c) = 0;
        FUN_1000d6b4(this,*(int **)(piVar4[1] + 4));
      }
    }
    else {
      iVar3 = *piVar2;
      if (*(char *)(iVar3 + 0x2c) == '\0') goto LAB_1000ff40;
      if (piVar4 == (int *)*piVar1) {
        FUN_1000d6b4(this,piVar1);
        piVar4 = piVar1;
      }
      *(undefined1 *)(piVar4[1] + 0x2c) = 1;
      *(undefined1 *)(*(int *)(piVar4[1] + 4) + 0x2c) = 0;
      FUN_1000dea8(this,*(int *)(piVar4[1] + 4));
    }
    iVar3 = piVar4[1];
  } while( true );
}