CRACK Solution
Push And Pull
CRACK alternating add/subtract

Prerequisites
Unlocks
GRID
Techniquealternating add/subtract cipher
Rulenonzero
SampleGRID
Walkthrough
Recover the accepted input below, then submit it to the CRACK verifier.
Reject Samples
- GRI
- GRIDX
- grid
- HRID
Verifier Listing
; llama_sub3: alternating add/subtract cipher. The old version folded a fixed
; subtract into the compare. Here the transform runs and FLIPS sign by position:
; even offsets get +3, odd offsets get -3 before the compare, so neighbouring
; letters move opposite ways and the single "minus a constant" reflex is wrong on
; half the bytes. Technique: alternating add/subtract cipher. r0 = 1 on accept.
; Accept rule: nonzero.
;
; sample "GRID": even idx +3, odd idx -3, then compare.
len r1
cmp r1, 4
jnz bad ; exactly 4 bytes
mov r7, 0
ldb r0, [r7]
add r0, 3 ; index 0 (even) -> +3
cmp r0, 0x4a
jnz bad
inc r7
ldb r0, [r7]
sub r0, 3 ; index 1 (odd) -> -3
cmp r0, 0x4f
jnz bad
inc r7
ldb r0, [r7]
add r0, 3 ; index 2 (even) -> +3
cmp r0, 0x4c
jnz bad
inc r7
ldb r0, [r7]
sub r0, 3 ; index 3 (odd) -> -3
cmp r0, 0x41
jnz bad
mov r0, 1
ret
bad: mov r0, 0
ret