V_stristr
0x000490e0 · 247 bytes · __cdecl
_Z9V_stristrPKcS0_
Decompiled
undefined (2 params)
/* V_stristr(char const*, char const*) */
char * V_stristr(char *param_1,char *param_2)
{
char *pcVar1;
char cVar2;
char cVar3;
char cVar4;
char cVar5;
char *local_1c;
int local_14;
if (((param_1 != (char *)0x0) && (param_2 != (char *)0x0)) && (cVar5 = *param_1, cVar5 != '\0')) {
cVar3 = *param_2;
if ((byte)(cVar3 + 0xbfU) < 0x1a) {
cVar3 = cVar3 + ' ';
}
do {
while( true ) {
pcVar1 = param_1;
local_1c = pcVar1 + 1;
cVar2 = cVar5 + ' ';
if (0x19 < (byte)(cVar5 + 0xbfU)) {
cVar2 = cVar5;
}
if (cVar2 != cVar3) break;
cVar2 = param_2[1];
if (cVar2 == '\0') {
return pcVar1;
}
cVar5 = *local_1c;
if (cVar5 == '\0') {
return (char *)0x0;
}
local_14 = 0;
cVar4 = cVar5;
while( true ) {
if ((byte)(cVar4 + 0xbfU) < 0x1a) {
cVar4 = cVar4 + ' ';
}
if ((byte)(cVar2 + 0xbfU) < 0x1a) {
cVar2 = cVar2 + ' ';
}
param_1 = local_1c;
if (cVar4 != cVar2) break;
cVar2 = param_2[local_14 + 2];
if (cVar2 == '\0') {
return pcVar1;
}
local_14 = local_14 + 1;
cVar4 = local_1c[local_14];
if (cVar4 == '\0') {
return (char *)0x0;
}
}
}
cVar5 = *local_1c;
param_1 = local_1c;
} while (cVar5 != '\0');
}
return (char *)0x0;
}
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.