V_strnistr
0x00b7b330 · 310 bytes · __cdecl
_Z10V_strnistrPKcS0_i
Decompiled
undefined (3 params)
/* V_strnistr(char const*, char const*, int) */
char * V_strnistr(char *param_1,char *param_2,int param_3)
{
char cVar1;
char cVar2;
char cVar3;
int iVar4;
char cVar5;
char *local_20;
int local_14;
if ((((param_1 != (char *)0x0) && (param_2 != (char *)0x0)) && (cVar5 = *param_1, cVar5 != '\0'))
&& (0 < param_3)) {
cVar3 = *param_2;
if ((byte)(cVar3 + 0xbfU) < 0x1a) {
cVar3 = cVar3 + ' ';
}
do {
local_20 = param_1 + 1;
iVar4 = param_3 + -1;
cVar1 = cVar5 + ' ';
if (0x19 < (byte)(cVar5 + 0xbfU)) {
cVar1 = cVar5;
}
if (cVar1 == cVar3) {
cVar1 = param_2[1];
if (cVar1 == '\0') {
return param_1;
}
if (iVar4 == 0) {
return (char *)0x0;
}
cVar5 = *local_20;
if (cVar5 == '\0') {
return (char *)0x0;
}
local_14 = 0;
cVar2 = cVar5;
while( true ) {
if ((byte)(cVar2 + 0xbfU) < 0x1a) {
cVar2 = cVar2 + ' ';
}
if ((byte)(cVar1 + 0xbfU) < 0x1a) {
cVar1 = cVar1 + ' ';
}
if (cVar2 != cVar1) break;
cVar1 = param_2[local_14 + 2];
if (cVar1 == '\0') {
return param_1;
}
if (local_14 == param_3 + -2) {
return (char *)0x0;
}
local_14 = local_14 + 1;
cVar2 = local_20[local_14];
if (cVar2 == '\0') {
return (char *)0x0;
}
}
}
else {
cVar5 = *local_20;
if (cVar5 == '\0') {
return (char *)0x0;
}
}
param_3 = iVar4;
param_1 = local_20;
} while (0 < iVar4);
}
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.