After a bunch of time spent with Dolphin and collaborating with OmegaDonut, here's the call structure of and the PRNG it uses.
0 Initial
1 Opponent TID
2 Opponent SID
3 1st ???
4 2nd ???
5 IV Block 1 (Def/Atk/HP)
6 IV Block 2 (SpD/SpA/SpE)
7 3rd ???
8 Upper Half of PID
9 Lower Half of PID
note that the upper is generated before the lower, a common trait of non-GBA originated Pokemon
like the BACD Restricted Pokemon that are generated from a header on the save file
0x000343FD*seed+0x00269EC3
=====
To check the PID/IV legality of an (and possibly Colosseum) originated Pokemon, you can't use the current version of Legal.exe. For Pokemon, it is a reverse BADE (call it DEBA) but with a different Linear Congruential Random Number Generator.
1 IV Block 1 (Def/Atk/HP)
2 IV Block 2 (SpD/SpA/SpE)
3 3rd ???
4 Upper Half of PID
5 Lower Half of PID
Here's an example:
Frame RNG Value
1 171EA3F5 171E in binary: 0|00101|11000|11110 (Defense 5, Attack 24, HP 30)
2 CA36C6E4 CA36 in binary: 1|10010|10001|10110 (SpDef 18, SpAtk 17, Speed 22)
3 8302DA17 ignored
4 C7512C7E C751 forms the upper half of the PID
5 BF7E9149 BF7E forms the lower half of the PID
We are then left with the following Pokemon:
C751BF7E 30/24/5/17/18/22
Common GC (DEBA)