L L4D2node

CDmxSerializerKeyValues2::SerializeElementAttribute

0x00bec030 · 355 bytes · __thiscall

_ZN24CDmxSerializerKeyValues225SerializeElementAttributeER10CUtlBufferR27CDmxSerializationDictionaryP13CDmxAttribute

Decompiled

undefined (4 params)

/* CDmxSerializerKeyValues2::SerializeElementAttribute(CUtlBuffer&, CDmxSerializationDictionary&,
   CDmxAttribute*) */

void __thiscall
CDmxSerializerKeyValues2::SerializeElementAttribute
          (CDmxSerializerKeyValues2 *this,CUtlBuffer *param_1,CDmxSerializationDictionary *param_2,
          CDmxAttribute *param_3)

{
  char cVar1;
  undefined4 uVar2;
  UniqueId_t *pUVar3;
  int iVar4;
  CDmxElement *this_00;
  
  if (*(int *)param_3 == 1) {
    this_00 = (CDmxElement *)**(undefined4 **)(param_3 + 8);
  }
  else {
    CDmxAttribute::GetValue<CDmxElement*>()::defaultValue = 0;
    this_00 = (CDmxElement *)0x0;
  }
  cVar1 = CDmxSerializationDictionary::ShouldInlineElement(param_2,this_00);
  if (cVar1 != '\0') {
    uVar2 = CDmxElement::GetTypeString(this_00);
    CUtlBuffer::Printf(param_1,"\"%s\"\n{\n",uVar2);
    if (this_00 != (CDmxElement *)0x0) {
      SaveElement(this,param_1,param_2,this_00,false);
    }
    CUtlBuffer::Printf(param_1,"}\n");
    return;
  }
  CUtlBuffer::Printf(param_1,"\"%s\" \"",DAT_00f71e44);
  if (this_00 != (CDmxElement *)0x0) {
    pUVar3 = (UniqueId_t *)CDmxElement::GetId(this_00);
    ::Serialize(param_1,pUVar3);
  }
  if (((((byte)param_1[0x15] & 1) != 0) && (*(int *)(param_1 + 0x10) != 0)) &&
     (*(char *)(*(int *)param_1 + ((*(int *)(param_1 + 0x10) + -1) - *(int *)(param_1 + 0x20))) ==
      '\n')) {
    iVar4 = 0;
    if (((byte)param_1[0x15] & 0x10) == 0) {
      iVar4 = *(int *)(param_1 + 0x18);
    }
    while (iVar4 = iVar4 + -1, -1 < iVar4) {
      cVar1 = CUtlBuffer::CheckPut(param_1,1);
      if (cVar1 != '\0') {
        *(undefined1 *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = 9
        ;
        *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
        CUtlBuffer::AddNullTermination(param_1);
      }
    }
  }
  cVar1 = CUtlBuffer::CheckPut(param_1,1);
  if (cVar1 == '\0') {
    return;
  }
  *(undefined1 *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = 0x22;
  *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
  CUtlBuffer::AddNullTermination(param_1);
  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)