_PoY

[Plat Research] Deeper into Swarms code interpretation

Apr 23rd, 2018
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. AllAdvanceRng (@ 202b3d8) stores in Swarm Nb, branches depending on r6 initialized by r1
  2. → called by Function_2055ac0
  3. → r1 initialized by r4
  4. → LoadVariableAreaAdress_11 DOESN'T change r4
  5. → called by Function_206c2d0
  6. → → (...)
  7.  
  8. OneAdvanceRng (@ 202b40c) takes a result in r2, stores it in VarArea11_24, advances ARNG, stores r0 in VarArea11_28
  9. → called by Function_21d0eac, branch_2048d66, and Jumppoints_2048c10
  10. → in Function_21d0eac, it takes the output from Function_201d35c
  11. → → r0 = 0x27, r1 = 0x271, r0 *= 4 (@0x270)
  12. → → r0++ (@0x271), bne fails, so r0 = 0x1571 before SetIRNGSeed is called
  13. → → → r1 = 0, r4 = 0x27, store 0x1571 in RAM_21bfb10_8, r1 = 0x271, r0 =1
  14. (Unknown_2100834 is 1 when IRNG is initialised)
  15. → → → r3 = 0x6c078965, r4 <<= 4 (@0x270)
  16. → → → r2 = r1 - 4 (@0x26d), r5 = r2 (@0x26d), r2 = r5 >> 30 (@0), r2 = 0x26d, r5 = 0x26d,
  17. → → → r5=r5*r3 (@0x0E484A01), r2 = r0+r5 (@0x0E484A02)
  18.  
  19. → → SO it'd be a full 624 "shifiting" Mersenne Twister cycle as a result stored in r2
  20. (careful: without the init, you skip this section, so you're doing more atrocious branches, check them next)
Add Comment
Please, Sign In to add comment