L L4D2node

CWorkshop::Steam_OnEnumeratePublishedFilesByUserAction

0x0023d900 · 415 bytes · __thiscall

_ZN9CWorkshop43Steam_OnEnumeratePublishedFilesByUserActionEP56RemoteStorageEnumeratePublishedFilesByUserActionResult_tb

Decompiled

undefined (3 params)

/* CWorkshop::Steam_OnEnumeratePublishedFilesByUserAction(RemoteStorageEnumeratePublishedFilesByUserActionResult_t*,
   bool) */

void __thiscall
CWorkshop::Steam_OnEnumeratePublishedFilesByUserAction
          (CWorkshop *this,RemoteStorageEnumeratePublishedFilesByUserActionResult_t *param_1,
          bool param_2)

{
  int iVar1;
  int *piVar2;
  char cVar3;
  int iVar4;
  int local_30;
  int local_28;
  RemoteStorageEnumeratePublishedFilesByUserActionResult_t *local_24;
  
  if ((param_2) || (*(int *)param_1 != 1)) {
    cVar3 = LoggingSystem_IsChannelEnabled(LOG_WORKSHOP,1);
    if (cVar3 != '\0') {
      LoggingSystem_Log(LOG_WORKSHOP,1,
                        "Failed to enumerate published file actions by user (Error: %d)\n",
                        *(undefined4 *)param_1);
      return;
    }
  }
  else {
    this[0x80] = (CWorkshop)0x1;
    this[0x88] = (CWorkshop)0x0;
    local_30 = *(int *)(param_1 + 8);
    if (0 < local_30) {
      local_28 = 0;
      local_24 = param_1 + 0x10;
      do {
        iVar1 = *(int *)(this + 0x98);
        if (iVar1 < 1) {
LAB_0023d9fb:
          CUtlVector<unsigned_long_long,CUtlMemory<unsigned_long_long,int>>::InsertBefore
                    ((CUtlVector<unsigned_long_long,CUtlMemory<unsigned_long_long,int>> *)
                     (this + 0x8c),iVar1,(ulonglong *)local_24);
          local_30 = *(int *)(param_1 + 8);
        }
        else {
          piVar2 = *(int **)(this + 0x8c);
          if (piVar2[1] != *(int *)(local_24 + 4) || *piVar2 != *(int *)local_24) {
            iVar4 = 0;
            do {
              iVar4 = iVar4 + 1;
              if (iVar4 == iVar1) goto LAB_0023d9fb;
            } while (piVar2[iVar4 * 2 + 1] != *(int *)(local_24 + 4) ||
                     piVar2[iVar4 * 2] != *(int *)local_24);
            if (iVar4 == -1) goto LAB_0023d9fb;
          }
        }
        local_28 = local_28 + 1;
        local_24 = local_24 + 8;
      } while (local_28 < local_30);
    }
    iVar1 = *(int *)(this + 0x7c);
    *(int *)(this + 0x7c) = local_30 + iVar1;
    if (local_30 + iVar1 < *(int *)(param_1 + 0xc)) {
      RequestItemHistory_Internal(this);
      return;
    }
    this[0x88] = (CWorkshop)0x1;
    cVar3 = LoggingSystem_IsChannelEnabled(LOG_WORKSHOP,0);
    if (cVar3 != '\0') {
      LoggingSystem_Log();
      return;
    }
  }
  return;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)