Files
mxaccess/analysis/ghidra/exports/Lmx.dll.synthesizer-helpers2-decompile.md
T
Joseph Doherty c73a33edd8
rust / build / test / clippy / fmt (push) Has been cancelled
rust / cargo public-api drift check (F41) (push) Has been cancelled
[R3/R4 Path A] mxaccess: port Lmx.dll FUN_10100ce0 synthesizer kernel
Path A landed for R3/R4. The byte->MxStatus synthesizer in Lmx.dll is
FUN_10100ce0 (`analysis/ghidra/exports/Lmx.dll.synthesizer-helpers2-decompile.md`),
a 4-byte u32 LE -> 4-tuple MxStatus decoder used by every NMX-frame
parser in Lmx.dll. The kernel is byte-deterministic and context-free,
so it ports as a pure function -- the operation-tracking state
machine the original verdict deferred is NOT required for synthesis.

Bit layout (per FUN_10100ce0 lines 21-24):
  bit 31:        success    (-1 if set, 0 if clear)
  bits 27..24:   category   (4 bits)
  bits 23..20:   detected_by (4 bits)
  bits 15..0:    detail     (i16 -- low 16 bits, signed)
  bits 30..28, 19..16: reserved/padding

Codec changes:
- MxStatus::from_packed_u32() / ::to_packed_u32() -- the kernel +
  inverse for round-trip parity.
- MxStatus::from_nmx_response_code() -- the constructed-from-response-
  code switch in FUN_1010bd10:741-770 (six proven mappings: 0x01, 0x02
  -> CommunicationError + RequestingNmx; 0x03 -> ConfigurationError +
  RequestingNmx; 0x04 -> ConfigurationError + RespondingNmx; 0x05 ->
  CommunicationError + RespondingNmx; 0x1A -> CommunicationError +
  RequestingNmx).
- MxStatusCategory / MxStatusSource: from_i16/to_i16 promoted to const
  fn so MxStatus::from_packed_u32 can be const.
- NmxOperationStatusMessage::try_parse_process_data_received_body() --
  thin wrapper that peels the outer NmxObservedEnvelope before
  delegating to try_parse_inner. Mirrors
  NmxOperationStatusMessage.TryParseProcessDataReceivedBody (.NET cs:20-32).
- NmxOperationStatusMessage::promote_to_typed() -- entry point that
  returns the existing Status field. Documented as a no-op pass-through
  for now (the 5-byte inner-body wire shape is NOT the same field as
  the 4-byte packed-u32 the kernel decodes); kept for API symmetry.
- 22 new round-trip tests covering the kernel, the response-code
  switch, the proven 0x00/0x41/0xEF completion bytes, and round-trip
  for every canonical sentinel.

mxaccess (Session) changes:
- New OperationKind enum (Write/WriteSecured/Read/Subscribe/
  Unsubscribe/Activate/Suspend/Other).
- New OperationContext struct (correlation_id, op_kind, reference,
  retry_count) -- ground for the F54 follow-on per-operation
  correlation work.
- New OperationStatus event type {raw, status, context,
  is_during_recovery}, mirroring MxNativeOperationStatusEvent (cs:73-78)
  with the typed-MxStatus addition.
- Session::operation_status_events() -> broadcast::Receiver<Arc<
  OperationStatus>> + operation_status_stream() Stream variant.
- callback_router() now tries operation-status parsing first, falling
  through to subscription messages -- matches MxNativeSession
  .OnCallbackReceived dispatch order (cs:574,582,590).
- recover_connection() flips a recovery_active counter (Arc<AtomicU32>
  shared with the router) so OperationStatus.is_during_recovery is
  populated correctly. Mirrors MxNativeSession._recoveryActive
  Volatile.Read at cs:573.
- 3 new router tests covering: status-word frame dispatch + typed
  promotion to WriteCompleteOk; completion-only frames stay verbatim;
  is_during_recovery is stamped from the live counter.

Per-operation context tracking (correlating completion frames back to
outstanding writes/subscribes via the correlation_id) is filed as F54
in design/followups.md. The synthesizer kernel itself is byte-
deterministic, so the kernel and the correlation work are decoupled.

Ghidra evidence (the next-ring xref walk beyond FUN_10114a90):
- analysis/ghidra/exports/Lmx.dll.set-attribute-result-xrefs.md --
  xrefs to OnSetAttributeResult / CancelWithStatus / OperationComplete.
- analysis/ghidra/exports/Lmx.dll.vtable-data-xrefs.md -- vtable-slot
  data xrefs for the virtual-dispatch path.
- analysis/ghidra/exports/Lmx.dll.synthesizer-decompile.md --
  ScanOnDemandCallback::OperationComplete/MultipleOperationComplete
  (FUN_1010b990), RemotePlatformResolver::OperationComplete
  (FUN_1010dc80), and the constructed-from-responseCode synthesizer
  in FUN_1010bd10 (lines 698-770). FUN_1010bd10 is the wire-frame
  receiver that drives the synthesis.
- analysis/ghidra/exports/Lmx.dll.synthesizer-helpers-decompile.md --
  FUN_10003fc0 (the <success %d category %d ...> formatter; confirms
  the 4-tuple layout), FUN_1008f150 (dispatch helper).
- analysis/ghidra/exports/Lmx.dll.synthesizer-helpers2-decompile.md --
  FUN_10100ce0 (the kernel itself), FUN_10100bc0 (3xu16 reader),
  FUN_1005e580 (4-byte stream reader), FUN_1010ee00 (sister NMX-frame
  parser using the same kernel).
- analysis/ghidra/exports/Lmx.dll.synthesizer-callers-xrefs.md --
  caller graph; confirms the kernel is called from many wire-frame
  parsers but each parser shares the single 4-byte decoder.

R3/R4 verdict updated in design/70-risks-and-open-questions.md from
"settled at verbatim-preserve" to "settled per Path A". F54 filed in
design/followups.md for the per-operation correlation work.

cargo build / test / clippy -D warnings / RUSTDOCFLAGS=-D warnings doc
all clean. cargo public-api baselines regenerated for mxaccess and
mxaccess-codec.

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

63 KiB

Lmx.dll selected decompile

FUN_10100ce0 at 10100ce0

Signature: undefined FUN_10100ce0(void)


void FUN_10100ce0(short *param_1,int *param_2)

{
  int iVar1;
  
  iVar1 = (**(code **)(*param_2 + 0xc))(param_2,&param_2,4,0);
  if (iVar1 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_1005bf30(iVar1,0,
                 "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                 ,0x12);
  }
  *param_1 = -(ushort)(((uint)param_2 & 0x80000000) != 0);
  *(uint *)(param_1 + 2) = (uint)param_2 >> 0x18 & 0xf;
  *(uint *)(param_1 + 4) = (uint)param_2 >> 0x14 & 0xf;
  param_1[6] = (short)param_2;
  return;
}


FUN_10100bc0 at 10100bc0

Signature: undefined FUN_10100bc0(void)


void FUN_10100bc0(uint *param_1,int *param_2)

{
  int *piVar1;
  int iVar2;
  
  piVar1 = param_2;
  iVar2 = (**(code **)(*param_2 + 0xc))(param_2,&param_2,2,0);
  if (iVar2 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_1005bf30(iVar2,0,
                 "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                 ,0x12);
  }
  *param_1 = (uint)param_2 & 0xffff;
  iVar2 = (**(code **)(*piVar1 + 0xc))(piVar1,&param_2,2,0);
  if (iVar2 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_1005bf30(iVar2,0,
                 "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                 ,0x12);
  }
  param_1[1] = (uint)param_2 & 0xffff;
  iVar2 = (**(code **)(*piVar1 + 0xc))(piVar1,&param_2,2,0);
  if (iVar2 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_1005bf30(iVar2,0,
                 "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                 ,0x12);
  }
  param_1[2] = (uint)param_2 & 0xffff;
  return;
}


FUN_1005e580 at 1005e580

Signature: undefined FUN_1005e580(void)


void FUN_1005e580(undefined4 param_1,int *param_2)

{
  int iVar1;
  
  iVar1 = (**(code **)(*param_2 + 0xc))(param_2,param_1,4,0);
  if (iVar1 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_1005bf30(iVar1,0,
                 "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                 ,0x12);
  }
  return;
}


FUN_1010ee00 at 1010ee00

Signature: undefined FUN_1010ee00(void)


/* WARNING: Function: __alloca_probe replaced with injection: alloca_probe */

void __thiscall FUN_1010ee00(uint param_1,int *param_2,int *param_3,undefined4 *param_4)

{
  char cVar1;
  int iVar2;
  undefined4 uVar3;
  basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *pbVar4;
  int iVar5;
  undefined4 *puVar6;
  uint uVar7;
  int *piVar8;
  int extraout_EDX;
  code *pcVar9;
  BSTR pOVar10;
  int *piVar11;
  int **ppiVar12;
  _func_basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>_ptr_basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>_ptr
  *p_Var13;
  undefined4 uVar14;
  undefined2 uVar16;
  int *piVar15;
  BSTR *ppOVar17;
  undefined4 uVar18;
  undefined4 uVar19;
  uint uStack_2cd4;
  undefined1 auStack_2cc4 [64];
  undefined4 local_2c84;
  undefined4 local_2c80;
  undefined4 local_2c7c;
  undefined4 local_2c78;
  int *local_2c74;
  undefined4 local_2c70;
  undefined4 uStack_2c6c;
  int *local_2c68;
  undefined4 local_2c64;
  uint uStack_2c60;
  undefined4 local_2c5c;
  undefined4 local_2c58 [2];
  BSTR local_2c50;
  BSTR local_2c4c;
  int *local_2c48;
  int *local_2c44;
  undefined4 local_2c40;
  int *local_2c38;
  int *local_2c2c;
  undefined4 local_2c28;
  undefined1 *local_2c24;
  int local_2c20;
  uint local_2c1c;
  undefined1 local_2c15;
  undefined2 uStack_2c14;
  byte local_2c11;
  int *local_2c10;
  undefined4 *local_2c0c;
  BSTR local_2c08;
  int *local_2c04;
  uint local_2c00;
  undefined1 local_2bfc [2];
  undefined4 local_2bfa;
  undefined2 local_2bf6;
  undefined2 uStack_2bf4;
  undefined2 local_2bf2;
  undefined2 uStack_2bf0;
  undefined4 local_2bee;
  undefined2 local_2bea;
  undefined4 uStack_2be8;
  undefined4 uStack_2be4;
  int local_2be0;
  undefined4 uStack_2bdc;
  undefined4 local_2bd8;
  int *local_2bd4;
  undefined2 local_2bd0;
  undefined2 uStack_2bce;
  undefined2 local_2bcc;
  ushort uStack_2bca;
  undefined1 local_120 [48];
  short local_f0 [2];
  int local_ec;
  uint local_e8;
  short local_e4;
  undefined1 local_e0 [16];
  undefined1 local_d0 [2];
  undefined4 local_ce;
  undefined4 local_ca;
  undefined4 local_c6;
  undefined4 local_c2;
  undefined2 local_be;
  undefined *local_bc;
  undefined4 local_b8;
  undefined4 local_b4;
  undefined4 local_b0;
  undefined *local_ac;
  undefined4 local_a8;
  undefined4 local_a4;
  undefined4 local_a0;
  undefined1 local_9c [16];
  undefined **ppuStack_8c;
  undefined1 local_88 [4];
  void *pvStack_84;
  undefined **local_78;
  undefined1 local_74 [4];
  void *local_70;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  int local_50;
  int *local_4c;
  int local_48;
  int local_44;
  int local_40;
  int local_3c;
  undefined4 uStack_34;
  uint uStack_30;
  uint uStack_2c;
  int local_28;
  int local_24;
  uint local_20;
  int local_1c;
  uint local_18;
  undefined1 *local_14;
  void *local_10;
  undefined1 *puStack_c;
  int local_8;
  
  local_8 = 0xffffffff;
  puStack_c = &LAB_10172302;
  local_10 = ExceptionList;
  uStack_2cd4 = DAT_101d60b8 ^ (uint)&stack0xfffffffc;
  local_14 = (undefined1 *)&uStack_2cd4;
  ExceptionList = &local_10;
  local_2c68 = param_2;
  local_2c38 = param_3;
  local_2c0c = param_4;
  local_2bfc[0] = 0;
  local_2bfa = 0;
  local_2bf6 = 0;
  uStack_2bf4 = 0;
  local_2bf2 = 0;
  uStack_2bf0 = 0;
  local_2bee = 0;
  local_2bea = 0;
  local_2c00 = param_1;
  local_18 = uStack_2cd4;
  FUN_10005170();
  local_2c64 = 0xffffffff;
  local_2c84 = DAT_101d6504;
  local_2c80 = DAT_101d6508;
  local_d0[0] = 0;
  local_ce = 0;
  local_ca = 0;
  local_c6 = 0;
  local_c2 = 0;
  local_be = 0;
  local_ac = PTR_101a21c4;
  local_a8 = DAT_101a21c8;
  local_a4 = DAT_101a21cc;
  local_a0 = DAT_101a21d0;
  local_2c50 = (BSTR)0x0;
  local_2c4c = (BSTR)0x0;
  local_8._1_3_ = 0;
  local_8._0_1_ = 2;
  local_bc = PTR_101a21c4;
  local_b8 = DAT_101a21c8;
  local_b4 = DAT_101a21cc;
  local_b0 = DAT_101a21d0;
  local_2c5c = 0;
  local_2c58[0] = 0;
  local_2c7c = 0;
  local_2c78 = 0;
  iVar2 = (**(code **)(*param_2 + 0xc))(param_2,&local_2c11,1,0);
  if (iVar2 < 0) {
LAB_1010ef7a:
                    /* WARNING: Subroutine does not return */
    FUN_1005bf30(iVar2,0,
                 "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                 ,0x12);
  }
  local_2c10 = (int *)(uint)local_2c11;
  uVar19 = 0;
  uVar18 = 2;
  ppOVar17 = &local_2c08;
  piVar11 = param_2;
  iVar2 = (**(code **)(*param_2 + 0xc))(param_2,ppOVar17,2,0);
  if (iVar2 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_1005bf30(iVar2,0,
                 "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                 ,0x12);
  }
  local_2c1c = (uint)local_2c08 & 0xffff;
  cVar1 = FUN_100033c0(local_2c10,local_2c08,local_f0);
  if (cVar1 == '\0') {
    local_2c00 = (local_ec << 4 | local_e8) << 0x14 | -(uint)(local_f0[0] != 0) & 0x80000000 |
                 (int)local_e4;
    iVar2 = (**(code **)(*param_3 + 0x10))(param_3,&local_2c00,4,0);
    if (iVar2 < 0) {
LAB_1010f034:
                    /* WARNING: Subroutine does not return */
      FUN_1005bf30(iVar2,0,
                   "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                   ,0x19);
    }
    if (local_e4 == 0x17) {
      local_2c00 = FUN_10003390(local_2c10);
      local_2c00 = local_2c00 & 0xffff;
      iVar2 = (**(code **)(*param_3 + 0x10))(param_3,&local_2c00,2,0);
      if (iVar2 < 0) {
                    /* WARNING: Subroutine does not return */
        FUN_1005bf30(iVar2,0,
                     "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                     ,0x19);
      }
    }
    pcVar9 = SysFreeString_exref;
    local_8._0_1_ = 1;
    SysFreeString((BSTR)0x0);
    local_8 = (uint)local_8._1_3_ << 8;
    SysFreeString((BSTR)0x0);
    local_8 = 0xffffffff;
    if (local_2c74 != (int *)0x0) {
      (**(code **)(*local_2c74 + 8))(local_2c74);
    }
    goto LAB_10112114;
  }
  cVar1 = FUN_100408d0();
  if (cVar1 != '\0') {
    p_Var13 = endl_exref;
    uVar3 = FUN_1001db60(*(undefined4 *)(DAT_101d6474 + 0x18),param_1,L" GetRequest ",local_2c10,
                         L" (version ",local_2c08,L") from ",local_2c0c);
    uVar3 = FUN_1001a0e0(uVar3);
    uVar3 = FUN_100a68d0(uVar3);
    FUN_1001a0e0(uVar3);
    uVar3 = FUN_10022870();
    uVar3 = FUN_1001a0e0(uVar3);
    pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
             FUN_1001db00(uVar3);
    std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
              (pbVar4,p_Var13);
  }
  iVar2 = DAT_101d8c28;
  if ((int)(10000U - DAT_101d8c28) < 4) {
    memset(&DAT_101d6518 + DAT_101d8c28,0xfa,10000U - DAT_101d8c28);
    iVar2 = 0;
  }
  *(undefined2 *)(&DAT_101d6518 + iVar2) = 0x3333;
  *(undefined2 *)(&DAT_101d651a + iVar2) = 0x3333;
  iVar5 = iVar2 + 4;
  if ((int)(10000U - iVar5) < 1) {
    memset(&DAT_101d651c + iVar2,0xfa,10000U - iVar5);
    iVar5 = 0;
  }
  (&DAT_101d6518)[iVar5] = (char)local_2c10;
  DAT_101d8c28 = iVar5 + 1;
  if (((local_2c10 == (int *)0x0) || (local_2c10 == (int *)0x34)) ||
     (cVar1 = FUN_100029c0(local_2c10), cVar1 != '\0')) {
    FUN_10104e90(param_2,local_2bfc,local_2c10,&local_2c74,&local_2c64,&local_2c84,local_d0,
                 local_2c58,&local_ac,&local_2c50,&local_2c4c,&local_bc,&local_2c5c,&local_2c7c);
    goto LAB_1011202f;
  }
  if (local_2c10 == (int *)0x1c) {
    uVar19 = 0;
    uVar18 = 4;
    ppiVar12 = &local_2c04;
    iVar2 = (**(code **)(*param_2 + 0xc))(param_2,ppiVar12,4,0);
    if (iVar2 < 0) {
                    /* WARNING: Subroutine does not return */
      FUN_1005bf30(iVar2,0,
                   "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                   ,0x12);
    }
    FUN_10100ce0(local_9c,param_2);
    if (local_2c04 != (int *)0x0) {
      local_2c08 = (BSTR)0x0;
      local_8._0_1_ = 4;
      uVar3 = FUN_10030d80();
      FUN_1014ed80(local_9c,0,uVar3);
      puVar6 = (undefined4 *)FUN_10005170();
      local_8._0_1_ = 5;
      (**(code **)(*local_2c04 + 8))
                (0,*puVar6,0xffffffff,DAT_101d6504,DAT_101d6508,local_9c,local_2c08);
      local_8._0_1_ = 4;
      FUN_10005220();
      local_8 = CONCAT31(local_8._1_3_,3);
      SysFreeString(local_2c08);
    }
    local_8 = 2;
    FUN_10112046(ppiVar12,uVar18,uVar19);
    return;
  }
  if (local_2c10 == (int *)0x29) {
    local_2c2c = (int *)0x0;
    local_2c28 = (BSTR)0x0;
    FUN_10100d40(&local_2c2c,param_2);
    FUN_10100ce0(&local_28,param_2);
    FUN_100fd820(&local_2c04,&local_2c2c);
    if (local_2c04 != *(int **)(param_1 + 0x20c)) {
      local_50 = local_2c04[5];
      piVar11 = (int *)local_2c04[6];
      local_48 = local_2c04[7];
      local_44 = local_2c04[8];
      local_40 = local_2c04[9];
      local_3c = local_2c04[10];
      FUN_10036d40(&local_2c24,local_2c04);
      iVar2 = local_50;
      local_8 = CONCAT31(local_8._1_3_,7);
      if (piVar11 != (int *)0x0) {
        local_2c08 = (BSTR)0x0;
        local_8._0_1_ = 8;
        uVar18 = FUN_10030d80();
        FUN_1014ed80(&local_28,0,uVar18);
        puVar6 = (undefined4 *)FUN_10005170();
        local_8._0_1_ = 9;
        uVar18 = *puVar6;
        uVar3 = 0xffffffff;
        uVar19 = DAT_101d6504;
        (**(code **)(*piVar11 + 8))
                  (0,uVar18,0xffffffff,DAT_101d6504,DAT_101d6508,&local_28,local_2c08);
        local_8 = CONCAT31(local_8._1_3_,8);
        FUN_10005220();
        if (((char)local_3c != '\0') && (local_50 != 0)) {
          (**(code **)(*(int *)(local_50 + 4) + 4))();
        }
        local_8 = CONCAT31(local_8._1_3_,7);
        SysFreeString(local_2c08);
        local_8 = 2;
        FUN_10112046(uVar18,uVar3,uVar19);
        return;
      }
      if (((char)local_3c != '\0') && (local_50 != 0)) {
        if (*(int *)(local_50 + 200) != 0) {
          FUN_10067aa0(*(int *)(local_50 + 200),&local_28);
        }
        (**(code **)(*(int *)(iVar2 + 4) + 4))();
      }
      local_8 = 2;
      FUN_10112046(ppOVar17,uVar18,uVar19);
      return;
    }
    cVar1 = FUN_100408d0();
    if (cVar1 != '\0') {
      p_Var13 = endl_exref;
      uVar3 = FUN_1001db60(*(undefined4 *)(DAT_101d6474 + 0x18),param_1,
                           L" MxSetCallback2 ignored - Set-Id Key not found in pendingSetMap");
      pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
               FUN_1001a0e0(uVar3);
      std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
                (pbVar4,p_Var13);
      FUN_10112046(ppOVar17,uVar18,uVar19);
      return;
    }
code_r0x10112046:
    cVar1 = FUN_100029c0(local_2c10);
    if (cVar1 != '\0') goto LAB_1011205d;
  }
  else {
    if (local_2c10 == (int *)0x14) {
      FUN_1005e580(&local_2c20,param_2);
      FUN_1008cf70(local_88,param_2);
      puVar6 = local_2c0c;
      *(int *)(param_1 + 0x53c) = *(int *)(param_1 + 0x53c) + 1;
      if (local_2c20 != 0) {
        do {
          iVar2 = (**(code **)(*param_2 + 0xc))(param_2,&local_28,0x10,0);
          if (((iVar2 < 0) ||
              (iVar2 = (**(code **)(*param_2 + 0xc))(param_2,&local_2c08,4,0), iVar2 < 0)) ||
             (iVar2 = (**(code **)(*param_2 + 0xc))(param_2,&local_2c00,2,0), iVar2 < 0))
          goto LAB_1010ef7a;
          FUN_10005170();
          local_8._0_1_ = 0xb;
          uVar18 = 0x1010f5b4;
          piVar11 = local_2c2c;
          piVar15 = param_2;
          (**(code **)(*local_2c2c + 0x14))(local_2c2c,param_2);
          cVar1 = FUN_100408d0();
          if (cVar1 != '\0') {
            uVar19 = FUN_1001db60(*(undefined4 *)(DAT_101d6474 + 0x28),param_1,&DAT_1017b6e4);
            FUN_1001a0e0(uVar19);
          }
          cVar1 = FUN_10003340(local_2c08,local_2c2c,local_2c00,&local_28);
          if (cVar1 == '\0') {
            FUN_10031c20(8);
            local_8._0_1_ = 0xc;
            cVar1 = FUN_100408d0();
            if (cVar1 != '\0') {
              uVar19 = FUN_10047fe0(local_28,local_24,local_20,local_1c);
              pOVar10 = local_2c08;
              p_Var13 = endl_exref;
              pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
                       FUN_1001a0e0(*(undefined4 *)(DAT_101d6474 + 0x2c),
                                    L"AccessManager::ProcessNmxRequest - canceling subscription cacheIndex "
                                    ,local_2c08,L" guid ",uVar19);
              pbVar4 = std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::
                       operator<<(pbVar4,(long)pOVar10);
              uVar19 = FUN_1001a0e0(pbVar4);
              pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
                       FUN_1001a0e0(uVar19);
              std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::
              operator<<(pbVar4,p_Var13);
            }
            local_2c11 = 0x12;
            iVar2 = (*(code *)local_78[4])(&local_78,&local_2c11,1,0);
            if (iVar2 < 0) goto LAB_1010f034;
            uVar7 = FUN_10003390(0x12);
            local_2c04 = (int *)(uVar7 & 0xffff);
            iVar2 = (*(code *)local_78[4])(&local_78,&local_2c04,2,0);
            if (((iVar2 < 0) ||
                (iVar2 = (*(code *)local_78[4])(&local_78,&local_2c08,4,0), iVar2 < 0)) ||
               (iVar2 = (*(code *)local_78[4])(&local_78,&local_28,0x10,0), iVar2 < 0))
            goto LAB_1010f034;
            FUN_1010ad00(0,puVar6,0x12,&local_78,0,2,0,0,0,0,0);
            local_8._0_1_ = 0xb;
            local_78 = FastStream::vftable;
            if (local_70 != (void *)0x0) {
              free(local_70);
            }
          }
          local_2c20 = local_2c20 + -1;
          local_8._0_1_ = 2;
          if (local_2c2c != (int *)0x0) {
            (**(code **)(*local_2c2c + 8))(local_2c2c);
          }
          SysFreeString(local_2c28);
          if (local_2c20 == 0) {
            FUN_10112046(uVar18,piVar11,piVar15);
            return;
          }
        } while( true );
      }
      goto code_r0x10112046;
    }
    if ((local_2c10 == (int *)0x1e) || (local_2c10 == (int *)0x1d)) {
      FUN_1005e580(&local_2c1c,param_2);
      FUN_1008cf70(&local_2bd8,param_2);
      piVar11 = local_2c10;
      if (local_2c10 == (int *)0x1d) {
        FUN_1008cf70(&local_28,param_2);
      }
      else {
        local_28 = *(int *)(param_1 + 0x1f0);
        local_24 = *(int *)(param_1 + 500);
        local_20 = *(undefined4 *)(param_1 + 0x1f8);
        local_1c = *(undefined4 *)(param_1 + 0x1fc);
      }
      *(int *)(param_1 + 0x53c) = *(int *)(param_1 + 0x53c) + 1;
      FUN_10005170();
      puVar6 = local_2c0c;
      local_8._0_1_ = 0xd;
      local_2c24 = (undefined1 *)CONCAT31(local_2c24._1_3_,piVar11 == (int *)0x1d);
      for (; local_2c1c != 0; local_2c1c = local_2c1c - 1) {
        iVar2 = (**(code **)(*param_2 + 0xc))(param_2,&local_2c04,4,0);
        if ((iVar2 < 0) ||
           (iVar2 = (**(code **)(*param_2 + 0xc))(param_2,&uStack_2c6c,2,0), iVar2 < 0))
        goto LAB_1010ef7a;
        (**(code **)(*local_2c2c + 0x14))(local_2c2c,param_2);
        cVar1 = FUN_100408d0();
        if (cVar1 != '\0') {
          uVar18 = FUN_1001db60(*(undefined4 *)(DAT_101d6474 + 0x28),param_1,&DAT_1017b6e4);
          FUN_1001a0e0(uVar18);
        }
        cVar1 = FUN_1004da60(local_2c04,local_2c2c,uStack_2c6c,&local_2bd8,local_2c24,&local_28);
        if (cVar1 == '\0') {
          FUN_10031c20(8);
          local_8._0_1_ = 0xe;
          cVar1 = FUN_100408d0();
          if (cVar1 != '\0') {
            uVar18 = FUN_10047fe0(local_2bd8,local_2bd4,CONCAT22(uStack_2bce,local_2bd0),
                                  CONCAT22(uStack_2bca,local_2bcc));
            piVar11 = local_2c04;
            p_Var13 = endl_exref;
            pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
                     FUN_1001a0e0(*(undefined4 *)(DAT_101d6474 + 0x2c),
                                  L"AccessManager::ProcessNmxRequest - canceling subscription cacheIndex "
                                  ,local_2c04,L"publisher guid ",uVar18);
            pbVar4 = std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::
                     operator<<(pbVar4,(long)piVar11);
            uVar18 = FUN_1001a0e0(pbVar4);
            pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
                     FUN_1001a0e0(uVar18);
            std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
                      (pbVar4,p_Var13);
          }
          local_2c11 = 0x23;
          iVar2 = (*(code *)ppuStack_8c[4])(&ppuStack_8c,&local_2c11,1,0);
          if (iVar2 < 0) goto LAB_1010f034;
          uStack_2c60 = FUN_10003390(0x23);
          uStack_2c60 = uStack_2c60 & 0xffff;
          iVar2 = (*(code *)ppuStack_8c[4])(&ppuStack_8c,&uStack_2c60,2,0);
          if (((iVar2 < 0) ||
              (iVar2 = (*(code *)ppuStack_8c[4])(&ppuStack_8c,&local_2c04,4,0), iVar2 < 0)) ||
             (iVar2 = (*(code *)ppuStack_8c[4])(&ppuStack_8c,&local_28,0x10,0), iVar2 < 0))
          goto LAB_1010f034;
          FUN_1010ad00(0,puVar6,0x23,&ppuStack_8c,0,2,0,0,0,0,0);
          local_8._0_1_ = 0xd;
          ppuStack_8c = FastStream::vftable;
          if (pvStack_84 != (void *)0x0) {
            free(pvStack_84);
          }
        }
      }
LAB_10112020:
      local_8._0_1_ = 2;
      FUN_10005220();
    }
    else {
      if ((local_2c10 == (int *)0x32) || (local_2c10 == (int *)0x33)) {
        FUN_1005e580(&local_2c1c,param_2);
        FUN_1008cf70(&local_2bd8,param_2);
        piVar11 = local_2c10;
        if (local_2c10 == (int *)0x32) {
          FUN_1008cf70(&local_28,param_2);
        }
        else {
          local_28 = *(int *)(param_1 + 0x1f0);
          local_24 = *(int *)(param_1 + 500);
          local_20 = *(undefined4 *)(param_1 + 0x1f8);
          local_1c = *(undefined4 *)(param_1 + 0x1fc);
        }
        *(int *)(param_1 + 0x53c) = *(int *)(param_1 + 0x53c) + 1;
        FUN_10005170();
        puVar6 = local_2c0c;
        local_8._0_1_ = 0xf;
        local_2c24 = (undefined1 *)CONCAT31(local_2c24._1_3_,piVar11 == (int *)0x32);
        if (local_2c1c != 0) {
          do {
            local_2c00 = 0;
            FUN_1005e580(&local_2c04,param_2);
            if (local_2c10 == (int *)0x32) {
              FUN_101004c0(&local_2c00,param_2);
            }
            FUN_1005e550(&uStack_2c6c,param_2);
            FUN_101006e0(&local_2be0,param_2);
            (**(code **)(*local_2c2c + 0x14))(local_2c2c,param_2);
            cVar1 = FUN_100408d0();
            if (cVar1 != '\0') {
              uVar18 = FUN_1001db60(*(undefined4 *)(DAT_101d6474 + 0x28),param_1,&DAT_1017b6e4);
              FUN_1001a0e0(uVar18);
            }
            cVar1 = FUN_1004de70(local_2c04,local_2c00,local_2c2c,uStack_2c6c,local_2be0,uStack_2bdc
                                 ,&local_2bd8,local_2c24,&local_28);
            if (cVar1 == '\0') {
              FUN_10031c20(8);
              local_8 = CONCAT31(local_8._1_3_,0x10);
              cVar1 = FUN_100408d0();
              if (cVar1 != '\0') {
                uVar18 = FUN_10047fe0(local_2bd8,local_2bd4,CONCAT22(uStack_2bce,local_2bd0),
                                      CONCAT22(uStack_2bca,local_2bcc));
                piVar11 = local_2c04;
                p_Var13 = endl_exref;
                pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
                         FUN_1001a0e0(*(undefined4 *)(DAT_101d6474 + 0x2c),
                                      L"AccessManager::ProcessNmxRequest - canceling subscription cacheIndex "
                                      ,local_2c04,L"publisher guid ",uVar18);
                pbVar4 = std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>
                         ::operator<<(pbVar4,(long)piVar11);
                uVar18 = FUN_1001a0e0(pbVar4);
                pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
                         FUN_1001a0e0(uVar18);
                std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::
                operator<<(pbVar4,p_Var13);
              }
              FUN_10060d10(0x23,&local_4c);
              uStack_2c60 = FUN_10003390(0x23);
              uStack_2c60 = uStack_2c60 & 0xffff;
              FUN_10063d90(&uStack_2c60,&local_4c);
              FUN_1008cfd0(&local_2c04,&local_4c);
              FUN_1005e4c0(&local_28,&local_4c);
              FUN_1010ad00(0,puVar6,0x23,&local_4c,0,2,0,0,0,0,0);
              local_8._0_1_ = 0xf;
              FUN_10005840();
            }
            local_2c1c = local_2c1c - 1;
          } while (local_2c1c != 0);
          local_2c1c = 0;
        }
        goto LAB_10112020;
      }
      if (local_2c10 == (int *)0xc) {
        FUN_1005f4f0();
        local_8._0_1_ = 0x11;
        piVar15 = param_2;
        (**(code **)(*local_4c + 0x14))(local_4c,param_2);
        FUN_10100710(&local_2c08,param_2);
        iVar2 = *(int *)(param_1 + 0x168);
        piVar8 = (int *)FUN_100dca80(&local_2c24,&local_2c08);
        if (*piVar8 != iVar2) {
          FUN_101417d0(local_4c);
          local_8 = CONCAT31(local_8._1_3_,2);
          FUN_10021cc0();
          FUN_10112046(piVar15,piVar11,ppOVar17);
          return;
        }
        cVar1 = FUN_100408d0();
        if (cVar1 != '\0') {
          p_Var13 = endl_exref;
          pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
                   FUN_1001a0e0(*(undefined4 *)(DAT_101d6474 + 0x38),
                                L"AccessManager::ProcessNmxRequest - MxResolveOnPlatformResults failed to find reference "
                               );
          pbVar4 = std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::
                   operator<<(pbVar4,local_2c08);
          std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
                    (pbVar4,p_Var13);
        }
        local_8 = CONCAT31(local_8._1_3_,2);
        FUN_10021cc0();
        FUN_10112046(piVar15,piVar11,ppOVar17);
        return;
      }
      if (local_2c10 == (int *)0xd) {
        FUN_1005f4f0();
        local_8._0_1_ = 0x12;
        piVar15 = param_2;
        (**(code **)(*local_4c + 0x14))(local_4c,param_2);
        FUN_1005e580(&local_2c00,param_2);
        local_2c24 = operator_new(0x48);
        local_8._0_1_ = 0x13;
        if (local_2c24 != (undefined1 *)0x0) {
          FUN_1010d9a0(local_4c,*local_2c0c,local_2c0c[1],local_2c0c[2],local_2c00,param_1);
        }
        local_8 = CONCAT31(local_8._1_3_,2);
        FUN_10021cc0();
        FUN_10112046(piVar15,piVar11,ppOVar17);
        return;
      }
      if (local_2c10 == (int *)0xe) {
        FUN_1005f4f0();
        local_8 = CONCAT31(local_8._1_3_,0x14);
        piVar15 = param_2;
        (**(code **)(*local_4c + 0x14))(local_4c,param_2);
        FUN_101004c0(&local_2c00,param_2);
        FUN_100fd610(&local_2c04,&local_2c00);
        if (local_2c04 != *(int **)(param_1 + 0x3d4)) {
          FUN_1009f440(local_4c,local_2c0c[1]);
        }
        local_8 = CONCAT31(local_8._1_3_,2);
        FUN_10021cc0();
        FUN_10112046(piVar15,piVar11,ppOVar17);
        return;
      }
      if (local_2c10 == (int *)0x9) {
        FUN_1008cf70(local_9c,param_2);
        FUN_1008cf70(local_88,param_2);
        iVar2 = FUN_10001050(param_1 + 0x1f0,local_9c);
        if (iVar2 == 0) {
          local_2bd8 = (uint)local_2bd8._2_2_ << 0x10;
          local_24 = 5;
        }
        else {
          local_2bd8 = CONCAT22(local_2bd8._2_2_,0xffff);
          local_24 = 0;
        }
        local_20 = (uint)(iVar2 == 0);
        local_2bcc = 0;
        local_1c = (uint)uStack_2bca << 0x10;
        local_28 = local_2bd8;
        FUN_1005fd00(&local_28,param_3);
        FUN_10112046(ppOVar17,uVar18,uVar19);
        return;
      }
      if ((local_2c10 != (int *)0x5) && (local_2c10 != (int *)0x6)) {
        if ((local_2c10 == (int *)0x1f) ||
           ((local_2c10 == (int *)0x2f || (local_2c10 == (int *)0x21)))) {
          local_2c00 = 0;
          FUN_1008cf70(&local_28,param_2);
          *(int *)(param_1 + 0x584) = local_28;
          *(int *)(param_1 + 0x588) = local_24;
          *(uint *)(param_1 + 0x58c) = local_20;
          *(int *)(param_1 + 0x590) = local_1c;
          if ((local_2c10 == (int *)0x1f) || (local_2c10 == (int *)0x2f)) {
            FUN_1005e550((short *)(param_1 + 0x594),param_2);
            if (*(short *)(param_1 + 0x594) == 0) {
              *(undefined2 *)(param_1 + 0x596) = 0;
              *(undefined4 *)(param_1 + 0x598) = 0;
            }
            else {
              FUN_1005e550(param_1 + 0x596,param_2);
              FUN_1005e580(param_1 + 0x598,param_2);
            }
          }
          piVar11 = local_2c10;
          piVar15 = param_2;
          FUN_1005d1d0(&uStack_2c14,param_2);
          uVar16 = (undefined2)((uint)piVar15 >> 0x10);
          FUN_1005d1d0(&local_2c00,param_2);
          FUN_101004f0(&local_2bd4,param_2);
          FUN_1005e580(&local_2c04,param_2);
          if ((piVar11 == (int *)0x1f) || (piVar11 == (int *)0x2f)) {
            local_64 = PTR_101a21c4;
            local_60 = DAT_101a21c8;
            local_5c = DAT_101a21cc;
            local_58 = DAT_101a21d0;
            FUN_10128820(&uStack_2be8,local_2c0c,local_2c04,uStack_2c14,local_2c00,&local_2bd4,
                         &local_28,&local_64,piVar11,param_1 + 0x594);
            piVar11 = local_2c38;
            FUN_1005fd00(&uStack_2be8,local_2c38);
            uStack_2c = (uint)*(ushort *)(param_1 + 0x2ac);
            uStack_30 = (uint)*(ushort *)(param_1 + 0x2ae);
            uStack_34 = 1;
            FUN_10100c50(&uStack_34,piVar11);
            FUN_1008cfd0(&DAT_101d60ec,piVar11);
            FUN_1005e4c0(&local_64,piVar11);
            FUN_1005e4c0(&local_28,piVar11);
            iVar2 = FUN_10001050(&local_64,&PTR_101a21c4);
            if ((iVar2 != 0) && (cVar1 = FUN_100408d0(), cVar1 != '\0')) {
              uVar18 = FUN_10003fc0(uStack_2be8,uStack_2be4,local_2be0,uStack_2bdc);
              p_Var13 = endl_exref;
              uVar18 = FUN_1001a0e0(*(undefined4 *)(DAT_101d6474 + 0x2c),L"MxSubscribe2 - status ",
                                    uVar18,L" cacheIndex ",local_2c04,
                                    L" returning NULL publisher guid");
              uVar18 = FUN_1001a0e0(uVar18);
              pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
                       FUN_1001a0e0(uVar18);
              pbVar4 = std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::
                       operator<<(pbVar4,(long)local_2c04);
              pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
                       FUN_1001a0e0(pbVar4);
              std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::
              operator<<(pbVar4,p_Var13);
            }
          }
          else {
            FUN_10124850(local_2c0c,&local_28,local_2c04,uStack_2c14,local_2bd4,
                         CONCAT22(uStack_2bce,local_2bd0),CONCAT22(uVar16,local_2bcc));
          }
        }
        else if (((local_2c10 == (int *)0x20) || (local_2c10 == (int *)0x30)) ||
                (local_2c10 == (int *)0x22)) {
          local_2c00 = 0;
          local_28 = *(int *)(param_1 + 0x584);
          local_24 = *(int *)(param_1 + 0x588);
          local_20 = *(undefined4 *)(param_1 + 0x58c);
          local_1c = *(undefined4 *)(param_1 + 0x590);
          piVar11 = param_2;
          FUN_1005d1d0(&uStack_2c14,param_2);
          uVar16 = (undefined2)((uint)piVar11 >> 0x10);
          FUN_1005d1d0(&local_2c00,param_2);
          FUN_101004f0(&local_2bd4,param_2);
          FUN_1005e580(&local_2c04,param_2);
          if ((local_2c10 == (int *)0x20) || (local_2c10 == (int *)0x30)) {
            local_64 = PTR_101a21c4;
            local_60 = DAT_101a21c8;
            local_5c = DAT_101a21cc;
            local_58 = DAT_101a21d0;
            FUN_10128820(local_88,local_2c0c,local_2c04,uStack_2c14,local_2c00,&local_2bd4,&local_28
                         ,&local_64,local_2c10,param_1 + 0x594);
            FUN_1005fd00(local_88,param_3);
            uStack_2c = (uint)*(ushort *)(param_1 + 0x2ac);
            uStack_30 = (uint)*(ushort *)(param_1 + 0x2ae);
            uStack_34 = 1;
            FUN_10100c50(&uStack_34,param_3);
            FUN_1008cfd0(&DAT_101d60ec,param_3);
          }
          else {
            FUN_10124850(local_2c0c,&local_28,local_2c04,uStack_2c14,local_2bd4,
                         CONCAT22(uStack_2bce,local_2bd0),CONCAT22(uVar16,local_2bcc));
          }
        }
        else {
          if (local_2c10 == (int *)0x8) {
            FUN_1005e580(&local_2c24,param_2);
            FUN_1008cf70(local_88,param_2);
            FUN_10100ce0(local_74,param_2);
            FUN_1008cf70(local_120,param_2);
            FUN_10112046(ppOVar17,uVar18,uVar19);
            return;
          }
          if (local_2c10 == (int *)0x24) {
            FUN_1005e580(&local_2c00,param_2);
            FUN_1008cf70(local_e0,param_2);
            FUN_10100ce0(&local_28,param_2);
            FUN_1008cf70(local_9c,param_2);
            cVar1 = FUN_100408d0();
            if (cVar1 != '\0') {
              uVar3 = FUN_1001db60(*(undefined4 *)(DAT_101d6474 + 0x24),param_1,&DAT_1017b6e4);
              FUN_1001a0e0(uVar3);
            }
            FUN_10044c00(local_2c00,local_e0,local_28,local_24,local_20,local_1c,local_9c);
            FUN_10112046(ppOVar17,uVar18,uVar19);
            return;
          }
          if (local_2c10 == (int *)0xa) {
            FUN_10044df0(local_2c0c);
            FUN_10112046(ppOVar17,uVar18,uVar19);
            return;
          }
          if (local_2c10 == (int *)0xf) {
            FUN_10061c60();
            FUN_10112046(ppOVar17,uVar18,uVar19);
            return;
          }
          if (local_2c10 != (int *)0x31) {
            if (local_2c10 == (int *)0x15) {
              local_2c2c = (int *)0x15;
              local_2c28 = (BSTR)((uint)local_2c08 & 0xffff);
              FUN_100ff1c0(param_2);
              if ((int)local_2c28._2_2_ - 0x45U < 0x18) {
                (*(code *)(&PTR_LAB_10112134)[(int)local_2c28._2_2_ - 0x45U])();
                return;
              }
            }
            else {
              if (local_2c10 == (int *)0x10) {
                FUN_1008d2a0(param_2,local_2c0c);
                FUN_10112046(ppOVar17,uVar18,uVar19);
                return;
              }
              if (local_2c10 == (int *)0x11) {
                FUN_10091ed0(param_2);
                FUN_10112046(ppOVar17,uVar18,uVar19);
                return;
              }
              if (local_2c10 == (int *)0x12) {
                FUN_1005e580(&local_2c24,param_2);
                FUN_1008cf70(local_88,param_2);
                FUN_10112046(ppOVar17,uVar18,uVar19);
                return;
              }
              if (local_2c10 == (int *)0x23) {
                FUN_1005e580(&local_2c00,param_2);
                FUN_1008cf70(&local_28,param_2);
                cVar1 = FUN_10126ef0(local_2c0c,local_2c00,&local_28);
                if ((cVar1 == '\0') && (cVar1 = FUN_100408d0(), cVar1 != '\0')) {
                  uVar3 = FUN_10047fe0(local_28,local_24,local_20,local_1c);
                  uVar7 = local_2c00;
                  p_Var13 = endl_exref;
                  pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *
                           )FUN_1001a0e0(*(undefined4 *)(DAT_101d6474 + 0x2c),
                                         L"AccessManager::ProcessNmxRequest - MxCancelSubscription failed to remove subscription cacheIndex "
                                         ,local_2c00,L" subscriber guid ",uVar3);
                  pbVar4 = std::
                           basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::
                           operator<<(pbVar4,uVar7);
                  uVar3 = FUN_1001a0e0(pbVar4);
                  pbVar4 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *
                           )FUN_1001a0e0(uVar3);
                  std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::
                  operator<<(pbVar4,p_Var13);
                  FUN_10112046(ppOVar17,uVar18,uVar19);
                  return;
                }
              }
              else if (local_2c10 == (int *)0x13) {
                FUN_1005e580(&local_2c00,param_2);
                if (local_2c00 == 0) {
                  FUN_10061ef0();
                  FUN_10112046(ppOVar17,uVar18,uVar19);
                  return;
                }
              }
              else {
                if (local_2c10 != (int *)0x16) {
                  cVar1 = FUN_100f6f20(local_2c10);
                  if (cVar1 != '\0') {
                    FUN_10100e20(&local_2c08,param_2);
                    FUN_10102da0(&local_2c1c,param_2);
                    FUN_10104e90(param_2,local_2bfc,local_2c08,&local_2c74,&local_2c64,&local_2c84,
                                 local_d0,local_2c58,&local_ac,&local_2c50,&local_2c4c,&local_bc,
                                 &local_2c5c,&local_2c7c);
                    local_2bfc[0] = 1;
                    local_2bfa = CONCAT22(*(undefined2 *)(param_1 + 0x2ac),
                                          *(undefined2 *)(param_1 + 0x2ae));
                    FUN_10005170();
                    local_64 = (undefined *)((uint)local_64._2_2_ << 0x10);
                    local_60 = 0;
                    local_5c = 0;
                    local_58 = 0;
                    local_2c20 = 0;
                    local_2c11 = 0;
                    local_2c15 = 0;
                    local_8._0_1_ = 0x1d;
                    uVar18 = FUN_10022400(local_2bf6,CONCAT22(local_2bf2,uStack_2bf4));
                    FUN_10016560(uVar18);
                    local_8 = CONCAT31(local_8._1_3_,0x1e);
                    (**(code **)(*local_2c48 + 0x24))
                              (local_2c48,&local_2bf2,local_2c74,local_2c40,&local_64);
                    if (7999 < (short)local_58) {
                      local_2c44 = local_2c48;
                      iVar2 = *local_2c48;
                      uVar18 = FUN_10030d80();
                      (**(code **)(iVar2 + 0x44))(local_2c44,&local_2bf2,&local_64,uVar18);
                      if (local_2c20 == 0) {
                        FUN_1005c2c0(&DAT_1017a514);
                      }
                    }
                    local_5c = 5;
                    local_8 = CONCAT31(local_8._1_3_,0x1d);
                    FUN_10014390();
                    local_8 = 0x1c;
                    FUN_10110986();
                    return;
                  }
                  if (extraout_EDX == 0x25) {
                    FUN_1008cf70(local_e0,param_2);
                    FUN_1008cf70(local_9c,param_2);
                    cVar1 = FUN_100408d0();
                    if (cVar1 != '\0') {
                      uVar3 = FUN_1001db60(*(undefined4 *)(DAT_101d6474 + 0x24),param_1,
                                           &DAT_1017b6e4);
                      FUN_1001a0e0(uVar3);
                    }
                    FUN_1004d840(local_e0,local_9c,*local_2c0c,local_2c0c[1],local_2c0c[2]);
                    FUN_10112046(ppOVar17,uVar18,uVar19);
                    return;
                  }
                  if ((extraout_EDX == 0x2d) || (extraout_EDX == 0x2e)) {
                    FUN_100838b0();
                    local_2c24 = (undefined1 *)(param_1 + 0x138);
                    *local_2c24 = 1;
                    local_8._0_1_ = 0x24;
                    FUN_1008cf70(local_74,param_2);
                    local_4c = local_2c10;
                    local_2c04 = (int *)CONCAT31(local_2c04._1_3_,local_2c10 == (int *)0x2d);
                    uVar18 = FUN_10081e00();
                    local_8._0_1_ = 0x25;
                    uStack_2c = (uint)*(ushort *)(param_1 + 0x2ac);
                    uStack_30 = (uint)*(ushort *)(param_1 + 0x2ae);
                    uStack_34 = 1;
                    uVar18 = FUN_10082820(auStack_2cc4,&uStack_34,uVar18);
                    local_8._0_1_ = 0x26;
                    uVar19 = 0;
                    uVar18 = FUN_10082a00(uVar18);
                    FUN_10083150(&local_2be0,uVar18,uVar19);
                    local_2c68 = (int *)local_2be0;
                    local_8._0_1_ = 0x25;
                    FUN_10081eb0();
                    local_8 = CONCAT31(local_8._1_3_,0x24);
                    FUN_10081b00();
                    FUN_100817c0(local_2be0,param_2);
                    local_2c20 = **(int **)(local_2be0 + 0x1c);
                    FUN_10111180();
                    return;
                  }
                  goto LAB_1011202f;
                }
                local_2bd4 = local_2c10;
                local_2bd0 = 1;
                uStack_2bce = 0;
                local_2bcc = 0;
                FUN_100ff630(param_2);
                if (CONCAT22(local_2bcc,uStack_2bce) == 1) {
                  local_54 = 0;
                  local_50 = 0;
                  local_4c = (int *)0x0;
                  FUN_100ff5c0(param_2);
                  if (((short)local_3c == 2) || ((short)local_3c == 3)) {
                    FUN_10046810(local_54,local_50,0xffffffff);
                    FUN_10107730(local_54,local_50,local_4c);
                    FUN_10128680(local_54,local_50,local_4c);
                    FUN_10045030(&local_54);
                    FUN_100fd400(local_54,local_50,local_4c,local_48,local_44,local_40,local_3c);
                    if (0 < local_50) {
                      FUN_1002f150(local_50,0xffffffff);
                    }
                    FUN_100ffc90(local_50,local_48,local_44,local_40,local_3c);
                  }
                  else {
                    FUN_10046810(local_54,local_50,local_4c);
                    FUN_10107540(&local_2c24,local_54,local_50,local_4c);
                    FUN_10128510(local_54,local_50,local_4c);
                    FUN_10044df0(&local_54);
                    FUN_1010a5e0(local_54,local_50,local_4c,local_48,local_44,local_40,local_3c);
                  }
                }
                if (CONCAT22(local_2bcc,uStack_2bce) == 2) {
                  local_28 = 0;
                  local_24 = 0;
                  local_20 = 0;
                  FUN_100ff670(param_2);
                  if (0 < local_24) {
                    iVar2 = FUN_10022ff0();
                    if ((*(int *)(iVar2 + 0xb4) == 0) && (iVar5 = FUN_1002f080(), iVar5 == 0)) {
                      uVar3 = 0;
                    }
                    else {
                      uVar3 = *(undefined4 *)(iVar2 + 0xb4);
                    }
                    uVar14 = 0;
                    FUN_10022ff0(uVar3,0);
                    cVar1 = FUN_10022ba0(uVar3,uVar14);
                    if (cVar1 != '\0') {
                      uVar3 = FUN_10022ff0(L"Received RemoteVersion for platform %d version %d",
                                           local_24,local_1c);
                      FUN_10022df0(uVar3);
                    }
                    FUN_1002f150(local_24,local_1c);
                    FUN_10112046(ppOVar17,uVar18,uVar19);
                    return;
                  }
                }
              }
            }
            goto code_r0x10112046;
          }
        }
      }
    }
LAB_1011202f:
    if ((local_2c10 != (int *)0x0) && (local_2c10 != (int *)0x34)) goto code_r0x10112046;
LAB_1011205d:
    FUN_10103ba0(local_2c38,local_2bfc,local_2c10,&local_2c74,&local_2c64,&local_2c84,local_d0,
                 &local_ac,&local_2c50,&local_2c4c,&local_bc,local_2c5c,local_2c0c,local_2c58[0],
                 local_2c7c,local_2c78);
  }
  pcVar9 = SysFreeString_exref;
  local_8._0_1_ = 1;
  SysFreeString(local_2c4c);
  local_8 = (uint)local_8._1_3_ << 8;
  SysFreeString(local_2c50);
  local_8 = 0xffffffff;
  if (local_2c74 != (int *)0x0) {
    (**(code **)(*local_2c74 + 8))(local_2c74);
  }
LAB_10112114:
  (*pcVar9)(local_2c70);
  ExceptionList = local_10;
  __security_check_cookie(local_18 ^ (uint)&stack0xfffffffc);
  return;
}


FUN_1010d4a0 at 1010d4a0

Signature: undefined FUN_1010d4a0(void)


/* WARNING: Removing unreachable block (ram,0x1010d4dc) */

undefined4 __thiscall FUN_1010d4a0(int param_1,uint param_2,long *param_3)

{
  _Container_base0 *p_Var1;
  undefined4 *puVar2;
  char cVar3;
  int iVar4;
  undefined4 uVar5;
  basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *pbVar6;
  int iVar7;
  uint uVar8;
  int iVar9;
  undefined4 *puVar10;
  long lVar11;
  long lVar12;
  _func_basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>_ptr_basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>_ptr
  *p_Var13;
  undefined **local_44;
  LPVOID local_40;
  undefined4 local_3c;
  long local_38;
  undefined4 *local_34;
  undefined4 *local_30;
  undefined4 local_2c;
  int local_24;
  undefined4 local_20;
  long local_1c;
  long local_18;
  LPVOID local_14;
  void *local_10;
  undefined1 *puStack_c;
  uint local_8;
  
  uVar8 = param_2;
  local_8 = 0;
  puStack_c = &LAB_10171e10;
  local_10 = ExceptionList;
  local_14 = (LPVOID)0x0;
  ExceptionList = &local_10;
  local_24 = param_1;
  iVar4 = (**(code **)(**(int **)(param_1 + 0x270) + 0x50))
                    (*(int **)(param_1 + 0x270),param_2,&local_20,&local_1c,&local_18,&local_14,
                     DAT_101d60b8 ^ (uint)&stack0xfffffffc);
  if (iVar4 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_1005bf30(iVar4,0,"e:\\bldsrc\\6\\s\\src\\lmx\\CNmxAdapter.h",99);
  }
  if (iVar4 != 0) {
    local_8 = 0xffffffff;
    if (local_14 != (LPVOID)0x0) {
      CoTaskMemFree(local_14);
    }
    ExceptionList = local_10;
    return 0;
  }
  *param_3 = local_18;
  cVar3 = FUN_100408d0();
  if (cVar3 != '\0') {
    uVar8 = uVar8 & 0xff;
    lVar11 = local_18;
    lVar12 = local_1c;
    p_Var13 = endl_exref;
    uVar5 = FUN_1001db60(*(undefined4 *)(DAT_101d6474 + 0x18),param_1,
                         L" AccessManager::ProcessNmxResponses received message block (",local_18,
                         L" bytes) requestId ",local_1c,L" type ");
    pbVar6 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
             FUN_1001a0e0(uVar5);
    pbVar6 = std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
                       (pbVar6,lVar11);
    pbVar6 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
             FUN_1001a0e0(pbVar6);
    pbVar6 = std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
                       (pbVar6,lVar12);
    pbVar6 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
             FUN_1001a0e0(pbVar6);
    pbVar6 = std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
                       (pbVar6,uVar8);
    std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
              (pbVar6,p_Var13);
  }
  iVar4 = DAT_101d8c28;
  if ((int)(10000U - DAT_101d8c28) < 4) {
    memset(&DAT_101d6518 + DAT_101d8c28,0xfa,10000U - DAT_101d8c28);
    iVar4 = 0;
  }
  *(undefined2 *)(&DAT_101d6518 + iVar4) = 0xfefe;
  *(undefined2 *)(&DAT_101d651a + iVar4) = 0xfefe;
  iVar7 = iVar4 + 4;
  if ((int)(10000U - iVar7) < 1) {
    memset(&DAT_101d651c + iVar4,0xfa,10000U - iVar7);
    iVar7 = 0;
  }
  (&DAT_101d6518)[iVar7] = (undefined1)local_20;
  iVar4 = iVar7 + 1;
  if ((int)(10000U - iVar4) < 4) {
    memset(&DAT_101d6519 + iVar7,0xfa,10000U - iVar4);
    iVar4 = 0;
  }
  (&DAT_101d6518)[iVar4] = (char)((uint)local_18 >> 0x18);
  (&DAT_101d6519)[iVar4] = (char)((uint)local_18 >> 0x10);
  (&DAT_101d651a)[iVar4] = (char)((uint)local_18 >> 8);
  (&DAT_101d651b)[iVar4] = (char)local_18;
  iVar7 = iVar4 + 4;
  if ((int)(10000U - iVar7) < 4) {
    memset(&DAT_101d651c + iVar4,0xfa,10000U - iVar7);
    iVar7 = 0;
  }
  (&DAT_101d6518)[iVar7] = (char)((uint)local_1c >> 0x18);
  (&DAT_101d6519)[iVar7] = (char)((uint)local_1c >> 0x10);
  (&DAT_101d651a)[iVar7] = (char)((uint)local_1c >> 8);
  (&DAT_101d651b)[iVar7] = (char)local_1c;
  DAT_101d8c28 = iVar7 + 4;
  FUN_100fd6e0(&param_2,&local_1c);
  uVar8 = param_2;
  if (param_2 != *(uint *)(param_1 + 0x2a0)) {
    local_34 = (undefined4 *)0x0;
    local_30 = (undefined4 *)0x0;
    local_2c = 0;
    local_8 = CONCAT31(local_8._1_3_,2);
    local_3c = 0;
    p_Var1 = (_Container_base0 *)(param_2 + 0x1c);
    local_40 = local_14;
    local_38 = local_18;
    local_44 = MoreAccessFastReadOnlyStream::vftable;
    if ((_Container_base0 *)&local_34 != p_Var1) {
      std::_Container_base0::_Swap_all((_Container_base0 *)&local_34,p_Var1);
      puVar10 = *(undefined4 **)p_Var1;
      *(undefined4 **)p_Var1 = local_34;
      puVar2 = *(undefined4 **)(uVar8 + 0x20);
      *(undefined4 **)(uVar8 + 0x20) = local_30;
      uVar5 = *(undefined4 *)(uVar8 + 0x24);
      *(undefined4 *)(uVar8 + 0x24) = local_2c;
      local_34 = puVar10;
      local_30 = puVar2;
      local_2c = uVar5;
    }
    FUN_10078cb0(&param_2,uVar8);
    puVar2 = local_30;
    puVar10 = local_34;
    iVar7 = (int)local_30 - (int)local_34;
    iVar9 = iVar7 >> 5;
    iVar4 = DAT_101d8c28;
    if ((int)(10000U - DAT_101d8c28) < 4) {
      memset(&DAT_101d6518 + DAT_101d8c28,0xfa,10000U - DAT_101d8c28);
      iVar4 = 0;
    }
    (&DAT_101d6518)[iVar4] = (char)(iVar7 >> 0x1d);
    (&DAT_101d6519)[iVar4] = (char)((uint)iVar9 >> 0x10);
    (&DAT_101d651a)[iVar4] = (char)((uint)iVar9 >> 8);
    (&DAT_101d651b)[iVar4] = (char)iVar9;
    iVar7 = iVar4 + 4;
    if (puVar10 != puVar2) {
      iVar4 = iVar4 + 4;
      puVar10 = puVar10 + 5;
      do {
        if ((int)(10000U - iVar4) < 4) {
          memset(&DAT_101d6518 + iVar4,0xfa,10000U - iVar4);
          iVar4 = 0;
        }
        *(undefined2 *)(&DAT_101d6518 + iVar4) = 0x2222;
        *(undefined2 *)(&DAT_101d651a + iVar4) = 0x2222;
        iVar7 = iVar4 + 4;
        uVar5 = puVar10[-4];
        DAT_101d8c28 = iVar7;
        if ((int)(10000U - iVar7) < 1) {
          memset(&DAT_101d651c + iVar4,0xfa,10000U - iVar7);
          iVar7 = 0;
        }
        (&DAT_101d6518)[iVar7] = (char)uVar5;
        iVar4 = iVar7 + 1;
        if ((int)(10000U - iVar4) < 4) {
          memset(&DAT_101d6519 + iVar7,0xfa,10000U - iVar4);
          iVar4 = 0;
        }
        (&DAT_101d6518)[iVar4] = (char)((uint)local_3c >> 0x18);
        (&DAT_101d6519)[iVar4] = (char)((uint)local_3c >> 0x10);
        (&DAT_101d651a)[iVar4] = (char)((uint)local_3c >> 8);
        (&DAT_101d651b)[iVar4] = (char)local_3c;
        DAT_101d8c28 = iVar4 + 4;
        FUN_1010bd10(&local_44,local_20,puVar10[-4],puVar10[-3],puVar10[-2],puVar10[-1],*puVar10,
                     puVar10[1],puVar10[2]);
        puVar2 = puVar10 + 3;
        iVar7 = DAT_101d8c28;
        iVar4 = DAT_101d8c28;
        puVar10 = puVar10 + 8;
      } while (puVar2 != local_30);
    }
    if ((int)(10000U - iVar7) < 4) {
      memset(&DAT_101d6518 + iVar7,0xfa,10000U - iVar7);
      iVar7 = 0;
    }
    (&DAT_101d6518)[iVar7] = (char)((uint)local_3c >> 0x18);
    (&DAT_101d6519)[iVar7] = (char)((uint)local_3c >> 0x10);
    (&DAT_101d651a)[iVar7] = (char)((uint)local_3c >> 8);
    (&DAT_101d651b)[iVar7] = (char)local_3c;
    DAT_101d8c28 = iVar7 + 4;
    local_8 = local_8 & 0xffffff00;
    if (local_34 != (undefined4 *)0x0) {
      std::_Container_base0::_Orphan_all((_Container_base0 *)&local_34);
      operator_delete(local_34);
    }
    local_34 = (undefined4 *)0x0;
    local_30 = (undefined4 *)0x0;
    local_2c = 0;
  }
  local_8 = 0xffffffff;
  if (local_14 != (LPVOID)0x0) {
    CoTaskMemFree(local_14);
  }
  ExceptionList = local_10;
  return 1;
}


FUN_100860c0 at 100860c0

Signature: undefined FUN_100860c0(void)


void FUN_100860c0(void *param_1,int *param_2,undefined4 param_3,ushort param_4,undefined4 param_5,
                 undefined4 param_6,undefined4 param_7,undefined4 param_8,char param_9,
                 undefined4 param_10)

{
  char cVar1;
  basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *pbVar2;
  void *pvVar3;
  _func_basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>_ptr_basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>_ptr
  *p_Var4;
  uint uStack_458;
  BSTR local_43c;
  void *local_438;
  uint local_434;
  uint local_20;
  undefined1 *local_1c;
  void *local_14;
  undefined1 *puStack_10;
  uint local_c;
  undefined4 local_8;
  
  local_8 = 0xfffffffe;
  puStack_10 = &LAB_10150ad2;
  local_14 = ExceptionList;
  local_c = DAT_101d60b8 ^ 0x101bd3b8;
  uStack_458 = DAT_101d60b8 ^ (uint)&stack0xfffffffc;
  local_1c = (undefined1 *)&uStack_458;
  ExceptionList = &local_14;
  local_438 = param_1;
  local_434 = (uint)param_4;
  local_20 = uStack_458;
  cVar1 = FUN_100408d0();
  if (cVar1 != '\0') {
    pvVar3 = local_438;
    p_Var4 = endl_exref;
    pbVar2 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
             FUN_1001a0e0(*(undefined4 *)(DAT_101d6474 + 0x14),
                          L"AccessManager::doGetOrSetCallback - reference ");
    pbVar2 = std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
                       (pbVar2,pvVar3);
    std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
              (pbVar2,p_Var4);
  }
  if (param_2 == (int *)0x0) {
    cVar1 = FUN_100408d0();
    if (cVar1 != '\0') {
      p_Var4 = endl_exref;
      pbVar2 = (basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_> *)
               FUN_1001a0e0(*(undefined4 *)(DAT_101d6474 + 0x14),
                            L"doGetOrSetCallback found NULL callback address");
      std::basic_ostream<unsigned_short,struct_std::char_traits<unsigned_short>_>::operator<<
                (pbVar2,p_Var4);
    }
  }
  else {
    local_8 = 0;
    if (param_9 == '\0') {
      (**(code **)(*param_2 + 4))(param_3,local_434,param_5,param_6,param_7);
    }
    else {
      FUN_1014ed80(param_7,param_8,&local_43c);
      if (local_43c == (BSTR)0x0) {
        (**(code **)(*param_2 + 8))(param_10,param_3,local_434,param_5,param_6,param_7,0);
      }
      else {
        (**(code **)(*param_2 + 8))(param_10,param_3,local_434,param_5,param_6,param_7,local_43c);
        SysFreeString(local_43c);
      }
    }
    local_8 = 0xfffffffe;
  }
  ExceptionList = local_14;
  __security_check_cookie(local_20 ^ (uint)&stack0xfffffffc);
  return;
}


FUN_10067aa0 at 10067aa0

Signature: undefined FUN_10067aa0(void)


void __thiscall FUN_10067aa0(int param_1,byte *param_2,undefined4 param_3)

{
  int *piVar1;
  uint uVar2;
  int iVar3;
  int *local_5c;
  BSTR local_58;
  undefined **local_54 [2];
  void *local_4c;
  uint local_40;
  undefined1 local_39;
  undefined1 local_38 [4];
  uint local_34;
  uint local_30;
  uint local_2c;
  undefined1 local_28 [2];
  undefined4 local_26;
  undefined4 local_22;
  undefined4 local_1e;
  undefined4 local_1a;
  undefined2 local_16;
  uint local_14;
  void *local_10;
  undefined1 *puStack_c;
  int local_8;
  
  local_8 = 0xffffffff;
  puStack_c = &LAB_1015f7b0;
  local_10 = ExceptionList;
  uVar2 = DAT_101d60b8 ^ (uint)&stack0xfffffffc;
  ExceptionList = &local_10;
  local_14 = uVar2;
  FUN_10005550(param_3);
  local_8 = 0;
  if (param_2 != (byte *)0x0) {
    if (((*(ushort *)(param_2 + 4) == *(ushort *)(param_1 + 0x2ac)) &&
        (*(short *)(param_2 + 2) == *(short *)(param_1 + 0x2ae))) && (*param_2 == 1)) {
      uVar2 = (uint)*(ushort *)(param_2 + 6);
      if ((uVar2 < (uint)((*(int *)(param_1 + 0x3c4) - *(int *)(param_1 + 0x3c0)) / 0x24)) &&
         (*(int *)(*(int *)(param_1 + 0x3c0) + uVar2 * 0x24) != 0)) {
        piVar1 = *(int **)(*(int *)(param_1 + 0x3c0) + uVar2 * 0x24);
        (**(code **)(*piVar1 + 0x2c))(piVar1,param_2 + 10,local_5c,0,local_38);
      }
    }
    else {
      local_34 = (uint)*param_2;
      local_30 = (uint)*(ushort *)(param_2 + 2);
      local_2c = (uint)*(ushort *)(param_2 + 4);
      FUN_10031c20(8);
      local_8._0_1_ = 1;
      local_39 = 3;
      iVar3 = (*(code *)local_54[0][4])(local_54,&local_39,1,0,uVar2);
      if (iVar3 < 0) {
                    /* WARNING: Subroutine does not return */
        FUN_1005bf30(iVar3,0,
                     "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                     ,0x19);
      }
      local_40 = 1;
      iVar3 = (*(code *)local_54[0][4])(local_54,&local_40,2,0);
      if (iVar3 < 0) {
                    /* WARNING: Subroutine does not return */
        FUN_1005bf30(iVar3,0,
                     "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                     ,0x19);
      }
      local_40 = (uint)*(ushort *)(param_2 + 6);
      iVar3 = (*(code *)local_54[0][4])(local_54,&local_40,2,0);
      if (iVar3 < 0) {
                    /* WARNING: Subroutine does not return */
        FUN_1005bf30(iVar3,0,
                     "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                     ,0x19);
      }
      local_40 = (uint)*(ushort *)(param_2 + 8);
      iVar3 = (*(code *)local_54[0][4])(local_54,&local_40,2,0);
      if (iVar3 < 0) {
                    /* WARNING: Subroutine does not return */
        FUN_1005bf30(iVar3,0,
                     "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                     ,0x19);
      }
      iVar3 = (*(code *)local_54[0][4])(local_54,param_2 + 10,10,0);
      if (iVar3 < 0) {
                    /* WARNING: Subroutine does not return */
        FUN_1005bf30(iVar3,0,
                     "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                     ,0x19);
      }
      iVar3 = (**(code **)(*local_5c + 0x18))(local_5c,local_54,0);
      if (iVar3 < 0) {
                    /* WARNING: Subroutine does not return */
        FUN_1005bf30(iVar3,0,"AccessManager.cpp",0x6e4);
      }
      local_28[0] = 0;
      local_26 = 0;
      local_22 = 0;
      local_1e = 0;
      local_1a = 0;
      local_16 = 0;
      FUN_10066650(local_28,local_54);
      FUN_1010ad00(0,&local_34,3,local_54,0,2,0,0,0,0,0);
      local_8 = (uint)local_8._1_3_ << 8;
      local_54[0] = FastStream::vftable;
      if (local_4c != (void *)0x0) {
        free(local_4c);
      }
    }
  }
  local_8 = 0xffffffff;
  if (local_5c != (int *)0x0) {
    (**(code **)(*local_5c + 8))(local_5c);
  }
  SysFreeString(local_58);
  ExceptionList = local_10;
  __security_check_cookie(local_14 ^ (uint)&stack0xfffffffc);
  return;
}


FUN_10100e20 at 10100e20

Signature: undefined FUN_10100e20(void)


void FUN_10100e20(uint *param_1,int *param_2)

{
  int iVar1;
  
  iVar1 = (**(code **)(*param_2 + 0xc))(param_2,(int)&param_2 + 3,1,0);
  if (iVar1 < 0) {
                    /* WARNING: Subroutine does not return */
    FUN_1005bf30(iVar1,0,
                 "E:\\BldSrc\\6\\s\\sharedcomponents\\internal\\MagellanPublic\\Includes\\BaseRuntimeComponentServer\\LoadSave.h"
                 ,0x12);
  }
  *param_1 = (uint)param_2 >> 0x18;
  return;
}


FUN_10101360 at 10101360

Signature: undefined FUN_10101360(void)


void __fastcall FUN_10101360(int param_1)

{
  undefined4 *puVar1;
  char cVar2;
  undefined4 uVar3;
  int *piVar4;
  int *piVar5;
  uint uVar6;
  int iVar7;
  int *piVar8;
  undefined2 *puVar9;
  int local_220;
  wchar_t local_21c [260];
  uint local_14;
  void *local_10;
  undefined1 *puStack_c;
  undefined4 local_8;
  
  puStack_c = &LAB_101709ee;
  local_10 = ExceptionList;
  uVar6 = DAT_101d60b8 ^ (uint)&stack0xfffffffc;
  ExceptionList = &local_10;
  uVar3 = *(undefined4 *)(param_1 + 0x3fc);
  local_14 = uVar6;
  if ((DAT_101d6444 & 1) == 0) {
    DAT_101d6444 = DAT_101d6444 | 1;
    local_8 = 0;
    FUN_10003a90(uVar6);
    _atexit(FUN_101792e0);
  }
  local_8 = 0xffffffff;
  FUN_10022d50(&DAT_101d6370,L"AccessManager::DumpState - remotePlatformResolvers.size %d",uVar3);
  if ((DAT_101d6444 & 1) == 0) {
    DAT_101d6444 = DAT_101d6444 | 1;
    local_8 = 1;
    FUN_10003a90(uVar6);
    _atexit(FUN_101792e0);
    local_8 = 0xffffffff;
  }
  FUN_10022d50(&DAT_101d6370,L" remotePlatformResolvers.sendResultsRetryCount %d",
               *(undefined4 *)(param_1 + 0x404));
  piVar8 = (int *)**(int **)(param_1 + 0x3f8);
  local_220 = 0;
  if (piVar8 != *(int **)(param_1 + 0x3f8)) {
    do {
      if ((DAT_101d6444 & 1) == 0) {
        DAT_101d6444 = DAT_101d6444 | 1;
        local_8 = 2;
        FUN_10003a90();
        _atexit(FUN_101792e0);
        local_8 = 0xffffffff;
      }
      FUN_10022d50(&DAT_101d6370,L" remotePlatformResolvers[%d].this            %x",local_220,
                   piVar8[3]);
      iVar7 = piVar8[3];
      SysFreeString(*(BSTR *)(iVar7 + 8));
      *(undefined4 *)(iVar7 + 8) = 0;
      iVar7 = (**(code **)(**(int **)(iVar7 + 4) + 0x20))
                        (*(int **)(iVar7 + 4),(undefined4 *)(iVar7 + 8));
      if (iVar7 < 0) {
LAB_10101768:
                    /* WARNING: Subroutine does not return */
        FUN_1005bf30(iVar7,0,"E:\\BldSrc\\6\\s\\ExtInterfaces\\Lmx\\IMxReferencePtr.h",0x3f);
      }
      iVar7 = piVar8[3];
      puVar1 = (undefined4 *)(iVar7 + 8);
      SysFreeString(*(BSTR *)(iVar7 + 8));
      *puVar1 = 0;
      iVar7 = (**(code **)(**(int **)(iVar7 + 4) + 0x20))(*(int **)(iVar7 + 4),puVar1);
      if (iVar7 < 0) goto LAB_10101768;
      puVar9 = (undefined2 *)*puVar1;
      if (puVar9 == (undefined2 *)0x0) {
        puVar9 = &DAT_1017a514;
      }
      if ((DAT_101d6444 & 1) == 0) {
        DAT_101d6444 = DAT_101d6444 | 1;
        local_8 = 3;
        FUN_10003a90();
        _atexit(FUN_101792e0);
        local_8 = 0xffffffff;
      }
      FUN_10022d50(&DAT_101d6370,L" remotePlatformResolvers[%d].mxReference     %s",local_220,puVar9
                  );
      iVar7 = piVar8[3];
      _snwprintf_s(local_21c,0x104,0xffffffff,L"<galaxy %d platform %d engine %d>",
                   *(undefined4 *)(iVar7 + 0x18),*(undefined4 *)(iVar7 + 0x1c),
                   *(undefined4 *)(iVar7 + 0x20));
      if ((DAT_101d6444 & 1) == 0) {
        DAT_101d6444 = DAT_101d6444 | 1;
        local_8 = 4;
        FUN_10003a90();
        _atexit(FUN_101792e0);
        local_8 = 0xffffffff;
      }
      FUN_10022d50(&DAT_101d6370,L" remotePlatformResolvers[%d].requesterEngine %s",local_220,
                   local_21c);
      if ((DAT_101d6444 & 1) == 0) {
        DAT_101d6444 = DAT_101d6444 | 1;
        local_8 = 5;
        FUN_10003a90();
        _atexit(FUN_101792e0);
        local_8 = 0xffffffff;
      }
      FUN_10022d50(&DAT_101d6370,L" remotePlatformResolvers[%d].requesterData   %x",local_220,
                   *(undefined4 *)(piVar8[3] + 0x24));
      if ((DAT_101d6444 & 1) == 0) {
        DAT_101d6444 = DAT_101d6444 | 1;
        local_8 = 6;
        FUN_10003a90();
        _atexit(FUN_101792e0);
        local_8 = 0xffffffff;
      }
      FUN_10022d50(&DAT_101d6370,L" remotePlatformResolvers[%d].currentEngineId %x",local_220,
                   *(undefined4 *)(piVar8[3] + 0x2c));
      if ((DAT_101d6444 & 1) == 0) {
        DAT_101d6444 = DAT_101d6444 | 1;
        local_8 = 7;
        FUN_10003a90();
        _atexit(FUN_101792e0);
        local_8 = 0xffffffff;
      }
      FUN_10022d50(&DAT_101d6370,L" remotePlatformResolvers[%d].retryCount      %d",local_220,
                   *(undefined4 *)(piVar8[3] + 0x44));
      if (*(char *)((int)piVar8 + 0x11) == '\0') {
        piVar4 = (int *)piVar8[2];
        if (*(char *)((int)piVar4 + 0x11) == '\0') {
          cVar2 = *(char *)(*piVar4 + 0x11);
          piVar8 = piVar4;
          piVar4 = (int *)*piVar4;
          while (cVar2 == '\0') {
            cVar2 = *(char *)(*piVar4 + 0x11);
            piVar8 = piVar4;
            piVar4 = (int *)*piVar4;
          }
        }
        else {
          cVar2 = *(char *)(piVar8[1] + 0x11);
          piVar5 = (int *)piVar8[1];
          piVar4 = piVar8;
          while ((piVar8 = piVar5, cVar2 == '\0' && (piVar4 == (int *)piVar8[2]))) {
            cVar2 = *(char *)(piVar8[1] + 0x11);
            piVar5 = (int *)piVar8[1];
            piVar4 = piVar8;
          }
        }
      }
      local_220 = local_220 + 1;
    } while (piVar8 != *(int **)(param_1 + 0x3f8));
  }
  if ((DAT_101d6444 & 1) == 0) {
    DAT_101d6444 = DAT_101d6444 | 1;
    local_8 = 8;
    FUN_10003a90();
    _atexit(FUN_101792e0);
    local_8 = 0xffffffff;
  }
  FUN_10022d50(&DAT_101d6370,&DAT_1017a514);
  ExceptionList = local_10;
  __security_check_cookie(local_14 ^ (uint)&stack0xfffffffc);
  return;
}