L L4D2node

CCurveData::GetBoundedSample

0x00ba60a0 · 455 bytes · __thiscall

_ZN10CCurveData16GetBoundedSampleEP18ICurveDataAccessoriRb

Decompiled

undefined (4 params)

/* CCurveData::GetBoundedSample(ICurveDataAccessor*, int, bool&) */

undefined1 * __thiscall
CCurveData::GetBoundedSample(CCurveData *this,ICurveDataAccessor *param_1,int param_2,bool *param_3)

{
  int iVar1;
  uint uVar2;
  longdouble lVar3;
  
  if (param_2 < 0) {
    if (GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart == '\0') {
      iVar1 = __cxa_guard_acquire(&GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart);
      if (iVar1 != 0) {
        GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart._0_4_ = 0;
        GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart._4_4_ = 0;
        GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart[8] = 0;
        GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart[9] = 0;
        __cxa_guard_release(&GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart);
      }
    }
    GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart._4_4_ = 0;
    if (this[0x14] == (CCurveData)0x0) {
      GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart._0_4_ = 0;
      uVar2 = 0;
    }
    else {
      GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart._0_4_ =
           *(undefined4 *)(this + 0x17);
      uVar2 = (uint)(*(ushort *)(this + 0x15) & 0x7fff);
    }
    GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart[9] = (undefined1)(uVar2 >> 7);
    GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart[8] =
         GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart[8] & 1 | (char)uVar2 * '\x02';
    *param_3 = true;
    return GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullstart;
  }
  if (*(int *)(this + 0xc) <= param_2) {
    if (GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend == '\0') {
      iVar1 = __cxa_guard_acquire(&GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend);
      if (iVar1 != 0) {
        GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend._0_4_ = 0;
        GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend._4_4_ = 0;
        GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend[8] = 0;
        GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend[9] = 0;
        __cxa_guard_release(&GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend);
      }
    }
    lVar3 = (longdouble)(*(code *)**(undefined4 **)param_1)(param_1);
    GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend._4_4_ = (undefined4)lVar3;
    if (this[0x1b] == (CCurveData)0x0) {
      GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend._0_4_ = 0;
      uVar2 = 0;
    }
    else {
      GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend._0_4_ = *(undefined4 *)(this + 0x1e);
      uVar2 = (uint)(*(ushort *)(this + 0x1c) & 0x7fff);
    }
    GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend[9] = (undefined1)(uVar2 >> 7);
    GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend[8] =
         GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend[8] & 1 | (char)uVar2 * '\x02';
    *param_3 = true;
    return GetBoundedSample(ICurveDataAccessor*,int,bool&)::nullend;
  }
  *param_3 = false;
  if (*(int *)(this + 0xc) <= param_2) {
    return (undefined1 *)0x0;
  }
  return (undefined1 *)(*(int *)this + param_2 * 10);
}

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)