std::__rotate_adaptive<unsigned_char*,unsigned_char*,int>
0x00143ba0 · 342 bytes · unknown
_ZSt17__rotate_adaptiveIPhS0_iET_S1_S1_S1_T1_S2_T0_S2_
Decompiled
uchar * (7 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* unsigned char* std::__rotate_adaptive<unsigned char*, unsigned char*, int>(unsigned char*,
unsigned char*, unsigned char*, int, int, unsigned char*, int) */
uchar * std::__rotate_adaptive<unsigned_char*,unsigned_char*,int>
(uchar *param_1,uchar *param_2,uchar *param_3,int param_4,int param_5,
uchar *param_6,int param_7)
{
size_t sVar1;
size_t sVar2;
uchar *puVar3;
if ((param_5 < param_4) && (param_5 <= param_7)) {
puVar3 = param_1;
if (param_5 != 0) {
sVar2 = (int)param_3 - (int)param_2;
sVar1 = 0;
if (sVar2 != 0) {
memmove(param_6,param_2,sVar2);
sVar1 = sVar2;
}
sVar2 = (int)param_2 - (int)param_1;
if (sVar2 != 0) {
memmove(param_3 + -sVar2,param_1,sVar2);
}
if (sVar1 != 0) {
memmove(param_1,param_6,sVar1);
puVar3 = param_1 + sVar1;
}
}
}
else {
if (param_7 < param_4) {
__rotate<unsigned_char*>(param_1,param_2,param_3,0);
return param_1 + ((int)param_3 - (int)param_2);
}
puVar3 = param_3;
if (param_4 != 0) {
sVar2 = (int)param_2 - (int)param_1;
sVar1 = 0;
if (sVar2 != 0) {
memmove(param_6,param_1,sVar2);
sVar1 = sVar2;
}
if ((int)param_3 - (int)param_2 != 0) {
memmove(param_1,param_2,(int)param_3 - (int)param_2);
}
puVar3 = param_3;
if (sVar1 != 0) {
memmove(param_3 + -sVar1,param_6,sVar1);
puVar3 = param_3 + -sVar1;
}
}
}
return puVar3;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.