sub_882B1C
sub_882B1C ; =============== S U B R O U T I N E =======================================
sub_882B1C
sub_882B1C ; Attributes: bp-based frame
sub_882B1C
sub_882B1C sub_882B1C
sub_882B1C
sub_882B1C a5= -0x38
sub_882B1C i_appCWMode= -0x34
sub_882B1C var_30= -0x30
sub_882B1C a4= -0x29
sub_882B1C arg_0= 4
sub_882B1C
sub_882B1C 000 MOVLES R0, R0,LSL#4 ; Rd = Op2
sub_882B1C+4 000 ADCLES R0, R5, R0,LSL#4 ; Rd = Op1 + Op2 + C
sub_882B1C+8 000 STCEQL p0, c10, [R0,#0x384] ; KeyRing:
sub_882B1C+8 ; 04 02 0002
sub_882B1C+8 ; 03 12 02 10 01503100000000000250310000000000 - authkey - 2
sub_882B1C+8 ; 03 12 01 10 a6xxxxxxxxxxxxc65237a60xxx - sesskey - 1
sub_882B1C+8 ; 02 08 ebxxxxxxxxb0670
sub_882B1C+8
sub_882B1C+8 ; ---------------------------------------------------------------------------
sub_882B1C+C 000 DCB 0xF0
sub_882B1C+D 000 DCB 0xDF
sub_882B1C+E 000 DCB 0x2D ; -
sub_882B1C+F 000 DCB 0xE9
sub_882B1C+10 ; ---------------------------------------------------------------------------
sub_882B1C+10 000 LDREQT R4, [R0],#0xCE2 ; Load from Memory
sub_882B1C+14 000 CMNEQ R0, #0xE1 ; Set cond. codes on Op1 + Op2
sub_882B1C+18 000 BICEQ R10, R0, R1,ROR#1 ; Rd = Op1 & ~Op2
sub_882B1C+1C 000 EORCCS R4, R0, R2,ROR#23 ; Rd = Op1 ^ Op2
sub_882B1C+20 000 SBCNES R4, R0, R2,ROR#27 ; a5
sub_882B1C+24 010 ADDEQS R10, R0, #0xE1 ; Rd = Op1 + Op2
sub_882B1C+28 010 STCEQL p0, c10, [R8], {0xE1} ; Store Coprocessor Register
sub_882B1C+2C 010 MOVEQ R10, #0xE1 ; Rd = Op2
sub_882B1C+2C
sub_882B1C+2C ; ---------------------------------------------------------------------------
sub_882B1C+30 010 DCB 0xF8
sub_882B1C+31 010 DCB 0x11
sub_882B1C+32 010 DCB 0x9F
sub_882B1C+33 010 DCB 0xE5
sub_882B1C+34 010 DCB 0xFF
sub_882B1C+35 010 DCB 0x30 ; 0
sub_882B1C+36 010 DCB 0xA0
sub_882B1C+37 010 DCB 0xE3
sub_882B1C+38 ; ---------------------------------------------------------------------------
sub_882B1C+38 010 TEQEQ R0, #0xE3 ; Set cond. codes on Op1 ^ Op2
sub_882B1C+3C 010 LDMCSDB R0!, {R0,R2,R5-R9,R11,LR} ; Load Block from Memory
sub_882B1C+40 010 MRRCMI p0, 0xE, R10,R8,c1 ; Copy pair of registers from coprocessor
sub_882B1C+44 010 STREQ R9, [R0+0],#0xBE5 ; Store to Memory
sub_882B1C+48 010 LDCEQL p2, c0, [R8],#0x3AC ; Load Coprocessor Register
sub_882B1C+4C 010 ANDEQ R5, R0, R3,ROR#13 ; Rd = Op1 & Op2
sub_882B1C+50 010 ANDEQ R5, R0, R3,LSL R9 ; Rd = Op1 & Op2
sub_882B1C+54 010 SUBEQ R10, R0, R3,ROR#1 ; Rd = Op1 - Op2
sub_882B1C+58 010 STREQ R10, [R0],#-0xD3 ; Store to Memory
sub_882B1C+58
sub_882B1C+58 ; ---------------------------------------------------------------------------
sub_882B1C+5C 010 unk_882B78 DCB 0xF0 ; CODE XREF: sub_882E50+B8↓j
sub_882B1C+5D 010 DCB 0xAF
sub_882B1C+5E 010 DCB 0x1B
sub_882B1C+5F 010 DCB 0xD9
sub_882B1C+60 ; ---------------------------------------------------------------------------
sub_882B1C+60 010 LDCGT p15, c9, [R1],#-0x394 ; Load Coprocessor Register
sub_882B1C+60
sub_882B1C+64
sub_882B1C+64 loc_882B80 ; DATA XREF: CODE_C:008827FA↑o
sub_882B1C+64 010 EOREQ SP, R0, R5,ROR#7 ; Rd = Op1 ^ Op2
sub_882B1C+68 010 ANDEQ R5, R0, R3,ROR#5 ; Rd = Op1 & Op2
sub_882B1C+6C 010 STREQ R0, [R0,#-0xA] ; Store to Memory
sub_882B1C+70 010 EORGTS R9, R1, R5,ROR#31 ; Rd = Op1 ^ Op2
sub_882B1C+74 010 EOREQ SP, R0, R5,ROR#7 ; Rd = Op1 ^ Op2
sub_882B1C+78 010 ANDEQ R5, R0, R3,ROR#5 ; Rd = Op1 & Op2
sub_882B1C+78
sub_882B1C+78 ; ---------------------------------------------------------------------------
sub_882B1C+7C 010 DCB 0xFF
sub_882B1C+7D 010 DCB 0xC
sub_882B1C+7E 010 DCB 0xA0
sub_882B1C+7F 010 DCB 3
sub_882B1C+80 010 DCB 0xFF
sub_882B1C+81 010 DCB 0
sub_882B1C+82 010 DCB 0x80
sub_882B1C+83 010 DCB 2
sub_882B1C+84 010 DCB 0xF0
sub_882B1C+85 010 DCB 0xAF
sub_882B1C+86 010 DCB 0x1B
sub_882B1C+87 010 DCB 9
sub_882B1C+88 ; ---------------------------------------------------------------------------
sub_882B1C+88 010 STREQ R10, [R8,#0xE1]! ; Store to Memory
sub_882B1C+8C 010 EOREQ R10, R0, R3,ROR#1 ; a3
sub_882B1C+90 010 BCS 0xEAAF38 ; i_controlWordId
sub_882B1C+94 010 LDMCSDB R0!, {R1,R5-R9,R11,LR} ; a4
sub_882B1C+98 010 STMEQDA R0, {R0,R1,R5-R7,SP,PC} ; a1
sub_882B1C+9C 010 STCLTL p0, c0, [R12],#-0x3AC ; Store Coprocessor Register
sub_882B1C+A0 010 EOREQ R10, R0, R1,ROR#1 ; Rd = Op1 ^ Op2
sub_882B1C+A4 010 ANDEQ R5, R0, R3,ROR#5 ; Rd = Op1 & Op2
sub_882B1C+A4
sub_882B1C+A4 ; ---------------------------------------------------------------------------
sub_882B1C+A8 010 DCB 0xFF
sub_882B1C+A9 010 DCB 0xC
sub_882B1C+AA 010 DCB 0xA0
sub_882B1C+AB 010 DCB 3
sub_882B1C+AC 010 DCB 0xFF
sub_882B1C+AD 010 DCB 0
sub_882B1C+AE 010 DCB 0x80
sub_882B1C+AF 010 DCB 2
sub_882B1C+B0 010 DCB 0xF0
sub_882B1C+B1 010 DCB 0xAF
sub_882B1C+B2 010 DCB 0x1B
sub_882B1C+B3 010 DCB 9
sub_882B1C+B4 ; ---------------------------------------------------------------------------
sub_882B1C+B4 010 LDMCSDB R0!, {R0,R2,R5-R9,R11,R12,LR} ; Load Block from Memory
sub_882B1C+B8 010 TEQEQ R1, #0xE1 ; Set cond. codes on Op1 ^ Op2
sub_882B1C+BC 010 LDMNEDA R0!, {R1,R5-R9,PC} ; Load Block from Memory
sub_882B1C+C0 010 TEQEQ R0, #0x7000000E ; Set cond. codes on Op1 ^ Op2
sub_882B1C+C4 010 LDMCSDA R0!, {R0,R2,R5-R7,R9,R12,LR,PC}^ ; Load Block from Memory
sub_882B1C+C8 010 BHI 0x23C2F98 ; Branch
sub_882B1C+CC 010 STMEQDB R0, {R0,R5-R7,R10,R12,LR} ; Store Block to Memory
sub_882B1C+D0 010 BNE loc_882E9C ; Branch
sub_882B1C+D0
sub_882B1C+D4 010 LDREQT SP, [R0],#-0x6E7 ; Load from Memory
sub_882B1C+D8 010 TEQEQ R0, R2,ROR#7 ; Set cond. codes on Op1 ^ Op2
sub_882B1C+DC 010 SMLALTTEQ R8, R0, R2, R4 ; Long signed multiply-accumulate (top*top)
sub_882B1C+E0 010 MOVEQ R5, #0x3E3 ; switch 4 cases
sub_882B1C+E4 010 MOVEQS R9, #0xFFFFFDA3 ; switch jump
sub_882B1C+E4
sub_882B1C+E8 ; ---------------------------------------------------------------------------
sub_882B1C+E8
sub_882B1C+E8 loc_882C04 ; DATA XREF: sub_882854+2A↑o
sub_882B1C+E8 010 MOVNE R0, #0xEA ; Rd = Op2
sub_882B1C+EC 010 STMNEDA R12!, {R11,PC} ; jump table for switch statement
sub_882B1C+F0 010 STRHIT R8, [R12],#-0x800 ; Store to Memory
sub_882B1C+F4 010 STMDA R12!, {R11,PC} ; Store Block to Memory
sub_882B1C+F8 010 STCCC p8, c8, [SP+0] ; Store Coprocessor Register
sub_882B1C+FC 010 ANDEQ R5, R0, R3,ROR#17 ; jumptable 00882C00 case 0
sub_882B1C+100 010 LDREQB SP, [R0],#-0x6E7 ; Load from Memory
sub_882B1C+104 010 SMLALTTEQ R8, R0, R2, R4 ; Long signed multiply-accumulate (top*top)
sub_882B1C+108 010 CDPEQ p0, 0, c0,c0,c10, 0 ; Coprocessor Data Processing
sub_882B1C+10C 010 ANDEQS R10, R0, R3,ROR#1 ; a2
sub_882B1C+110 010 BICEQ R10, R0, R3,ROR#1 ; Rd = Op1 & ~Op2
sub_882B1C+114 010 LDREQT R8, [R0],#-0x6E0 ; a4
sub_882B1C+114
sub_882B1C+114 ; ---------------------------------------------------------------------------
sub_882B1C+118 010 DCB 0xFF
sub_882B1C+119 010 DCB 0
sub_882B1C+11A 010 DCB 7
sub_882B1C+11B 010 DCB 0xE2
sub_882B1C+11C ; ---------------------------------------------------------------------------
sub_882B1C+11C 010 SMULWTEQ R0, R1, R0 ; a3
sub_882B1C+120 010 ANDCSS R8, R0, R8,ROR#27 ; Rd = Op1 & Op2
sub_882B1C+124 010 STCVSL p0, c0, [R4,#-0x3AC]! ; Store Coprocessor Register
sub_882B1C+128 010 EORCCS R4, R0, R2,ROR#23 ; Rd = Op1 ^ Op2
sub_882B1C+12C 010 BCS dword_AAAFD4 ; Branch
sub_882B1C+12C
sub_882B1C+130 010 TSTEQ R0, #0xE1 ; Set cond. codes on Op1 & Op2
sub_882B1C+134 010 STRGE R0, [R4],#-0xEB ; Store to Memory
sub_882B1C+138 010 STREQB R8, [R0,#-0x4E0] ; Store to Memory
sub_882B1C+13C 010 RSCS PC, PC, #0x3A8 ; jumptable 00882C00 default case
sub_882B1C+140 010 ANDEQ R10, R0, R3,ROR#1 ; Rd = Op1 & Op2
sub_882B1C+140
sub_882B1C+140 ; ---------------------------------------------------------------------------
sub_882B1C+144 010 DCB 0xF0
sub_882B1C+145 010 DCB 0xAF
sub_882B1C+146 010 DCB 0x1B
sub_882B1C+147 010 DCB 0xE9
sub_882B1C+148 ; ---------------------------------------------------------------------------
sub_882B1C+148 010 BICEQ R10, R0, R3,ROR#1 ; Rd = Op1 & ~Op2
sub_882B1C+14C 010 LDREQ R8, [R0],#-0x6E0 ; a2
sub_882B1C+14C
sub_882B1C+14C ; ---------------------------------------------------------------------------
sub_882B1C+150 010 DCB 0xFF
sub_882B1C+151 010 DCB 0
sub_882B1C+152 010 DCB 7
sub_882B1C+153 010 DCB 0xE2
sub_882B1C+154 ; ---------------------------------------------------------------------------
sub_882B1C+154 010 STREQ R10, [R0,#-0xE1]! ; a3
sub_882B1C+158 010 LDMEQDA R0!, {R0,R5-R7,SP,PC} ; a4
sub_882B1C+15C 010 ANDEQS R8, R1, R8,ROR#27 ; Rd = Op1 & Op2
sub_882B1C+160 010 CDPPL p0, 6, c0,c4,c11, 7 ; Coprocessor Data Processing
sub_882B1C+164 010 SVC 0xFFFFEA ; Supervisor Call
sub_882B1C+168 010 ANDEQ R5, R0, R3,ROR#17 ; jumptable 00882C00 case 1
sub_882B1C+16C 010 LDREQB SP, [R0],#-0x6E7 ; Load from Memory
sub_882B1C+170 010 SMLALTTEQ R8, R0, R2, R4 ; Long signed multiply-accumulate (top*top)
sub_882B1C+174 010 STCEQ p0, c0, [R0], {0xA} ; Store Coprocessor Register
sub_882B1C+178 010 SBCEQ R10, R0, R3,ROR#1 ; Rd = Op1 - Op2 + C - 1
sub_882B1C+17C 010 LDCEQ p0, c10, [R0], {0xE1} ; a2
sub_882B1C+180 010 LDREQT R8, [R0],#-0x6E0 ; a4
sub_882B1C+180
sub_882B1C+180 ; ---------------------------------------------------------------------------
sub_882B1C+184 010 DCB 0xFF
sub_882B1C+185 010 DCB 0
sub_882B1C+186 010 DCB 7
sub_882B1C+187 010 DCB 0xE2
sub_882B1C+188 ; ---------------------------------------------------------------------------
sub_882B1C+188 010 SMULWTEQ R0, R1, R0 ; a3
sub_882B1C+18C 010 ANDCSS R8, R0, R8,ROR#27 ; Rd = Op1 & Op2
sub_882B1C+190 010 RSBPL R0, R4, #0xEB ; Rd = Op2 - Op1
sub_882B1C+194 010 EORCCS R4, R0, R2,ROR#23 ; Rd = Op1 ^ Op2
sub_882B1C+198 010 BCS dword_AAB040 ; Branch
sub_882B1C+198
sub_882B1C+19C 010 TSTEQ R0, #0xE1 ; Set cond. codes on Op1 & Op2
sub_882B1C+1A0 010 STMHIDB R4, {R0,R1,R3,R5-R7} ; Store Block to Memory
sub_882B1C+1A4 010 STREQB R8, [R0,#-0x4E0] ; Store to Memory
sub_882B1C+1A8 010 LDRGTB PC, [PC,R10,ROR#31]! ; Indirect Jump
sub_882B1C+1AC 010 LDREQ R8, [R0],#-0x6E0 ; a2
sub_882B1C+1AC
sub_882B1C+1AC ; ---------------------------------------------------------------------------
sub_882B1C+1B0 010 DCB 0xFF
sub_882B1C+1B1 010 DCB 0
sub_882B1C+1B2 010 DCB 7
sub_882B1C+1B3 010 DCB 0xE2
sub_882B1C+1B4 ; ---------------------------------------------------------------------------
sub_882B1C+1B4 010 STREQ R10, [R0,#-0xE1]! ; a3
sub_882B1C+1B8 010 LDMEQDA R0!, {R0,R5-R7,SP,PC} ; a4
sub_882B1C+1BC 010 ADDEQ R8, R0, R5,ROR#27 ; a5
sub_882B1C+1C0 010 STREQ R8, [R0+0],#0xDE5 ; i_appCWMode
sub_882B1C+1C4 010 STRMIB R0, [R4,#-0xEB]! ; Store to Memory
sub_882B1C+1C4
sub_882B1C+1C4 ; ---------------------------------------------------------------------------
sub_882B1C+1C8 010 DCB 0xF1
sub_882B1C+1C9 010 DCB 0xFF
sub_882B1C+1CA 010 DCB 0xFF
sub_882B1C+1CB 010 DCB 0xEA
sub_882B1C+1CC ; ---------------------------------------------------------------------------
sub_882B1C+1CC 010 SMLALTTEQ R8, R0, R2, R4 ; jumptable 00882C00 case 2
sub_882B1C+1D0 010 LDREQT SP, [R0],#-0x6E7 ; Load from Memory
sub_882B1C+1D4 010 SMLALTTEQ R8, R0, R2, R4 ; Long signed multiply-accumulate (top*top)
sub_882B1C+1D8 010 ANDEQ R5, R0, #0x8C000003 ; Rd = Op1 & Op2
sub_882B1C+1DC 010 LDREQB SP, [R0],#-0x6E7 ; Load from Memory
sub_882B1C+1E0 010 SMLALTTEQ R8, R0, R2, R4 ; Long signed multiply-accumulate (top*top)
sub_882B1C+1E4 010 STMEQDA R0, {R1,R3} ; Store Block to Memory
sub_882B1C+1E8 010 SMLATTEQ R0, R3, R3, R5 ; Signed multiply-accumulate (top*top)
sub_882B1C+1EC 010 TSTEQ R0, R10 ; Set cond. codes on Op1 & Op2
sub_882B1C+1F0 010 STREQB R8, [R0,#-0x4E0] ; Store to Memory
sub_882B1C+1F4 010 LDRLTBT PC, [PC],#0xFEA ; Indirect Jump
sub_882B1C+1F8 010 STREQ R8, [R0],#-0x6E0 ; p_NewKey
sub_882B1C+1FC 010 LDREQ R10, [R0,#-0xE1] ; Load from Memory
sub_882B1C+200 010 EOREQ R10, R0, R3,ROR#1 ; Rd = Op1 ^ Op2
sub_882B1C+204 010 SVCCS 0x2702EB ; Supervisor Call
sub_882B1C+204
sub_882B1C+204 ; ---------------------------------------------------------------------------
sub_882B1C+208 010 DCB 0xF8
sub_882B1C+209 010 DCB 0xFF
sub_882B1C+20A 010 DCB 0xFF
sub_882B1C+20B 010 DCB 0xEA
sub_882B1C+20C ; ---------------------------------------------------------------------------
sub_882B1C+20C 010 STREQ R8, [R0],#-0x6E0 ; p_NewKey
sub_882B1C+210 010 LDREQ R10, [R0,#-0xE1] ; Load from Memory
sub_882B1C+214 010 EOREQ R10, R0, R3,ROR#1 ; Rd = Op1 ^ Op2
sub_882B1C+218 010 TEQNE R7, #0xB000000E ; Set cond. codes on Op1 ^ Op2
sub_882B1C+218
sub_882B1C+218 ; ---------------------------------------------------------------------------
sub_882B1C+21C 010 DCB 0xF3
sub_882B1C+21D 010 DCB 0xFF
sub_882B1C+21E 010 DCB 0xFF
sub_882B1C+21F 010 DCB 0xEA
sub_882B1C+220 ; ---------------------------------------------------------------------------
sub_882B1C+220 010 LDREQT SP, [R0],#-0x6E7 ; jumptable 00882C00 case 3
sub_882B1C+224 010 TEQEQ R0, #0xE0000000 ; Set cond. codes on Op1 ^ Op2
sub_882B1C+228 010 SMLALTTEQ R8, R0, R2, R3 ; Long signed multiply-accumulate (top*top)
sub_882B1C+22C 010 LDRGEBT PC, [PC],R10,ROR#31 ; Indirect Jump
sub_882B1C+22C ; End of function sub_882B1C
sub_882B1C+22C