No Description

musicInjector.s 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. .thumb
  2. .align 2
  3. musicInjector:
  4. push {r4, r5, r6, lr}
  5. mov r5, r0
  6. ldrh r0, var_music1from ; (0x74)
  7. ldr r1, getvaraddr ; (0x88)
  8. bl call_r1
  9. cmp r0, #0
  10. beq branch_1
  11. ldrh r3, [r0]
  12. ldrh r1, var_disableval ; (0x84)
  13. cmp r3, r1
  14. beq branch_1
  15. cmp r3, r5
  16. bne branch_1
  17. ldrh r0, var_music1to ; (0x7c)
  18. ldr r1, getvaraddr ; (0x88)
  19. bl call_r1
  20. ldrh r5, [r0]
  21. b branch_2
  22. branch_1:
  23. ldrh r0, var_music2from ; (0x78)
  24. ldr r1, getvaraddr ; (0x88)
  25. bl call_r1
  26. cmp r0, #0
  27. beq branch_2
  28. ldrh r3, [r0]
  29. ldrh r1, var_disableval ; (0x84)
  30. cmp r3, r1
  31. beq branch_2
  32. cmp r3, r5
  33. bne branch_2
  34. ldrh r0, var_music2to ; (0x80)
  35. ldr r1, getvaraddr ; (0x88)
  36. bl call_r1
  37. ldrh r5, [r0]
  38. branch_2:
  39. lsls r0, r5, #16
  40. pop {r4, r5, r6}
  41. ldr r2, mplay_table ; (0x90)
  42. ldr r1, song_list ; (0x94)
  43. lsrs r0, r0, #13
  44. adds r0, r0, r1
  45. ldrh r3, [r0, #4]
  46. lsls r1, r3, #1
  47. adds r1, r1, r3
  48. lsls r1, r1, #2
  49. adds r1, r1, r2
  50. ldr r2, [r1, #0]
  51. ldr r1, [r0, #0]
  52. mov r0, r2
  53. pop {pc}
  54. call_r1:
  55. bx r1
  56. var_music1from:
  57. .word 0x1014
  58. var_music2from:
  59. .word 0x1015
  60. var_music1to:
  61. .word 0x1016
  62. var_music2to:
  63. .word 0x1017
  64. var_disableval:
  65. .word 0xFFFF
  66. getvaraddr:
  67. .word 0x0806E455
  68. MPlayContinue:
  69. .word 0x081DCFF9
  70. mplay_table:
  71. .word 0x084A329C
  72. song_list:
  73. .word 0x084A32CC