fe2a6db786
rust / build / test / clippy / fmt (push) Has been cancelled
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>
316 lines
8.3 KiB
Markdown
316 lines
8.3 KiB
Markdown
# LmxProxy.dll selected decompile
|
|
|
|
## FUN_1000f663 at 1000f663
|
|
|
|
Signature: `undefined __thiscall FUN_1000f663(void * this, undefined4 * param_1, int * param_2)`
|
|
|
|
```c
|
|
|
|
void __thiscall FUN_1000f663(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_1000d781(this,param_2);
|
|
if ((piVar2 == *(int **)((int)this + 4)) || (*piVar1 < piVar2[3])) {
|
|
local_8 = *(int **)((int)this + 4);
|
|
ppiVar3 = &local_8;
|
|
}
|
|
else {
|
|
ppiVar3 = ¶m_2;
|
|
}
|
|
*param_1 = *ppiVar3;
|
|
return;
|
|
}
|
|
|
|
|
|
```
|
|
|
|
## FUN_1000fa3b at 1000fa3b
|
|
|
|
Signature: `undefined4 __thiscall FUN_1000fa3b(void * this, int param_1, int param_2, int * param_3, int * param_4)`
|
|
|
|
```c
|
|
|
|
undefined4 __thiscall FUN_1000fa3b(void *this,int param_1,int param_2,int *param_3,int *param_4)
|
|
|
|
{
|
|
void *pvVar1;
|
|
basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> bVar2;
|
|
basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *pbVar3;
|
|
wchar_t *pwVar4;
|
|
int iVar5;
|
|
wchar_t *pwVar6;
|
|
_func_basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>_ptr_basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>_ptr
|
|
*p_Var7;
|
|
void *local_8;
|
|
|
|
local_8 = this;
|
|
FUN_1000f663((void *)((int)this + 0x2c),&local_8,¶m_1);
|
|
pvVar1 = local_8;
|
|
if (local_8 == *(void **)((int)this + 0x30)) {
|
|
bVar2 = FUN_10003f01(*(basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> **)
|
|
(DAT_100294e0 + 0xc));
|
|
if (bVar2 == (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>)0x0) {
|
|
return 0x80070057;
|
|
}
|
|
pwVar4 = L"CLMXProxyServer::VerifyItemValid - hLMXServer ";
|
|
iVar5 = param_1;
|
|
}
|
|
else {
|
|
*param_3 = (int)local_8 + 0x10;
|
|
FUN_1000f5ef((void *)((int)local_8 + 0x3c),¶m_1,¶m_2);
|
|
if (param_1 != *(int *)((int)pvVar1 + 0x40)) {
|
|
*param_4 = param_1;
|
|
return 0;
|
|
}
|
|
bVar2 = FUN_10003f01(*(basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> **)
|
|
(DAT_100294e0 + 0xc));
|
|
if (bVar2 == (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>)0x0) {
|
|
return 0x80070057;
|
|
}
|
|
pwVar4 = L"CLMXProxyServer::VerifyItemValid - hItem ";
|
|
iVar5 = param_2;
|
|
}
|
|
pwVar6 = L" not found.";
|
|
p_Var7 = endl_exref;
|
|
pbVar3 = (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *)
|
|
FUN_10002dbf(*(int **)(DAT_100294e0 + 0xc),pwVar4);
|
|
pbVar3 = std::basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>::operator<<(pbVar3,iVar5);
|
|
pbVar3 = (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *)
|
|
FUN_10002dbf((int *)pbVar3,pwVar6);
|
|
std::basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>::operator<<(pbVar3,p_Var7);
|
|
return 0x80070057;
|
|
}
|
|
|
|
|
|
```
|
|
|
|
## FUN_1000f9b6 at 1000f9b6
|
|
|
|
Signature: `int __cdecl FUN_1000f9b6(undefined4 param_1, undefined4 param_2, undefined4 param_3, undefined4 param_4, undefined4 param_5)`
|
|
|
|
```c
|
|
|
|
int __cdecl
|
|
FUN_1000f9b6(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
|
|
undefined4 param_5)
|
|
|
|
{
|
|
undefined4 *puVar1;
|
|
undefined4 uVar2;
|
|
int iVar3;
|
|
|
|
iVar3 = -0x7fffbffb;
|
|
puVar1 = operator_new(0x18);
|
|
if (puVar1 == (undefined4 *)0x0) {
|
|
puVar1 = (undefined4 *)0x0;
|
|
}
|
|
else {
|
|
puVar1 = FUN_1000e607(puVar1);
|
|
}
|
|
uVar2 = FUN_1000f816((undefined4 *)(uint)(puVar1 != (undefined4 *)0x0),0x46,
|
|
"d:\\bldsrc\\6\\s\\src\\lmxproxy\\mxcallback.h");
|
|
if ((char)uVar2 != '\0') {
|
|
puVar1[3] = param_1;
|
|
puVar1[4] = param_2;
|
|
puVar1[5] = param_3;
|
|
iVar3 = (**(code **)*puVar1)(puVar1,&DAT_1001c3a0,param_4);
|
|
if ((iVar3 == 0) && (iVar3 = (**(code **)*puVar1)(puVar1,&DAT_1001c480,param_5), iVar3 == 0)) {
|
|
return 0;
|
|
}
|
|
operator_delete(puVar1);
|
|
}
|
|
return iVar3;
|
|
}
|
|
|
|
|
|
```
|
|
|
|
## FUN_1000fb02 at 1000fb02
|
|
|
|
Signature: `undefined4 __thiscall FUN_1000fb02(void * this, int param_1, int param_2, int * param_3, int * param_4)`
|
|
|
|
```c
|
|
|
|
undefined4 __thiscall FUN_1000fb02(void *this,int param_1,int param_2,int *param_3,int *param_4)
|
|
|
|
{
|
|
basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> bVar1;
|
|
int iVar2;
|
|
undefined4 uVar3;
|
|
basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *this_00;
|
|
_func_basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>_ptr_basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>_ptr
|
|
*p_Var4;
|
|
int local_8;
|
|
|
|
local_8 = 0;
|
|
iVar2 = FUN_1000fa3b(this,param_1,param_2,param_3,&local_8);
|
|
if ((iVar2 < 0) || (*(char *)(local_8 + 0x1c) == '\0')) {
|
|
bVar1 = FUN_10003f01(*(basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> **)
|
|
(DAT_100294e0 + 0xc));
|
|
if (bVar1 != (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>)0x0) {
|
|
p_Var4 = endl_exref;
|
|
this_00 = (basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_> *)
|
|
FUN_10002dbf(*(int **)(DAT_100294e0 + 0xc),
|
|
L"CLMXProxyServer::VerifyAdvisedItem - returning E_INVALIDARG");
|
|
std::basic_ostream<wchar_t,struct_std::char_traits<wchar_t>_>::operator<<(this_00,p_Var4);
|
|
}
|
|
uVar3 = 0x80070057;
|
|
}
|
|
else {
|
|
*param_4 = local_8 + 0x10;
|
|
uVar3 = 0;
|
|
}
|
|
return uVar3;
|
|
}
|
|
|
|
|
|
```
|
|
|
|
## FUN_1000f743 at 1000f743
|
|
|
|
Signature: `void * __cdecl FUN_1000f743(void * param_1, undefined4 * param_2, CComBSTR * param_3)`
|
|
|
|
```c
|
|
|
|
/* WARNING: Function: __EH_prolog3 replaced with injection: EH_prolog3 */
|
|
/* WARNING: Function: __EH_epilog3 replaced with injection: EH_epilog3 */
|
|
|
|
void * __cdecl FUN_1000f743(void *param_1,undefined4 *param_2,CComBSTR *param_3)
|
|
|
|
{
|
|
FUN_1000ef29(param_1,param_2,param_3);
|
|
return param_1;
|
|
}
|
|
|
|
|
|
```
|
|
|
|
## FUN_1000ffa9 at 1000ffa9
|
|
|
|
Signature: `int __thiscall FUN_1000ffa9(void * this, undefined4 * param_1)`
|
|
|
|
```c
|
|
|
|
/* WARNING: Function: __EH_prolog3_catch replaced with injection: EH_prolog3 */
|
|
/* WARNING: Function: __EH_epilog3 replaced with injection: EH_epilog3 */
|
|
|
|
int __thiscall FUN_1000ffa9(void *this,undefined4 *param_1)
|
|
|
|
{
|
|
int iVar1;
|
|
|
|
iVar1 = FUN_1000e196((int)this);
|
|
FUN_1000f796((int)this + 0xd,(void *)(iVar1 + 0xc),param_1);
|
|
return iVar1;
|
|
}
|
|
|
|
|
|
```
|
|
|
|
## FUN_100104d1 at 100104d1
|
|
|
|
Signature: `undefined __thiscall FUN_100104d1(void * this, undefined4 * param_1, int * param_2, char param_3)`
|
|
|
|
```c
|
|
|
|
void __thiscall FUN_100104d1(void *this,undefined4 *param_1,int *param_2,char param_3)
|
|
|
|
{
|
|
int *piVar1;
|
|
int *piVar2;
|
|
undefined4 *puVar3;
|
|
int *piVar4;
|
|
bool local_8;
|
|
|
|
piVar1 = *(int **)((int)this + 4);
|
|
local_8 = true;
|
|
piVar4 = piVar1;
|
|
if (*(char *)(piVar1[1] + 0x2d) == '\0') {
|
|
piVar2 = (int *)piVar1[1];
|
|
do {
|
|
piVar4 = piVar2;
|
|
if (param_3 == '\0') {
|
|
local_8 = param_2[3] < piVar4[3];
|
|
}
|
|
else {
|
|
local_8 = param_2[3] <= piVar4[3];
|
|
}
|
|
if (local_8 == false) {
|
|
piVar2 = (int *)piVar4[2];
|
|
}
|
|
else {
|
|
piVar2 = (int *)*piVar4;
|
|
}
|
|
} while (*(char *)((int)piVar2 + 0x2d) == '\0');
|
|
}
|
|
_param_3 = piVar4;
|
|
if (local_8 != false) {
|
|
if (piVar4 == (int *)*piVar1) {
|
|
local_8 = true;
|
|
goto LAB_10010530;
|
|
}
|
|
FUN_1000cce7((int *)¶m_3);
|
|
}
|
|
piVar1 = _param_3;
|
|
if (param_2[3] <= _param_3[3]) {
|
|
FUN_1000eef5(param_2 + 3,0);
|
|
operator_delete(param_2);
|
|
*param_1 = piVar1;
|
|
*(undefined1 *)(param_1 + 1) = 0;
|
|
return;
|
|
}
|
|
LAB_10010530:
|
|
puVar3 = (undefined4 *)FUN_1000fe75(this,(undefined4 *)¶m_3,local_8,piVar4,param_2);
|
|
*param_1 = *puVar3;
|
|
*(undefined1 *)(param_1 + 1) = 1;
|
|
return;
|
|
}
|
|
|
|
|
|
```
|
|
|
|
## FUN_1000dcbb at 1000dcbb
|
|
|
|
Signature: `void * __thiscall FUN_1000dcbb(void * this, OLECHAR * param_1, undefined4 param_2)`
|
|
|
|
```c
|
|
|
|
/* WARNING: Function: __EH_prolog3 replaced with injection: EH_prolog3 */
|
|
/* WARNING: Function: __EH_epilog3 replaced with injection: EH_epilog3 */
|
|
|
|
void * __thiscall FUN_1000dcbb(void *this,OLECHAR *param_1,undefined4 param_2)
|
|
|
|
{
|
|
BSTR pOVar1;
|
|
|
|
if (param_1 == (OLECHAR *)0x0) {
|
|
*(undefined4 *)this = 0;
|
|
}
|
|
else {
|
|
pOVar1 = SysAllocString(param_1);
|
|
*(BSTR *)this = pOVar1;
|
|
if (pOVar1 == (BSTR)0x0) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_1000134e(0x8007000e);
|
|
}
|
|
}
|
|
*(undefined4 *)((int)this + 4) = param_2;
|
|
*(undefined4 *)((int)this + 8) = 0;
|
|
*(undefined4 *)((int)this + 0xc) = 0;
|
|
*(undefined4 *)((int)this + 0x10) = 0;
|
|
*(undefined4 *)((int)this + 0x14) = 0;
|
|
*(undefined1 *)((int)this + 0x18) = 0;
|
|
return this;
|
|
}
|
|
|
|
|
|
```
|
|
|