L L4D2node

uw_init_context_1

0x000ad340 · 427 bytes · unknown

Decompiled

undefined (0 params)

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void uw_init_context_1(undefined4 param_1)

{
  undefined4 *in_EAX;
  int iVar1;
  uint uVar2;
  uint uVar3;
  undefined4 *puVar4;
  undefined4 *puVar5;
  bool bVar6;
  undefined4 unaff_retaddr;
  undefined1 local_e0 [152];
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_3c;
  
  bVar6 = ((uint)in_EAX & 1) != 0;
  uVar3 = 0x80;
  puVar4 = in_EAX;
  if (bVar6) {
    *(undefined1 *)in_EAX = 0;
    puVar4 = (undefined4 *)((int)in_EAX + 1);
    uVar3 = 0x7f;
  }
  puVar5 = puVar4;
  if (((uint)puVar4 & 2) != 0) {
    puVar5 = (undefined4 *)((int)puVar4 + 2);
    *(undefined2 *)puVar4 = 0;
    uVar3 = uVar3 - 2;
  }
  for (uVar2 = uVar3 >> 2; uVar2 != 0; uVar2 = uVar2 - 1) {
    *puVar5 = 0;
    puVar5 = puVar5 + 1;
  }
  puVar4 = puVar5;
  if ((uVar3 & 2) != 0) {
    puVar4 = (undefined4 *)((int)puVar5 + 2);
    *(undefined2 *)puVar5 = 0;
  }
  if (bVar6) {
    *(undefined1 *)puVar4 = 0;
  }
  in_EAX[0x13] = unaff_retaddr;
  in_EAX[0x18] = 0x40000000;
  iVar1 = uw_frame_state_for();
  if (iVar1 == 0) {
    iVar1 = pthread_once(&once_regsizes_8792,init_dwarf_reg_size_table);
    if ((iVar1 == 0) || (dwarf_reg_size_table != '\0')) {
      bVar6 = DAT_000e6ddc == '\x04';
    }
    else {
      DAT_000e6ddc = '\x04';
      bVar6 = true;
      dwarf_reg_size_table = '\x04';
      DAT_000e6dda = 4;
      DAT_000e6dd9 = 4;
      DAT_000e6ddb = 4;
      DAT_000e6dde = 4;
      DAT_000e6ddf = 4;
      DAT_000e6ddd = 4;
      DAT_000e6de3 = 0xc;
      DAT_000e6de4 = 0xc;
      DAT_000e6de5 = 0xc;
      DAT_000e6de6 = 0xc;
      DAT_000e6de7 = 0xc;
      DAT_000e6de8 = 0xc;
      DAT_000e6de1 = 4;
      DAT_000e6de0 = 4;
    }
    if (bVar6) {
      if ((*(byte *)((int)in_EAX + 99) & 0x40) != 0) {
        *(undefined1 *)(in_EAX + 0x1c) = 0;
      }
      in_EAX[4] = local_e0;
      local_3c = 1;
      local_44 = 4;
      local_48 = 0;
      uw_update_context_1();
      in_EAX[0x13] = param_1;
      return;
    }
  }
                    /* WARNING: Subroutine does not return */
  abort();
}

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.



        
        

⚠ 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.

Return-type handling cheatsheet (DHookReturn)