RR_Parse
0x005b4050 · 319 bytes · __cdecl
_Z8RR_ParsePKcPc
Decompiled
undefined (2 params)
/* RR_Parse(char const*, char*) */
char * RR_Parse(char *param_1,char *param_2)
{
byte *pbVar1;
char cVar2;
byte bVar3;
uint uVar4;
int iVar5;
uint uVar6;
*param_2 = '\0';
if (param_1 == (char *)0x0) {
return (char *)(byte *)0x0;
}
uVar4 = (uint)(byte)*param_1;
while( true ) {
while (bVar3 = (byte)uVar4, bVar3 < 0x21) {
if (bVar3 == 0) {
return (char *)(byte *)0x0;
}
pbVar1 = (byte *)(param_1 + 1);
param_1 = param_1 + 1;
uVar4 = (uint)*pbVar1;
}
if (bVar3 != 0x2f) {
iVar5 = 0;
pbVar1 = (byte *)(param_1 + 1);
if (bVar3 == 0x22) {
while( true ) {
bVar3 = *pbVar1;
if ((byte)(bVar3 + 0xbf) < 0x1a) {
bVar3 = bVar3 + 0x20;
}
if ((bVar3 == 0) || (bVar3 == 0x22)) break;
param_2[iVar5] = bVar3;
iVar5 = iVar5 + 1;
pbVar1 = pbVar1 + 1;
}
param_2[iVar5] = '\0';
return (char *)(pbVar1 + 1);
}
uVar6 = uVar4;
cVar2 = g_BreakSetIncludingColons[uVar4];
goto joined_r0x005b40d4;
}
pbVar1 = (byte *)param_1;
if (param_1[1] != 0x2f) break;
while( true ) {
param_1 = (char *)(pbVar1 + 1);
if (((char)uVar4 == '\n') || ((char)uVar4 == '\0')) break;
uVar4 = (uint)pbVar1[2];
pbVar1 = (byte *)param_1;
}
}
uVar6 = 0x2f;
cVar2 = g_BreakSetIncludingColons[0x2f];
joined_r0x005b40d4:
iVar5 = 0;
if (cVar2 != '\0') {
*param_2 = (char)uVar6;
param_2[1] = '\0';
return param_1 + 1;
}
do {
while( true ) {
cVar2 = (char)uVar4;
if ((byte)(cVar2 + 0xbfU) < 0x1a) {
cVar2 = cVar2 + ' ';
}
param_1 = param_1 + 1;
param_2[iVar5] = cVar2;
iVar5 = iVar5 + 1;
bVar3 = *param_1;
uVar4 = (uint)bVar3;
if ((byte)(bVar3 + 0xbf) < 0x1a) break;
if (g_BreakSetIncludingColons[uVar4] != '\0') goto LAB_005b4176;
if (bVar3 < 0x21) {
param_2[iVar5] = '\0';
return param_1;
}
}
uVar4 = uVar4 + 0x20;
} while (g_BreakSetIncludingColons[uVar4 & 0xff] == '\0');
LAB_005b4176:
param_2[iVar5] = '\0';
return param_1;
}
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.