L L4D2node

CWorkshop::CreateAddOnFileRequest

0x0023cfa0 · 363 bytes · __thiscall

_ZN9CWorkshop22CreateAddOnFileRequestERK19PublishedFileInfo_t

Decompiled

undefined (2 params)

/* CWorkshop::CreateAddOnFileRequest(PublishedFileInfo_t const&) */

byte __thiscall CWorkshop::CreateAddOnFileRequest(CWorkshop *this,PublishedFileInfo_t *param_1)

{
  undefined4 uVar1;
  code *pcVar2;
  byte bVar3;
  byte bVar4;
  int *piVar5;
  int in_GS_OFFSET;
  CFmtStrN<256> local_12c [5];
  undefined1 local_127 [263];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  piVar5 = (int *)(**(code **)(*(int *)this + 0x14))(this);
  uVar1 = *(undefined4 *)(param_1 + 0xa8);
  pcVar2 = *(code **)(*piVar5 + 0x48);
  CFmtStrN<256>::CFmtStrN(local_12c,"%llu.vpk",*(undefined4 *)param_1,*(undefined4 *)(param_1 + 4));
  bVar3 = (*pcVar2)(piVar5,*(undefined4 *)(param_1 + 0x8c),*(undefined4 *)(param_1 + 0x90),
                    "addons/workshop",local_127,0,uVar1,0);
  piVar5 = (int *)(**(code **)(*(int *)this + 0x14))(this);
  uVar1 = *(undefined4 *)(param_1 + 0xa8);
  pcVar2 = *(code **)(*piVar5 + 0x48);
  CFmtStrN<256>::CFmtStrN(local_12c,"%llu.jpg",*(undefined4 *)param_1,*(undefined4 *)(param_1 + 4));
  bVar4 = (*pcVar2)(piVar5,*(undefined4 *)(param_1 + 0x94),*(undefined4 *)(param_1 + 0x98),
                    "addons/workshop",local_127,1,uVar1,0);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return bVar4 & bVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)