benilla-re systems structs docs

system sound · source

sound: overview

The client's sound: the engine over FMOD that opens, places, fades and mixes every sound; the SoundEntries definitions and the plays built on them; the interface's start-up, CVars and Lua functions; the music; the ambience, reverb, water and emitter loops; and the sound side of the unit, item and combat sounds.

The system owns ten object files, listed below; 0x827000, the C runtime's initializer table, lists each one's static initializers in one run. The docs split by topic: engine (the Sound object over FMOD), entries (definitions, file picks and plays), interface (start-up, CVars, Lua, interface and named sounds), music, ambience and objects. This doc holds the object files, their static initializers, the containers they share and the code nothing reaches. Other systems enter through the roots each topic doc lists, and through the static initializers below.

Roots: 0x456a80, 0x458200, 0x458220, 0x459ae0, 0x459b10, 0x459b40, 0x459b70, 0x459ba0, 0x459bd0, 0x459c00, 0x459c30, 0x459c60, 0x459c90, 0x459cc0, 0x459cf0, 0x459d20, 0x459d50, 0x459d70, 0x459da0, 0x459dd0, 0x459e00, 0x45a680, 0x45a6b0, 0x456aa0, 0x456ad0, 0x456b00, 0x456b30, 0x456b60, 0x456b90, 0x456de0, 0x456e40, 0x456ea0, 0x45a6e0, 0x45a910, 0x45a930, 0x45a960, 0x45a990, 0x45a9c0, 0x45a9f0, 0x45aa20, 0x45aa50, 0x45aa80, 0x45aab0, 0x45aae0, 0x45ab10, 0x45ab40, 0x45ab70, 0x45aba0, 0x45abd0, 0x45abf0, 0x45ac20, 0x45ac50, 0x45ac80, 0x45acb0, 0x45ace0, 0x45ad10, 0x45b080, 0x45b0a0, 0x45b0d0, 0x45b100, 0x45b130, 0x45b160, 0x45b190, 0x45b1c0, 0x45b1f0, 0x45b220, 0x45b250, 0x45b280, 0x45b2b0, 0x45b2e0, 0x45b310, 0x45b340, 0x45b360, 0x45b390, 0x45b3c0, 0x45b3f0, 0x45b420, 0x45b450, 0x45ad30, 0x45b480, 0x45d720, 0x45d740, 0x45f730, 0x45f760, 0x45f790, 0x45f7c0, 0x45f7f0, 0x45f820, 0x45f850, 0x45f880, 0x45f8b0, 0x45f8e0, 0x45f910, 0x45f940, 0x45f970, 0x45f9a0, 0x45f9c0, 0x45f9f0, 0x45fa20, 0x45fa50, 0x45ff40, 0x45ff70, 0x45b4a0, 0x45b4f0, 0x45b550, 0x45b5b0, 0x45b800, 0x45b8c0, 0x45b920, 0x45ffa0, 0x460590, 0x4605b0, 0x4605e0, 0x460610, 0x460640, 0x460670, 0x4606a0, 0x4606d0, 0x460700, 0x460730, 0x460760, 0x460790, 0x4607c0, 0x4607f0, 0x460820, 0x460850, 0x460870, 0x4608a0, 0x4608d0, 0x460900, 0x460930, 0x460960, 0x460990, 0x460cf0, 0x460d10, 0x460d40, 0x460d70, 0x460da0, 0x460dd0, 0x460e00, 0x460e30, 0x460e60, 0x460e90, 0x460ec0, 0x460ef0, 0x460f20, 0x460f50, 0x460f80, 0x460fb0, 0x460fd0, 0x461000, 0x461030, 0x461060, 0x461090, 0x4610c0, 0x4610f0, 0x4614b0, 0x4614d0, 0x461500, 0x461530, 0x461560, 0x461590, 0x4615c0, 0x4615f0, 0x461620, 0x461650, 0x461680, 0x4616b0, 0x4616e0, 0x461710, 0x461740, 0x461770, 0x461790, 0x4617c0, 0x4617f0, 0x461820, 0x461850, 0x461880, 0x461110, 0x4618b0, 0x462150, 0x462170, 0x4621b0, 0x4621e0, 0x462210, 0x462240, 0x462270, 0x4622a0, 0x4622d0, 0x462300, 0x462330, 0x462360, 0x462390, 0x4623c0, 0x4623f0, 0x462420, 0x462440, 0x462470, 0x4624a0, 0x4624d0, 0x462510, 0x462540, 0x4618d0, 0x462570, 0x462e90, 0x462eb0, 0x462ee0, 0x462f10, 0x462f40, 0x462f70, 0x462fa0, 0x462fd0, 0x463000, 0x463030, 0x463060, 0x463090, 0x4630c0, 0x4630f0, 0x463120, 0x463150, 0x463170, 0x4631a0, 0x4631d0, 0x463200, 0x463230, 0x463260, 0x462590, 0x4625c0, 0x4625f0, 0x462620, 0x462650, 0x462680, 0x4626b0, 0x7a3a90, 0x7a3ab0, 0x7a3ad0, 0x7a3b00, 0x7a3bf0, 0x7a3cf0, 0x7a3df0, 0x7a3ef0, 0x7a3ff0, 0x7a40f0, 0x7a4140

Object files

SoundInterface.cpp runs from 0x456a80 through 0x45a6d2: start-up, CVars, the Lua functions, the unit and combat sounds, the duck and the play helpers. The reverb file follows, 0x45a6e0 to 0x45ad02, then the glue and credits music file to 0x45b472, ISoundInterface.cpp to 0x45ff92 (the definitions and their tables), the zone music file to 0x460982, the zone ambience file to 0x4610e2, the zone intro file to 0x4618a2, the emitter file to 0x462562 and the water sound file to 0x463282. The engine, class Sound, runs from 0x7a3a90 through 0x7a6998.

Addresses: 0x456a80, 0x45a6d2, 0x45a6e0, 0x45ad02, 0x45ad10, 0x45b472, 0x45b480, 0x45ff92, 0x45ffa0, 0x460982, 0x460990, 0x4610e2, 0x4610f0, 0x4618a2, 0x4618b0, 0x462562, 0x462570, 0x463282, 0x7a3a90, 0x7a6998, 0x458c07, 0x835fbc, 0x45c1bf, 0x45c1d4, 0x45cd6d, 0x8362e0, 0x82757c, 0x82791c, 0x82d8e4, 0x82d90c, 0x456a60, 0x4633d0, 0x7a3a50, 0x7a6970, 0x7a69a0, 0x87d3a0 Confidence: verified Proof: one Test: none

0x458c07 passes SoundInterface.cpp (0x835fbc); 0x45c1bf, 0x45c1d4 and 0x45cd6d pass ISoundInterface.cpp (0x8362e0). The nine interface runs fill 0x82757c to 0x82791c in the order above, each opening with its +∞ thunk; each file's code starts at that thunk and ends with its last header constant's body, so the files abut. The run before ends with 0x456a60, the one after opens at 0x4633d0. The engine's run is 0x82d8e4 to 0x82d90c, after 0x7a3a50's file; its last function 0x7a6970 steps a Sound list link, and 0x7a69a0 after it reads with InternetReadFileExA. The engine allocates its records with the tag .?AUSound@@ (0x87d3a0).

Shared header constants

The nine interface files open with the shared header's +∞, 2π and 1/2π and run the header constants of models/overview#shared-header-constants, with 10² and 0.5/10 added. The SoundInterface.cpp and water files put five more between +∞ and 2π: −21 · −1/36, that value · −255, 18 · 1/36, that value · 256 and 1/4.1666665; the water file adds 100² after them. The engine file runs only +∞, 2π and 1/2π.

Addresses: 0x456a80, 0x456a90, 0x456aa0, 0x456ab0, 0x456ad0, 0x456ae0, 0x456b00, 0x456b10, 0x456b30, 0x456b40, 0x456b60, 0x456b70, 0x458200, 0x458210, 0x458220, 0x458230, 0x459ae0, 0x459af0, 0x459b10, 0x459b20, 0x459b40, 0x459b50, 0x459b70, 0x459b80, 0x459ba0, 0x459bb0, 0x459bd0, 0x459be0, 0x459c00, 0x459c10, 0x459c30, 0x459c40, 0x459c60, 0x459c70, 0x459c90, 0x459ca0, 0x459cc0, 0x459cd0, 0x459cf0, 0x459d00, 0x459d20, 0x459d30, 0x459d50, 0x459d60, 0x459d70, 0x459d80, 0x459da0, 0x459db0, 0x459dd0, 0x459de0, 0x459e00, 0x459e10, 0x45a680, 0x45a690, 0x45a6b0, 0x45a6c0, 0x45a6e0, 0x45a6f0, 0x45a910, 0x45a920, 0x45a930, 0x45a940, 0x45a960, 0x45a970, 0x45a990, 0x45a9a0, 0x45a9c0, 0x45a9d0, 0x45a9f0, 0x45aa00, 0x45aa20, 0x45aa30, 0x45aa50, 0x45aa60, 0x45aa80, 0x45aa90, 0x45aab0, 0x45aac0, 0x45aae0, 0x45aaf0, 0x45ab10, 0x45ab20, 0x45ab40, 0x45ab50, 0x45ab70, 0x45ab80, 0x45aba0, 0x45abb0, 0x45abd0, 0x45abe0, 0x45abf0, 0x45ac00, 0x45ac20, 0x45ac30, 0x45ac50, 0x45ac60, 0x45ac80, 0x45ac90, 0x45acb0, 0x45acc0, 0x45ace0, 0x45acf0, 0x45ad10, 0x45ad20, 0x45b080, 0x45b090, 0x45b0a0, 0x45b0b0, 0x45b0d0, 0x45b0e0, 0x45b100, 0x45b110, 0x45b130, 0x45b140, 0x45b160, 0x45b170, 0x45b190, 0x45b1a0, 0x45b1c0, 0x45b1d0, 0x45b1f0, 0x45b200, 0x45b220, 0x45b230, 0x45b250, 0x45b260, 0x45b280, 0x45b290, 0x45b2b0, 0x45b2c0, 0x45b2e0, 0x45b2f0, 0x45b310, 0x45b320, 0x45b340, 0x45b350, 0x45b360, 0x45b370, 0x45b390, 0x45b3a0, 0x45b3c0, 0x45b3d0, 0x45b3f0, 0x45b400, 0x45b420, 0x45b430, 0x45b450, 0x45b460, 0x45b480, 0x45b490, 0x45d720, 0x45d730, 0x45d740, 0x45d750, 0x45f730, 0x45f740, 0x45f760, 0x45f770, 0x45f790, 0x45f7a0, 0x45f7c0, 0x45f7d0, 0x45f7f0, 0x45f800, 0x45f820, 0x45f830, 0x45f850, 0x45f860, 0x45f880, 0x45f890, 0x45f8b0, 0x45f8c0, 0x45f8e0, 0x45f8f0, 0x45f910, 0x45f920, 0x45f940, 0x45f950, 0x45f970, 0x45f980, 0x45f9a0, 0x45f9b0, 0x45f9c0, 0x45f9d0, 0x45f9f0, 0x45fa00, 0x45fa20, 0x45fa30, 0x45fa50, 0x45fa60, 0x45ff40, 0x45ff50, 0x45ff70, 0x45ff80, 0x45ffa0, 0x45ffb0, 0x460590, 0x4605a0, 0x4605b0, 0x4605c0, 0x4605e0, 0x4605f0, 0x460610, 0x460620, 0x460640, 0x460650, 0x460670, 0x460680, 0x4606a0, 0x4606b0, 0x4606d0, 0x4606e0, 0x460700, 0x460710, 0x460730, 0x460740, 0x460760, 0x460770, 0x460790, 0x4607a0, 0x4607c0, 0x4607d0, 0x4607f0, 0x460800, 0x460820, 0x460830, 0x460850, 0x460860, 0x460870, 0x460880, 0x4608a0, 0x4608b0, 0x4608d0, 0x4608e0, 0x460900, 0x460910, 0x460930, 0x460940, 0x460960, 0x460970, 0x460990, 0x4609a0, 0x460cf0, 0x460d00, 0x460d10, 0x460d20, 0x460d40, 0x460d50, 0x460d70, 0x460d80, 0x460da0, 0x460db0, 0x460dd0, 0x460de0, 0x460e00, 0x460e10, 0x460e30, 0x460e40, 0x460e60, 0x460e70, 0x460e90, 0x460ea0, 0x460ec0, 0x460ed0, 0x460ef0, 0x460f00, 0x460f20, 0x460f30, 0x460f50, 0x460f60, 0x460f80, 0x460f90, 0x460fb0, 0x460fc0, 0x460fd0, 0x460fe0, 0x461000, 0x461010, 0x461030, 0x461040, 0x461060, 0x461070, 0x461090, 0x4610a0, 0x4610c0, 0x4610d0, 0x4610f0, 0x461100, 0x4614b0, 0x4614c0, 0x4614d0, 0x4614e0, 0x461500, 0x461510, 0x461530, 0x461540, 0x461560, 0x461570, 0x461590, 0x4615a0, 0x4615c0, 0x4615d0, 0x4615f0, 0x461600, 0x461620, 0x461630, 0x461650, 0x461660, 0x461680, 0x461690, 0x4616b0, 0x4616c0, 0x4616e0, 0x4616f0, 0x461710, 0x461720, 0x461740, 0x461750, 0x461770, 0x461780, 0x461790, 0x4617a0, 0x4617c0, 0x4617d0, 0x4617f0, 0x461800, 0x461820, 0x461830, 0x461850, 0x461860, 0x461880, 0x461890, 0x4618b0, 0x4618c0, 0x462150, 0x462160, 0x462170, 0x462180, 0x4621b0, 0x4621c0, 0x4621e0, 0x4621f0, 0x462210, 0x462220, 0x462240, 0x462250, 0x462270, 0x462280, 0x4622a0, 0x4622b0, 0x4622d0, 0x4622e0, 0x462300, 0x462310, 0x462330, 0x462340, 0x462360, 0x462370, 0x462390, 0x4623a0, 0x4623c0, 0x4623d0, 0x4623f0, 0x462400, 0x462420, 0x462430, 0x462440, 0x462450, 0x462470, 0x462480, 0x4624a0, 0x4624b0, 0x4624d0, 0x4624e0, 0x462510, 0x462520, 0x462540, 0x462550, 0x462570, 0x462580, 0x462590, 0x4625a0, 0x4625c0, 0x4625d0, 0x4625f0, 0x462600, 0x462620, 0x462630, 0x462650, 0x462660, 0x462680, 0x462690, 0x462e90, 0x462ea0, 0x462eb0, 0x462ec0, 0x462ee0, 0x462ef0, 0x462f10, 0x462f20, 0x462f40, 0x462f50, 0x462f70, 0x462f80, 0x462fa0, 0x462fb0, 0x462fd0, 0x462fe0, 0x463000, 0x463010, 0x463030, 0x463040, 0x463060, 0x463070, 0x463090, 0x4630a0, 0x4630c0, 0x4630d0, 0x4630f0, 0x463100, 0x463120, 0x463130, 0x463150, 0x463160, 0x463170, 0x463180, 0x4631a0, 0x4631b0, 0x4631d0, 0x4631e0, 0x463200, 0x463210, 0x463230, 0x463240, 0x463260, 0x463270, 0x7a3a90, 0x7a3aa0, 0x7a3ab0, 0x7a3ac0, 0x7a3ad0, 0x7a3ae0 Confidence: verified Proof: one Test: none

Each thunk is a 5-byte jmp to its body, and each body stores one float in its file's own globals: 0x456a90 copies +∞ from 0x8030bc to 0xb05ee0, 0x456ab0 multiplies −21 by 0x7ff9c8 (−1/36) and 0x456ae0 that result by −255. The squares are fld [c]; fmul [c] of 10, 11.111111, 5.5555553, 10, 5, 10, 30, 120, 20, 10, 0.5, 3, 100, then 5.0 stored, then 50, 100, 40, 1.5 and 10 squared, and 0.5 divided by 10, in every interface file.

Static objects

Twenty-three constructors build the statics. SoundInterface.cpp: the footstep table, the server sound registry and the two emote arrays. The glue music file: a counter whose first count calls EmptyStaticInit. ISoundInterface.cpp: the definition pool, the reverb and definition arrays, the UI sound name table, the weapon impact array, the swing table and the sheathe table. Then the intro time array, the 32 emitter entries, the four water groups, and the engine's six list heads, sound pool and lock. Each pair is call constructor; jmp registrar, the registrar passing an exit hook to _atexit.

Addresses: 0x456b90, 0x456de0, 0x456e40, 0x456ea0, 0x45ad30, 0x45b4a0, 0x45b4f0, 0x45b550, 0x45b5b0, 0x45b800, 0x45b8c0, 0x45b920, 0x461110, 0x4618d0, 0x4626b0, 0x7a3b00, 0x7a3bf0, 0x7a3cf0, 0x7a3df0, 0x7a3ef0, 0x7a3ff0, 0x7a40f0, 0x7a4140, 0x456ba0, 0x456df0, 0x456e50, 0x456eb0, 0x45ad40, 0x45b4b0, 0x45b500, 0x45b560, 0x45b5c0, 0x45b810, 0x45b8d0, 0x45b930, 0x461120, 0x4618e0, 0x4626c0, 0x7a3b10, 0x7a3c00, 0x7a3d00, 0x7a3e00, 0x7a3f00, 0x7a4000, 0x7a4100, 0x7a4150, 0x456c60, 0x456e10, 0x456e70, 0x456ed0, 0x45ad60, 0x45b4d0, 0x45b520, 0x45b580, 0x45b680, 0x45b830, 0x45b8f0, 0x45b9f0, 0x461140, 0x461940, 0x462730, 0x7a3b40, 0x7a3c30, 0x7a3d30, 0x7a3e30, 0x7a3f30, 0x7a4030, 0x7a4120, 0x7a4160, 0x456c70, 0x456e20, 0x456e80, 0x456ee0, 0x45ad70, 0x45b4e0, 0x45b530, 0x45b590, 0x45b690, 0x45b840, 0x45b900, 0x45ba00, 0x461150, 0x461950, 0x462740, 0x7a3b50, 0x7a3c40, 0x7a3d40, 0x7a3e40, 0x7a3f40, 0x7a4040, 0x7a4130, 0x7a4170, 0xb05f50, 0xb05f30, 0xb05ef0, 0xb05ebc, 0xc2a3c4, 0xb06c38, 0xb061c0, 0xb06214, 0xb06bfc, 0xb06224, 0xb06bd4, 0xb061e0, 0xb06d54, 0xb06dd8, 0xb230b8 Confidence: verified Proof: one Test: none

The tables are 0xb05f50, 0xb06bfc and 0xb061e0, built by 0x456ba0, 0x45b5c0 and 0x45b930 and destroyed by 0x456c70, 0x45b690 and 0x45ba00. The arrays 0xb05f30, 0xb05ef0, 0xb05ebc, 0xb061c0, 0xb06214 and 0xb06d54 are zeroed and their buffers freed at exit. 0x45ad40 raises 0xc2a3c4 and 0x45ad70 lowers it, calling EmptyStaticTerm at 0. 0x45b4b0 makes the pool 0xb06c38; 0x45b840 destroys each subclass's ten impact entries of 0xb06224 with 0x456f00; 0x45b8d0 clears the three pairs at 0xb06bd4. 0x4618e0 builds the 0xe10-byte entries from 0xb06dd8, each with 256 zeroed vectors; 0x4626c0 the 0x6c-byte groups from 0xb230b8, each with two arrays of three. The engine's are engine#the-sound-object's.

Hash tables

The footstep table, the UI sound name table, the sheathe table and the definition load's string table share one hash table template: a vtable, a node list, a walk counter, an array of bucket lists and a mask, −1 while empty. An add makes four buckets on first use; while the mask is below 0x1fff it lowers the counter by 3 (not below 0) and raises it once per link in the bucket, and past 13 doubles the buckets and rehashes. The new node goes at the tail of the node list. The vtable holds the node free, the node allocation, the deleting destructor and the destroy.

Addresses: 0x803148, 0x8032c4, 0x8032d4, 0x8032e4, 0x4592f0, 0x459360, 0x459530, 0x459430, 0x45d530, 0x45d5a0, 0x45d930, 0x45d660, 0x45d350, 0x45d3a0, 0x45d870, 0x45d470, 0x45d020, 0x45d090, 0x45d7b0, 0x45d210, 0x459730, 0x45dfd0, 0x45e570, 0x459630, 0x45da70, 0x45ded0, 0x459fc0, 0x45e9f0, 0x45f040, 0x45d150, 0x45d9f0, 0x4594f0, 0x45c24f, 0x4597bc, 0x4597be, 0x4597cd, 0x459804, 0x45981f Confidence: verified Proof: one Test: none

The vtables are 0x803148 (footstep), 0x8032c4 (UI sound), 0x8032d4 (sheathe) and 0x8032e4 (string entry), each {free node, new node, deleting destructor, destroy}. The table holds the list's link offset at +4, its head at +8, the counter at +0x10, the buckets at +0x14 (capacity, count, data, granularity) and the mask at +0x24. The adds are 0x459730, 0x45dfd0 and 0x45e570; the UI table's growth is 0x45ee10; the bucket is hash & mask (0x4597bc) and the growth 0x45981f passes 2·mask + 2 to the rehash 0x459fc0, 0x45e9f0 or 0x45f040. 0x459630, 0x45da70 and 0x45ded0 empty a table, unlinking each node and, unless the argument is set, freeing it through slot 0. 0x45d150 builds the string table on the stack of 0x45c080, which destroys it at 0x45c24f. 0x45d9f0 unlinks a sheathe node's two links; 0x4594f0 frees a dword array's buffer, and the array when bit 0 of its argument is set.

The file cache open

SoundFileCacheOpen(name) (0x7a8770), FMOD's open, finds a 0x1a4-byte entry by the name's SStrHashHT alone, never comparing the name; a null or empty name gets 0. A known entry with 16 handles refuses; an idle one leaves the idle list and, above 0x40000 bytes, reopens its file, while a smaller one keeps the null file the close left. A new name is opened with SFile::OpenEx(0, name, 1) and takes the idle list's head; with none it returns 0, leaving that file open. The handle is index << 8 | slot + 1, the slot the entry's first free of 16. The close 0x7a8f00 frees the slot and at the last closes the file and makes the entry the idle list's tail.

Addresses: 0x7a8770, 0x7a879b, 0x7a87a7, 0x7a87bb, 0x7a87e3, 0x7a8805, 0x7a88bc, 0x7a8816, 0x7a8848, 0x7a8860, 0x7a8873, 0x7a88a1, 0x7a88db, 0x7a88e5, 0x7a88fd, 0x7a893c, 0x7a8951, 0x7a89af, 0x7a89c3, 0x7a8a49, 0x7a8a9b, 0x7a8e50, 0x7a8f00, 0x7a8f22, 0x7a8f35, 0x7a8f3a, 0x7a8f97, 0x7a8ab0, 0x7a8b86, 0xcf569c, 0xcf56d4, 0xcf56e8 Confidence: verified Proof: one Test: none

The table 0xcf569c is the template above, mask [0xcf56c0]; 0x7a87a7 sends a mask of −1 to the miss and 0x7a87e3 compares only a node's hash with 0x7a879b's. A node's +0x18 is the entry (0x7a8805), whose +0x114 counts its handles (0x7a88bc, cmp eax,0x10). 0x7a8816 unlinks an idle entry through the list 0xcf56d4; 0x7a8848 compares +0x110, the size, with 0x40000 and 0x7a8860 opens into +0x108 without testing it. 0x7a8873 takes the first slot of +0x11c whose byte is 0; 0x7a88a1 shifts +0x10c. On a miss 0x7a88db opens into a local, 0x7a88e5 fails on a null file, 0x7a88fd takes [0xcf56dc] and fails on none; 0x7a893c and 0x7a8951 drop the old name's node. Flag 1 is the loose-index flag (mount). 0x7a89af copies the name into +0 with no bound, past which +0x104 lies; 0x7a89c3 stores the size. 0x7a8a49 grows the table and 0x7a8a9b builds the handle with slot 0. 0x7a8e50 maps a handle back: [0xcf56e8] + (h >> 8)·0x1a4, slot (h & 0xff) − 1. 0x7a8f22 counts down, 0x7a8f35 is SFile::Close, 0x7a8f3a zeroes +0x108, and 0x7a8f97 links the entry at the tail. The read callback 0x7a8ab0 opens a null +0x108 at 0x7a8b86; the rest of it is not read here.

Lists and growable arrays

A list link is two words, the previous link and the next, with bit 0 of the next marking the end; an explicit list holds its link offset (0xdddddddd until set) and a head linked to itself. A growable array holds its capacity, count, buffer and granularity; a granularity of 0 takes the largest power of two not above the request, capped at 21 for bucket lists, 64 for pointer arrays, 256 for the string block and 8 for the reverb records, and a reserve rounds up to it.

Addresses: 0x4595f0, 0x45e4f0, 0x45e530, 0x45e710, 0x459ac0, 0x459e60, 0x45e6f0, 0x45e750, 0x459e30, 0x45e960, 0x45e990, 0x45e9c0, 0x45a1b0, 0x45ebe0, 0x45f230, 0x45f000, 0x45a1e0, 0x45ec10, 0x45f260, 0x45a290, 0x45ecc0, 0x45f030, 0x45f310, 0x45a520, 0x45e830, 0x45f5a0, 0x45fbc0, 0x4598b0, 0x45db70, 0x45e150, 0x45e270, 0x459940, 0x45dc00, 0x45e1e0, 0x45e370, 0x45a2a0, 0x45ecd0, 0x45f320, 0x45f5f0, 0x45a3e0, 0x45f460, 0x45fa80, 0x45a570, 0x45fc10, 0x45fd20, 0x45fe30, 0x4599d0, 0x45e400, 0x459e80, 0x459f20, 0x45dc90, 0x45dd70, 0x45d2d0, 0x45d770, 0x45d790, 0x45e300, 0x45e770, 0x45e880, 0x45e8c0, 0x45a2c7, 0x4599f8, 0x45dcb8, 0x45e886 Confidence: verified Proof: one Test: none

Unlink a link: 0x4595f0, 0x45e4f0, 0x45e530, 0x45e710. A node's link (node + offset, the head for null): 0x459ac0, 0x459e60, 0x45e6f0, 0x45e750. The link after: 0x459e30, 0x45e960, 0x45e990, 0x45e9c0. List constructor, deleting destructor, head reset and unlink all: 0x45a1b0, 0x45ebe0, 0x45f230, 0x45f000; 0x45a1e0, 0x45ec10, 0x45f260; 0x45a290, 0x45ecc0, 0x45f030, 0x45f310; 0x45a520, 0x45e830, 0x45f5a0, 0x45fbc0. 0x4598b0, 0x45db70, 0x45e150 and 0x45e270 unlink a list and its head; 0x459940, 0x45dc00, 0x45e1e0 and 0x45e370 free a bucket array. Bucket arrays: set count 0x45a2a0, 0x45ecd0, 0x45f320, 0x45f5f0; reserve 0x45a3e0, 0x45f460, 0x45fa80; reallocate 0x45a570, 0x45fc10, 0x45fd20, 0x45fe30. Reserves: 0x4599d0 and 0x45e400 (pointers), 0x459e80, 0x459f20, 0x45e8c0 with 0x45e880 (reverb), 0x45dc90 (bytes), 0x45dd70 (impacts, 0xa0 bytes). Frees: 0x45d2d0, 0x45d770, 0x45d790. 0x45e300 sets a list's offset; 0x45e770 links a node before or after another.

Element helpers

The weapon impact entries and the swing table hold pairs of dwords. The emitter and water records hold three-float vectors that a constructor zeroes and an empty destructor ends.

Addresses: 0x456f00, 0x456f40, 0x456f50, 0x456f60, 0x456fd0, 0x462500, 0x4621a0, 0x404130, 0x4044b0 Confidence: verified Proof: one Test: none

0x456fd0 and 0x456f50 zero a pair (0x456f50 returns it), 0x456f40 jumps to 0x456fd0, and 0x456f60 copies a pair. 0x456f00 ends an impact entry: it zeroes its two pairs, then calls 0x456f40 on each, last first. 0x462500 zeroes a vector, 0x4621a0 returns; 0x404130 and 0x4044b0 run them over the arrays.

Unreached code

Eighteen functions of the system have no live caller: the pair copy that clears first 0x456f90, the ambience switch query 0x460c90, the emitter's first free slot 0x461b20, and the fifteen of engine#unreached-engine-code. No call or jmp reaches them, no byte sequence e8, e9 or 0f 8x encodes a branch to one, and their addresses appear nowhere in the image as a dword.

Addresses: 0x456f90, 0x460c90, 0x461b20, 0x7a5840, 0x7a5ae0, 0x7a5af0, 0x7a5c20, 0x7a5fb0, 0x7a6310, 0x7a6320, 0x7a6330, 0x7a6340, 0x7a6350, 0x7a6360, 0x7a6370, 0x7a6380, 0x7a6790, 0x7a6830 Confidence: verified Proof: one Test: none

The census walks every e8/e9 rel32 and 0f 8x rel32 at every byte of .text and every dword of the image, and drops a reference from inside the target or from another unreached function. It leaves 884 of the system's 902 functions reached. As a control it finds the 53 references to 0x7a5700, the first at 0x457aa4. 0x461b20 returns the first slot whose used byte (+0xc00) is 0, or 0.