goclient follows Last War 1.0.370 (iOS build 918, Android build 1911) and the data tables it bundles, version 40413. Live servers were already on tables 40460 when the client was audited, and no dump of 40460 exists. A November 2026 audit compared the client with the decompiled 1.0.370 Lua, C# and Java, and the fixes below came out of it. All of it is static analysis: none of these changes has been sent to a live server yet.
Build and tables
- The built-in builds are 1.0.370/918 (iOS) and 1.0.370/1911 (Android). Fresh binds,
-own-device-sessionand runs without a session config claim them. A session config that names noappVersion/versionCodekeeps claiming the build such configs always had, 1.0.344/786 (iOS) or 1.0.364/1892 (Android), and the run warns to add the fields. - Every generated table is regenerated from tables 40413: activities (1,451 rows, now with
tableInfoType,showUiType, the group columns,para,para_1,para_3,para_5,conditionandcondition_giftbag), production, visitor types, duel scores (withlw_heroandofficer_recruit), alliance science (with its tab), dig maps, radar events, mail groups, and the new season tables. One constant,tableVersionininternal/game/tables.go, names the version, and a test holds every generated file’s header to it. - With
LASTWAR_TABLESpointing at a table dump,go test ./internal/gamereruns every generator and fails on any difference, and checks the lists still copied from a table by hand. An activity id the table lacks is now logged at Warn.
The production login (iOS)
These change what the scheduled iOS run does. Give them a config-copy test before the cron uses them. Since the follow-up a copy without ashumeiId takes two runs, so the second Login sends the shumeiId the first one saved: start the second only after the first logged saved the pushed shumeiId. A copy that already has one sends it from its first Login, and that run logs pushed shumeiId already saved when the push repeats it (see What to check).
- GSL lookup before every reconnect. As the real client does on every cold start, the run asks GSL
getserverlist.php(noopt) for the role’s server before theLogin. It fails open: any lookup error keeps the configured address and token. A token the reply carries is used, and a rotated refresh token is saved before theLogin. If the listed server can’t be reached, theLogingoes to the configured address; if a server refuses a handed-back token (E011), the token the lookup replaced (the configured one, or the one this run’s refresh issued) is tried at the same address, after any lookup. GSL’s gateway host names will likely replace the captured IPs on the first run. - The
Login:netTypeis 1 (Wi-Fi). Thetafieldlw_versionis the claimed app version. From an iOS capture,cmd/pcap -session-outrecords the device fields (phone_model,osVersion,mt,idfv,distinct_id,fromCountry,lang,phone_screen,afuid,firebaseId) underdevice, and an iOS reconnect sends them again; without them the run warns to recapture. Since the follow-up the iOStafillslw_device_id,lw_airKeyandlw_shumei_idand replays a capturedta(see The follow-up).isUseLz4goes out only while check-version’s switches 4 and 5 are off. With switch 25 off, theLogin’sshumeiBoxIdis empty. About 5 % of device ids are bucketed to theea-check-version hosts, as in the client. - Forced update:
updateType2 stops the run with exit code 5: in check-version before the GSL lookup, in aLoginreply beforeinit. - Ends of a session:
push.user.gm.offandpush.refund.restartend the run with exit 3, likepush.user.off. Apush.account.device.delthat names this run’s device ends it with exit 2: bind again or recapture.E015/E016(the season’s server window) exit 1.E005is unchanged (exit 2). - Transport: each reply is paired with its request by
_id, so a late reply to a timed-out request is no longer taken for the next one. Once the server has answered a ping, waits that end with no frame at all count as a dead connection when their silence adds up to more than 12 s: with the usual 8 s waits that is the end of the second silent wait in a row, about 16 s, and a single longer wait, such as the one forinit, can pass it alone. A request body over 1,000,000 bytes is refused, the big-size flag follows the uncompressed length, and a pong is timed by the socket read that delivered it. login.initis sent with only its_id. An empty server list in a GSL reply is error E120 for everyopt.
Bind, guest and Android identity
-interactivesends integers that fit 32 bits as SFS Int and larger ones as Long; a key suffix:i,:l,:d,:sor:bpicks the type.- The role picker binds every role with the account’s top-level
loginKey, and the bound role’s zone is kept in.lastwar_goclient_zoneand sent as the GSLzone. Apush.account.login.newwithout agameUidfails the bind. - A new Android identity’s deviceId is its Android ID plus
_n3d. It keeps an install record in.lastwar_goclient_android_install(install time, AppsFlyer-styleafuid, ThinkingDatadistinct_id), sent in the AndroidLogin. The AndroidLoginalso sendsgoogle_available1, the catalog phone’ssimOpandsimOpName,lat0, and atawith#device_type,#install_time,#ram,#diskand#carrieras ThinkingData builds them.gcmRegisterIdandreferrerare Android-only. - ShuMei (Android only): the fingerprint’s slots follow the 1.0.370 SDK, the device catalog carries US SIMs, and a registration sends the SDK’s
/v3/cloudconfrequest before the device profile, keeping its counters and the cached cloud config inshumeiInstall. See ShuMei.
Features that changed in place
- City: the Season 7 Blessing Fountain farms 853000-856000 and the week-card farm 857000 are collected. Visitor queue 1 counts type 9.
finished-timersleaves finished upgrades alone while the account’s confirm-before-finish setting is on (HQ 16 and up), and reads a building’s upgrade end from its build queue, as doalliance-call-helpandduel-speedups. Since the follow-upfinished-timersholds finished upgrades for a day that scores building power and finished research for one that scores research power, and finishes as before without a duel or when it can’t read the duel. The idle reward is not claimed when the peek shows both pools empty. - Dailies:
questsleaves the Season 7 Lockhart quest 2400008 tostage-quests, which also knows the 40413 stage rows. The free weekly package needs HQ 8. The week-card gift is claimed when the info reply has nodailyFree. The truck privilege waits until the station is out of the fog.free-recruitslogs a Warn naming the confirmation wherever the recruit window would ask one before the free pull (alert 1, 2 or 5), and still pulls. - Alliance Duel:
duel-recruit-ticketskeeps a ticket where the recruit window would ask a wish confirmation (alert 1, 2 or 5) and readsofficer_recruit40413; a pool newer than the tables is pulled unless the wish question applies.duel-speedupsleaves jobs that end more than a year out.duel-troop-trainingholds on Enemy Buster unless a training speed-up is held and a later run is left in the day, and trains T11 in season 4 from day 64.secret-tasks-startreads hero quality from the generatedlw_heroand skips a placement the server refuses.arms-race-chestsclaims only before the stage ends. Item counts follow the client’s field precedence. - Alliance: the tech donation reads the charges (
al.science.refreshNum) before donating and stops quietly on 120471 or 120836. Tab-3 techs are not donated out of season.alliance-salaryskips only when init shows its activity closed, and the officer box only below rank 4. Fireworks of type 1 need the building’s alliance, not a member. The fireworks and treasure features share one scan per run (three blocks around each member HQ, viewport-shaped requests of at most 160 blocks), its requests 0.5 s apart. A clustered alliance needs a few requests; one spread over the map needs more than before, up to about 50 for 100 HQs across the whole map, which adds about 25 s to the run. - Events: the crystal boss follows the client’s window, HQ condition and march reply. Seven-day boxes ignore the VIP flag except on the claim-all views. A bought battle pass also claims its state-2 tasks and high-tier rows. The T11 idle features check the camp level and season first. A
hero.event.info.getreply that carriessuccessis dropped, as the client drops it, and the Torch Relay pack needs its table row. Lucky Roll and Bargain Shop needlastReceiveFreeTimein the reply. LuckyShop, BattlePass_new, BargainShop and the season preview send the entry’s own id. - Season:
season-dailiessends the power-milestone pair only in a Desert (type 1) season, as the client does; any other season uses achievements v2, claimed by the newseason-achievements. Military salary readspara_1(Season 7 included), the week card reads the row’s card id, the Season 7 mummy yard is 858000, andseason-outputclaims a stronghold output entry that names noserverIdfor the source server instead of skipping it (Seasons 2, 3, 4 and 7). - Radar and dig: the dig and radar tables include Season 7 (maps 17001-17062, cave exploration 700001-700033). The vault and chest track open by activity type, Treasure Hunt reads its dig row from
tableInfoType, and a vault open whose reply asks for a re-check re-reads the vault (anycheckOpenAllbutfalse). - Railway (opt-in): a squad’s present
soldierTypeis kept, squads fill slots in wire order, the squad is saved before every truck attack,train.datais read only while the truck activity is open, a lineup the client would refuse leaves trains alone, and the attack log names the outcome.
New opt-in features
66 features, each off by default with a summary ending “(static-only, not validated live)”. None marches or sends a chat message (four read the alliance chat), and none spends anything except the user’s carve-outs:duel-gacha-draw spends only the duel gacha’s own score balance, and truck-reroll uses only a truck’s free reroll. secret-task-assist is seen by the ally it helps. Each logs its first reply at Info and registers no benign error code. An error code is logged and stops that claim; depending on the feature it also stops the rest of that activity or building, or the feature for the run, while others (city-soldiers, radar-rescue-claims, supplies-search among them) go on to their other claims. The read-only -plan features send only reads.
The progress claims among them run in the last phase, after the actions, so a run claims what its own actions earned.
duel-gacha-draw runs there after duel-gacha’s pity claim, and truck-reroll in the first phase, before truck-deploy sends a truck it rerolled to UR.
The follow-up on the user’s decisions
The user ruled on the audit’s open questions on 2026-11-19, and a follow-up built them. All of it is static analysis, like the rest of this page.- The iOS
ta. The iOSLogin’stacarrieslw_device_idandlw_airKey(theLogin’s owndeviceIdandairKey) andlw_shumei_id(the session config’sshumeiId, empty until one is known), as the 1.0.370 app does before everyLogin(Assembly-CSharp.decompiled.cs:59117-59125, iOS). Before, the three went out blank, which the cron’s August 2026 runs showed the server accepts. A session config whose captured device has atareplays thattabyte for byte, with#app_version,lw_version,lw_res_version,lw_buildcode,lw_zone,lw_device_id,lw_airKeyandlw_shumei_idtaken from the run;lw_game_session_id,lw_main_levelandlw_first_launchstay as captured. A captured device without atawarns to recapture. Android keeps the three ids blank. shumeiId. The session config keeps theshumeiIdthe server pushes (push.shumei.id):pcap -session-outrecords it, and a run saves each one a push brings as it arrives, as the app does in the push handler (PushShumeiIdMessage.lua:14-18), so a run that then exits 1 or 3 keeps it; for the config’s owndeviceIdonly. The iOSLoginsends it astalw_shumei_id, so the cron’sLoginsends it from the run after the first push, with no recapture.pcap -session-outrecords the iOStaunderdevice.ta, prints theshumeiIdlength with the others, and, written onto an existing session config, keeps every key it doesn’t write (features,duelPolicy,shumeiInstalland any other). It dropsaccessTokenTimewhen the token changed and the refresh token when thedeviceIdchanged, and refuses a file that isn’t a JSON object. A recapture can go straight onto the live config. A run’s own saves (tokens, the pushedshumeiId, the save-back) write only the keys the session config models, so a keygoclientdoesn’t know is dropped at the first such save.finished-timersholds for the duel day. A finished upgrade (free.building.upgrade.finish) waits for a day whose duel entry lists type 23 (Base Expansion, Total Mobilization) and a finished research (queue.finish) for one that lists type 6 (Age of Science, Total Mobilization). It holds only in an alliance with the duel activity open and readable, and a rest day with no current entry holds too. With no duel (no alliance, no open duel activity, HQ below 10) it finishes as before; when it can’t read the duel it finishes with a Warn. A held research leaves its Tech Center’s queue idle until a scoring day. Repairs, healing and camp output are never held, and the confirm-before-finish setting still applies.- New opt-in features:
secret-task-assist(hero.dispatch.assist, up to 5 a day, neverhero.dispatch.steal),duel-gacha-draw(al.duel.lottery.lottery {configId, num: 1}, paid only from the gacha’s own score, on a Sunday or while the duel runs),truck-reroll(train.change, a truck’s one free reroll, N, R and SR trucks only), and the chat consumersfireworks-chatandalliance-treasures-chatnext tochat-scanandred-packets. See Alliance Duel, World map and Alliance, chat & mail. - The chat reader sends only
room.joinMultiandhistory.roomsv2. One chat read per run serves all four chat features, and it drops the phone’s chat connection, as the run’s game login drops the phone’s game session. - Not built: the free research finish (
queue.ccd.m.new {qUUID, itemIDs: ""}inside effect 30100’s window). The same bytes are the client’s diamond instant finish, and on a 3-hour cron it would complete nothing earlier: the window is at most 3 h, andfinished-timerscompletes the research on the next run anyway.
What to check on the first runs
- The GSL lookup line before the
Login, and whether the saved address changed. season-dailies: the logged season config and type; in a non-Desert season no power-milestone pair goes out.- Two claims move from features the production config enables to opt-in ones that are off by default and not validated live: the achievement grades outside a Desert season (
season-dailiestoseason-achievements) and the Season 7 Lockhart quest 2400008 (queststostage-quests). Nothing claims them untilseason-achievementsandstage-questsare validated and enabled. alliance-salary: the gate depends on init listing activity 28 (the only type-372 row in 40413). Revert the gate if it skips an account that used to claim.card-dailies: the truck privilege claim needs initmonopolyStageInfo.stageId; without it nothing is claimed.free-chests: no weekly package below HQ 8, and a Warn each run while init has noweekFreeReward.treasure-digs: a vault open reply withcheckOpenAllnow re-reads the vault, at most 12 rounds a run.- The tech donation logs
useNum,donateAvailableandmaxdonate.countbefore donating; 120836 after the day reset is a Warn, not a run error. arms-race-chestsclaims nothing when the info reply has nostage_end_time.finished-timersleaves finished upgrades alone while the account’s confirm-before-finish setting (19) is on, from HQ 16.event-shop-freebiesskips Lucky Roll and Bargain Shop, with a Warn, when the reply has nolastReceiveFreeTime.- The crystal boss sends nothing without an
activityIdin the march reply, and drops a progress reply for another season. battle-passsends the new state-2 premium claims for a bought pass.treasure-digsspends owned hammers in the Season 7 off-season vault and chest track too (activities 2300011-2300015, 2300017 and 2300018-2300021).season-digsends its first Season 7 requests:season.dig.game.openon the free alliance vaults 17043-17052 andseason.dig.game.get.personal.rewardon 17001-17042 and 17053-17062.treasure-huntreads dig row 6 for 1071012.free-chestsclaims the week-card gift whenever the info reply has nodailyFree. If the server leaves the field out for an account without the card and refuses the claim with a code other than 120289, every run exits 1.- check-version logs when the device falls in the early-access bucket and asks the
ea-hosts. - The iOS
Login’stanow carrieslw_device_idandlw_airKey, andlw_shumei_idonce ashumeiIdis saved. Test it on a config copy before the cron uses it. A copy without ashumeiId(one from before the follow-up, or one wherepcapprintedshumeiId (0 chars)) takes two runs: its firstLoginsendslw_shumei_idempty, and that run saves the pushed id when the push arrives. Start the second run only after the first one loggedsaved the pushed shumeiId(a first run without that line got no push; run it again); only the second run’sLoginsends the filled form. A copy that already has ashumeiId(pcap -session-outrecords the capture’s) sends the filled form from its firstLogin, so one run tests it; that run logspushed shumeiId already savedwhen the push repeats the id, orsaved the pushed shumeiIdwhen it brings a new one. Each run kicks the phone’s session. finished-timerslogs each held upgrade and research withtodayandwaitsFor, and which case the duel read took. On a Sunday the rest-day branch logs the duel activity’s window: whether activity 55000 is open on the rest day decides whether completions are held through Sunday.- Enabling any chat feature drops the phone’s chat connection once per run.
duel-gacha-draw:spentagainstexpectedCost(10,000,000) in the first draw reply, and whetherprotectNumkeeps counting pastprotect.num.truck-reroll: the reply’smyTrain(uuid,cfgId) andchangeCountByGold, expected 1 after the first reroll.secret-task-assist: whether apush.act.score.obtainfollows an assist on a Tuesday or Saturday, which would make it a duel action.- The chat features: run
chat-scanfirst, thenalliance-treasures-chatandfireworks-chatwith a card in chat (their first-reply lines showreplyKeys,numPresent,currServerIdandpointId).
Not done
Built in the follow-up (opt-in where new, static-only): the duel gacha draw (duel-gacha-draw), Secret Task assists (secret-task-assist), the free truck reroll (truck-reroll), holding finished timers for their duel day, the Login’s ta device fields, and the chat consumers. Left open by it: whether a replayed ta should refresh lw_game_session_id, lw_main_level and lw_first_launch; whether Android’s ta fills the three ids too; truck-reroll stops below SSR (an SSR reroll can’t be undone, so widening it is the user’s call); the chat reader reads only the alliance room. Still waiting for a decision: the E005 exit code, GSL 211/212 during the pre-login refresh, the alliance challenge box, Ghost Recon actions, other alliances’ shared treasures, alliance treasure boxes of types 2/5/8 (the same ruling decides whether base-bubbles keeps its built, opt-in Thanksgiving claim on other members’ bases), supplies search past level 1, arena attacks, survey mail 146, AllianceCongratulation visitors, expired-item exchange, treasure-map digs, joining an alliance train, opening Explorer Treasure chests. Waiting for a capture or a live retest: isSimulator and the Android sensor lists, the ShuMei service class name, the forwarded-send framing (switch 29), the guest path’s stored tokens, and a pong that waits in the kernel buffer.