NTempest::CRandom::uint32
function · random · primitive
- Address
0x4531e0· 211 bytes, up to0x4532b2- Signature
uint32_t __thiscall (NTempest::CRndSeed *this)- Meaning
- Advances a state: steps its four lanes, adds the XOR of four rotated table dwords to the accumulator, returns it
- Confidence
- verified, proof two
- Name from
- the community database (idb)
- Finding
- random#state-advance
- Test
random::crandom_uint32_advance,random::prng_difftest,gx::lightning_segment_subdivide_difftest,models::burst_velocity_difftest,models::emit_shape_plane_difftest,models::emit_shape_sphere_difftest,models::emit_shape_spline_difftest,random::seeded_sequence_difftest
Finding: State advance in random
0x4531e0 moves each lane down by a fixed step, adding the lane's modulus back when the result
is negative; reads four dwords of the table at the new byte offsets; XORs them after rotating
three of them; adds the result to the accumulator; stores both dwords and returns the new
accumulator. With T(n) the dword at byte offset n of 0x802700:
| lane | byte | step | modulus | rotate left |
|---|---|---|---|---|
| 3 | 3 | 4 | 0xbc | 1 |
| 2 | 2 | 12 | 0xd4 | 2 |
| 1 | 1 | 24 | 0xec | 3 |
| 0 | 0 | 28 | 0xf4 | 0 |
acc += rotl(T(n3),1) ^ rotl(T(n2),2) ^ rotl(T(n1),3) ^ T(n0), all modulo 2³².
The derivation is in the doc.
Callers 32
- RandomExponentialDouble random
- RandomExponentialScaledDouble random
- RandomGaussianFloat random
- RandomGaussianDouble random
- GenerateRandomName glue
- PublishGossipGreeting ui
- TabardModel::SeedFromGuild ui
- DrunkTransformText ui
- RealmConnection::HandleAuthChallenge net
- CGUnit_C::EmitWaterRipple objectlayer
- CGUnit_C::UpdateBleed objectlayer
- CGUnit_C::UpdateAutoMove objectlayer
- CMissile::Aim objectlayer
- CMissile::ArriveMiss objectlayer
- Rain::SpawnDrop lighting
- Rain::EmitDrops lighting
- Snow::SpawnFlake lighting
- Sand::SpawnGrain lighting
- Mists::PlacePuff lighting
- Mists::Render lighting
- RollDriftGust terrain
- ScatterDriftCloud terrain
- CMapChunk::CreateDetailDoodads terrain
- BlizzardObject::Update spell
- LightningBolt::BuildPoints gx
- CParticleEmitter2::InitParticle models
- CParticleEmitter2::InitModelParticle models
- CParticleEmitter2::Spawn models
- PlaneEmitterSpawnParticle models
- SphereEmitterSpawnParticle models
- SplineEmitterSpawnParticle models
- CParticleEmitter::SpawnParticle models
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.