Locate what the native LocalMP modules need from data
The LocalMP modules of wto_ws.dll scanned for 42 functions at start-up and used about a hundred structure offsets compiled in as constants, so a game update could move a field without anything noticing. Their needs are now definitions under patches/native/<module>.jsonc, resolved by the patcher when it builds the game copy, the same way exe patches are located: - Locate methods: "string_ref" finds code by the string it loads (optionally with a pattern around the lea, to read the field a scoreboard row stores under that name), and "within" searches a short pattern inside the function of a site located before it (function ranges from the exception directory). - Each module lists its sites (functions, globals, call targets and the instructions whose captures give structure offsets), its features and the modules it requires. A module whose sites are not all found is reported like an unavailable patch, with the modules depending on it. - The resolved values go into wto_ws.cfg as native.<site>[.<capture>] lines, with the executable's PE time stamp and image size so the library can refuse values resolved for another build. - Version records include the native module variants and values. - Patch-set folders: the patcher, the scripts and the launcher take the root of a patch set (exe, gui, native, versions) instead of separate folders. - New feature tags K-Chat and radio and K-Nuclear bomb in both language packs. The library still scans by itself; reading these values is the next change. Checked: root and launcher type checks; all 10 modules resolve on 2.61.0.37, where the 239 values equal what the drafting tool read with a disassembler, and on 2.61.0.43, where every structure offset is unchanged except the GameSaveData HUD event queue (0xae8 -> 0xb18); build-game-copy from 2.61.0.37 into a temporary folder writes the values into wto_ws.cfg.
This commit is contained in:
1 parent
fdf859c4c9
commit
ddec5c59c0
36 files changed
+3318
-91
No files matched your search
@@ -0,0 +1,86 @@
|
||||
// LocalMP construction and chat host (native/wto-net/src/local_mp_actions.c): both teams' countries
|
||||
// and the AI vehicle pool, and an MPChat host that delivers the player's messages.
|
||||
// Without it: each side has a single country, and chat messages are not delivered.
|
||||
{
|
||||
"module": "local_mp_actions",
|
||||
"features": [
|
||||
"K-AI opponents and teammates",
|
||||
"K-Chat and radio"
|
||||
],
|
||||
"requires": [
|
||||
"local_mp_core"
|
||||
],
|
||||
"sites": {
|
||||
// Multiplayer::initMPChat.
|
||||
// 2.61.0.37: 0x5bd6a0
|
||||
"mp_init_chat": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 54 56 57 53 48 83 ec 48 48 89 d7 48 89 ce 48 8b 05 ?? ?? ?? ?? 48 85 c0 74 ?? c6 00 01 48 8b 9e 00 02 00 00"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Multiplayer MPChat pointer.
|
||||
// 2.61.0.37: 0x5bd732 (mov rbx, qword ptr [rsi + 0x1f0]; test rbx, rbx; je 0x5bd7e0)
|
||||
"mp_chat": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "mp_init_chat",
|
||||
"pattern": "48 8b 9e ?? ?? ?? ?? 48 85 db 0f 84 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"mp_chat": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// BotSystem setup (refers to "botDeviationLimits").
|
||||
// 2.61.0.37: 0x11af3f0
|
||||
"bot_system_setup": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "botDeviationLimits",
|
||||
"target": "function"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Multiplayer country vectors of both teams.
|
||||
// 2.61.0.37: 0x11afd9f (mov rbx, qword ptr [r10 + 0x150]; mov r14, qword ptr [r10 + 0x170])
|
||||
"mp_team_countries": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "bot_system_setup",
|
||||
"pattern": "49 8b 9a ?? ?? ?? ?? 4d 8b b2 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"team1_countries": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"team2_countries": {
|
||||
"offset": 10,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
// In-battle award events (native/wto-net/src/local_mp_awards.c): the stock InBattleReward HUD event
|
||||
// and the facts sent to the local server for awards.
|
||||
// Without it: no reward banners and no battle awards in LocalMP battles.
|
||||
{
|
||||
"module": "local_mp_awards",
|
||||
"features": [
|
||||
"L-Battle awards"
|
||||
],
|
||||
"requires": [
|
||||
"local_mp_core"
|
||||
],
|
||||
"sites": {
|
||||
// GameSaveData::addScoreMessage.
|
||||
// 2.61.0.37: 0x189a8e0
|
||||
"add_score_message": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec 38 01 00 00 45 89 c5 41 8d 45 fd"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// DataBlock::DataBlock.
|
||||
// 2.61.0.37: 0x189b99c (call 0x3093000; cmp dword ptr [rsp + 0x68], 0; mov ebx, dword ptr [rsp + 0x104])
|
||||
"score_msg_blk_ctor": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "add_score_message",
|
||||
"pattern": "e8 ?? ?? ?? ?? 83 7c 24 68 00 8b 9c 24 04 01 00 00",
|
||||
"captures": {
|
||||
"call": {
|
||||
"offset": 1,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// DataBlock set string.
|
||||
// 2.61.0.37: 0x189ba34 (call 0x3094950; mov dword ptr [rsp + 0x78], ebp; cmp dword ptr [rsp + 0xa4], -1)
|
||||
"score_msg_blk_set_str": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "add_score_message",
|
||||
"pattern": "e8 ?? ?? ?? ?? 89 6c 24 78 83 bc 24 a4 00 00 00 ff",
|
||||
"captures": {
|
||||
"call": {
|
||||
"offset": 1,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// DataBlock make owned.
|
||||
// 2.61.0.37: 0x189ba4f (call 0x30998c0; lea rdx, [rip + 0x5fc2664]; lea rcx, [rsp + 0x90]; ...)
|
||||
"score_msg_blk_to_owned": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "add_score_message",
|
||||
"pattern": "e8 ?? ?? ?? ?? 48 8d 15 ?? ?? ?? ?? 48 8d 8c 24 90 00 00 00 4c 8d 44 24 78 e8 ?? ?? ?? ?? 44 89 74 24 78",
|
||||
"captures": {
|
||||
"call": {
|
||||
"offset": 1,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// DataBlock set int.
|
||||
// 2.61.0.37: 0x189ba68 (call 0x3095130; mov dword ptr [rsp + 0x78], r14d; cmp dword ptr [rsp + 0xa4], -1)
|
||||
"score_msg_blk_set_int": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "add_score_message",
|
||||
"pattern": "e8 ?? ?? ?? ?? 44 89 74 24 78 83 bc 24 a4 00 00 00 ff",
|
||||
"captures": {
|
||||
"call": {
|
||||
"offset": 1,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// The HUD script event queue in GameSaveData and its queue function.
|
||||
// 2.61.0.37: 0x189be3b (add rcx, 0xae8; lea rdx, [rip + 0x5fcb75d]; lea r8, [rsp + 0x90]; ...)
|
||||
"score_msg_hud_queue": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "add_score_message",
|
||||
"pattern": "48 81 c1 ?? ?? ?? ?? 48 8d 15 ?? ?? ?? ?? 4c 8d 84 24 90 00 00 00 e8 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"queue": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"call": {
|
||||
"offset": 23,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// DataBlock::~DataBlock.
|
||||
// 2.61.0.37: 0x189be90 (call 0x3093a60; cmp ebp, 0xe; setne al; ...)
|
||||
"score_msg_blk_dtor": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "add_score_message",
|
||||
"pattern": "e8 ?? ?? ?? ?? 83 fd 0e 0f 95 c0 0f b6 4c 24 52",
|
||||
"captures": {
|
||||
"call": {
|
||||
"offset": 1,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Unit info expClass string.
|
||||
// 2.61.0.37: 0x189bb19 (mov rax, qword ptr [r15 + 0x1020]; mov rax, qword ptr [rax + 0x38]; test rax, rax)
|
||||
"score_msg_exp_class": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "add_score_message",
|
||||
"pattern": "49 8b 87 ?? ?? ?? ?? 48 8b 40 ?? 48 85 c0",
|
||||
"captures": {
|
||||
"unit_info": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"exp_class": {
|
||||
"offset": 10,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// The global GameSaveData.
|
||||
// 2.61.0.37: 0x427e19 (mov rcx, qword ptr [rip + 0x77ccb38]; test rcx, rcx; je 0x427f77; ...)
|
||||
"game_save_data": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "iground_on_dead",
|
||||
"pattern": "48 8b 0d ?? ?? ?? ?? 48 85 c9 0f 84 ?? ?? ?? ?? 48 8b 05 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"game_save_data": {
|
||||
"offset": 3,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,434 @@
|
||||
// Core of the LocalMP host bridge (native/wto-net/src/local_mp_core.c): the engine globals, the
|
||||
// MPlayer table, the allocator and the helpers every other LocalMP module uses.
|
||||
// Without it: no LocalMP module runs, the battle host misses everything the dedicated server did.
|
||||
{
|
||||
"module": "local_mp_core",
|
||||
"features": [],
|
||||
"requires": [],
|
||||
"sites": {
|
||||
// getDisabledSlotsMask: reads g_multiplayer, the App and the local MPlayer, and the MPlayer broken
|
||||
// slots mask (+0x4a0 | broken slots).
|
||||
// 2.61.0.37: 0x6bb480
|
||||
"disabled_slots_mask": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "31 c0 48 83 3d ?? ?? ?? ?? 00 74 ?? 48 8b 0d ?? ?? ?? ?? 0f b6 89 f3 00 00 00 f6 c1 01 74 ?? 48 8b 0d ?? ?? ?? ?? 48 85 c9 74 ?? 8b 81 a0 04 00 00 0b 81 d0 04 00 00 c3",
|
||||
"captures": {
|
||||
"multiplayer": {
|
||||
"offset": 5,
|
||||
"type": "rel32",
|
||||
"end": 10
|
||||
},
|
||||
"app": {
|
||||
"offset": 15,
|
||||
"type": "rel32"
|
||||
},
|
||||
"local_mplayer": {
|
||||
"offset": 34,
|
||||
"type": "rel32"
|
||||
},
|
||||
"mplayer_broken_slots": {
|
||||
"offset": 51,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// doRespawnPlayer (App method): App score rules pointer, and the global hero unit.
|
||||
// 2.61.0.37: 0xc6c010
|
||||
"do_respawn_player": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "56 57 53 48 81 ec 40 01 00 00 44 0f 29 84 24 30 01 00 00 0f 29 bc 24 20 01 00 00 0f 29 b4 24 10 01 00 00 48 8b 91 e0 03 00 00 48 c7 c0 ff ff ff ff 48 85 d2 0f 84 ?? ?? ?? ?? 8b 92 f0 00 00 00 83 fa 01 0f 85 ?? ?? ?? ?? f3 0f 10 81 e4 06 00 00 0f 57 c9 0f 2e c1 0f 83 ?? ?? ?? ?? 4c 8b 05 ?? ?? ?? ?? 40 b6 01 4d 85 c0 0f 84 ?? ?? ?? ?? f6 05 ?? ?? ?? ?? 04 0f 84 ?? ?? ?? ?? 48 8b 15 ?? ?? ?? ?? 48 85 d2 0f 84 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"app_score_rules": {
|
||||
"offset": 38,
|
||||
"type": "u32"
|
||||
},
|
||||
"hero": {
|
||||
"offset": 128,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MissionSettings::getPlayerCountry: Multiplayer isLocalMP flag, and the MPlayer table and its count.
|
||||
// 2.61.0.37: 0x12773b0
|
||||
"get_player_country": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "56 48 83 ec 40 4c 89 c0 4c 8b 05 ?? ?? ?? ?? 4d 85 c0 0f 84 ?? ?? ?? ?? 45 31 d2 41 80 78 61 00 44 0f 44 d2 81 fa fa 00 00 00 44 0f 45 d2 44 3b 15 ?? ?? ?? ?? 73 ?? 4c 8b 1d ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"mp_is_local_mp": {
|
||||
"offset": 30,
|
||||
"type": "u8"
|
||||
},
|
||||
"player_count": {
|
||||
"offset": 49,
|
||||
"type": "rel32"
|
||||
},
|
||||
"player_table": {
|
||||
"offset": 58,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Script binding get_local_player_country: the global MissionSettings.
|
||||
// 2.61.0.37: 0x179f400
|
||||
"sq_local_country": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 56 56 57 53 48 83 ec 68 48 89 ce 48 8b 05 ?? ?? ?? ?? 48 85 c0 74 ?? 0f b6 50 08 48 8d 0d ?? ?? ?? ?? 4c 8d 44 24 20 41 b9 40 00 00 00 e8 ?? ?? ?? ?? 48 89 c7",
|
||||
"captures": {
|
||||
"mission_settings": {
|
||||
"offset": 31,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ChangeUnitReflection destructor.
|
||||
// 2.61.0.37: 0x548f20
|
||||
"refl_dtor": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "56 57 53 48 83 ec 40 48 89 ce 48 8d 05 ?? ?? ?? ?? 48 89 01 48 8b 89 b0 01 00 00 48 85 c9 74 ?? e8 ?? ?? ?? ?? 48 8b be 90 01 00 00 48 8b 9e 98 01 00 00 48 39 df"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// GameSaveData::aircraftChangeResultFromHost: the change request inside the economic state.
|
||||
// 2.61.0.37: 0xebc490
|
||||
"aircraft_change_result": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 56 57 53 48 83 ec 50 41 89 d0 48 89 ce 48 81 c1 78 f5 00 00 48 89 f2 e8 ?? ?? ?? ?? 84 c0 0f 84 ?? ?? ?? ?? 48 8b 9e 78 f5 00 00 48 85 db 48 8d 3d ?? ?? ?? ?? 48 0f 44 df",
|
||||
"captures": {
|
||||
"econ_change_req": {
|
||||
"offset": 20,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// setPlayerGuiState(player id, state).
|
||||
// 2.61.0.37: 0x155f5f0
|
||||
"set_player_gui_state": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 54 56 57 55 53 48 83 ec 40 89 d6 48 8b 15 ?? ?? ?? ?? 48 85 d2 74 ?? 80 7a 60 00 0f 84 ?? ?? ?? ?? 85 c9 78 ?? 31 c0 80 7a 61 00 0f 44 c1 81 f9 fa 00 00 00 0f 45 c1 eb ?? 89 c8"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// getUnitByEid (a leaf function without unwind info).
|
||||
// 2.61.0.37: 0x110b960
|
||||
"get_unit_by_eid": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "39 0d ?? ?? ?? ?? 74 2f 89 ca c1 ea 0a 3b 15 ?? ?? ?? ??"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Unit::setOwningMPlayer(unit, mplayer, ...): its start reads the MPlayer player id.
|
||||
// 2.61.0.37: 0xfce410 (push r15; push r14; push r13; ...)
|
||||
"set_owning_mplayer": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec 98 00 00 00 44 89 c3 48 89 d7 48 89 ce 48 85 d2 74 ?? 0f b6 6f ??",
|
||||
"captures": {
|
||||
"mp_pid": {
|
||||
"offset": 36,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// IGroundModel::onBecameDead.
|
||||
// 2.61.0.37: 0x427400
|
||||
"iground_on_dead": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec a8 01 00 00 44 0f 29 8c 24 90 01 00 00 44 0f 29 84 24 80 01 00 00 0f 29 bc 24 70 01 00 00 0f 29 b4 24 60 01 00 00 89 d3"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// DataBlock::getStr wrapper.
|
||||
// 2.61.0.37: 0x3094400
|
||||
"datablock_get_str": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "48 83 ec 28 4c 89 44 24 20 4c 8d 44 24 20 e8 ?? ?? ?? ?? 90 48 83 c4 28 c3 cc cc cc cc cc cc cc 41 57"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// DataBlock::setFrom; its first call is the Dagor allocator.
|
||||
// 2.61.0.37: 0x3093210
|
||||
"datablock_set_from": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 83 ec 48 48 89 d7 48 89 ce 66 2e 0f 1f 84 00 00 00 00 00 b9 90 00 00 00 e8 ?? ?? ?? ?? 48 85 c0 75 ?? 48 8b 05 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"dagmem_alloc": {
|
||||
"offset": 38,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Multiplayer::constructLocalMP: builds the chat host at +0x1f8 and sets isHost and isLocalMP (one word).
|
||||
// 2.61.0.37: 0x5bd960
|
||||
"mp_construct_local": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "56 57 53 48 83 ec 60 48 89 ce 48 81 c1 f8 00 00 00 e8 ?? ?? ?? ?? 66 c7 46 60 01 01",
|
||||
"captures": {
|
||||
"mp_chat_host": {
|
||||
"offset": 13,
|
||||
"type": "u32"
|
||||
},
|
||||
"mp_is_host": {
|
||||
"offset": 25,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// GuiState::update.
|
||||
// 2.61.0.37: 0x155f490
|
||||
"gui_state_update": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "56 57 48 83 ec 48 48 89 ce f3 0f 10 41 08 f3 0f 58 c1 f3 0f 11 41 08 f3 0f 10 51 10 0f 57 c0 0f 2e c2 73 ?? f3 0f 5c d1 f3 0f 11 56 10 48 8b 0d ?? ?? ?? ?? b0 01 0f 2e 81 e4 06 00 00 76 ??"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// App -> economic state holder -> GameEconomicState.
|
||||
// 2.61.0.37: 0x155f5b7 (mov rax, qword ptr [rax + 0x3f0]; mov rax, qword ptr [rax + 0x9a8])
|
||||
"app_econ_state": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "gui_state_update",
|
||||
"pattern": "48 8b 80 ?? ?? ?? ?? 48 8b 80 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"econ_holder": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"econ_state": {
|
||||
"offset": 10,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer::initFromMatching: team of the matching info, the MPlayer team, and the user id it logs.
|
||||
// 2.61.0.37: 0x59e95f (mov edx, dword ptr [rdi + 4]; test rdx, rdx; je 0x59ea61; ...)
|
||||
"mplayer_matching": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "MPlayer::setMatchingPlayerInfo",
|
||||
"pattern": "8b 57 ?? 48 85 d2 0f 84 ?? ?? ?? ?? 83 fa 02 0f 87 ?? ?? ?? ?? 8b 86 80 07 00 00 83 f8 08 0f 85 ?? ?? ?? ?? 0f b6 86 ?? ?? ?? ?? 85 c0 0f 94 c1 39 c2 41 0f 94 c0 41 08 c8 75 ?? 48 8b 8e ?? ?? ?? ?? 4c 8d 05 ?? ?? ?? ??",
|
||||
"lea_at": 66,
|
||||
"captures": {
|
||||
"match_team": {
|
||||
"offset": 2,
|
||||
"type": "u8"
|
||||
},
|
||||
"mp_team": {
|
||||
"offset": 39,
|
||||
"type": "u32"
|
||||
},
|
||||
"mp_user_id": {
|
||||
"offset": 62,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Unit::changeAircraft(unit, reflection).
|
||||
// 2.61.0.37: 0xff1020
|
||||
"unit_change_aircraft": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 56 57 55 53 48 81 ec 88 00 00 00 48 89 ce 8b 81 90 00 00 00 a8 10 75 ?? 80 be 1a 0f 00 00 00 75 ?? 48 8b 05 ?? ?? ?? ?? 0f b6 80 f3 00 00 00 0f b6 0d ?? ?? ?? ?? 08 c8 a8 01 74 ??"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Unit type (word) compared with helicopter.
|
||||
// 2.61.0.37: 0xff120f (cmp word ptr [rsi + 0x8c], 0xd; jne 0xff1369)
|
||||
"unit_type": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "unit_change_aircraft",
|
||||
"pattern": "66 83 be ?? ?? ?? ?? 0d 0f 85 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"unit_type": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Unit -> unit info -> unit name.
|
||||
// 2.61.0.37: 0xff12a5 (mov rax, qword ptr [rsi + 0x1020]; mov rax, qword ptr [rax + 0x10]; test rax, rax; ...)
|
||||
"unit_info_name": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "unit_change_aircraft",
|
||||
"pattern": "48 8b 86 ?? ?? ?? ?? 48 8b 40 ?? 48 85 c0 48 8d 0d ?? ?? ?? ?? 48 0f 44 c1 48 8b 52 50 48 89 44 24 48 c7 44 24 40 01 00 00 00 48 85 d2 48 0f 44 d1 48 89 54 24 58 c7 44 24 50 01 00 00 00 48 8d 15 ?? ?? ?? ?? eb ??",
|
||||
"captures": {
|
||||
"unit_info": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"info_name": {
|
||||
"offset": 10,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Unit owning MPlayer.
|
||||
// 2.61.0.37: 0xfce718 (cmp qword ptr [rsi + 0xf98], rdi; je 0xfce7ed)
|
||||
"unit_mplayer": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "set_owning_mplayer",
|
||||
"pattern": "48 39 be ?? ?? ?? ?? 0f 84 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"unit_mplayer": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// The Dagor default allocator global.
|
||||
// 2.61.0.37: 0x548fab (mov rcx, qword ptr [rip + 0x7adc2e6]; mov rax, qword ptr [rcx]; call qword ptr [rax + 0x40]; ...)
|
||||
"refl_stdmem": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "refl_dtor",
|
||||
"pattern": "48 8b 0d ?? ?? ?? ?? 48 8b 01 ff 50 40 48 8b 56 60",
|
||||
"captures": {
|
||||
"stdmem": {
|
||||
"offset": 3,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// The mission settings loader (refers to "customScoreParams").
|
||||
// 2.61.0.37: 0x12657a0
|
||||
"mission_settings_load": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "customScoreParams",
|
||||
"target": "function"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
// Combat events on the LocalMP host (native/wto-net/src/local_mp_events.c): assists, captures, hits,
|
||||
// critical and severe damage, counted and reported as award facts.
|
||||
// Without it: assists, captures and damage events score nothing in LocalMP battles.
|
||||
{
|
||||
"module": "local_mp_events",
|
||||
"features": [
|
||||
"K-Kill, assist and capture scoring",
|
||||
"L-Battle awards"
|
||||
],
|
||||
"requires": [
|
||||
"local_mp_core",
|
||||
"local_mp_awards",
|
||||
"local_mp_kills"
|
||||
],
|
||||
"sites": {
|
||||
// dispatchAssist.
|
||||
// 2.61.0.37: 0x35beb0
|
||||
"dispatch_assist": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 83 ec 78 0f 29 7c 24 60 0f 29 74 24 50 0f 28 f3 4c 89 c6 48 89 d7 48 89 cb 48 8b 05 ?? ?? ?? ?? 48 85 c9 7e ?? 48 85 c0"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// A caller of the capture zone dispatch; captures the callee.
|
||||
// 2.61.0.37: 0x3db0e0
|
||||
"caller_capture_zone": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 83 ec 38 44 0f b7 72 02 44 8b 7a 04 4c 8b 62 08 4c 8b 6a 18 49 8d 85 88 06 00 00 48 89 44 24 30 49 8d 85 50 06 00 00 48 89 44 24 28 eb ?? 48 8b 90 08 0e 00 00 89 d1 83 e1 01 0b 0d ?? ?? ?? ?? 3b 88 14 0e 00 00 0f 85 ?? ?? ?? ?? 48 83 e2 fe 48 8b 82 98 0f 00 00 48 8b 88 b8 00 00 00 e8 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"call": {
|
||||
"offset": 108,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// A caller of the hit / critical hit dispatch.
|
||||
// 2.61.0.37: 0xff85ea
|
||||
"caller_hit_crit": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "8b 0d ?? ?? ?? ?? f7 c1 00 00 08 00 75 ?? f7 c1 00 00 00 01 75 ?? 0f b6 8f 10 10 00 00 39 4e 1c 74 ?? 41 20 c0 0f b6 86 49 01 00 00 0f 57 db f3 0f 5f 9e 30 01 00 00 48 8b 4e 58 85 ed f3 0f 5d 1d ?? ?? ?? ?? 88 44 24 30 0f 9f 44 24 28 44 88 44 24 20 48 89 fa 49 89 f0 e8 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"call": {
|
||||
"offset": 90,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// A caller of the severe damage dispatch.
|
||||
// 2.61.0.37: 0xe55afa
|
||||
"caller_severe_damage": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "66 83 be b0 06 00 00 ff 0f 85 ?? ?? ?? ?? 48 89 f1 e8 ?? ?? ?? ?? 84 c0 0f 84 ?? ?? ?? ?? 48 8d 9e b0 06 00 00 48 8b 4f 58 48 89 f2 49 89 f8 e8 ?? ?? ?? ?? 48 89 f1 48 89 fa e8 ?? ?? ?? ?? 0f b6 ae d4 06 00 00",
|
||||
"captures": {
|
||||
"call": {
|
||||
"offset": 48,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// A caller of the naval damage dispatch.
|
||||
// 2.61.0.37: 0xd048ea
|
||||
"caller_naval_damage": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "66 83 b9 90 0f 00 00 01 77 ?? 66 83 ff ff 74 ?? 0f b7 c7 0f 57 d2 f3 0f 2a d0 f3 0f 59 15 ?? ?? ?? ?? eb ?? f3 0f 10 15 ?? ?? ?? ?? 48 8b 94 24 c0 03 00 00 0f b6 7c 24 5b 41 89 f9 e8 ?? ?? ?? ?? 0f 57 c0 0f 2e f0 0f 96 c0 40 08 f8 a8 01 75 ?? 48 8b 96 e8 0a 00 00 4c 8b 84 24 c0 03 00 00 49 8b 48 58 0f 28 de e8 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"call": {
|
||||
"offset": 104,
|
||||
"type": "rel32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Offender assist already reported.
|
||||
// 2.61.0.37: 0x465896 (cmp byte ptr [r14 + 0x148], 0; jne 0x465620)
|
||||
"offender_assist": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "iground_award_assists",
|
||||
"pattern": "41 80 be ?? ?? ?? ?? 00 0f 85 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"assist_sent": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,592 @@
|
||||
// Unit deaths and kill attribution on the LocalMP host (native/wto-net/src/local_mp_kills.c):
|
||||
// scoreboard counters and battle score for every MPlayer, the local player's kills as award facts.
|
||||
// Without it: kills and deaths are not counted in LocalMP battles.
|
||||
{
|
||||
"module": "local_mp_kills",
|
||||
"features": [
|
||||
"K-Kill, assist and capture scoring",
|
||||
"K-Scoreboard"
|
||||
],
|
||||
"requires": [
|
||||
"local_mp_core",
|
||||
"local_mp_awards",
|
||||
"local_mp_scores"
|
||||
],
|
||||
"sites": {
|
||||
// MPlayer::addScore.
|
||||
// 2.61.0.37: 0x59f2d0
|
||||
"mplayer_add_score": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 56 57 55 53 48 81 ec 88 00 00 00 0f 29 7c 24 70 0f 29 74 24 60 48 89 ce 44 89 c0 f3 0f 2a 84 81 fc 08 00 00 0f 28 f9 f3 0f 58 c1 f3 0f 2c c8 89 8c 86 fc 08 00 00"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer battle score.
|
||||
// 2.61.0.37: 0x59f30d (cvtsi2ss xmm0, dword ptr [rsi + 0x8f8]; addss xmm0, xmm1)
|
||||
"mplayer_score": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "mplayer_add_score",
|
||||
"pattern": "f3 0f 2a 86 ?? ?? ?? ?? f3 0f 58 c1",
|
||||
"captures": {
|
||||
"score": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer stats replication field and payload.
|
||||
// 2.61.0.37: 0x59f5f8 (lea rcx, [rsi + 0xa10]; lea r8, [rsi + 0xa30]; mov rdx, rsi; ...)
|
||||
"mplayer_stat_sync": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "mplayer_add_score",
|
||||
"pattern": "48 8d 8e ?? ?? ?? ?? 4c 8d 86 ?? ?? ?? ?? 48 89 f2 e8 ?? ?? ?? ?? 0f 57 c0",
|
||||
"captures": {
|
||||
"dirty": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"payload": {
|
||||
"offset": 10,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Replicated field setter that marks it dirty.
|
||||
// 2.61.0.37: 0x31030a0
|
||||
"net_mark_dirty": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "56 57 53 48 83 ec 40 81 7a 20 44 4e 45 54 0f 85 ?? ?? ?? ?? 48 89 ce 0f b7 41 02 a8 02 75 ?? f6 42 48 02 75 ?? a8 01 75 ?? 4c 89 c7 83 c8 01 66 89 46 02"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// onUnitDeadOnce; skips units flagged at +0x3058.
|
||||
// 2.61.0.37: 0xe5b200
|
||||
"on_unit_dead_once": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec 98 01 00 00 44 0f 29 84 24 80 01 00 00 0f 29 bc 24 70 01 00 00 0f 29 b4 24 60 01 00 00 80 b9 58 30 00 00 00 0f 85 ?? ?? ?? ?? 48 89 ce 48 8d 54 24 38 e8 ?? ?? ?? ?? 66 83 7c 24 38 ff",
|
||||
"captures": {
|
||||
"skip_kill": {
|
||||
"offset": 46,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Unit severe damage offender: index, user id, player id.
|
||||
// 2.61.0.37: 0xe5b2c7 (movzx r8d, word ptr [rsi + 0x6b0]; cmp r8w, -1; je 0xe5b340; ...)
|
||||
"unit_severe": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "on_unit_dead_once",
|
||||
"pattern": "44 0f b7 86 ?? ?? ?? ?? 66 41 83 f8 ff 74 ?? 4c 8b 8e ?? ?? ?? ?? 49 83 f9 ff 0f 95 c1 44 0f b6 96 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"severe_idx": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
},
|
||||
"severe_uid": {
|
||||
"offset": 18,
|
||||
"type": "u32"
|
||||
},
|
||||
"severe_pid": {
|
||||
"offset": 33,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// IGroundModel death guards.
|
||||
// 2.61.0.37: 0x427490 (cmp byte ptr [rsi + 0x2101], 0; jne 0x42846f; cmp byte ptr [rsi + 0x1c19], 0)
|
||||
"ground_death_flags": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "iground_on_dead",
|
||||
"pattern": "80 be ?? ?? ?? ?? 00 0f 85 ?? ?? ?? ?? 80 be ?? ?? ?? ?? 00",
|
||||
"captures": {
|
||||
"already_dead": {
|
||||
"offset": 2,
|
||||
"type": "u32"
|
||||
},
|
||||
"dead_silent": {
|
||||
"offset": 15,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// IGroundModel crew bailed out.
|
||||
// 2.61.0.37: 0x427a61 (cmp byte ptr [rsi + 0x3888], 0; jne 0x427d8c; mov rcx, qword ptr [rsp + 0x130])
|
||||
"ground_bailout": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "iground_on_dead",
|
||||
"pattern": "80 be ?? ?? ?? ?? 00 0f 85 ?? ?? ?? ?? 48 8b 8c 24 30 01 00 00",
|
||||
"captures": {
|
||||
"bailout_dead": {
|
||||
"offset": 2,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// IGroundModel offender list and the embedded killer record.
|
||||
// 2.61.0.37: 0x427aad (cmp word ptr [rsi + 0x8c], 5; jne 0x427bc0; mov ecx, dword ptr [rsi + 0x17d0]; ...)
|
||||
"ground_offenders": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "iground_on_dead",
|
||||
"pattern": "66 83 be ?? ?? ?? ?? 05 0f 85 ?? ?? ?? ?? 8b 8e ?? ?? ?? ?? 48 85 c9 0f 84 ?? ?? ?? ?? 48 8b 86 ?? ?? ?? ?? 48 69 c9 ?? ?? ?? ?? 48 8b 96 ?? ?? ?? ?? 48 83 fa ff 41 0f 95 c3 44 0f b7 86 ?? ?? ?? ?? 44 0f b6 8e ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"unit_type": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"offenders_count": {
|
||||
"offset": 16,
|
||||
"type": "u32"
|
||||
},
|
||||
"offenders": {
|
||||
"offset": 32,
|
||||
"type": "u32"
|
||||
},
|
||||
"offender_size": {
|
||||
"offset": 39,
|
||||
"type": "u32"
|
||||
},
|
||||
"killer_uid": {
|
||||
"offset": 46,
|
||||
"type": "u32"
|
||||
},
|
||||
"killer": {
|
||||
"offset": 62,
|
||||
"type": "u32"
|
||||
},
|
||||
"killer_pid": {
|
||||
"offset": 70,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// IGroundModel::awardAssists; calls the unit chooseOffender virtual first.
|
||||
// 2.61.0.37: 0x465540
|
||||
"iground_award_assists": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec a8 01 00 00 44 0f 29 94 24 90 01 00 00 44 0f 29 8c 24 80 01 00 00 44 0f 29 84 24 70 01 00 00 0f 29 bc 24 60 01 00 00 0f 29 b4 24 50 01 00 00 48 89 ce 48 8b 01 48 8d 54 24 28 41 b0 01 ff 90 98 04 00 00",
|
||||
"captures": {
|
||||
"choose_offender": {
|
||||
"offset": 78,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Offender army, user id and player id.
|
||||
// 2.61.0.37: 0x465832 (movzx eax, byte ptr [rsi + 0x1010]; cmp dword ptr [r14 + 0x1c], eax; je 0x465620; ...)
|
||||
"offender_fields": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "iground_award_assists",
|
||||
"pattern": "0f b6 86 ?? ?? ?? ?? 41 39 46 ?? 0f 84 ?? ?? ?? ?? 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 49 8b 56 ?? 48 83 fa ff 41 0f 95 c0 41 0f b6 46 ??",
|
||||
"captures": {
|
||||
"unit_army": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"army": {
|
||||
"offset": 10,
|
||||
"type": "u8"
|
||||
},
|
||||
"uid": {
|
||||
"offset": 33,
|
||||
"type": "u8"
|
||||
},
|
||||
"pid": {
|
||||
"offset": 46,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "kills" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f0e4 (movsx r8d, word ptr [rsi + 0x9d8]; mov rcx, r14; lea rdx, [rip + 0x6614963])
|
||||
"stat_kills": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "kills",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "groundKills" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f0fb (movsx r8d, word ptr [rsi + 0x9de]; mov rcx, r14; lea rdx, [rip + 0x6614b0a])
|
||||
"stat_ground_kills": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "groundKills",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "humanKills" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f112 (movsx r8d, word ptr [rsi + 0x9e0]; mov rcx, r14; lea rdx, [rip + 0x66149da])
|
||||
"stat_human_kills": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "humanKills",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "navalKills" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f129 (movsx r8d, word ptr [rsi + 0x9e2]; mov rcx, r14; lea rdx, [rip + 0x6614a3b])
|
||||
"stat_naval_kills": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "navalKills",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "teamKills" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f140 (movsx r8d, word ptr [rsi + 0x9da]; mov rcx, r14; lea rdx, [rip + 0x6614a01])
|
||||
"stat_team_kills": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "teamKills",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "aiKills" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f157 (movsx r8d, word ptr [rsi + 0x9e4]; mov rcx, r14; lea rdx, [rip + 0x6614a84])
|
||||
"stat_ai_kills": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "aiKills",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "aiGroundKills" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f16e (movsx r8d, word ptr [rsi + 0x9e6]; mov rcx, r14; lea rdx, [rip + 0x6614ade])
|
||||
"stat_ai_ground_kills": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "aiGroundKills",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "aiNavalKills" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f185 (movsx r8d, word ptr [rsi + 0x9e8]; mov rcx, r14; lea rdx, [rip + 0x6614a21])
|
||||
"stat_ai_naval_kills": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "aiNavalKills",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "assists" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f19c (movsx r8d, word ptr [rsi + 0x9ec]; mov rcx, r14; lea rdx, [rip + 0x65fb6b2])
|
||||
"stat_assists": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "assists",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "deaths" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f1b3 (movsx r8d, word ptr [rsi + 0x9dc]; mov rcx, r14; lea rdx, [rip + 0x6618733])
|
||||
"stat_deaths": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "deaths",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "captureZone" counter, read where the scoreboard row writes it.
|
||||
// 2.61.0.37: 0x111f1ca (movsx r8d, word ptr [rsi + 0x9ee]; mov rcx, r14; lea rdx, [rip + 0x67096a5])
|
||||
"stat_capture_zone": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "captureZone",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 11,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer scoreboard score: the larger of the short score and the battle score.
|
||||
// 2.61.0.37: 0x111f1f7 (movsx r8d, word ptr [rsi + 0x2d8]; mov eax, dword ptr [rsi + 0x8f8]; cmp eax, r8d; ...)
|
||||
"stat_score": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "score",
|
||||
"pattern": "44 0f bf 86 ?? ?? ?? ?? 8b 86 ?? ?? ?? ?? 44 39 c0 44 0f 4f c0 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 24,
|
||||
"captures": {
|
||||
"fallback": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
},
|
||||
"score": {
|
||||
"offset": 10,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "awardDamage" counter.
|
||||
// 2.61.0.37: 0x111f21b (mov r8d, dword ptr [rsi + 0xa00]; mov rcx, r14; lea rdx, [rip + 0x67392d6])
|
||||
"stat_award_damage": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "awardDamage",
|
||||
"pattern": "44 8b 86 ?? ?? ?? ?? 4c 89 f1 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 10,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "airSevereDamage" counter.
|
||||
// 2.61.0.37: 0x129349c (movsx rax, word ptr [rdi + 0xa06]; mov qword ptr [rsp + 0x30], rax; mov byte ptr [rsp + 0x20], 0; ...)
|
||||
"stat_air_severe": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "airSevereDamage",
|
||||
"pattern": "48 0f bf 87 ?? ?? ?? ?? 48 89 44 24 30 c6 44 24 20 00 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 18,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer "shipSevereDamage" counter.
|
||||
// 2.61.0.37: 0x12934c8 (movsx rax, word ptr [rdi + 0xa08]; mov qword ptr [rsp + 0x30], rax; mov byte ptr [rsp + 0x20], 0; ...)
|
||||
"stat_ship_severe": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "shipSevereDamage",
|
||||
"pattern": "48 0f bf 87 ?? ?? ?? ?? 48 89 44 24 30 c6 44 24 20 00 48 8d 15 ?? ?? ?? ??",
|
||||
"lea_at": 18,
|
||||
"captures": {
|
||||
"field": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,429 @@
|
||||
// Vehicle selection on the LocalMP host (native/wto-net/src/local_mp_loadout.c): the client build has
|
||||
// no receiver for SemChangeAircraftRequest, so the host builds the ChangeUnitReflection itself.
|
||||
// Request fields with no reader in the client (respawn base, spare type) and the fuel member are
|
||||
// kept in the module; see the module header.
|
||||
// Without it: pressing "To battle!" in a LocalMP battle does nothing.
|
||||
{
|
||||
"module": "local_mp_loadout",
|
||||
"features": [
|
||||
"K-Spawn score and respawns"
|
||||
],
|
||||
"requires": [
|
||||
"local_mp_core",
|
||||
"local_mp_players"
|
||||
],
|
||||
"sites": {
|
||||
// SemChangeAircraftRequest::send.
|
||||
// 2.61.0.37: 0xccba20
|
||||
"sem_change_aircraft_send": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec f8 01 00 00 44 0f 29 84 24 e0 01 00 00 0f 29 bc 24 d0 01 00 00 0f 29 b4 24 c0 01 00 00 4c 89 cf 4c 89 c3 49 89 d7 48 89 ce 8b 05 ?? ?? ?? ?? 65 48 8b 0c 25 58 00 00 00"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ChangeUnitReflection constructor.
|
||||
// 2.61.0.37: 0xcccdc0
|
||||
"refl_ctor": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "56 48 83 ec 50 0f 29 74 24 40 48 89 ce 66 c7 41 08 ff ff c7 41 0c ff ff ff ff 0f 57 f6 0f 11 71 10 c7 41 20 44 4e 45 54 0f 11 71 28 0f 11 71 38"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// DataBlock destructor.
|
||||
// 2.61.0.37: 0x3093a60
|
||||
"datablock_dtor": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 54 56 57 53 48 83 ec 38 0f 29 74 24 20 48 8b 41 18"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// BulletSetVec::assign.
|
||||
// 2.61.0.37: 0x4f1410
|
||||
"bullet_vec_assign": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 83 ec 58 4c 89 c5 49 89 d7 48 89 ce 4c 89 c3 48 29 d3 4c 8b 01 48 8b 41 10 4c 29 c0 48 39 c3 0f 86 ?? ?? ?? ?? 48 89 d9"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// GameSaveData::getDecalsBlk.
|
||||
// 2.61.0.37: 0x2df9a0
|
||||
"get_decals_blk": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec 88 00 00 00 44 0f 29 44 24 70 0f 29 7c 24 60 0f 29 74 24 50 4d 89 cf"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// GameSaveData::getAttachablesBlk.
|
||||
// 2.61.0.37: 0x2e08f0
|
||||
"get_attachables_blk": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 83 ec 38 48 89 d7 4d 85 c0"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// str_hash_fnv1.
|
||||
// 2.61.0.37: 0x21b670
|
||||
"str_hash_fnv1": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 56 56 57 53 49 89 d0 49 ba db 28 b4 a0 d1 7e 03 e7 48 83 fa 10 77 76"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// OAHashNameMap::addNameId.
|
||||
// 2.61.0.37: 0xed4b0
|
||||
"namemap_add_name_id": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 83 ec 38 44 89 cf 48 89 ce 80 79 4b 00"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// UnitCrewSkills::initFromSave.
|
||||
// 2.61.0.37: 0x1032130
|
||||
"crew_skills_init": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 56 56 57 55 53 48 81 ec 90 00 00 00 0f 29 b4 24 80 00 00 00 0f 28 f3"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ChangeUnitReflection members the destructor frees: bullet sets, modification name maps, blocks.
|
||||
// 2.61.0.37: 0x548f45 (mov rdi, qword ptr [rsi + 0x190]; mov rbx, qword ptr [rsi + 0x198]; cmp rdi, rbx; ...)
|
||||
"refl_objects": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "refl_dtor",
|
||||
"pattern": "48 8b be ?? ?? ?? ?? 48 8b 9e 98 01 00 00 48 39 df 0f 85 ?? ?? ?? ?? 48 85 ff 74 ?? 48 89 f9 e8 ?? ?? ?? ?? 48 8d 8e ?? ?? ?? ?? e8 ?? ?? ?? ?? 48 8d 8e ?? ?? ?? ?? e8 ?? ?? ?? ?? 48 8d 8e ?? ?? ?? ?? e8 ?? ?? ?? ?? 48 8d 8e ?? ?? ?? ?? e8 ?? ?? ?? ?? 48 8d 4e ??",
|
||||
"captures": {
|
||||
"bullets": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"disabled_mods": {
|
||||
"offset": 39,
|
||||
"type": "u32"
|
||||
},
|
||||
"enabled_mods": {
|
||||
"offset": 51,
|
||||
"type": "u32"
|
||||
},
|
||||
"custom_preset": {
|
||||
"offset": 63,
|
||||
"type": "u32"
|
||||
},
|
||||
"attachables": {
|
||||
"offset": 75,
|
||||
"type": "u32"
|
||||
},
|
||||
"decals": {
|
||||
"offset": 87,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ChangeUnitReflection name strings the destructor frees.
|
||||
// 2.61.0.37: 0x548fa2 (mov rdx, qword ptr [rsi + 0x68]; test rdx, rdx; je 0x548fb8; ...)
|
||||
"refl_names": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "refl_dtor",
|
||||
"pattern": "48 8b 56 ?? 48 85 d2 74 ?? 48 8b 0d ?? ?? ?? ?? 48 8b 01 ff 50 40 48 8b 56 ?? 48 85 d2 74 ?? 48 8b 0d ?? ?? ?? ?? 48 8b 01 ff 50 40 48 8b 56 ?? 48 85 d2 74 ?? 48 8b 0d ?? ?? ?? ?? 48 8b 01 ff 50 40 48 8b 56 ??",
|
||||
"captures": {
|
||||
"custom_skin": {
|
||||
"offset": 3,
|
||||
"type": "u8"
|
||||
},
|
||||
"skin": {
|
||||
"offset": 25,
|
||||
"type": "u8"
|
||||
},
|
||||
"weapon": {
|
||||
"offset": 47,
|
||||
"type": "u8"
|
||||
},
|
||||
"unit": {
|
||||
"offset": 69,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ChangeUnitReflection flags.
|
||||
// 2.61.0.37: 0xff139a (mov eax, dword ptr [rdx + 0xd0]; test al, 0x20; jne 0xff13ad; ...)
|
||||
"refl_flags": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "unit_change_aircraft",
|
||||
"pattern": "8b 82 ?? ?? ?? ?? a8 20 75 ?? 83 c8 10",
|
||||
"captures": {
|
||||
"flags": {
|
||||
"offset": 2,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ChangeUnitReflection gun convergence.
|
||||
// 2.61.0.37: 0xff13ce (movss xmm0, dword ptr [rdx + 0xdc]; movss dword ptr [rsp + 0x40], xmm0; movss xmm1, dword ptr [rsi + 0xb20])
|
||||
"refl_targeting": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "unit_change_aircraft",
|
||||
"pattern": "f3 0f 10 82 ?? ?? ?? ?? f3 0f 11 44 24 40 f3 0f 10 8e 20 0b 00 00",
|
||||
"captures": {
|
||||
"gun_convergence": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ChangeUnitReflection vertical targeting.
|
||||
// 2.61.0.37: 0xff140e (movzx eax, byte ptr [rdx + 0xe0]; mov byte ptr [rsp + 0x40], al; cmp byte ptr [rsi + 0xb48], al)
|
||||
"refl_vertical_targeting": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "unit_change_aircraft",
|
||||
"pattern": "0f b6 82 ?? ?? ?? ?? 88 44 24 40 38 86 48 0b 00 00",
|
||||
"captures": {
|
||||
"vertical_targeting": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// ChangeUnitReflection bomb activation time.
|
||||
// 2.61.0.37: 0xff1443 (movss xmm0, dword ptr [rdx + 0xe4]; movss dword ptr [rsp + 0x40], xmm0; movss xmm1, dword ptr [rsi + 0xb70])
|
||||
"refl_bomb_fuse": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "unit_change_aircraft",
|
||||
"pattern": "f3 0f 10 82 ?? ?? ?? ?? f3 0f 11 44 24 40 f3 0f 10 8e 70 0b 00 00",
|
||||
"captures": {
|
||||
"bomb_fuse": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Local MPlayer spawn point, delay and position read before respawning.
|
||||
// 2.61.0.37: 0xc6c48a (mov edi, dword ptr [rax + 0xbd8]; mov esi, dword ptr [rax + 0xbf4]; movss xmm6, dword ptr [rax + 0xbfc]; ...)
|
||||
"respawn_spawn": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "do_respawn_player",
|
||||
"pattern": "8b b8 ?? ?? ?? ?? 8b b0 ?? ?? ?? ?? f3 0f 10 b0 ?? ?? ?? ?? f3 0f 10 b8 ?? ?? ?? ?? f3 44 0f 10 80 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"resp_base_id": {
|
||||
"offset": 2,
|
||||
"type": "u32"
|
||||
},
|
||||
"spawn_delay_a": {
|
||||
"offset": 8,
|
||||
"type": "u32"
|
||||
},
|
||||
"spawn_pos_x": {
|
||||
"offset": 16,
|
||||
"type": "u32"
|
||||
},
|
||||
"spawn_pos_y": {
|
||||
"offset": 24,
|
||||
"type": "u32"
|
||||
},
|
||||
"spawn_pos_z": {
|
||||
"offset": 33,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Unit::onEvent reading the owner MPlayer spawn state (base, both delays, position).
|
||||
// 2.61.0.37: 0x1044ff1 (mov rax, qword ptr [r13 + 0xf98]; mov ebp, dword ptr [rax + 0xbd8]; mov r15d, dword ptr [rax + 0xbf4]; ...)
|
||||
"unit_spawn_state": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "49 8b 85 ?? ?? ?? ?? 8b a8 ?? ?? ?? ?? 44 8b b8 ?? ?? ?? ?? 44 89 bc 24 80 00 00 00 8b b8 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"unit_mplayer": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"resp_base_id": {
|
||||
"offset": 9,
|
||||
"type": "u32"
|
||||
},
|
||||
"spawn_delay_a": {
|
||||
"offset": 16,
|
||||
"type": "u32"
|
||||
},
|
||||
"spawn_delay_b": {
|
||||
"offset": 30,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Change request crew slot, as an offset in the economic state.
|
||||
// 2.61.0.37: 0xebc657 (mov r8d, dword ptr [rsi + 0xf65c]; mov dword ptr [rsi + 0x2c4], r8d)
|
||||
"change_req_slot": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "aircraft_change_result",
|
||||
"pattern": "44 8b 86 ?? ?? ?? ?? 44 89 86 c4 02 00 00",
|
||||
"captures": {
|
||||
"slot_id": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// GameEconomicState member cleanup, which frees the change request.
|
||||
// 2.61.0.37: 0x2dd300 (push r14; push rsi; push rdi; ...)
|
||||
"econ_clear": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 56 56 57 53 48 83 ec 28 48 89 ce 48 8d 05 ?? ?? ?? ?? 48 89 01 48 8d 05 ?? ?? ?? ?? 48 89 81 c8 02 00 00"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Change request bullet set vector, as offsets in the economic state.
|
||||
// 2.61.0.37: 0x2dd45f (mov rdi, qword ptr [rsi + 0xf608]; mov rbx, qword ptr [rsi + 0xf610]; cmp rdi, rbx; ...)
|
||||
"change_req_bullets": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "econ_clear",
|
||||
"pattern": "48 8b be ?? ?? ?? ?? 48 8b 9e ?? ?? ?? ?? 48 39 df 0f 85 ?? ?? ?? ?? 48 85 ff 74 ?? 48 89 f9 e8 ?? ?? ?? ?? 48 8d 8e e0 f5 00 00",
|
||||
"captures": {
|
||||
"bullets_begin": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
},
|
||||
"bullets_end": {
|
||||
"offset": 10,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// A Unit method that starts by reading the unit crew skills.
|
||||
// 2.61.0.37: 0x485850 (push r15; push r14; push r12; ...)
|
||||
"unit_crew_skills": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 54 56 57 53 48 81 ec b8 00 00 00 44 0f 29 b4 24 a0 00 00 00 44 0f 29 ac 24 90 00 00 00 44 0f 29 a4 24 80 00 00 00 44 0f 29 5c 24 70 44 0f 29 54 24 60 44 0f 29 4c 24 50 44 0f 29 44 24 40 0f 29 7c 24 30 0f 29 74 24 20 48 89 ce 48 8b b9 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"crew_skills": {
|
||||
"offset": 83,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
// Nuclear strike ends the battle on the LocalMP host (native/wto-net/src/local_mp_nuke.c).
|
||||
// Without it: a nuclear explosion does not win a LocalMP battle.
|
||||
{
|
||||
"module": "local_mp_nuke",
|
||||
"features": [
|
||||
"K-Nuclear bomb"
|
||||
],
|
||||
"requires": [
|
||||
"local_mp_core",
|
||||
"local_mp_awards"
|
||||
],
|
||||
"sites": {
|
||||
// Bomb / shell launch.
|
||||
// 2.61.0.37: 0x1431c10
|
||||
"shell_launch": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 54 56 57 55 53 48 81 ec 30 02 00 00 44 0f 29 bc 24 20 02 00 00"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// The launch record (+0x18 of the launch) gets the instant-win flag.
|
||||
// 2.61.0.37: 0x14332fd (mov rax, qword ptr [rsi + 0x18]; test rax, rax; jne 0x143330d; ...)
|
||||
"shell_instant_win": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "shell_launch",
|
||||
"pattern": "48 8b 46 ?? 48 85 c0 75 ?? 48 8b 06 48 89 46 18 c6 40 ?? 01",
|
||||
"captures": {
|
||||
"record": {
|
||||
"offset": 3,
|
||||
"type": "u8"
|
||||
},
|
||||
"instant_win": {
|
||||
"offset": 18,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Projectile explosion.
|
||||
// 2.61.0.37: 0xbe7c00
|
||||
"shell_explode": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec a8 02 00 00 44 0f 29 bc 24 90 02 00 00 44 0f 29 b4 24 80 02 00 00 44 0f 29 ac 24 70 02 00 00 44 0f 29 a4 24 60 02 00 00 44 0f 29 9c 24 50 02 00 00 44 0f 29 94 24 40 02 00 00 44 0f 29 8c 24 30 02 00 00 44 0f 29 84 24 20 02 00 00 0f 29 bc 24 10 02 00 00 0f 29 b4 24 00 02 00 00 41 89 d3"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// cta_logic_action (domination logic).
|
||||
// 2.61.0.37: 0x11bc400
|
||||
"cta_logic_action": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec a8 02 00 00 44 0f 29 bc 24 90 02 00 00 44 0f 29 b4 24 80 02 00 00 44 0f 29 ac 24 70 02 00 00 44 0f 29 a4 24 60 02 00 00 44 0f 29 9c 24 50 02 00 00 44 0f 29 94 24 40 02 00 00 44 0f 29 8c 24 30 02 00 00 44 0f 29 84 24 20 02 00 00 0f 29 bc 24 10 02 00 00 0f 29 b4 24 00 02 00 00 48 89 cf"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Mission variables array of the logic context.
|
||||
// 2.61.0.37: 0x11bc4f6 (lea rax, [rdi + 0x40]; mov r14d, dword ptr [rdi + 0x50]; test r14, r14; ...)
|
||||
"mission_vars_data": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "cta_logic_action",
|
||||
"pattern": "48 8d 47 ?? 44 8b 77 50 4d 85 f6 48 89 44 24 38",
|
||||
"captures": {
|
||||
"data": {
|
||||
"offset": 3,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Mission variables count; the walk keeps a pointer 8 bytes into each entry.
|
||||
// 2.61.0.37: 0x11bd150 (mov ebx, dword ptr [rdi + 0x50]; test rbx, rbx; je 0x11bd250; ...)
|
||||
"mission_vars_walk": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "mpTi0",
|
||||
"pattern": "8b 5f ?? 48 85 db 0f 84 ?? ?? ?? ?? 48 8b 44 24 38 48 8b 30 4c 8d 7e ?? 4c 8d 35 ?? ?? ?? ??",
|
||||
"lea_at": 24,
|
||||
"captures": {
|
||||
"count": {
|
||||
"offset": 2,
|
||||
"type": "u8"
|
||||
},
|
||||
"entry_bias": {
|
||||
"offset": 23,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Entry name and size.
|
||||
// 2.61.0.37: 0x11bd180 (mov rcx, qword ptr [r15 - 8]; mov rdx, r14; call 0x6bdf490; ...)
|
||||
"mission_vars_step": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "cta_logic_action",
|
||||
"pattern": "49 8b 4f ?? 4c 89 f2 e8 ?? ?? ?? ?? 85 c0 74 ?? 49 83 c7 ?? 49 ff cc 75 ?? 45 31 ff c7 05 ?? ?? ?? ?? 00 00 00 00 49 8d 4f 08",
|
||||
"captures": {
|
||||
"name": {
|
||||
"offset": 3,
|
||||
"type": "i8"
|
||||
},
|
||||
"stride": {
|
||||
"offset": 19,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Entry value.
|
||||
// 2.61.0.37: 0x11bd1a6 (lea rcx, [r15 + 8]; test r15, r15; lea rax, [rip + 0x69f6e0c]; ...)
|
||||
"mission_vars_value": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "cta_logic_action",
|
||||
"pattern": "49 8d 4f ?? 4d 85 ff 48 8d 05 ?? ?? ?? ?? 48 0f 44 c8 48 89 cd",
|
||||
"captures": {
|
||||
"value": {
|
||||
"offset": 3,
|
||||
"type": "u8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
// Player state on the LocalMP host (native/wto-net/src/local_mp_players.c): team from the hangar
|
||||
// country, GUI states, crew slots used, spare vehicles.
|
||||
// Without it: the player cannot pick a vehicle or spawn in a LocalMP battle.
|
||||
{
|
||||
"module": "local_mp_players",
|
||||
"features": [
|
||||
"K-Spawn score and respawns"
|
||||
],
|
||||
"requires": [
|
||||
"local_mp_core"
|
||||
],
|
||||
"sites": {
|
||||
// MPlayer::initFromMatching.
|
||||
// 2.61.0.37: 0x59e660
|
||||
"mplayer_init_matching": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 56 56 57 55 53 48 81 ec e0 00 00 00 48 89 d7 48 89 ce 48 89 91 90 0c 00 00 48 8d 8c 24 88 00 00 00 0f 57 c0 0f 11 84 24 b8 00 00 00 0f 11 84 24 a8 00 00 00 0f 11 84 24 98 00 00 00"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// is_crew_slot_was_ready_at_host.
|
||||
// 2.61.0.37: 0x17a31d0
|
||||
"is_slot_ready_at_host": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 56 56 57 55 53 48 81 ec a0 00 00 00 0f 29 b4 24 90 00 00 00 44 89 c3 48 89 d6 48 83 3d"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer GUI state byte.
|
||||
// 2.61.0.37: 0x155f6f1 (movzx r15d, byte ptr [rdi + 0x640]; movsxd r12, esi; lea rax, [rip + 0x5d757fd])
|
||||
"mplayer_gui_state": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "set_player_gui_state",
|
||||
"pattern": "44 0f b6 bf ?? ?? ?? ?? 4c 63 e6 48 8d 05 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"gui_state": {
|
||||
"offset": 4,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer::clearBeforeLobby.
|
||||
// 2.61.0.37: 0x599680 (push r15; push r14; push r13; ...)
|
||||
"mplayer_clear_before_lobby": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec 98 00 00 00 0f 29 b4 24 80 00 00 00 48 89 ce 83 b9 0c 0c 00 00 00"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer used spare vehicles mask, reset after the broken slots mask.
|
||||
// 2.61.0.37: 0x59a102 (cmp dword ptr [rsi + 0x520], 0; je 0x59a129; lea rcx, [rsi + 0x500])
|
||||
"mplayer_used_spares": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "mplayer_clear_before_lobby",
|
||||
"pattern": "83 be ?? ?? ?? ?? 00 74 ?? 48 8d 8e 00 05 00 00",
|
||||
"captures": {
|
||||
"used_spares": {
|
||||
"offset": 2,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Scoreboard row writer (refers to "airSevereDamage").
|
||||
// 2.61.0.37: 0x12929f0
|
||||
"scoreboard_rows": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "string_ref",
|
||||
"string": "airSevereDamage",
|
||||
"target": "function"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// The controlled unit eid, falling back to the player's own unit eid.
|
||||
// 2.61.0.37: 0x1292bfb (mov edx, dword ptr [rdi + 0x880]; lea r8, [rdi + 0x854]; test edx, edx; ...)
|
||||
"mplayer_unit_eid": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "scoreboard_rows",
|
||||
"pattern": "8b 97 ?? ?? ?? ?? 4c 8d 87 54 08 00 00 85 d2 4c 0f 45 c1 48 8d 8f 48 08 00 00 0f 44 97 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"controlled_eid": {
|
||||
"offset": 2,
|
||||
"type": "u32"
|
||||
},
|
||||
"unit_eid": {
|
||||
"offset": 29,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MissionSettings allies country.
|
||||
// 2.61.0.37: 0x1277500 (mov rcx, qword ptr [rcx + 0xd0]; jmp 0x127751f; xor r10d, r10d)
|
||||
"mission_allies_country": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "get_player_country",
|
||||
"pattern": "48 8b 89 ?? ?? ?? ?? eb ?? 45 31 d2",
|
||||
"captures": {
|
||||
"allies_country": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MissionSettings axis country.
|
||||
// 2.61.0.37: 0x1277518 (mov rcx, qword ptr [rcx + 0xc8]; test rcx, rcx; lea r10, [rip + 0x67c23d8])
|
||||
"mission_axis_country": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "get_player_country",
|
||||
"pattern": "48 8b 89 ?? ?? ?? ?? 48 85 c9 4c 8d 15 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"axis_country": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MissionSettings arcade country mode.
|
||||
// 2.61.0.37: 0x127748a (cmp byte ptr [rcx + 0x1d0], 1; jne 0x12774ee; movzx ecx, byte ptr [r10 + 0x250])
|
||||
"mission_arcade_country": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "get_player_country",
|
||||
"pattern": "80 b9 ?? ?? ?? ?? 01 75 ?? 41 0f b6 8a 50 02 00 00",
|
||||
"captures": {
|
||||
"arcade_country": {
|
||||
"offset": 2,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MissionSettings customBots.
|
||||
// 2.61.0.37: 0x126ef8d (lea rdi, [rsi + 0x718]; mov rcx, rdi; call 0x3093970)
|
||||
"mission_custom_bots": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "mission_settings_load",
|
||||
"pattern": "48 8d be ?? ?? ?? ?? 48 89 f9 e8 ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"custom_bots": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// Score table of a LocalMP battle (native/wto-net/src/local_mp_scores.c): the local server puts it
|
||||
// in the mission's customScoreParams; the host reads it there.
|
||||
// Without it: kills, assists and captures score nothing.
|
||||
{
|
||||
"module": "local_mp_scores",
|
||||
"features": [
|
||||
"K-Kill, assist and capture scoring"
|
||||
],
|
||||
"requires": [
|
||||
"local_mp_core"
|
||||
],
|
||||
"sites": {
|
||||
// DataBlock::getReal wrapper.
|
||||
// 2.61.0.37: 0x5445270
|
||||
"datablock_get_real": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "48 83 ec 28 f3 0f 11 54 24 24 4c 8d 44 24 24 e8 ?? ?? ?? ?? 90 48 83 c4 28 c3 cc cc cc cc cc cc 56 57 53 48 83 ec 30 48 89 d7 48 89 ce 48 8d 15"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MissionSettings customScoreParams copy.
|
||||
// 2.61.0.37: 0x126d762 (lea rcx, [rax + 0x6d8]; mov eax, dword ptr [r13 + 0x10]; cmp eax, -1; ...)
|
||||
"mission_score_params": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "mission_settings_load",
|
||||
"pattern": "48 8d 88 ?? ?? ?? ?? 41 8b 45 10 83 f8 ff 74 ?? 45 0f b7 45 0e 46 8d 0c 00 31 d2 44 39 c8 0f 8d ?? ?? ?? ?? ff c7 4d 8b 4d 00 45 8b 51 5c 4d 01 d1 49 81 c1 90 00 00 00 41 bb ff ff ff 3f 45 31 d2 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 42 8d 34 10 48 c1 e6 05 41 8b 5c 31 08 44 21 db 39 fb 74 ?? 41 ff c2 45 39 d0 75 ?? eb ?? 41 0f b7 45 0e 31 d2 85 c0 74 ?? ff c7 4d 8b 4d 18 4d 8b 01 45 8b 49 08 44 8d 14 c5 00 00 00 00 45 29 d1 41 ba ff ff ff 3f 45 31 db 66 0f 1f 44 00 00 4b 8b 34 08 8b 76 08 44 21 d6 39 fe 74 ?? 41 ff c3 49 83 c1 08 44 39 d8 75 ?? eb ?? 49 01 f1 31 d2 45 39 c2 49 0f 42 d1 eb ?? 41 39 c3 73 ?? 44 89 c8 49 8b 14 00 eb ?? 31 d2 48 85 d2 49 0f 44 d6 31 f6 45 31 c0 e8 ?? ?? ?? ?? 49 8b 5d 00 bf ff ff ff ff 48 85 db 74 ?? 48 8d 0d ?? ?? ?? ?? ba 16 00 00 00",
|
||||
"captures": {
|
||||
"custom_score_params": {
|
||||
"offset": 3,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// Mission support unit (the nuclear carrier) after it is destroyed (native/wto-net/src/local_mp_support.c).
|
||||
// Without it: a second nuclear carrier spawns where the first died and nobody flies it.
|
||||
{
|
||||
"module": "local_mp_support",
|
||||
"features": [
|
||||
"K-Nuclear bomb"
|
||||
],
|
||||
"requires": [
|
||||
"local_mp_core"
|
||||
],
|
||||
"sites": {
|
||||
// setControlledUnit(mplayer, eid).
|
||||
// 2.61.0.37: 0x598a70
|
||||
"set_controlled_unit": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "56 57 53 48 83 ec 40 89 d7 48 89 ce 89 d0 48 89 44 24 28 c7 44 24 20 03 00 00 00"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer per-frame update.
|
||||
// 2.61.0.37: 0x59d270 (push r15; push r14; push r13; ...)
|
||||
"mplayer_update": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "signature",
|
||||
"pattern": "41 57 41 56 41 55 41 54 56 57 55 53 48 81 ec 98 00 00 00 0f 29 bc 24 80 00 00 00 0f 29 74 24 70 0f 28 f1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// MPlayer missionSupportUnitRef.
|
||||
// 2.61.0.37: 0x59da3c (mov dword ptr [rsi + 0xb58], eax; mov rcx, qword ptr [rsp + 0x38]; mov qword ptr [rsi + 0xb50], rcx)
|
||||
"mplayer_support_unit": {
|
||||
"variants": [
|
||||
{
|
||||
"written_for": "2.61.0.37",
|
||||
"locate": {
|
||||
"method": "within",
|
||||
"in": "mplayer_update",
|
||||
"pattern": "89 86 ?? ?? ?? ?? 48 8b 4c 24 38 48 89 8e ?? ?? ?? ??",
|
||||
"captures": {
|
||||
"eid": {
|
||||
"offset": 2,
|
||||
"type": "u32"
|
||||
},
|
||||
"unit": {
|
||||
"offset": 14,
|
||||
"type": "u32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user