Skip to content

aowlspt_modetext.h

Source: abi/aowlspt_modetext.h — 239 lines, 12 file-scope functions.

What this header owns

Reproduced verbatim from the header's own banner comment — these notes are frequently the only written record of why the subsystem is shaped the way it is.

text
 aowlspt_modetext.h -- the main menu's bottom-right GAME MODE label, made
host/mod-controlled.

===========================================================================
WHAT THE LABEL ACTUALLY IS
===========================================================================

The bottom-right corner of the main menu reads "PVE ZONE" on a stock post-1.0
client. It is NOT a standalone TMP object and it is NOT a `LocalizedText` that
has to be fought. It is one of three strings `EFT.UI.PreloaderUI` composes
into its corner label, and the game gives us a real setter for it.

Resolved OFFLINE from the decrypted `global-metadata.dat` (decrypted here with
`tools/metablob.py` + the installed layout blob at
`mods/tarkov/data/metadata/1.1.0.1.46777.json`, verified `AF 1B B1 FA` / v31)
via `tools/il2cpp_resolve.py`. No string search of the metadata was involved
-- managed strings there are encrypted -- and nothing was guessed.

  EFT.UI.PreloaderUI  (typedef 14830, Assembly-CSharp.dll) fields:
      0x020  _alphaVersionLabel   LocalizedText        <- the corner label
      0x110  _alphaVersionText    string
      0x118  _sessionIdText       string
      0x128  _sessionModeText     string               <- "PVE ZONE"

  EFT.UI.PreloaderUI methods:
      Update              RVA 0x1569f20
      SetGameModeText     RVA 0x156cff0   instance, 1 string arg -> void
      RefreshCornerLabel  RVA 0x156d050

THE IDENTIFICATION IS SELF-PROVING, from the disassembly rather than the name.
`SetGameModeText`'s own prologue is:

    83 3D 49 95 B4 05 00     cmp  dword [rip+0x5B49549], 0   ; cctor guard
    4C 8B C9                 mov  r9, rcx                    ; this
    48 89 91 28 01 00 00     mov  [rcx+0x128], rdx           ; _sessionModeText = arg

i.e. the method stores its RDX argument into field 0x128 and then refreshes
the corner label. Field 0x128 IS the mode text, the method IS its setter, and
the IL2CPP instance convention (RCX=this, RDX=arg0, R8=hidden MethodInfo*) is
visible in those bytes. That is why this file calls the setter and never
pokes 0x128 directly.

===========================================================================
WHY THIS DOES NOT REPEAT THE PHASE-2a REPAINT BUG
===========================================================================

The live Phase-2a bug is: store into `TMP.m_text` (0xE0) + a dirty byte, the
store demonstrably lands, and the screen never changes. This file does not do
that. It calls the game's OWN setter, which performs whatever invalidation the
game performs for itself -- `RefreshCornerLabel` is right there in the same
type, at the next RVA, and is what the setter tail-calls. Calling the real
managed method at its static RVA is the sanctioned escape from a dead
reflection API on this build; `abi/aowlspt_invoke2.h` established the
convention with disassembled evidence, and this is the same shape
(`aowl_mi2_call_v_pp`: instance, one reference arg, void).

===========================================================================
SAFETY
===========================================================================

Same discipline as `aowl_mi2_fn` and `aowl_bridge_settings_target_at`:

  * every RVA is checked to land in COMMITTED EXECUTABLE memory with
    `VirtualQuery` BEFORE the 16 prologue bytes are compared, because a stale
    RVA on another build can point at an uncommitted page and `memcmp` there
    faults;
  * the 16-byte prologue must match exactly or the target is refused and
    nothing is bound -- on any build but this one the feature is simply a
    no-op, never a hazard;
  * the caller (`modetext.nim`) is flag-gated (`uxMenuModeText`), default OFF,
    runs its whole body under ONE `aowl_p_p_seh` guard (never nested), guards
    every pointer hop with `aowl_is_readable`, self-disables after a small
    number of faults, and -- the specific hazard that crashed this host once
    before -- allocates a managed string ONLY when the desired text actually
    CHANGED, never once per frame.

Constants

  • AOWLSPT_MODETEXT_H
  • AOWL_MTX_CORNERLABEL_OFF
  • AOWL_MTX_PRELOADER_UPDATE_RVA
  • AOWL_MTX_REFRESHCORNER_RVA
  • AOWL_MTX_SESSIONMODETEXT_OFF
  • AOWL_MTX_SETGAMEMODETEXT_RVA
  • AOWL_MTX_TARGET_COUNT
  • AOWL_MTX_T_REFRESH
  • AOWL_MTX_T_SETTEXT
  • AOWL_MTX_T_UPDATE

Types

  • struct AowlMtxTarget

Functions

SignatureLine
void aowl_mtx_fn(int32_t i)164
char aowl_mtx_name(int32_t i)199
uint32_t aowl_mtx_rva(int32_t i)203
int32_t aowl_mtx_target_count(void)207
int32_t aowl_mtx_profull_count(void)208
int32_t aowl_mtx_base_ok(void)209
int32_t aowl_mtx_ok_count(void)210
int32_t aowl_mtx_bad_count(void)211
int32_t aowl_mtx_off_mode_text(void)213
int32_t aowl_mtx_off_corner_label(void)214
void aowl_mtx_call_v_pp(void* fn, void* self, void* a0)227
void aowl_mtx_call_v_p(void* fn, void* self)233

aoughwl — self-hosted platform for things n stuff. Contact / Support on Discord for access to the private backends.