0

I'm disassembling a C written binary using radare2:

The block of code im looking into corresponds to this one

    int num[5];       
    int sum;            
    num[0] = 200;      
    num[1] = 150;
    num[2] = 100;
    num[3] = -50;
    num[4] = 300;
    sum = num[0] +     num[1] + num[2] + num[3] + num[4];

Inside radare2 the array is initialized the following way:

|           0x561e181b9729      31c0           xor eax, eax
|           0x561e181b972b      c745e0c80000.  mov dword [rbp - 0x20], 0xc8 ; 200
|           0x561e181b9732      c745e4960000.  mov dword [rbp - 0x1c], 0x96 ; 150
|           0x561e181b9739      c745e8640000.  mov dword [rbp - 0x18], 0x64 ; 'd' ; 100
|           0x561e181b9740      c745ecceffff.  mov dword [rbp - 0x14], 0xffffffce ; 4294967246
|           0x561e181b9747      c745f02c0100.  mov dword [rbp - 0x10], 0x12c ; 300
|           0x561e181b974e      8b55e0         mov edx, dword [rbp - 0x20]

Is there a way to present that structure in radare2 as an array?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.