L L4D2node

WildcardMatch

0x0042e8a0 · 191 bytes · __cdecl

_Z13WildcardMatchPKcS0_

Decompiled

undefined (2 params)

/* WildcardMatch(char const*, char const*) */

bool WildcardMatch(char *param_1,char *param_2)

{
  char cVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  
  if (param_1 == (char *)0x0 || param_2 == (char *)0x0) {
    return false;
  }
  cVar1 = *param_2;
  do {
    if (cVar1 == '\0') {
      cVar2 = *param_1;
      if (cVar2 == '\0') {
        return true;
      }
LAB_0042e948:
      return cVar2 == '*';
    }
    cVar2 = *param_1;
    if (cVar2 == '\0') {
      return false;
    }
    iVar3 = tolower((int)cVar1);
    iVar4 = tolower((int)cVar2);
    if (iVar3 != iVar4) {
      cVar2 = *param_1;
      if (cVar2 == '\0') {
        return cVar1 == '\0';
      }
      goto LAB_0042e948;
    }
    param_2 = param_2 + 1;
    cVar1 = *param_2;
    param_1 = param_1 + 1;
  } while( true );
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)