Native vending access admission
This is read-only original-client research. No production source/data, SQLite, server or client was changed. The REA session was exported and closed.
Target and retained state
Target: anarchy-vanilla-14.9.1/kkr.dll, SHA-256
a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0.
Ghidra12.1.2, analysis profile
17fae9135c0f647ce7271e2b74936949ebe245320c1606a223c86bce0b2b7bed.
The matching local/nano-death-research/kkr-death.snapshot.json was supplied
when opening. native-evidence.json retains119 records including reused
snapshot evidence; kkr-access.snapshot.json includes the additional queries.
Addresses below use original image base0x10000000. Generated lifted C uses
0x36000000, an offset of0x26000000.
Answer: Use selects action3 only
Observed original vending admission0x100a9430 calls
FUN_1008fc40(3, player + 0xe4, 0) and returns2 for true,0 for false.
Its incoming data reference is0x101743b8, offset0x4c into the vending
primary vtable0x1017436c. Constructor0x100a8e70 installs that vtable.
There is no separate action0 admission in this checker.
Wrapper0x1008fc40 looks up the requested action through0x1008f990. The
lookup uses the exact requested integer key in the action map; it has no
action0 fallback. If the action is absent, wrapper returns1. Otherwise it
sets criteria identity context to zero and evaluates the action's list with
the player's stat interface and rewrite flag0. Empty lists pass the shared
interpreter, as already established in docs/combat-client-requirements.md.
Therefore the original client admission rule is:
- No actions: unrestricted by criteria.
- An action3 with empty criteria: unrestricted by criteria.
- An action3 with criteria: evaluate its whole postfix list against the player.
- Only action0 present: action3 is absent, so unrestricted by this Use check. Do not silently promote the action0 side restriction to action3.
This last distinction matters for14 templates (eight Clan, six Omni) in the 346-template placement catalog. The source naming suggests faction intent, but the native Use checker does not test those action0 requirements. This is static client evidence; historical server-side admission could have been stricter and has not been recovered. Naming is not evidence for a different rule. A server implementation mirroring this observed path should evaluate action3 and accept absence, retaining action0 data without reinterpreting it.
Principal Evidence:
ev_7f0e77dcffa1f7d11eff955e55ddd4f7643f8312ef6a1d01818fefd7e6cbc0de: exact vending checker0x100a9430 and generic item Use checker0x1008fda0.ev_409f566a7d884d91536b4f3c458ee7884f3c3f8ffcc90012feb843e5790871c7: complete vending checker body0x100a9430..0x100a9457 and vtable reference.ev_adf57635aaa6f6799d0e4e3ff17c5979c87670af35566d2d9f66680bbc471181: absent-action-success wrapper0x1008fc40.ev_c7a37ba5ec24ae8342b9ab4fa4a7c6e4d7bf9f3da7299299d847a5f209d22874: exact action-map lookup0x1008f990 (and related action callers).ev_68c5a56085d944f5bc19eac7ae0ed697eeb538d24f5bc3b9217cb29c2b91f944: vending constructor0x100a8e70 and original criteria formatter0x10024a40.
Selected complete pseudocode is copied to native-0x*.c.txt. The file
native-0x10024f00.c.txt was selected by an interior address; its canonical
procedure is the exported ConvertCriteria at0x10024a40, as the Evidence says.
Stat389/operator22: proved from first-party code
Original stat-name registration labels0x185 (389) Expansions; it is not a
shop-specific side/level gate. Original ConvertCriteria at0x10024a40
formats stat389 as Must have expansionset: and independently tests:
- value bit1:
Booster Pack 1 - The Notum Wars. - value bit2:
Expansion Pack 1 - ShadowLands. - other value bits: illegal expansion data diagnostic.
This identifies both the stat and bit1 without relying on Auno or a later
emulator. The current placement templates202606,202607,202608,202614,204743
all author (stat389, value1, operator22) on action3. These require Notum Wars
entitlement. They do not require Shadowlands.
Operator22 is the original registered BitAnd operator. Native interpreter
0x100056e0 obtains stat value in getter mode2 and pushes whether any value-mask
bit intersects, (get(stat,2) & value) != 0. It does not require all mask bits.
The original compressed operator dispatch mapping and getter mode are already
documented in docs/combat-client-requirements.md and the exported snapshot.
Fresh complete interpreter pseudocode is Evidence
ev_44d7183430ce32258814b3bfd7811bb45abccd05b9cc00b61ec16fb00da96051.
Stat-name registration and expansion-related client paths are in
ev_708c4fadbbd061b7ff4eaaf7db38b07aee4e004ee239fd2e9a9ceeb502a12614.
The canonical naming registration functions resolved from selected interior
addresses are0x10036490 and0x10037b70; refer to full Evidence for boundaries.
Current Go evaluator coverage
The346 original referenced vending templates contain these criterion operands:
| Stat/operator | Occurrences | Current support |
|---|---|---|
| Side33 / Equal0 | 202 | Supported |
| Boolean0 / And4 | 6 | Supported by shared postfix evaluator |
| Level54 / Larger2 | 4 | Supported, strict greater than |
| Profession60 / Equal0 | 3 | Supported |
| VisualProfession368 / Equal0 | 1 | Supported by current profession model |
| BreakingAndEntering165 / Larger2 | 1 | Supported effective skill with trickle/equipment/nanos |
| Expansions389 / BitAnd22 | 5 | Neither stat389 nor operator22 is currently supported |
The three specialist shops99499,99538,151987 require profession7 and level>24, with side equality where authored. Shop-of-Fortune155595 requires level>39. Wrecked Shop158698 requires visual profession4 and effective BreakingAndEntering
- Existing shared
requirementsMetpluscharacter.meetsStatRequirementsupports all of these complete postfix lists without template-specific cases.
ownedItem.requirementsMet(3, player.meetsStatRequirement) accepts absence
and empty actions, so it has the required general shape. It currently fails
closed on the five expansion checks. Supporting them requires an authoritative
current player/server expansion entitlement value in addition to BitAnd22;
returning true for unknown stats or treating every BitAnd as a pass is wrong.
A server-wide grant of Notum Wars bit1 would be a coherent current development
policy if desired, but is a policy choice rather than historical account data
recovered from these binaries. Do not add per-template exemptions.
The focused implementation can instead keep these five predicates closed while
sharing the existing nano-template action3 evaluator with shop Use. Neither
effectiveStat nor the current account/character model supplies a proven
expansion entitlement. A future producer should supply the character/account's
owned expansion-bit mask as intrinsic stat389, consistently in authoritative
Use checks and native character stat delivery. The evaluator should then apply
BitAnd22 in getter-mode2 semantics. A user-controlled client stat is not an
authoritative entitlement source. This research found no existing trusted
current-player producer to reuse.
All but one referenced template have Can stat30 equal8. Dependency Item41325 has no Can stat30; native default action picking will not offer Use for it. That does not change the vending criteria check above, which itself only tests action3. Its unavailable dependency-world placement is not evidence for granting access to a placeholder terminal.
Verification boundaries and remaining questions
- Answered: noaction/action0/action3 client admission and exact missing-action success, based on code and vtable wiring.
- Answered: stat389 and mask1 first-party meaning, and operator22 computation.
- Answered: current shared evaluator coverage for every authored catalog gate.
- Unresolved: historical authoritative server behavior beyond client prediction, account entitlement distribution, and vending range. Existing living/session/ readiness/range/atomic sale validation remains necessary server policy.
- No runtime execution was performed here. The parent must verify actual native interaction and presentation using the restored registry.
The previous source catalog audit remains authoritative for authored placements, templates and stock descriptors. Exact purchase-stock membership and rotation are separate questions; this evidence does not invent a catalog.
Follow-up: Can30 and forged Use for the dependency placeholder
The exact original symbol is
n3EngineClientAnarchy_t::N3Msg_DefaultActionOnDynel, original0x1002c350,
lifted sub_3602C350 in client/game/kkr.dll/lifted-0017.c:548.
After its character branch, it casts the picked n3Dynel to SimpleItem and then:
- At0x1002c544..0x1002c54a, calls the item's stat getter for30, getter mode2.
- At0x1002c54d tests low-byte bit1; if present, calls pickup and returns.
- Otherwise0x1002c56d tests low-byte bit8; zero returns without Use.
- With bit8 present,0x1002c577 calls
N3Msg_UseItem0x1002acd0.
Thus Can stat30 bit8 is the generic authored capability for native default Use selection, including vending machines. It is distinct from action3's requirements. Missing action3 means no criteria restriction, not a grant of an absent Use capability.
The original vending primary vtable0x1017436c uses getter0x10003000 at+4.
This getter reads the raw stat-array slot and ignores the mode argument for
this object. See client/game/kkr.dll/lifted-0000.c:10267,
sub_36003000. The raw stat-array constructor0x10008bb0 fills1200 slots with
the missing-stat sentinel1234567890 (0x499602d2), as shown in
client/game/kkr.dll/lifted-0003.c:965; base constructor0x1002fd30 calls it
(lifted-0018.c:16648). An absent Can is therefore not automatically8.
The missing sentinel itself also has bit8 clear. Vending initializer0x100a8f40
does not grant Can8; its previously retained full code is in
local/shop-research/wire/replacement-rdb-batch.json, Evidence
ev_822a7c99e15f5b03748eee30987a8bfe2fa1f865bc3a846e21d0437a641aee04.
The inspected inherited initializers0x1008e840,0x1009c500,0x10097370 and
0x1008b490 likewise do not set stat30.
tmp_can_followup.py verifies the original binary SHA and reads original PE
vtable words, confirming+4=0x10003000 and+0x4c=0x100a9430. No new REA session
was opened for this follow-up.
Recommendation: (itemStat(template,30) & 8) != 0 is justified as a shared
shop-admission precondition. The server helper's absent-stat0 and the native
missing sentinel both fail this particular bit test. Reject forged Use for
placeholder41325 even if its criteria are absent. This is a reconstruction
policy grounded in native authored capability selection; the vending-specific
criteria callback0x100a9430 itself does not repeat the bit test, so do not cite
it as proof of an original authoritative server check. No per-template branch
is needed. Other345 catalog templates carry explicit Can8 and are unchanged
by this precondition.