Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text:82AEEF28 # =============== S U B R O U T I N E =======================================
- .text:82AEEF28
- .text:82AEEF28
- .text:82AEEF28 Initialize: # CODE XREF: .text:82AE843Cp
- .text:82AEEF28 # .text:82AE8870p
- .text:82AEEF28 mfspr r12, LR # Move from sprg,
- .text:82AEEF2C bl __savegprlr_29 # Branch
- .text:82AEEF30 stwu r1, -0x70(r1) # Store Word with Update
- .text:82AEEF34 li r10, 0x100 # Load Immediate
- .text:82AEEF38 mr r31, r3 # Move Register
- .text:82AEEF3C li r3, 0 # Load Immediate
- .text:82AEEF40 addi r7, r31, 0x100 # Add Immediate
- .text:82AEEF44 mr r11, r3 # Move Register
- .text:82AEEF48 mtspr CTR, r10 # Move to sprg,
- .text:82AEEF4C
- .text:82AEEF4C loc_82AEEF4C: # CODE XREF: Initialize+30j
- .text:82AEEF4C clrlwi r10, r11, 24 # Clear Left Immediate
- .text:82AEEF50 stbx r10, r7, r11 # Store Byte Indexed
- .text:82AEEF54 addi r11, r11, 1 # Add Immediate
- .text:82AEEF58 bdnz loc_82AEEF4C # CTR--; branch if CTR non-zero
- .text:82AEEF5C cmplwi cr6, r4, 0 # Compare Logical Word Immediate
- .text:82AEEF60 beq cr6, loc_82AEEFC0 # Branch if equal
- .text:82AEEF64 li r9, 0x100 # Load Immediate
- .text:82AEEF68 mr r10, r3 # Move Register
- .text:82AEEF6C mr r11, r3 # Move Register
- .text:82AEEF70 mtspr CTR, r9 # Move to sprg,
- .text:82AEEF74
- .text:82AEEF74 loc_82AEEF74: # CODE XREF: Initialize+94j
- .text:82AEEF74 divw r8, r11, r5 # Divide Word
- .text:82AEEF78 lbzx r6, r7, r11 # Load Byte and Zero Indexed
- .text:82AEEF7C rotlwi r9, r11, 1 # Rotate Left Immediate
- .text:82AEEF80 mullw r8, r8, r5 # Multiply Low
- .text:82AEEF84 subf r30, r8, r11 # Subtract from
- .text:82AEEF88 addi r9, r9, -1 # Add Immediate
- .text:82AEEF8C twllei r5, 0 # Trap Word Immediate if Logically Less Than or Equal
- .text:82AEEF90 andc r29, r5, r9 # AND with Complement
- .text:82AEEF94 mr r8, r6 # Move Register
- .text:82AEEF98 lbzx r9, r30, r4 # Load Byte and Zero Indexed
- .text:82AEEF9C twlgei r29, -1 # Trap Word Immediate if Logically Greater Than or Equal
- .text:82AEEFA0 add r9, r9, r6 # Add
- .text:82AEEFA4 add r10, r9, r10 # Add
- .text:82AEEFA8 clrlwi r10, r10, 24 # Clear Left Immediate
- .text:82AEEFAC lbzx r9, r7, r10 # Load Byte and Zero Indexed
- .text:82AEEFB0 stbx r9, r7, r11 # Store Byte Indexed
- .text:82AEEFB4 addi r11, r11, 1 # Add Immediate
- .text:82AEEFB8 stbx r6, r7, r10 # Store Byte Indexed
- .text:82AEEFBC bdnz loc_82AEEF74 # CTR--; branch if CTR non-zero
- .text:82AEEFC0
- .text:82AEEFC0 loc_82AEEFC0: # CODE XREF: Initialize+38j
- .text:82AEEFC0 li r6, 0x400 # Load Immediate
- .text:82AEEFC4 stw r3, 0x20C(r31) # Store Word
- .text:82AEEFC8 stw r3, 0x204(r31) # Store Word
- .text:82AEEFCC
- .text:82AEEFCC loc_82AEEFCC: # CODE XREF: Initialize+B0j
- .text:82AEEFCC mr r3, r31 # Move Register
- .text:82AEEFD0 bl Permutate # Branch
- .text:82AEEFD4 addic. r6, r6, -1 # Add Immediate Carrying
- .text:82AEEFD8 bne loc_82AEEFCC # Branch if not equal
- .text:82AEEFDC li r5, 0x100 # Load Immediate
- .text:82AEEFE0 mr r4, r7 # Move Register
- .text:82AEEFE4 mr r3, r31 # Move Register
- .text:82AEEFE8 bl sub_839697E0 # Branch
- .text:82AEEFEC lwz r11, 0x204(r31) # Load Word and Zero
- .text:82AEEFF0 lwz r10, 0x20C(r31) # Load Word and Zero
- .text:82AEEFF4 stw r11, 0x200(r31) # Store Word
- .text:82AEEFF8 stw r10, 0x208(r31) # Store Word
- .text:82AEEFFC addi r1, r1, 0x70 # Add Immediate
- .text:82AEF000 b __restgprlr_29 # Branch
- .text:82AEF000 # End of function Initialize
- .text:82AEEE28 # =============== S U B R O U T I N E =======================================
- .text:82AEEE28
- .text:82AEEE28
- .text:82AEEE28 Permutate: # CODE XREF: Crypt+5Cp
- .text:82AEEE28 # Initialize+A8p
- .text:82AEEE28 lwz r11, 0x204(r3) # Load Word and Zero
- .text:82AEEE2C lwz r9, 0x20C(r3) # Load Word and Zero
- .text:82AEEE30 addi r11, r11, 1 # Add Immediate
- .text:82AEEE34 clrlwi r10, r11, 24 # Clear Left Immediate
- .text:82AEEE38 add r11, r10, r3 # Add
- .text:82AEEE3C stw r10, 0x204(r3) # Store Word
- .text:82AEEE40 addi r10, r11, 0x100 # Add Immediate
- .text:82AEEE44 lbz r10, 0x100(r11) # Load Byte and Zero
- .text:82AEEE48 add r10, r10, r9 # Add
- .text:82AEEE4C clrlwi r9, r10, 24 # Clear Left Immediate
- .text:82AEEE50 add r10, r9, r3 # Add
- .text:82AEEE54 stw r9, 0x20C(r3) # Store Word
- .text:82AEEE58 lbz r9, 0x100(r11) # Load Byte and Zero
- .text:82AEEE5C addi r11, r10, 0x100 # Add Immediate
- .text:82AEEE60 lbz r8, 0x100(r10) # Load Byte and Zero
- .text:82AEEE64 stb r9, 0x100(r10) # Store Byte
- .text:82AEEE68 lwz r11, 0x204(r3) # Load Word and Zero
- .text:82AEEE6C add r11, r3, r11 # Add
- .text:82AEEE70 stb r8, 0x100(r11) # Store Byte
- .text:82AEEE74 lwz r10, 0x20C(r3) # Load Word and Zero
- .text:82AEEE78 lwz r11, 0x204(r3) # Load Word and Zero
- .text:82AEEE7C add r11, r3, r11 # Add
- .text:82AEEE80 add r9, r10, r3 # Add
- .text:82AEEE84 lbz r10, 0x100(r11) # Load Byte and Zero
- .text:82AEEE88 lbz r11, 0x100(r9) # Load Byte and Zero
- .text:82AEEE8C add r11, r11, r10 # Add
- .text:82AEEE90 clrlwi r11, r11, 24 # Clear Left Immediate
- .text:82AEEE94 add r11, r11, r3 # Add
- .text:82AEEE98 lbz r3, 0x100(r11) # Load Byte and Zero
- .text:82AEEE9C blr # Branch unconditionally
- .text:82AEEE9C # End of function Permutate
- .text:82AEEEA0 # =============== S U B R O U T I N E =======================================
- .text:82AEEEA0
- .text:82AEEEA0
- .text:82AEEEA0 Crypt: # CODE XREF: .text:82AE846Cp
- .text:82AEEEA0 # .text:82AE84B8j ...
- .text:82AEEEA0 mfspr r12, LR # Move from sprg,
- .text:82AEEEA4 bl __savegprlr_28 # Branch
- .text:82AEEEA8 stwu r1, -0x80(r1) # Store Word with Update
- .text:82AEEEAC mr r31, r3 # Move Register
- .text:82AEEEB0 mr r28, r4 # Move Register
- .text:82AEEEB4 mr r29, r5 # Move Register
- .text:82AEEEB8 mr r30, r6 # Move Register
- .text:82AEEEBC clrlwi. r11, r7, 24 # Clear Left Immediate
- .text:82AEEEC0 beq loc_82AEEEE4 # Branch if equal
- .text:82AEEEC4 addi r3, r3, 0x100 # Add Immediate
- .text:82AEEEC8 li r5, 0x100 # Load Immediate
- .text:82AEEECC mr r4, r31 # Move Register
- .text:82AEEED0 bl sub_839697E0 # Branch
- .text:82AEEED4 lwz r11, 0x200(r31) # Load Word and Zero
- .text:82AEEED8 lwz r10, 0x208(r31) # Load Word and Zero
- .text:82AEEEDC stw r11, 0x204(r31) # Store Word
- .text:82AEEEE0 stw r10, 0x20C(r31) # Store Word
- .text:82AEEEE4
- .text:82AEEEE4 loc_82AEEEE4: # CODE XREF: Crypt+20j
- .text:82AEEEE4 cmpwi cr6, r29, 0 # Compare Word Immediate
- .text:82AEEEE8 ble cr6, loc_82AEEF20 # Branch if less than or equal
- .text:82AEEEEC mr r7, r30 # Move Register
- .text:82AEEEF0 subf r5, r30, r28 # Subtract from
- .text:82AEEEF4 mr r6, r29 # Move Register
- .text:82AEEEF8
- .text:82AEEEF8 loc_82AEEEF8: # CODE XREF: Crypt+7Cj
- .text:82AEEEF8 mr r3, r31 # Move Register
- .text:82AEEEFC bl Permutate # Branch
- .text:82AEEF00 lbzx r11, r5, r7 # Load Byte and Zero Indexed
- .text:82AEEF04 clrlwi r10, r3, 24 # Clear Left Immediate
- .text:82AEEF08 addic. r6, r6, -1 # Add Immediate Carrying
- .text:82AEEF0C xor r11, r10, r11 # XOR
- .text:82AEEF10 clrlwi r11, r11, 24 # Clear Left Immediate
- .text:82AEEF14 stb r11, 0(r7) # Store Byte
- .text:82AEEF18 addi r7, r7, 1 # Add Immediate
- .text:82AEEF1C bne loc_82AEEEF8 # Branch if not equal
- .text:82AEEF20
- .text:82AEEF20 loc_82AEEF20: # CODE XREF: Crypt+48j
- .text:82AEEF20 addi r1, r1, 0x80 # Add Immediate
- .text:82AEEF24 b __restgprlr_28 # Branch
- .text:82AEEF24 # End of function Crypt
Advertisement
Add Comment
Please, Sign In to add comment