L L4D2node

CWorkshopFileInfoManager::UpdatePublishedFileVotingInfoQueries

0x0021c490 · 437 bytes · __thiscall

_ZN24CWorkshopFileInfoManager36UpdatePublishedFileVotingInfoQueriesEv

Decompiled

undefined (1 param)

/* CWorkshopFileInfoManager::UpdatePublishedFileVotingInfoQueries() */

void __thiscall
CWorkshopFileInfoManager::UpdatePublishedFileVotingInfoQueries(CWorkshopFileInfoManager *this)

{
  undefined4 *puVar1;
  char cVar2;
  int iVar3;
  int *piVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  int iVar7;
  longlong lVar8;
  
  iVar3 = *(int *)(this + 0x84);
  if ((iVar3 == 0) || (this[0x94] != (CWorkshopFileInfoManager)0x0)) {
    return;
  }
  while( true ) {
    puVar1 = *(undefined4 **)(this + 0x78);
    iVar3 = iVar3 + -1;
    uVar5 = *puVar1;
    uVar6 = puVar1[1];
    *(undefined4 *)(this + 0x8c) = uVar5;
    *(undefined4 *)(this + 0x90) = uVar6;
    if (0 < iVar3) {
      _V_memmove(puVar1,puVar1 + 2,iVar3 * 8);
      uVar5 = *(undefined4 *)(this + 0x8c);
      uVar6 = *(undefined4 *)(this + 0x90);
      iVar3 = *(int *)(this + 0x84) + -1;
    }
    *(int *)(this + 0x84) = iVar3;
    piVar4 = (int *)GetISteamRemoteStorage();
    lVar8 = (**(code **)(*piVar4 + 0xb8))(piVar4,uVar5,uVar6);
    if (lVar8 != 0) break;
    cVar2 = LoggingSystem_IsChannelEnabled(LOG_WORKSHOP,0);
    if (cVar2 != '\0') {
      LoggingSystem_Log(LOG_WORKSHOP,0,
                        "[CWorkshopFileInfoManager] Failed to query for voting details on published file: %llu\n"
                        ,uVar5,uVar6);
    }
    iVar3 = *(int *)(this + 0x84);
  }
  cVar2 = LoggingSystem_IsChannelEnabled(LOG_WORKSHOP,0);
  if (cVar2 == '\0') {
    iVar3 = *(int *)(this + 0x30);
    iVar7 = *(int *)(this + 0x2c);
    if (iVar3 == 0 && iVar7 == 0) goto LAB_0021c58f;
  }
  else {
    LoggingSystem_Log(LOG_WORKSHOP,0,
                      "[CWorkshopFileInfoManager] Querying for voting details of published file: %llu\n"
                      ,uVar5,uVar6);
    iVar3 = *(int *)(this + 0x30);
    iVar7 = *(int *)(this + 0x2c);
    if (iVar3 == 0 && iVar7 == 0) goto LAB_0021c58f;
  }
  SteamAPI_UnregisterCallResult(this + 0x20,iVar7,iVar3);
LAB_0021c58f:
  *(longlong *)(this + 0x2c) = lVar8;
  *(CWorkshopFileInfoManager **)(this + 0x34) = this;
  *(code **)(this + 0x38) = Steam_OnGetPublishedItemVoteDetails;
  *(undefined4 *)(this + 0x3c) = 0;
  SteamAPI_RegisterCallResult(this + 0x20,lVar8);
  this[0x94] = (CWorkshopFileInfoManager)0x1;
  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)