__wrap_rename
0x0025bcb0 · 325 bytes · unknown
Decompiled
undefined (0 params)
int __wrap_rename(char *param_1,char *param_2)
{
char *__new;
int iVar1;
int in_GS_OFFSET;
char *local_434;
char local_430 [512];
undefined4 local_230;
char *local_22c;
char *local_228;
char local_224 [512];
undefined4 local_24;
int local_20;
local_228 = (char *)0x0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_22c = param_2;
local_24 = pathmatch(param_2,&local_228,true,local_224,0x200);
if (local_228 == (char *)0x0) {
local_228 = local_22c;
}
__new = local_228;
local_434 = (char *)0x0;
/* try { // try from 0025bd5e to 0025bd62 has its CatchHandler @ 0025bdfe */
local_230 = pathmatch(param_1,&local_434,false,local_430,0x200);
if (local_434 == (char *)0x0) {
local_434 = param_1;
}
/* try { // try from 0025bd7a to 0025bd7e has its CatchHandler @ 0025be22 */
iVar1 = rename(local_434,__new);
if ((local_434 != param_1) && (local_434 != local_430)) {
free(local_434);
}
if ((local_228 != local_22c) && (local_228 != local_224)) {
free(local_228);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
⚠ This function has no mangled symbol — it may be internal/static. The
Linux gamedata field uses @-prefix symbol resolution which
requires an exported mangled name. You'll need a Linux byte signature
for this one (extract via extract_signature.java).
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.