Repository navigation
ListenHost
Client-hosted worlds: the StartPlay variant gate, the host patch set, the phase lifecycle, the MatchOver crashes.
SLGameMode.StartPlay FUN_1407b21e0 (0x1407b21e0–0x1407b3052).
?variant=nohost → NoHost (tag 1, DAT_143bc7180)
?variant=solo → Solo (tag 2, DAT_143bc7188)
otherwise → the game-mode getter (Hosted = 0)
Solo → NM_Standalone (0x1407b2665); other tags → NM_DedicatedServer (0x1407b2a0d). The helper at 0x1407b2a29 (FUN_14107fe90) returns 0 on equality, so je 0x1407b2d98 at 0x1407b2a30 is success; NM_ListenServer gives al = 1, and the builder at 0x1407b2a36–0x1407b2d92 runs. Fatal is a log: "Fatal" 0x142e3cf90 → toupper FUN_140541f20 → "FATAL" 0x142ec8da8 → FUN_14135c3e0(L"Fatal error:", …); exit behaviour [NOT RUN]. H1 forces success.
Browse: /Game/Maps/GameCon/GameCon_PersistentLevel?Name=Player?game=Tag?listen
GameNetDriver IpNetDriver_0 IpNetDriver listening on port 7777
switchServerMap FUN_1407aec30: both branches → travel closure FUN_1408c9890 → UWorld::ServerTravel; the host's only map-travel path, and it strips IsHost/PlayerSessionID (H11).
UGameEngine::LoadMap FUN_141a05360 → CALL [RDI+0x200] at 0x141a06aa8; false → Fatal 0x141a06b1b ("Couldn't spawn player: %s", line 9830), body = empty static FString 0x142cea8b0.
ULocalPlayer::SpawnPlayActor FUN_1419bff10: stores FUN_1419c0270's return at +0x30, returns param_1[6] != 0; FUN_1419c0270 reads the GameMode Login entry +0x6e8. Null sources:
-
AGameMode::Login— controller spawned, stage-3 hook errorJG 0x1417007b9(xor eax,eax; jmp epilogue) → null. -
onPlayerLoginFUN_140b83030—record+0x30(isHost) = 0 and nologgedInPlayersentry →"The host has left"0x142f2d4c8(loaded0x140b83459);onPlayerLogout unregistered player: Playeris the cleanup.
isHost writer FUN_140d43140: option IsHost 0x142eaa2f0 (read 0x140d43178) → +0x30 (0x140d431a5, 88 43 30); 0x140b83429–0x140b8342f is PIE-gated, dead. GetGameLoginOptions: {} = SLLocalPlayer.extraLoginOptions (+0xa0), a distinct map; a direct listen boot carries options only in the boot URL.
The listen URL's ?game= token is a GameModeClassAliases short name from the shipped
DefaultGame.ini (also DefaultGame_Shared.ini):
| short name | game mode class |
|---|---|
Tag |
/Game/Blueprints/Modes/BP_TagGameMode.BP_TagGameMode_C |
FreeForAll |
/Game/Blueprints/Modes/BP_SeekGameMode.BP_SeekGameMode_C |
Elimination |
/Game/Blueprints/Modes/BP_ElimGameMode.BP_ElimGameMode_C |
Bitball |
/Game/Blueprints/Modes/BP_BitballGameMode.BP_BitballGameMode_C |
There is no Seek alias: ?game=Seek fails with Failed to find object 'Class None.Seek' and the
world falls back to the default game mode. The stream phases (BettingPhase,
EnteringFlashSalePhase, FlashSalePhase) belong to FreeForAll.
.text file = VA − 0x140000C00; .rdata file = VA − 0x140000E00 (the delta includes the image base). Recompute the PE checksum after any edit (Login).
| row | purpose | VA | file | original | patch | state |
|---|---|---|---|---|---|---|
| H1 |
StartPlay accepts Hosted
|
0x1407b2a2e |
0x7b1e2e |
84 c0 |
31 c0 |
applied |
| H2 |
Login returns the spawned controller |
0x141700822 |
0x16ffc22 |
7f 95 |
90 90 |
applied |
| H3 | skip LoggedInPlayer.startLogin
|
0x140d48650 |
0xd47a50 |
40 |
c3 |
applied |
| H4 | NOP inner loadPlayerFromAppServer (if H3 reverted) |
0x140d487a4 |
0xd47ba4 |
e8 c7 e8 ff ff |
90×5 |
earlier runs |
| H5 | skip empty-IID kick in SetPlayerDefaults
|
0x1407b0ee3 |
0x7b02e3 |
84 c0 |
31 c0 |
applied |
| H6 | ret activateServer
|
0x140b7e4f0 |
0xb7d8f0 |
48 89 5c 24 10 |
c3 |
applied |
| H7 |
PreLogin skips "No game session ID" |
0x1407bb52d |
0x7ba92d |
84 c0 0f 84 28 03 00 00 |
31 c0 |
applied |
| H8 |
PreLogin skips NoHost "No host" |
0x1407bbdc9 |
0x7bb1c9 |
84 c0 0f 84 28 03 00 00 |
31 c0 |
applied |
| H9 | force m_registered
|
0x1407ba713 |
0x7b9b13 |
0f 94 c3 |
30 db 90 |
applied |
| H10 | skip registerServer
|
0x1407b2daf |
0x7b21af |
84 c0 |
0c 01 |
applied, with H9 |
| H11 | no travel from host login with Level
|
0x140b834fa |
0xb828fa |
e8 31 b7 c2 ff |
90×5 |
proposed |
| H12 |
isHost for every login |
0x140d431a0 |
0xd425a0 |
e8 cb 8e b5 ff |
b0 01 90 90 90 |
host-only |
| H13 | disable 900 s inactivity kick | 0x140cc61c0 |
0xcc55c0 |
40 55 41 56 |
c3 |
applied |
| H14 | phase timer 900 → 86400 (immediate) | 0x140739aa7 |
0x738ea7 |
84 03 00 00 |
80 51 01 00 |
proposed |
| W1 |
checkAllPlayersLoaded ≡ len >= 2
|
0x1407b73c8 |
0x7b67c8 |
24 bytes below | rewrite | applied |
| R1 |
canRestartPlayer drops appserver branch |
0x1407d5833 |
0x7d4c33 |
75 14 |
90 90 |
applied |
| C1 | rebuild contestants map at StartingRound (disp) |
0x140b80e9b (disp 0x140b80e9e) |
0xb8029e |
26 51 04 03 |
56 51 04 03 |
applied |
| C4 |
playerIID from playerSessionID, name fallback |
0x140d46e30 |
0xd46230 |
48 89 5c 24 10 |
E9 2B 1D D7 02 + 125-byte stub 0x143ab8b60
|
applied |
| C5 | length test in that stub |
0x143ab8b79, 0x143ab8b85
|
0x3ab7d79, 0x3ab7d85
|
4d 85 c9 |
85 c0 90 |
applied |
Working set (what --profile host actually applies): H1, H2, H3, H5, H6, H7, H8, H9, H10, H13,
P5 (gate5b_nop), P1 (round-timer cave), S2, W1, R1, C1, C4/C5 (identity cave), L1 (loop cave), and the
two match-data sites (send_match_data_bypass, send_match_data_post_skip). M2 is not in the set —
see "The MatchOver fatal" below, where M2's +0x31 is the expiry gate. H9 = cmp byte [manager+8],0 /
sete bl, bl == 1 = not registered.
The profile is authoritative; the table above uses its own row labels, and the patcher's internal site
names differ (activate_server_ret is H3's site, set_player_defaults_skip is H6's, and so on).
- H10 and H9 are a pair: H10 skips
registerServer, which on its own leavesm_registered = 0(PreLogin:Initializing) — that is why H10 alone was refuted; H9 forces the flag. H6 separately cuts thegetOurURL/checkVersionchain behind the registration fatal. - H12 host-only:
isHost=1for all logins → joiner"There is already a host on the server". - H11 needs
Level:switchServerMapat0x140b834fawhenrecord+0x38non-empty; the travel URL losesIsHost/PlayerSessionIDand re-enters "host has left". - H2 not semantic: success return only; Haxe may self-kick or fail its first data read.
- H3 global: both sides skip
startLogin, neither setsLoggedInPlayer+8, both take"finishLogin for player ".
[/Script/EngineSettings.GameMapsSettings]
GameDefaultMap=/Game/Maps/GameCon/GameCon_PersistentLevel
LocalMapOptions=?game=Tag?listen?IsHost=true?PlayerSessionID=host-1
Net timeouts: Joining (ConnectionTimeout / InitialConnectTimeout 600, both sections, both processes).
?IsHost=true must reach the login options; one browse line had only ?game=Tag?listen ([UNK] where dropped); the host request shows Login request: /Game/Maps/Entry?Version=HNS-release.2.7.31?Name=DevUser, engine-built.
Each row is the previous row plus the listed patches.
| composition | result |
|---|---|
| H1, H2, H3, H5–H9 | UDP 7777 bound on GameCon; the 900 s kick ends the phase |
| + H13 | idles in WaitingForPlayers
|
| + P3 | match starts without a joiner |
| + P5 | WaitingForPlayers → StartingRound → InRound → RoundEnding → MatchOver |
| + M1 | still fatal at MatchOver
|
| + S2 + M2 | survives MatchOver, parks at the awards screen |
| + W1, R1, C1, C4, C5, joined client | multiple rounds, phase replication, no fatal (Joining) |
?game=Tag?listen selects the mode.
Advance path 0x1407192b0 (SeekGameMode.hx:170), from the phase-manager tick.
| gate | test | on a listen host |
|---|---|---|
| 1 |
0x1407b3060 (phase clock), result never tested (0x1407192c7) |
cannot block |
| 2 | (*(native+0x3f0))+0x330 == "WaitingForPlayers" |
passes, written by gotoPhase
|
| 3 |
call 0x1407b7320 at 0x140719323
|
vacuous on an empty player array |
| 5a |
*(native+0x3e0) == 2 (Solo) |
false (Hosted) |
| 5b |
+0x230 entry → 0x14071fa90 → world.IsPlayInEditor → *(byte*)(world+0x880) == 3
|
false on a standalone host, no log line |
P3 0x1407b7320 / 0x7b6720: 40 53 55 56 → b0 01 c3 90 (predicate ≡ true). P5 0x140719440 / 0x718840: 74 1b → 90 90 (gate 5b cannot reject; falls to gotoPhase("StartingRound") at 0x140719458). P5b 0x14071fa90 / 0x71ee90: 48 83 ec 38 → b0 01 c3 90 (the +0x230 entry, four vtables). P5 is scoped to one site; P5b hits 0x142e40128, 0x142e86450, 0x142e8a798, 0x142e987c8.
Calling players loaded callback requires *(this+0x28) != 0 (cmpq $0x0,0x28(%rdi) 0x140719330, je 0x14071940a); its absence proves nothing.
21:17:57 gotoPhase(WaitingForPlayers) / Starting match BBA4…
21:17:58 gotoPhase(StartingRound) / Starting round 0 for match BBA4…
21:18:04 gotoPhase(InRound)
21:18:04 gotoPhase(RoundEnding)
21:18:09 gotoPhase(MatchOver)
21:18:09 AppServerManager.hx:49 Initializing … -> unnamed Fatal
11 s StartingRound → MatchOver; P3 is unconditional, so the host does not wait for a joiner.
gotoPhase(MatchOver) → 0x143bc53d0 (+0xe8)
0x140cbf340 MatchOverPhase.onStartPhase "sending match rewards" (hx:48); m_timeLimitReached at 0xcbfda5
0x140cbfde0 completion → call *0x280 at 0x140cc0172
0x142e8a568 +0x280 = 0x14071f010 giveEndOfMatchRewards
0x14071f5a5 call 0x1407aa180 → FUN_14056e100 (hx:49)
0x14071f5b9 mov 0x28(%rcx),%rcx ; XIAppServerPrivate NULL on host
0x14071f5bd call 0x1408f29e0; mov 0x8(%rcx),%r14 → AV → "Fatal error!"
FUN_14056e100 stores manager+0x28 only under if (param_3), param_3 = netmode == dedicated; false on NM_ListenServer, so no request exists and no mock reply helps.
- M1
0x14071f5b9/0x71e9b9:48 8b 49 28→48 8b 49 20(operand0x71e9bc), public proxy. Same fatal. - M2
0x140cc01be/0xcbf5be:0f 84 d9 05 00 00→90×6, drop therewardsCompleteearly-exit. - S1
0x14071f5a5/0x71e9a5:e8 d6 ab 08 00→e9 18 00 00 00, skip manager + proxy call. Alone: flag stays 0, phase stuck. - S2
0x140cc0172/0xcbf572:ff 90 80 02 00 00→90×6, skipgiveEndOfMatchRewards.
Field tables: +0x30 rewardsComplete, +0x31 m_timeLimitReached; S2 kills the writer, M2 hides the test. S2 + M2 leaves the host alive at the awards screen and never restarts.
Restarting uses the game's own clock gate instead. +0x31 is written only at 0x140cc0190, the
+0x108 slot called when the phase clock crosses zero. The rewardsComplete branch at
0x140cc01c8 is redirected to a 31-byte cave that waits on getRemainingTime and then calls
gotoPhase(WaitingForPlayers):
file 0xCBF5C8 0f 84 cf 05 00 00 -> e9 2f 89 df 02 90 (jmp cave)
file 0x3AB7CFC 31-byte cave at VA 0x143AB8AFC:
48 8b 4e 28 mov rcx,[rsi+0x28] ; manager
48 85 c9 / je exit
80 7e 31 00 / je gate ; +0x31 = clock-expired flag
48 8b 15 <W4P> mov rdx,[0x143bc5fc8]
48 85 d2 / je exit
e8 <gotoPhase>
exit: e9 ... jmp 0x140cc079d ; the original je target
M2 must not be applied: +0x31 is the expiry gate. The exit must jump to 0x140cc079d, not
0x140cc078d: the two frame reloads between them read stack slots written after the hook site, and
using them corrupts rdi (the phase manager's this) in the same frame. .rdata VirtualSize must
cover the cave (0xDF5C00) and Characteristics must gain MEM_EXECUTE.
Result: MatchOver → Showing Awards UI → WaitingForPlayers → Starting match → StartingRound → InRound,
repeating, no fatal. The transition is about 40 s after MatchOver.
sendMatchData posts the match result with one didWin per finished round: the winning contestant's
entry is marked from the round outcome. updateMatchData copies the player state's score
(playerState+0x398) into nPoints before the payload is built, so the score that reaches the payload is
the one the match tracked. A passive match produces no score events, so nPoints stays 0.
InTagRoundPhase.onUpdate (0x140cbe1c0) ends the round only when the game state's contestant count
is <= 1: it calls 0x130 at 0x140cbe430, the predicate 0x140ccf170 resolves
SeekTagGameState+0x198 and compares at 0x140ccf3f0 (cmp $1; setle), then calls
gotoPhase(RoundEnding).
The duration is live: DefaultGame.ini sets RoundDuration=180 for SeekTagPhaseManager, and the
phase receives it. The shipped +0x108 (0x140cbe1b0, c6 41 30 01 c3) only latches
m_timeLimitReached, and onUpdate never reads it, so time alone does not end a round and a round
ends only when one contestant remains.
Wiring the latch to the transition fixes that. Hook the 5-byte body and tail-jump to the phase's own end call:
file 0xCBD5B0 c6 41 30 01 c3 -> e9 28 aa df 02
file 0x3AB7DDD 23-byte cave at VA 0x143AB8BDD:
c6 41 30 01 mov byte [rcx+0x30],1 ; keep the latch
48 8b 41 28 mov rax,[rcx+0x28] ; phase manager
48 8b 15 <RoundEnding> mov rdx,[0x143bc6138]
48 89 c1 mov rcx,rax
e9 <gotoPhase> jmp 0x140617710
The body is shared by InElimRoundPhase, InRoundPhase and InTagRoundPhase, so all three modes
get it. One-shot is structural: the clock stores remaining - dt before the call and skips the block
once it is <= 0. Result: InRound → RoundEnding at exactly 180 s, then AfterRound → flashSale → StartingRound, no fatal.
Test aid: raise the threshold to 2 (file 0xCCE7F2, 01 -> 02) to make a two-contestant round end
on the first tick. That is a rig patch, not a fix.
Duration SLGameMode+0x3A4; FUN_140739a80 writes 900 (BA 84 03 00 00) at 0x140739aa6. onTimeout 0x140cc61c0 (vtable +0x108, .rdata 0x142f67b60):
if (mgr.getHostPlayer() != null)
Warning: WaitingForPlayersPhase.hx:114: Kicking host due to inactivity.
AGameSession::KickPlayer(hostPC, "KickReason:Inactivity")
No input, RPC or connection test. timeRemaining has one writer (startPhase, per gotoPhase), so a join does not reset it; kicks at +902 s (join at +96 s) and +900.6 s (none). H13 idles the phase; H14 extends the timer.
Rewrite FUN_1407b7320 to playerArray.length >= 2, no IID loop:
file 0x7b67c8, 24 bytes
85 c0 0f 8e 10 01 00 00 48 8b 5c 24 78 48 8b 7c 24 78 66 0f 1f 44 00 00
→ 83 f8 02 0f 8c 25 01 00 00 e9 0a 01 00 00 + 10 × 90
(cmp eax,2; jl 0x1407b74f6; jmp 0x1407b74e0)
No cave, no header edit, not with P3. Standalone host: gotoPhase(WaitingForPlayers) / Starting match <guid>, no advance. Joined run: Joining.
Patch set short-circuits login: boot URL GameCon?listen?IsHost=true&PlayerSessionID=host-1, no Handshaking/LoggedIn/startSession, no mock request.
-
SessionDataStoreempty →SetPlayerDefaultsfails the entity fetch (SLGameMode.hx:558 … not in the datastore); entity payloads cannot reach the host. - Contestants come from
LoggedInPlayer, not the datastore (PatchIndex).
Related: Joining · GC · Login · Matchmaking · PatchIndex