V_wcsistr
0x00049200 · 211 bytes · __cdecl
_Z9V_wcsistrPKwS0_
Decompiled
undefined (2 params)
/* V_wcsistr(wchar_t const*, wchar_t const*) */
wchar_t * V_wcsistr(wchar_t *param_1,wchar_t *param_2)
{
wchar_t *pwVar1;
wint_t wVar2;
wint_t wVar3;
wchar_t __wc;
wint_t wVar4;
wchar_t __wc_00;
int iVar5;
wchar_t local_28;
wchar_t *local_24;
if (((param_1 != (wchar_t *)0x0) && (param_2 != (wchar_t *)0x0)) &&
(local_28 = *param_1, local_28 != L'\0')) {
wVar2 = towlower(*param_2);
do {
while( true ) {
pwVar1 = param_1;
local_24 = pwVar1 + 1;
wVar3 = towlower(local_28);
if (wVar3 != wVar2) break;
__wc_00 = param_2[1];
if (__wc_00 == L'\0') {
return pwVar1;
}
local_28 = *local_24;
if (local_28 == L'\0') {
return (wchar_t *)0x0;
}
__wc = local_28;
iVar5 = 0;
while( true ) {
wVar3 = towlower(__wc);
wVar4 = towlower(__wc_00);
param_1 = local_24;
if (wVar3 != wVar4) break;
__wc_00 = *(wchar_t *)((int)param_2 + iVar5 + 8);
if (__wc_00 == L'\0') {
return pwVar1;
}
__wc = *(wchar_t *)((int)pwVar1 + iVar5 + 8);
iVar5 = iVar5 + 4;
if (__wc == L'\0') {
return (wchar_t *)0x0;
}
}
}
local_28 = *local_24;
param_1 = local_24;
} while (local_28 != L'\0');
}
return (wchar_t *)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.