0x1a5c3c

From Final Fantasy Hacktics Wiki
Revision as of 13:04, 30 April 2019 by Glain (talk | contribs) (Created page with " # Parameters: # r4 = (p1) ? # r5 = (p2) ? 801a5c3c: 27bdffe0 addiu r29,r29,-0x0020 801a5c40: afb20018 sw r18,0x0018(r29) 801a5c44: 00a09021 addu r18,r5,r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
#   Parameters:
#       r4 = (p1) ?
#       r5 = (p2) ?

801a5c3c: 27bdffe0 addiu r29,r29,-0x0020
801a5c40: afb20018 sw r18,0x0018(r29)
801a5c44: 00a09021 addu r18,r5,r0                   #   p2
801a5c48: 3c02801c lui r2,0x801c
801a5c4c: 8c42bf68 lw r2,-0x4098(r2)                #   *0x801bbf68
801a5c50: 3c03801c lui r3,0x801c
801a5c54: 8c639140 lw r3,-0x6ec0(r3)                #   *0x801b9140
801a5c58: 00042400 sll r4,r4,0x10                   #   p1 << 16
801a5c5c: afb00010 sw r16,0x0010(r29)
801a5c60: 3c10801c lui r16,0x801c
801a5c64: 8e109270 lw r16,-0x6d90(r16)              #   old_0x801b9270 = *0x801b9270
801a5c68: 00042403 sra r4,r4,0x10                   #   p1
801a5c6c: afbf001c sw r31,0x001c(r29)
801a5c70: afb10014 sw r17,0x0014(r29)
801a5c74: 24450001 addiu r5,r2,0x0001               #   *0x801bbf68 + 1
801a5c78: 00041140 sll r2,r4,0x05                   #   p1 * 32
801a5c7c: 00441023 subu r2,r2,r4                    #   p1 * 31
801a5c80: 000210c0 sll r2,r2,0x03                   #   p1 * 248
801a5c84: 3c04801c lui r4,0x801c
801a5c88: 2484f02c addiu r4,r4,-0x0fd4              #   0x801bf02c
801a5c8c: 0065182a slt r3,r3,r5
801a5c90: 3c01801c lui r1,0x801c
801a5c94: ac25bf68 sw r5,-0x4098(r1)                #   *0x801bbf68 = *0x801bbf68 + 1
801a5c98: 10600003 beq r3,r0,0x801a5ca8
801a5c9c: 00448821 addu r17,r2,r4                   #   (p1 * 248) + 0x801bf02c
                                                    #   if (*0x801b9140 < *0x801bbf68) {
801a5ca0: 3c01801c lui r1,0x801c
801a5ca4: ac259140 sw r5,-0x6ec0(r1)                #       *0x801b9140 = *0x801bbf68
                                                    #   }
801a5ca8: 16000003 bne r16,r0,0x801a5cb8
801a5cac: 34040001 ori r4,r0,0x0001                 #   1
                                                    #   if (old_0x801b9270 == 0) {
801a5cb0: 0c01127e jal 0x800449f8                   #       0x449f8 (0x3e);     // Empty routine; does nothing.
801a5cb4: 3405003e ori r5,r0,0x003e
                                                    #   }
801a5cb8: 8e020004 lw r2,0x0004(r16)                #   *(old_0x801b9270 + 4)
801a5cbc: 3245f000 andi r5,r18,0xf000               #   testValue = p2 & 0xf000
801a5cc0: 3c01801c lui r1,0x801c
801a5cc4: ac229270 sw r2,-0x6d90(r1)                #   *0x801b9270 = *(*0x801b9270 + 4)
801a5cc8: 34021000 ori r2,r0,0x1000                 #   0x1000
801a5ccc: 10a2000e beq r5,r2,0x801a5d08             #   if (testValue == 0x1000) jump to [2]
801a5cd0: 28a21001 slti r2,r5,0x1001
801a5cd4: 10400005 beq r2,r0,0x801a5cec             #   if (testValue < 0x1001) jump to [1]
801a5cd8: 00000000 nop
801a5cdc: 10a0000d beq r5,r0,0x801a5d14             #   if (testValue == 0) jump to [4]
801a5ce0: 00002021 addu r4,r0,r0                    #       arg = 0
801a5ce4: 08069749 j 0x801a5d24                     
801a5ce8: ae000000 sw r0,0x0000(r16)                #   *(old_0x801b9270) = 0
                                                    #   Jump to [5]
[1]                                                    
801a5cec: 34022000 ori r2,r0,0x2000
801a5cf0: 10a20007 beq r5,r2,0x801a5d10             #   if (testValue == 0x2000) jump to [3]
801a5cf4: 34023000 ori r2,r0,0x3000
801a5cf8: 10a20006 beq r5,r2,0x801a5d14             
801a5cfc: 34040006 ori r4,r0,0x0006                 #   arg = 6
                                                    #   if (testValue == 0x3000) jump to [4]
801a5d00: 08069749 j 0x801a5d24
801a5d04: ae000000 sw r0,0x0000(r16)                #   *(old_0x801b9270) = 0
                                                    #   Jump to [5]
                                                    
[2]
801a5d08: 08069745 j 0x801a5d14                     
801a5d0c: 34040002 ori r4,r0,0x0002                 #   arg = 2
                                                    #   Jump to [4]

[3]
801a5d10: 34040004 ori r4,r0,0x0004                 #   arg = 4

[4]
801a5d14: 0c06a802 jal 0x801aa008                   #   result_0x1aa008 = 0x1aa008 (arg);               // Infinite loop if removed
801a5d18: 00000000 nop
801a5d1c: ae020054 sw r2,0x0054(r16)                #   *(old_0x801b9270 + 0x54) = result_0x1aa008
801a5d20: ae000000 sw r0,0x0000(r16)                #   *(old_0x801b9270) = 0
   
[5]   
801a5d24: 8e2200d0 lw r2,0x00d0(r17)                #   *((p1 * 248) + 0x801bf02c + 0xd0)
801a5d28: 00000000 nop
801a5d2c: ae020004 sw r2,0x0004(r16)                #   *(old_0x801b9270 + 4) = *((p1 * 248) + 0x801bf02c + 0xd0)
801a5d30: 8e2200d0 lw r2,0x00d0(r17)                #   *((p1 * 248) + 0x801bf02c + 0xd0)
801a5d34: 00000000 nop
801a5d38: 10400002 beq r2,r0,0x801a5d44             #   if (*((p1 * 248) + 0x801bf02c + 0xd0) != 0) {
801a5d3c: 00000000 nop
801a5d40: ac500000 sw r16,0x0000(r2)                #       *(*((p1 * 248) + 0x801bf02c + 0xd0)) = old_0x801b9270
                                                    #   }
801a5d44: 9623001c lhu r3,0x001c(r17)               #   *((p1 * 248) + 0x801bf02c + 0x1c)
801a5d48: 02001021 addu r2,r16,r0                   #   old_0x801b9270
801a5d4c: ae2200d0 sw r2,0x00d0(r17)                #   *((p1 * 248) + 0x801bf02c + 0xd0) = old_0x801b9270
801a5d50: 24630001 addiu r3,r3,0x0001               #   *((p1 * 248) + 0x801bf02c + 0x1c) + 1
801a5d54: a623001c sh r3,0x001c(r17)                #   *((p1 * 248) + 0x801bf02c + 0x1c) = *((p1 * 248) + 0x801bf02c + 0x1c) + 1
801a5d58: 8fbf001c lw r31,0x001c(r29)
801a5d5c: 8fb20018 lw r18,0x0018(r29)
801a5d60: 8fb10014 lw r17,0x0014(r29)
801a5d64: 8fb00010 lw r16,0x0010(r29)
801a5d68: 27bd0020 addiu r29,r29,0x0020
801a5d6c: 03e00008 jr r31
801a5d70: 00000000 nop