Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RAM_ARM9:02088180 ; u32 __fastcall OS_GetLowEntropyData__(u32 *buffer)
- RAM_ARM9:02088180 OS_GetLowEntropyData__ ; CODE XREF: buildSeed__+14p
- RAM_ARM9:02088180 ; sub_20595A0+14p
- RAM_ARM9:02088180 70 40 2D E9 STMFD SP!, {R4-R6,LR} ; OS_GetLowEntropyData(u32 buffer[OS_LOW_ENTROPY_DATA_SIZE / sizeof(u32)]);
- RAM_ARM9:02088180 ; Buffer is in DTCM @ 2FE36AC, White (U)
- RAM_ARM9:02088184 B0 10 9F E5 LDR R1, VCOUNT ; VCOUNT @ =0x4000006
- RAM_ARM9:02088188 00 50 A0 E1 MOV R5, R0
- RAM_ARM9:0208818C B0 60 D1 E1 LDRH R6, [R1] ; *VCOUNT into R6
- RAM_ARM9:02088190 A8 40 9F E5 LDR R4, =0x2FFFC00
- RAM_ARM9:02088194 FB FB FF EB BL OS_GetTickLo__ ; get timer0
- RAM_ARM9:02088198 06 08 80 E1 ORR R0, R0, R6,LSL#16 ; (*VCOUNT << 16) | *timer0
- RAM_ARM9:0208819C 00 00 85 E5 STR R0, [R5]
- RAM_ARM9:020881A0 9C 00 9F E5 LDR R0, =0x2151358
- RAM_ARM9:020881A4 B8 1F D4 E1 LDRH R1, [R4,#0xF8]
- RAM_ARM9:020881A8 00 20 90 E5 LDR R2, [R0]
- RAM_ARM9:020881AC 04 30 90 E5 LDR R3, [R0,#4]
- RAM_ARM9:020881B0 01 18 22 E0 EOR R1, R2, R1,LSL#16
- RAM_ARM9:020881B4 04 10 85 E5 STR R1, [R5,#4]
- RAM_ARM9:020881B8 00 20 90 E5 LDR R2, [R0]
- RAM_ARM9:020881BC 84 20 9F E5 LDR R2, GxStat ; GxStat @ =0x4000600
- RAM_ARM9:020881C0 04 10 90 E5 LDR R1, [R0,#4]
- RAM_ARM9:020881C4 F4 00 94 E5 LDR R0, [R4,#0xF4]
- RAM_ARM9:020881C8 3C 30 94 E5 LDR R3, [R4,#0x3C]
- RAM_ARM9:020881CC 00 00 21 E0 EOR R0, R1, R0
- RAM_ARM9:020881D0 00 30 23 E0 EOR R3, R3, R0
- RAM_ARM9:020881D4 08 30 85 E5 STR R3, [R5,#8]
- RAM_ARM9:020881D8 00 10 92 E5 LDR R1, [R2]
- RAM_ARM9:020881DC 03 0C 84 E2 ADD R0, R4, #0x300
- RAM_ARM9:020881E0 01 10 23 E0 EOR R1, R3, R1
- RAM_ARM9:020881E4 08 10 85 E5 STR R1, [R5,#8]
- RAM_ARM9:020881E8 E8 11 94 E5 LDR R1, [R4,#0x1E8] ; grab the date
- RAM_ARM9:020881EC 4D 2E 42 E2 SUB R2, R2, #0x4D0 ; gxstat(4000600)-4D0 = 4000130(gba-compatible controller input)
- RAM_ARM9:020881F0 0C 10 85 E5 STR R1, [R5,#0xC]
- RAM_ARM9:020881F4 EC 31 94 E5 LDR R3, [R4,#0x1EC] ; grab the time
- RAM_ARM9:020881F8 EA 1F 84 E2 ADD R1, R4, #0x3A8 ; 2FFFFA8 - nds-compatible input
- RAM_ARM9:020881FC 10 30 85 E5 STR R3, [R5,#0x10]
- RAM_ARM9:02088200 B4 C9 D0 E1 LDRH R12, [R0,#0x94]
- RAM_ARM9:02088204 90 33 94 E5 LDR R3, [R4,#0x390]
- RAM_ARM9:02088208 0C 38 23 E0 EOR R3, R3, R12,LSL#16
- RAM_ARM9:0208820C 14 30 85 E5 STR R3, [R5,#0x14]
- RAM_ARM9:02088210 BA 4A D0 E1 LDRH R4, [R0,#0xAA]
- RAM_ARM9:02088214 BC 3A D0 E1 LDRH R3, [R0,#0xAC]
- RAM_ARM9:02088218 04 38 83 E1 ORR R3, R3, R4,LSL#16
- RAM_ARM9:0208821C 18 30 85 E5 STR R3, [R5,#0x18]
- RAM_ARM9:02088220 B0 20 D2 E1 LDRH R2, [R2] ; get gba-compatible input
- RAM_ARM9:02088224 B0 10 D1 E1 LDRH R1, [R1] ; get nds-only input
- RAM_ARM9:02088228 B8 39 D0 E1 LDRH R3, [R0,#0x98]
- RAM_ARM9:0208822C 01 00 82 E1 ORR R0, R2, R1 ; OR the inputs together to make 1 number: (3FF | 2C00) = 2FFF, etc
- RAM_ARM9:02088230 03 08 80 E1 ORR R0, R0, R3,LSL#16
- RAM_ARM9:02088234 1C 00 85 E5 STR R0, [R5,#0x1C]
- RAM_ARM9:02088238 70 80 BD E8 LDMFD SP!, {R4-R6,PC}
- RAM_ARM9:02088238 ; End of function OS_GetLowEntropyData__
- RAM_ARM9:02088238
- RAM_ARM9:02088238 ; ---------------------------------------------------------------------------
- RAM_ARM9:0208823C 06 00 00 04 dword_208823C DCD ; DATA XREF: OS_GetLowEntropyData__+4r
- RAM_ARM9:02088240 00 FC FF 02 dword_2088240 DCD 0x2FFFC00 ; DATA XREF: OS_GetLowEntropyData__+10r
- RAM_ARM9:02088244 58 13 15 02 dword_2088244 DCD 0x2151358 ; DATA XREF: OS_GetLowEntropyData__+20r
- RAM_ARM9:02088248 00 06 00 04 dword_2088248 DCD ; DATA XREF: OS_GetLowEntropyData__+3Cr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement