L L4D2node

CBaseServerVehicle::ParseExitAnim

0x00b39af0 · 431 bytes · __thiscall

_ZN18CBaseServerVehicle13ParseExitAnimEP9KeyValuesb

Decompiled

undefined (3 params)

/* CBaseServerVehicle::ParseExitAnim(KeyValues*, bool) */

void __thiscall
CBaseServerVehicle::ParseExitAnim(CBaseServerVehicle *this,KeyValues *param_1,bool param_2)

{
  KeyValues *this_00;
  char *pcVar1;
  int iVar2;
  int iVar3;
  void *pvVar4;
  int iVar5;
  int iVar6;
  
  this_00 = (KeyValues *)KeyValues::GetFirstSubKey(param_1);
  do {
    if (this_00 == (KeyValues *)0x0) {
      return;
    }
    iVar6 = *(int *)(this + 0x60);
    iVar5 = *(int *)(this + 0x58);
    iVar2 = iVar6 + 1;
    if (iVar5 < iVar2) {
      iVar3 = *(int *)(this + 0x5c);
      if (iVar3 < 0) goto LAB_00b39b47;
      if (iVar3 == 0) {
        if (iVar5 == 0) {
          if (iVar2 < 2) {
            iVar3 = 1;
            goto LAB_00b39c47;
          }
          iVar5 = 1;
        }
        do {
          iVar3 = iVar5 * 2;
          if (iVar2 <= iVar3) break;
          iVar3 = iVar5 * 4;
          iVar5 = iVar3;
        } while (iVar3 < iVar2);
      }
      else {
        for (iVar3 = (iVar6 / iVar3 + 1) * iVar3; iVar3 < iVar2; iVar3 = (iVar3 + iVar2) / 2) {
        }
      }
LAB_00b39c47:
      *(int *)(this + 0x58) = iVar3;
      if (*(void **)(this + 0x54) == (void *)0x0) {
        pvVar4 = malloc(iVar3 * 0x9c);
        *(void **)(this + 0x54) = pvVar4;
      }
      else {
        pvVar4 = realloc(*(void **)(this + 0x54),iVar3 * 0x9c);
        *(void **)(this + 0x54) = pvVar4;
        iVar2 = *(int *)(this + 0x60) + 1;
      }
    }
    else {
LAB_00b39b47:
      pvVar4 = *(void **)(this + 0x54);
    }
    *(int *)(this + 0x60) = iVar2;
    iVar2 = (iVar2 - iVar6) + -1;
    iVar6 = iVar6 * 0x9c;
    *(void **)(this + 100) = pvVar4;
    if (0 < iVar2) {
      _V_memmove((void *)((int)pvVar4 + iVar6 + 0x9c),(void *)((int)pvVar4 + iVar6),iVar2 * 0x9c);
    }
    pcVar1 = (char *)KeyValues::GetName(this_00);
    V_strncpy((char *)(*(int *)(this + 0x54) + iVar6 + 2),pcVar1,0x80);
    *(bool *)(*(int *)(this + 0x54) + 1 + iVar6) = param_2;
    pcVar1 = (char *)KeyValues::GetString(this_00,(char *)0x0,"");
    iVar2 = V_strncmp(pcVar1,"upsidedown",10);
    if (iVar2 == 0) {
      *(undefined1 *)(*(int *)(this + 0x54) + iVar6) = 0;
      this_00 = (KeyValues *)KeyValues::GetNextKey(this_00);
    }
    else {
      *(undefined1 *)(*(int *)(this + 0x54) + iVar6) = 1;
      this_00 = (KeyValues *)KeyValues::GetNextKey(this_00);
    }
  } while( true );
}

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)