-1

Is there an easy to convert assembly (ARM) to C code?

1
void func(char *r0, int r1, int r2) {
    char *r12, r3;
    int r4, r5;
    if (r1>=r2)
        goto l1;
l2:
    r12=r0+r2<<2;
    r3=r0+r1<<2;
    r4=*(int *)r12;
    r5=*(int *)r3;
    r1++;
    r2--;
    *((int *)(&(r12[-4])))=r5;
    *((int *)(&(r3[-4])))=r4;
    if (r1<r2)
        goto l2;
l1:
}

Another example why reverse engineering is not about converting assembler to C, but about understanding what's going on. (This function seems to reverse the elements of an array).

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.