Skip to content

Instantly share code, notes, and snippets.

@SquaredTiki

SquaredTiki/obfuscated_cbc.asm Secret

Last active Feb 10, 2016
Embed
What would you like to do?
================ B E G I N N I N G O F P R O C E D U R E ================
; Basic Block Registers Used: r1 r2 r3 r4 r5 r6 r7 r8 r10 r11 sp lr pc - Defined: r2 r3 r7 r11 sp d16 d17 A1 A3 A12 - Killed: <nothing> - LiveIn: r0 r1 r2 r3 r4 r5 r6 r7 r8 r10 r11 sp lr pc q8 q9 - LiveOut: r0 r3 r4 r5 r6 r7 r11 sp pc q8 q9 A1 A3 A12 - AvailIn: <nothing> - AvailOut: r2 r3 r7 r11 sp d16 d17 A1 A3 A12
sub_44d84:
0x00044d84 F0B5 push {r4, r5, r6, r7, lr} ; XREF=-[NSData decryptToken:withIV:usingDecryptionFunction:]+92
0x00044d86 03AF add r7, sp, #0xc
0x00044d88 2DE9000D push.w {r8, r10, r11}
0x00044d8c 8DB0 sub sp, #0x34
0x00044d8e 0193 str r3, [sp, #0x4]
0x00044d90 0DF1200B add.w r11, sp, #0x20
0x00044d94 0392 str r2, [sp, #0xc]
0x00044d96 47F26422 movw r2, #0x7264
0x00044d9a C0F2BF02 movt r2, #0xbf ; 0xbf7264
0x00044d9e BB68 ldr r3, [r7, #0x8]
0x00044da0 7A44 add r2, pc ; imp___nl_symbol_ptr____stack_chk_guard
0x00044da2 002B cmp r3, #0x0
0x00044da4 1268 ldr r2, [r2] ; imp___nl_symbol_ptr____stack_chk_guard
0x00044da6 1268 ldr r2, [r2] ; ___stack_chk_guard
0x00044da8 0C92 str r2, [sp, #0x30]
0x00044daa 61F90F0A vld1.8 {d16, d17}, [r1]
0x00044dae 4BF98F0A vst1.32 {d16, d17}, [r11]
0x00044db2 58D0 beq 0x44e66
; Basic Block Registers Used: r0 r3 sp - Defined: r4 r5 r8 A2 - Killed: <nothing> - LiveIn: r0 r3 r7 r11 sp pc q8 q9 A1 A3 A12 - LiveOut: r4 r5 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r2 r3 r7 r11 sp d16 d17 A1 A3 A12 - AvailOut: r2 r3 r4 r5 r7 r8 r11 sp d16 d17 A1 A2 A3 A12
0x00044db4 A3F11008 sub.w r8, r3, #0x10
0x00044db8 04AC add r4, sp, #0x10
0x00044dba 0025 movs r5, #0x0
0x00044dbc 0290 str r0, [sp, #0x8]
0x00044dbe CDF80080 str.w r8, [sp]
; Basic Block Registers Used: r5 sp A2 A3 - Defined: r0 r6 - Killed: <nothing> - LiveIn: r4 r5 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r0 r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r2 r5 - AvailOut: r0 r2 r5 r6
0x00044dc2 0398 ldr r0, [sp, #0xc] ; XREF=sub_44d84+222
0x00044dc4 4619 adds r6, r0, r5
0x00044dc6 0298 ldr r0, [sp, #0x8]
0x00044dc8 0128 cmp r0, #0x1
0x00044dca 04D1 bne 0x44dd6
; Basic Block Registers Used: r4 r6 - Defined: r0 r1 - Killed: r0 r1 r2 r3 r9 r12 lr pc s0 s1 s2 s3 s9 s12 s14 s15 d0 d1 d2 d3 d9 d12 d14 d15 q0 q1 q2 q3 q9 q12 q14 q15 - LiveIn: r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r2 r5 r6 - AvailOut: r0 r1 r2 r5 r6
0x00044dcc 3046 mov r0, r6 ; argument #1 for method sub_46d554
0x00044dce 2146 mov r1, r4 ; argument #2 for method sub_46d554
0x00044dd0 28F0C0F3 bl sub_46d554
0x00044dd4 06E0 b 0x44de4
; Basic Block Registers Used: r0 - Defined: <nothing> - Killed: <nothing> - LiveIn: r0 r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r2 r5 r6 - AvailOut: r0 r2 r5 r6
0x00044dd6 28B9 cbnz r0, 0x44de4 ; XREF=sub_44d84+70
; Basic Block Registers Used: r4 r6 sp - Defined: r0 r1 r8 - Killed: r0 r1 r2 r3 r9 r12 lr pc s0 s1 s2 s3 s9 s12 s14 s15 d0 d1 d2 d3 d9 d12 d14 d15 q0 q1 q2 q3 q9 q12 q14 q15 - LiveIn: r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r2 r5 r6 - AvailOut: r0 r1 r2 r5 r6 r8
0x00044dd8 3046 mov r0, r6 ; argument #1 for method sub_6db4a4
0x00044dda 2146 mov r1, r4 ; argument #2 for method sub_6db4a4
0x00044ddc 96F262F3 bl sub_6db4a4
0x00044de0 DDF80080 ldr.w r8, [sp]
; Basic Block Registers Used: <nothing> - Defined: r0 - Killed: <nothing> - LiveIn: r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r0 r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r2 r5 r6 - AvailOut: r0 r2 r5 r6
0x00044de4 0020 movs r0, #0x0 ; XREF=sub_44d84+80, sub_44d84+82
; Basic Block Registers Used: r0 r4 r11 q8 q9 - Defined: r0 r1 r2 d16 d17 d18 d19 q8 - Killed: <nothing> - LiveIn: r0 r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r0 r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r2 - AvailOut: r0 r1 r2 d16 d17 d18 d19 q8
0x00044de6 2118 adds r1, r4, r0 ; XREF=sub_44d84+124
0x00044de8 0BEB0002 add.w r2, r11, r0
0x00044dec 61F90F0A vld1.8 {d16, d17}, [r1]
0x00044df0 1030 adds r0, #0x10
0x00044df2 1028 cmp r0, #0x10
0x00044df4 62F90F2A vld1.8 {d18, d19}, [r2]
0x00044df8 42FFF001 veor q8, q9, q8
0x00044dfc 41F90F0A vst1.8 {d16, d17}, [r1]
0x00044e00 F1D1 bne 0x44de6
; Basic Block Registers Used: r5 r6 r11 - Defined: r8 d16 d17 - Killed: <nothing> - LiveIn: r4 r5 r6 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r4 r5 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r1 r2 d16 d17 d18 d19 q8 - AvailOut: r0 r1 r2 r8 d16 d17 d18 d19 q8
0x00044e02 66F90F0A vld1.8 {d16, d17}, [r6]
0x00044e06 A845 cmp r8, r5
0x00044e08 4BF98F0A vst1.32 {d16, d17}, [r11]
0x00044e0c 17D1 bne 0x44e3e
; Basic Block Registers Used: r7 r8 sp - Defined: r0 r6 r10 - Killed: <nothing> - LiveIn: r4 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r0 r4 r6 r7 r8 r10 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r1 r2 r8 d16 d17 d18 d19 q8 - AvailOut: r0 r1 r2 r6 r8 r10 d16 d17 d18 d19 q8
0x00044e0e 9DF81F00 ldrb.w r0, [sp, #0x1f]
0x00044e12 C246 mov r10, r8
0x00044e14 BE68 ldr r6, [r7, #0x8]
0x00044e16 0F28 cmp r0, #0xf
0x00044e18 21D8 bhi 0x44e5e
; Basic Block Registers Used: r0 - Defined: r1 r2 - Killed: <nothing> - LiveIn: r0 r4 r6 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r0 r1 r4 r6 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r1 r2 r6 r8 r10 d16 d17 d18 d19 q8 - AvailOut: r0 r1 r2 r6 r8 r10 d16 d17 d18 d19 q8
0x00044e1a C0F11002 rsb.w r2, r0, #0x10
0x00044e1e 0F2A cmp r2, #0xf
0x00044e20 1146 mov r1, r2
0x00044e22 05D8 bhi 0x44e30
; Basic Block Registers Used: r0 r1 r4 - Defined: r3 - Killed: <nothing> - LiveIn: r0 r1 r4 r6 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r0 r4 r6 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r1 - AvailOut: r1 r3
0x00044e24 635C ldrb r3, [r4, r1] ; XREF=sub_44d84+170
0x00044e26 8342 cmp r3, r0
0x00044e28 12D1 bne 0x44e50
; Basic Block Registers Used: <nothing> - Defined: r1 - Killed: <nothing> - LiveIn: r0 r4 r6 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r0 r1 r4 r6 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r1 r3 - AvailOut: r1 r3
0x00044e2a 0131 adds r1, #0x1
0x00044e2c 1029 cmp r1, #0x10
0x00044e2e F9D3 blo 0x44e24
; Basic Block Registers Used: r6 r8 - Defined: r0 r1 r2 r10 - Killed: <nothing> - LiveIn: r4 r6 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r2 r4 r6 r7 r8 r10 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r1 - AvailOut: r0 r1 r2 r10
0x00044e30 C246 mov r10, r8 ; XREF=sub_44d84+158
0x00044e32 1029 cmp r1, #0x10
0x00044e34 14BF ite ne
0x00044e36 1022 movne r2, #0x10
0x00044e38 A6EB000A subeq.w r10, r6, r0
0x00044e3c 0AE0 b 0x44e54
; Basic Block Registers Used: r4 r5 r7 sp A1 - Defined: r0 r6 r10 d16 d17 - Killed: <nothing> - LiveIn: r4 r5 r7 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r4 r6 r7 r10 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r1 r2 r8 d16 d17 d18 d19 q8 - AvailOut: r0 r1 r2 r6 r8 r10 d16 d17 d18 d19 q8
0x00044e3e 0198 ldr r0, [sp, #0x4] ; XREF=sub_44d84+136
0x00044e40 AA46 mov r10, r5
0x00044e42 BE68 ldr r6, [r7, #0x8]
0x00044e44 64F90F0A vld1.8 {d16, d17}, [r4]
0x00044e48 2844 add r0, r5
0x00044e4a 40F90F0A vst1.8 {d16, d17}, [r0]
0x00044e4e 06E0 b 0x44e5e
; Basic Block Registers Used: r8 - Defined: r2 r10 - Killed: <nothing> - LiveIn: r4 r6 r7 r8 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r2 r4 r6 r7 r8 r10 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r1 r3 - AvailOut: r1 r2 r3 r10
0x00044e50 1022 movs r2, #0x10 ; XREF=sub_44d84+164
0x00044e52 C246 mov r10, r8
; Basic Block Registers Used: r2 r4 r8 sp A1 - Defined: r0 r1 - Killed: r0 r1 r2 r3 r9 r12 lr pc s0 s1 s2 s3 s9 s12 s14 s15 d0 d1 d2 d3 d9 d12 d14 d15 q0 q1 q2 q3 q9 q12 q14 q15 - LiveIn: r2 r4 r6 r7 r8 r10 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r4 r6 r7 r10 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r1 r2 r10 - AvailOut: r0 r1 r2 r10
0x00044e54 0198 ldr r0, [sp, #0x4] ; XREF=sub_44d84+184
0x00044e56 2146 mov r1, r4 ; argument #2 for method imp___picsymbolstub4__memcpy
0x00044e58 4044 add r0, r8
0x00044e5a D3F296CD blx imp___picsymbolstub4__memcpy
; Basic Block Registers Used: r6 - Defined: r5 - Killed: <nothing> - LiveIn: r4 r6 r7 r10 r11 sp pc q8 q9 A1 A2 A3 A12 - LiveOut: r4 r5 r6 r7 r10 r11 sp pc q8 q9 A1 A2 A3 A12 - AvailIn: r0 r1 r2 r10 - AvailOut: r0 r1 r2 r5 r10
0x00044e5e 1035 adds r5, #0x10 ; XREF=sub_44d84+148, sub_44d84+202
0x00044e60 B542 cmp r5, r6
0x00044e62 AED3 blo 0x44dc2
; Basic Block Registers Used: <nothing> - Defined: <nothing> - Killed: <nothing> - LiveIn: r4 r5 r6 r7 r10 sp pc A12 - LiveOut: r4 r5 r6 r7 r10 sp pc A12 - AvailIn: r0 r1 r2 r5 r10 - AvailOut: r0 r1 r2 r5 r10
0x00044e64 01E0 b 0x44e6a
; Basic Block Registers Used: <nothing> - Defined: r10 - Killed: <nothing> - LiveIn: r4 r5 r6 r7 sp pc A12 - LiveOut: r4 r5 r6 r7 r10 sp pc A12 - AvailIn: r2 r3 r7 r11 sp d16 d17 A1 A3 A12 - AvailOut: r2 r3 r7 r10 r11 sp d16 d17 A1 A3 A12
0x00044e66 4FF0000A mov.w r10, #0x0 ; XREF=sub_44d84+46
; Basic Block Registers Used: r4 r5 r6 r7 r10 sp pc A12 - Defined: r0 r1 r8 r10 r11 sp - Killed: r0 r1 r2 r3 r9 r12 lr pc s0 s1 s2 s3 s9 s12 s14 s15 d0 d1 d2 d3 d9 d12 d14 d15 q0 q1 q2 q3 q9 q12 q14 q15 - LiveIn: r4 r5 r6 r7 r10 sp pc A12 - LiveOut: <nothing> - AvailIn: r2 r10 - AvailOut: r0 r1 r2 r8 r10 r11 sp
0x00044e6a 0C98 ldr r0, [sp, #0x30] ; XREF=sub_44d84+224
0x00044e6c 47F29011 movw r1, #0x7190
0x00044e70 C0F2BF01 movt r1, #0xbf ; 0xbf7190
0x00044e74 7944 add r1, pc ; imp___nl_symbol_ptr____stack_chk_guard
0x00044e76 0968 ldr r1, [r1] ; imp___nl_symbol_ptr____stack_chk_guard
0x00044e78 0968 ldr r1, [r1] ; ___stack_chk_guard
0x00044e7a 081A subs r0, r1, r0
0x00044e7c 01BF itttt eq
0x00044e7e 5046 moveq r0, r10
0x00044e80 0DB0 addeq sp, #0x34
0x00044e82 BDE8000D popeq.w {r8, r10, r11}
0x00044e86 F0BD popeq {r4, r5, r6, r7, pc}
0x00044e88 D3F2A6C9 blx imp___picsymbolstub4____stack_chk_fail
; endp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment