CRACK Solution

Read Backwards

CRACK reversed index

In-game screenshot of Read Backwards
In-game view
FamilyCRACK Graph0.081 DifficultyTutorial Ring01 IDe01_backwards

Prerequisites

DIFFERENTIAL PAIR

Unlocks

DOUBLE TAP

Accepted input STAR
Techniquereversed index Rulenonzero SampleSTAR

Walkthrough

Recover the accepted input below, then submit it to the CRACK verifier.

Verifier Listing
; e01_backwards: four direct compares, but the stored word is spelled in
; reverse: the encoded array is read at [3],[2],[1],[0], so the input reads
; forwards as the reversal of the stored bytes. Technique: reversed index.
; r0 = 1 on accept. Accept rule: nonzero.
;
; stored enc = R A T S (0x52 0x41 0x54 0x53); read backwards -> "STAR".
; The check compares input[0..3] against enc[3],enc[2],enc[1],enc[0].

        len   r1
        cmp   r1, 4
        jnz   bad           ; exactly 4 bytes

        mov   r7, 0
        ldb   r0, [r7]
        cmp   r0, 0x53      ; enc[3] = 'S'
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        cmp   r0, 0x54      ; enc[2] = 'T'
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        cmp   r0, 0x41      ; enc[1] = 'A'
        jnz   bad
        inc   r7
        ldb   r0, [r7]
        cmp   r0, 0x52      ; enc[0] = 'R'
        jnz   bad

        mov   r0, 1
        ret
bad:    mov   r0, 0
        ret