[*] Binary protection state of ip.iproute2
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of ip.iproute2
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52df8 */
| #include <stdint.h>
|
; (fcn) sym.print_color_0xhex () | void print_color_0xhex (int16_t arg_78h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_70h;
| int32_t var_8h;
| int32_t var_8h_2;
| int16_t var_14h;
| int16_t var_54h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052df8 push.w {r4, r5, r6, r7, r8, sl, fp, lr} |
0x00052dfc mov r7, r2 | r7 = r2;
0x00052dfe ldr r2, [pc, 0xac] |
0x00052e00 mov r6, r3 | r6 = r3;
0x00052e02 sub sp, 0x58 |
0x00052e04 mov r4, r0 | r4 = r0;
0x00052e06 ldr r3, [pc, 0xa8] | r3 = *(0x52eb2);
0x00052e08 mov r8, r1 | r8 = r1;
0x00052e0a add r2, pc | r2 = 0xa5cbc;
0x00052e0c ldr r5, [pc, 0xa4] |
0x00052e0e ldrd sl, fp, [sp, 0x78] | __asm ("ldrd sl, fp, [arg_78h]");
0x00052e12 ldr r3, [r2, r3] |
0x00052e14 add r5, pc | r5 = 0xa5ccc;
0x00052e16 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00052e18 str r3, [sp, 0x54] | var_54h = r3;
0x00052e1a mov.w r3, 0 | r3 = 0;
0x00052e1e bl 0x5263c | r0 = is_json_context ();
| if (r0 != 0) {
0x00052e22 cbz r0, 0x52e2a |
0x00052e24 tst.w r4, 6 |
| if ((r4 & 6) != 0) {
0x00052e28 bne 0x52e7e | goto label_1;
| }
| }
0x00052e2a bl 0x5263c | r0 = is_json_context ();
0x00052e2e cbz r0, 0x52e4c |
| while ((r4 & 5) == 0) {
| label_0:
0x00052e30 ldr r2, [pc, 0x84] |
0x00052e32 ldr r3, [pc, 0x7c] | r3 = *(0x52eb2);
0x00052e34 add r2, pc | r2 = 0xa5cf0;
0x00052e36 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00052e38 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00052e3a ldr r3, [sp, 0x54] | r3 = var_54h;
0x00052e3c eors r2, r3 | r2 ^= r3;
0x00052e3e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00052e42 bne 0x52ea6 | goto label_2;
| }
0x00052e44 movs r0, 0 | r0 = 0;
0x00052e46 add sp, 0x58 |
0x00052e48 pop.w {r4, r5, r6, r7, r8, sl, fp, pc} |
0x00052e4c tst.w r4, 5 |
0x00052e50 beq 0x52e30 |
| }
0x00052e52 ldr r2, [pc, 0x68] |
0x00052e54 ldr r3, [pc, 0x58] | r3 = *(0x52eb0);
0x00052e56 add r2, pc | r2 = 0xa5d18;
0x00052e58 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00052e5a ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00052e5c ldr r3, [sp, 0x54] | r3 = var_54h;
0x00052e5e eors r2, r3 | r2 ^= r3;
0x00052e60 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00052e64 bne 0x52ea6 |
0x00052e66 ldr r3, [pc, 0x58] | r3 = *(0x52ec2);
0x00052e68 mov r2, r6 | r2 = r6;
0x00052e6a mov r1, r8 | r1 = r8;
0x00052e6c ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00052e6e strd sl, fp, [sp, 0x78] | __asm ("strd sl, fp, [var_70hx78]");
0x00052e72 ldr r0, [r3] | r0 = *(0x52ec2);
0x00052e74 add sp, 0x58 |
0x00052e76 pop.w {r4, r5, r6, r7, r8, sl, fp, lr} |
0x00052e7a b.w 0x53348 | void (*0x53348)() ();
| label_1:
0x00052e7e ldr r1, [pc, 0x44] |
0x00052e80 movs r3, 0x40 | r3 = 0x40;
0x00052e82 add r4, sp, 0x14 | r4 += var_14h;
0x00052e84 movs r2, 1 | r2 = 1;
0x00052e86 mov r0, r4 | r0 = r4;
0x00052e88 strd sl, fp, [sp, 8] | __asm ("strd sl, fp, [var_8h]");
0x00052e8c add r1, pc | r1 = 0xa5d56;
0x00052e8e str r1, [sp] | *(sp) = r1;
0x00052e90 mov r1, r3 | r1 = r3;
0x00052e92 blx 0x9448 | fcn_00009448 ();
0x00052e96 movs r3, 0 | r3 = 0;
0x00052e98 mov r2, r7 | r2 = r7;
0x00052e9a movs r1, 6 | r1 = 6;
0x00052e9c str r4, [sp] | *(sp) = r4;
0x00052e9e movs r0, 2 | r0 = 2;
0x00052ea0 bl 0x52bd0 | print_color_string ();
0x00052ea4 b 0x52e30 | goto label_0;
| }
| label_2:
0x00052ea6 blx 0x94f8 | getdelim ();
0x00052eaa nop |
0x00052eac ldr r6, [pc, 0x2b8] | r6 = *(0x53168);
0x00052eae movs r2, r0 | r2 = r0;
0x00052eb0 lsls r0, r1, 0xc | r0 = r1 << 0xc;
0x00052eb2 movs r0, r0 |
0x00052eb4 ldr r6, [pc, 0x290] | r6 = *(0x53148);
0x00052eb6 movs r2, r0 | r2 = r0;
0x00052eb8 ldr r6, [pc, 0x210] | r6 = *(0x530cc);
0x00052eba movs r2, r0 | r2 = r0;
0x00052ebc ldr r6, [pc, 0x188] | r6 = imp.__aeabi_unwind_cpp_pr0;
0x00052ebe movs r2, r0 | r2 = r0;
0x00052ec0 lsls r0, r4, 0xc | r0 = r4 << 0xc;
0x00052ec2 movs r0, r0 |
0x00052ec4 ldm r3!, {r2, r4, r7} | r2 = *(r3!);
| r4 = *((r3! + 4));
| r7 = *((r3! + 8));
0x00052ec6 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52cd8 */
| #include <stdint.h>
|
; (fcn) sym.print_color_bool () | void print_color_bool (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
| if (? >= ?) {
0x00052cd8 ldrbmi lr, [r0, sp, lsr 18]! |
| }
0x00052cdc mov r4, r0 | r4 = r0;
0x00052cde ldrb.w r8, [sp, 0x20] | r8 = *(arg_20h);
0x00052ce2 mov r7, r1 | r7 = r1;
0x00052ce4 mov sb, r2 | sb = r2;
0x00052ce6 mov r6, r3 | r6 = r3;
0x00052ce8 ldr r5, [pc, 0x68] |
0x00052cea add r5, pc | r5 = 0xa5a42;
0x00052cec cmp.w r8, 0 |
| if (r8 != 0) {
0x00052cf0 bne 0x52d40 | goto label_2;
| }
0x00052cf2 ldr.w sl, [pc, 0x64] | sl = *(0x00052d58);
0x00052cf6 add sl, pc | sl += pc;
| label_1:
0x00052cf8 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052cfc cbz r0, 0x52d1e | goto label_3;
| }
0x00052cfe tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x00052d02 beq 0x52d1e | goto label_3;
| }
0x00052d04 ldr r3, [pc, 0x54] |
0x00052d06 add r3, pc | r3 = 0xa5a66;
0x00052d08 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00052d0a cmp.w sb, 0 |
| if (sb == 0) {
0x00052d0e beq 0x52d48 | goto label_4;
| }
0x00052d10 mov r2, r8 | r2 = r8;
0x00052d12 mov r1, sb | r1 = sb;
0x00052d14 bl 0x52418 | jsonw_bool_field ();
| do {
| label_0:
0x00052d18 movs r0, 0 | r0 = 0;
0x00052d1a pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_3:
0x00052d1e bl 0x5263c | r0 = is_json_context ();
0x00052d22 cmp r0, 0 |
0x00052d24 bne 0x52d18 |
| } while (r0 != 0);
0x00052d26 tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x00052d2a beq 0x52d18 | goto label_0;
| }
0x00052d2c ldr r0, [pc, 0x30] |
0x00052d2e mov r3, sl | r3 = sl;
0x00052d30 mov r2, r6 | r2 = r6;
0x00052d32 mov r1, r7 | r1 = r7;
0x00052d34 ldr r0, [r5, r0] | r0 = *((r5 + r0));
0x00052d36 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052d3a ldr r0, [r0] | r0 = *(0x52d60);
0x00052d3c b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x00052d40 ldr.w sl, [pc, 0x20] |
0x00052d44 add sl, pc | sl = 0xa5aac;
0x00052d46 b 0x52cf8 | goto label_1;
| label_4:
0x00052d48 mov r1, r8 | r1 = r8;
0x00052d4a bl 0x52344 | jsonw_bool ();
0x00052d4e movs r0, 0 | r0 = 0;
0x00052d50 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52ae8 */
| #include <stdint.h>
|
; (fcn) sym.print_color_float () | void print_color_float (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052ae8 push.w {r4, r5, r6, r7, r8, lr} |
0x00052aec mov r4, r0 | r4 = r0;
0x00052aee ldr r6, [pc, 0x6c] |
0x00052af0 mov r8, r1 | r8 = r1;
0x00052af2 mov r7, r2 | r7 = r2;
0x00052af4 mov r5, r3 | r5 = r3;
0x00052af6 vpush {d8} | __asm ("vpush {d8}");
0x00052afa sub sp, 8 |
0x00052afc vmov.f64 d8, d0 | __asm ("vmov.f64 d8, d0");
0x00052b00 add r6, pc | r6 = 0xa5662;
0x00052b02 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052b06 cbz r0, 0x52b2c | goto label_1;
| }
0x00052b08 tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x00052b0c beq 0x52b2c | goto label_1;
| }
0x00052b0e ldr r3, [pc, 0x50] |
0x00052b10 vmov.f64 d0, d8 | __asm ("vmov.f64 d0, d8");
0x00052b14 add r3, pc | r3 = 0xa567a;
0x00052b16 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
| if (r7 == 0) {
0x00052b18 cbz r7, 0x52b56 | goto label_2;
| }
0x00052b1a mov r1, r7 | r1 = r7;
0x00052b1c bl 0x52430 | jsonw_float_field ();
| do {
| label_0:
0x00052b20 movs r0, 0 | r0 = 0;
0x00052b22 add sp, 8 |
0x00052b24 vpop {d8} | __asm ("vpop {d8}");
0x00052b28 pop.w {r4, r5, r6, r7, r8, pc} |
| label_1:
0x00052b2c bl 0x5263c | r0 = is_json_context ();
0x00052b30 cmp r0, 0 |
0x00052b32 bne 0x52b20 |
| } while (r0 != 0);
0x00052b34 tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x00052b38 beq 0x52b20 | goto label_0;
| }
0x00052b3a ldr r3, [pc, 0x28] | r3 = *(0x52b66);
0x00052b3c mov r2, r5 | r2 = r5;
0x00052b3e mov r1, r8 | r1 = r8;
0x00052b40 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00052b42 vstr d8, [sp] | __asm ("vstr d8, [sp]");
0x00052b46 ldr r0, [r3] | r0 = *(0x52b66);
0x00052b48 bl 0x53348 | color_fprintf ()
0x00052b4c add sp, 8 |
0x00052b4e vpop {d8} | __asm ("vpop {d8}");
0x00052b52 pop.w {r4, r5, r6, r7, r8, pc} |
| label_2:
0x00052b56 bl 0x52370 | jsonw_float ();
0x00052b5a b 0x52b20 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52ec8 */
| #include <stdint.h>
|
; (fcn) sym.print_color_hex () | void print_color_hex (int16_t arg_2d8h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_ch;
| int16_t var_4ch;
| int16_t var_70h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052ec8 push.w {r4, r5, r6, r7, r8, sb, lr} |
0x00052ecc mov sb, r2 | sb = r2;
0x00052ece ldr r2, [pc, 0xbc] |
0x00052ed0 mov r6, r3 | r6 = r3;
0x00052ed2 sub sp, 0x54 |
0x00052ed4 mov r4, r0 | r4 = r0;
0x00052ed6 ldr r3, [pc, 0xb8] | r3 = *(0x52f92);
0x00052ed8 mov r7, r1 | r7 = r1;
0x00052eda add r2, pc | r2 = 0xa5e6c;
0x00052edc ldr r5, [pc, 0xb4] |
0x00052ede ldr.w r8, [sp, 0x70] | r8 = var_70h;
0x00052ee2 ldr r3, [r2, r3] |
0x00052ee4 add r5, pc | r5 = 0xa5e7c;
0x00052ee6 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00052ee8 str r3, [sp, 0x4c] | var_4ch = r3;
0x00052eea mov.w r3, 0 | r3 = 0;
0x00052eee bl 0x5263c | r0 = is_json_context ();
| if (r0 != 0) {
0x00052ef2 cbz r0, 0x52efa |
0x00052ef4 tst.w r4, 6 |
| if ((r4 & 6) != 0) {
0x00052ef8 bne 0x52f4c | goto label_1;
| }
| }
0x00052efa bl 0x5263c | r0 = is_json_context ();
0x00052efe cbz r0, 0x52f1c |
| while ((r4 & 5) == 0) {
| label_0:
0x00052f00 ldr r2, [pc, 0x94] |
0x00052f02 ldr r3, [pc, 0x8c] | r3 = *(0x52f92);
0x00052f04 add r2, pc | r2 = 0xa5ea0;
0x00052f06 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00052f08 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00052f0a ldr r3, [sp, 0x4c] | r3 = var_4ch;
0x00052f0c eors r2, r3 | r2 ^= r3;
0x00052f0e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00052f12 bne 0x52f86 | goto label_2;
| }
0x00052f14 movs r0, 0 | r0 = 0;
0x00052f16 add sp, 0x54 |
0x00052f18 pop.w {r4, r5, r6, r7, r8, sb, pc} |
0x00052f1c tst.w r4, 5 |
0x00052f20 beq 0x52f00 |
| }
0x00052f22 ldr r2, [pc, 0x78] |
0x00052f24 ldr r3, [pc, 0x68] | r3 = *(0x52f90);
0x00052f26 add r2, pc | r2 = 0xa5ec8;
0x00052f28 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00052f2a ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00052f2c ldr r3, [sp, 0x4c] | r3 = var_4ch;
0x00052f2e eors r2, r3 | r2 ^= r3;
0x00052f30 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00052f34 bne 0x52f86 |
0x00052f36 ldr r0, [pc, 0x68] |
0x00052f38 mov r3, r8 | r3 = r8;
0x00052f3a mov r2, r6 | r2 = r6;
0x00052f3c mov r1, r7 | r1 = r7;
0x00052f3e ldr r0, [r5, r0] | r0 = *((r5 + r0));
0x00052f40 ldr r0, [r0] | r0 = *(0x52fa2);
0x00052f42 add sp, 0x54 |
0x00052f44 pop.w {r4, r5, r6, r7, r8, sb, lr} |
0x00052f48 b.w 0x53348 | void (*0x53348)() ();
| label_1:
0x00052f4c ldr r2, [pc, 0x54] |
0x00052f4e add r4, sp, 0xc | r4 += var_ch;
0x00052f50 movs r3, 0x40 | r3 = 0x40;
0x00052f52 mov r0, r4 | r0 = r4;
0x00052f54 mov r1, r3 | r1 = r3;
0x00052f56 add r2, pc | r2 = 0xa5efe;
0x00052f58 strd r2, r8, [sp] | __asm ("strd r2, r8, [sp]");
0x00052f5c movs r2, 1 | r2 = 1;
0x00052f5e blx 0x9448 | fcn_00009448 ();
0x00052f62 cmp.w sb, 0 |
| if (sb != 0) {
0x00052f66 beq 0x52f78 |
0x00052f68 ldr r3, [pc, 0x3c] |
0x00052f6a mov r2, r4 | r2 = r4;
0x00052f6c mov r1, sb | r1 = sb;
0x00052f6e add r3, pc | r3 = 0xa5f1a;
0x00052f70 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00052f72 bl 0x52400 | jsonw_string_field ();
0x00052f76 b 0x52f00 | goto label_0;
| }
0x00052f78 ldr r3, [pc, 0x30] |
0x00052f7a mov r1, r4 | r1 = r4;
0x00052f7c add r3, pc | r3 = 0xa5f2c;
0x00052f7e ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00052f80 bl 0x52324 | jsonw_string ();
0x00052f84 b 0x52f00 | goto label_0;
| }
| label_2:
0x00052f86 blx 0x94f8 | getdelim ();
0x00052f8a nop |
0x00052f8c ldr r5, [pc, 0x378] | r5 = *(0x53308);
0x00052f8e movs r2, r0 | r2 = r0;
0x00052f90 lsls r0, r1, 0xc | r0 = r1 << 0xc;
0x00052f92 movs r0, r0 |
0x00052f94 ldr r5, [pc, 0x350] | r5 = *(0x532e8);
0x00052f96 movs r2, r0 | r2 = r0;
0x00052f98 ldr r5, [pc, 0x2d0] | r5 = *(0x5326c);
0x00052f9a movs r2, r0 | r2 = r0;
0x00052f9c ldr r5, [pc, 0x248] | r5 = *(0x531e8);
0x00052f9e movs r2, r0 | r2 = r0;
0x00052fa0 lsls r0, r4, 0xc | r0 = r4 << 0xc;
0x00052fa2 movs r0, r0 |
0x00052fa4 ldr r4, [sp, 0x2d8] | r4 = *(arg_2d8h);
0x00052fa6 movs r0, r0 |
0x00052fa8 udf 0x96 | __asm ("udf 0x96");
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52830 */
| #include <stdint.h>
|
; (fcn) sym.print_color_hhu () | void print_color_hhu (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
| if (? >= ?) {
0x00052830 ldrbmi lr, [r0, sp, lsr 18]! |
| }
0x00052834 mov r4, r0 | r4 = r0;
0x00052836 ldr r6, [pc, 0x60] |
0x00052838 mov r7, r1 | r7 = r1;
0x0005283a mov sb, r2 | sb = r2;
0x0005283c mov r5, r3 | r5 = r3;
0x0005283e ldrb.w r8, [sp, 0x20] | r8 = *(arg_20h);
0x00052842 add r6, pc | r6 = 0xa50e0;
0x00052844 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052848 cbz r0, 0x5286a | goto label_1;
| }
0x0005284a tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x0005284e beq 0x5286a | goto label_1;
| }
0x00052850 ldr r3, [pc, 0x48] |
0x00052852 add r3, pc | r3 = 0xa50f2;
0x00052854 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00052856 cmp.w sb, 0 |
| if (sb == 0) {
0x0005285a beq 0x5288c | goto label_2;
| }
0x0005285c mov r2, r8 | r2 = r8;
0x0005285e mov r1, sb | r1 = sb;
0x00052860 bl 0x524a4 | jsonw_hhu_field ();
| do {
| label_0:
0x00052864 movs r0, 0 | r0 = 0;
0x00052866 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x0005286a bl 0x5263c | r0 = is_json_context ();
0x0005286e cmp r0, 0 |
0x00052870 bne 0x52864 |
| } while (r0 != 0);
0x00052872 tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x00052876 beq 0x52864 | goto label_0;
| }
0x00052878 ldr r0, [pc, 0x24] |
0x0005287a mov r3, r8 | r3 = r8;
0x0005287c mov r2, r5 | r2 = r5;
0x0005287e mov r1, r7 | r1 = r7;
0x00052880 ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x00052882 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052886 ldr r0, [r0] | r0 = *(0x528a0);
0x00052888 b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x0005288c mov r1, r8 | r1 = r8;
0x0005288e bl 0x52380 | jsonw_hhu ();
0x00052892 movs r0, 0 | r0 = 0;
0x00052894 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x528a4 */
| #include <stdint.h>
|
; (fcn) sym.print_color_hu () | void print_color_hu (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000528a4 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000528a8 mov r4, r0 | r4 = r0;
0x000528aa ldr r6, [pc, 0x60] |
0x000528ac mov r7, r1 | r7 = r1;
0x000528ae mov sb, r2 | sb = r2;
0x000528b0 mov r5, r3 | r5 = r3;
0x000528b2 ldrh.w r8, [sp, 0x20] | r8 = *(arg_20h);
0x000528b6 add r6, pc | r6 = 0xa51c8;
0x000528b8 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x000528bc cbz r0, 0x528de | goto label_1;
| }
0x000528be tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x000528c2 beq 0x528de | goto label_1;
| }
0x000528c4 ldr r3, [pc, 0x48] |
0x000528c6 add r3, pc | r3 = 0xa51da;
0x000528c8 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x000528ca cmp.w sb, 0 |
0x000528cc lsrs r0, r0, 0x1c | r0 >>= 0x1c;
| if (r0 == r0) {
0x000528ce beq 0x52900 | goto label_2;
| }
0x000528d0 mov r2, r8 | r2 = r8;
0x000528d2 mov r1, sb | r1 = sb;
0x000528d4 bl 0x524bc | jsonw_hu_field ();
| do {
| label_0:
0x000528d8 movs r0, 0 | r0 = 0;
0x000528da pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x000528de bl 0x5263c | r0 = is_json_context ();
0x000528e2 cmp r0, 0 |
0x000528e4 bne 0x528d8 |
| } while (r0 != 0);
0x000528e6 tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x000528ea beq 0x528d8 | goto label_0;
| }
0x000528ec ldr r0, [pc, 0x24] |
0x000528ee mov r3, r8 | r3 = r8;
0x000528f0 mov r2, r5 | r2 = r5;
0x000528f2 mov r1, r7 | r1 = r7;
0x000528f4 ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x000528f6 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000528f8 blx lr | r0 = lr (r4, r3, r2, r1, r0);
0x000528fa ldr r0, [r0] | r0 = *(0x52914);
0x000528fc b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x00052900 mov r1, r8 | r1 = r8;
0x00052902 bl 0x52390 | jsonw_hu ();
0x00052906 movs r0, 0 | r0 = 0;
0x00052908 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52748 */
| #include <stdint.h>
|
; (fcn) sym.print_color_int () | void print_color_int (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052748 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0005274c mov r4, r0 | r4 = r0;
0x0005274e ldr r6, [pc, 0x60] |
0x00052750 mov r7, r1 | r7 = r1;
0x00052752 mov sb, r2 | sb = r2;
0x00052754 mov r5, r3 | r5 = r3;
0x00052756 ldr.w r8, [sp, 0x20] | r8 = *(arg_20h);
0x0005275a add r6, pc | r6 = 0xa4f10;
0x0005275c bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052760 cbz r0, 0x52782 | goto label_1;
| }
0x00052762 tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x00052766 beq 0x52782 | goto label_1;
| }
0x00052768 ldr r3, [pc, 0x48] |
0x0005276a add r3, pc | r3 = 0xa4f22;
0x0005276c ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x0005276e cmp.w sb, 0 |
| if (sb == 0) {
0x00052772 beq 0x527a4 | goto label_2;
| }
0x00052774 mov r2, r8 | r2 = r8;
0x00052776 mov r1, sb | r1 = sb;
0x00052778 bl 0x52508 | jsonw_int_field ();
| do {
| label_0:
0x0005277c movs r0, 0 | r0 = 0;
0x0005277e pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x00052782 bl 0x5263c | r0 = is_json_context ();
0x00052786 cmp r0, 0 |
0x00052788 bne 0x5277c |
| } while (r0 != 0);
0x0005278a tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x0005278e beq 0x5277c | goto label_0;
| }
0x00052790 ldr r0, [pc, 0x24] |
0x00052792 mov r3, r8 | r3 = r8;
0x00052794 mov r2, r5 | r2 = r5;
0x00052796 mov r1, r7 | r1 = r7;
0x00052798 ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x0005279a pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0005279e ldr r0, [r0] | r0 = *(0x527b8);
0x000527a0 b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x000527a4 mov r1, r8 | r1 = r8;
0x000527a6 bl 0x523e4 | jsonw_int ();
0x000527aa movs r0, 0 | r0 = 0;
0x000527ac pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52a74 */
| #include <stdint.h>
|
; (fcn) sym.print_color_lluint () | void print_color_lluint (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052a74 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052a78 mov r4, r0 | r4 = r0;
0x00052a7a ldr r7, [pc, 0x60] |
0x00052a7c mov r6, r1 | r6 = r1;
0x00052a7e mov r5, r2 | r5 = r2;
0x00052a80 mov sl, r3 | sl = r3;
0x00052a82 ldrd r8, sb, [sp, 0x20] | __asm ("ldrd r8, sb, [arg_20h]");
0x00052a86 add r7, pc | r7 = 0xa5568;
0x00052a88 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052a8c cbz r0, 0x52aac | goto label_1;
| }
0x00052a8e tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x00052a92 beq 0x52aac | goto label_1;
| }
0x00052a94 ldr r3, [pc, 0x48] |
0x00052a96 mov r2, r8 | r2 = r8;
0x00052a98 add r3, pc | r3 = 0xa557c;
0x00052a9a ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00052a9c mov r3, sb | r3 = sb;
| if (r5 == 0) {
0x00052a9e cbz r5, 0x52ad0 | goto label_2;
| }
0x00052aa0 mov r1, r5 | r1 = r5;
0x00052aa2 bl 0x524ec | jsonw_lluint_field ();
| do {
| label_0:
0x00052aa6 movs r0, 0 | r0 = 0;
0x00052aa8 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x00052aac bl 0x5263c | r0 = is_json_context ();
0x00052ab0 cmp r0, 0 |
0x00052ab2 bne 0x52aa6 |
| } while (r0 != 0);
0x00052ab4 tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x00052ab8 beq 0x52aa6 | goto label_0;
| }
0x00052aba ldr r3, [pc, 0x28] | r3 = *(0x52ae6);
0x00052abc mov r2, sl | r2 = sl;
0x00052abe mov r1, r6 | r1 = r6;
0x00052ac0 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00052ac2 strd r8, sb, [sp, 0x20] | __asm ("strd r8, sb, [sp, 0x20]");
0x00052ac6 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052aca ldr r0, [r3] | r0 = *(0x52ae6);
0x00052acc b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x00052ad0 bl 0x523d8 | jsonw_lluint ();
0x00052ad4 movs r0, 0 | r0 = 0;
0x00052ad6 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52a00 */
| #include <stdint.h>
|
; (fcn) sym.print_color_luint () | void print_color_luint (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052a00 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052a04 mov r4, r0 | r4 = r0;
0x00052a06 ldr r6, [pc, 0x60] |
0x00052a08 mov r7, r1 | r7 = r1;
0x00052a0a mov sb, r2 | sb = r2;
0x00052a0c mov r5, r3 | r5 = r3;
0x00052a0e ldr.w r8, [sp, 0x20] | r8 = *(arg_20h);
0x00052a12 add r6, pc | r6 = 0xa5480;
0x00052a14 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052a18 cbz r0, 0x52a3a | goto label_1;
| }
0x00052a1a tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x00052a1e beq 0x52a3a | goto label_1;
| }
0x00052a20 ldr r3, [pc, 0x48] |
0x00052a22 add r3, pc | r3 = 0xa5492;
0x00052a24 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00052a26 cmp.w sb, 0 |
| if (sb == 0) {
0x00052a2a beq 0x52a5c | goto label_2;
| }
0x00052a2c mov r2, r8 | r2 = r8;
0x00052a2e mov r1, sb | r1 = sb;
0x00052a30 bl 0x524d4 | jsonw_luint_field ();
| do {
| label_0:
0x00052a34 movs r0, 0 | r0 = 0;
0x00052a36 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x00052a3a bl 0x5263c | r0 = is_json_context ();
0x00052a3e cmp r0, 0 |
0x00052a40 bne 0x52a34 |
| } while (r0 != 0);
0x00052a42 tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x00052a46 beq 0x52a34 | goto label_0;
| }
0x00052a48 ldr r0, [pc, 0x24] |
0x00052a4a mov r3, r8 | r3 = r8;
0x00052a4c mov r2, r5 | r2 = r5;
0x00052a4e mov r1, r7 | r1 = r7;
0x00052a50 ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x00052a52 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052a56 ldr r0, [r0] | r0 = *(0x52a70);
0x00052a58 b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x00052a5c mov r1, r8 | r1 = r8;
0x00052a5e bl 0x523c8 | jsonw_luint ();
0x00052a62 movs r0, 0 | r0 = 0;
0x00052a64 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52fb0 */
| #include <stdint.h>
|
; (fcn) sym.print_color_null () | void print_color_null (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052fb0 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052fb4 mov r4, r0 | r4 = r0;
0x00052fb6 ldr r6, [pc, 0x5c] |
0x00052fb8 mov r7, r1 | r7 = r1;
0x00052fba mov sb, r2 | sb = r2;
0x00052fbc mov r5, r3 | r5 = r3;
0x00052fbe ldr.w r8, [sp, 0x20] | r8 = *(arg_20h);
0x00052fc2 add r6, pc | r6 = 0xa5fdc;
0x00052fc4 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052fc8 cbz r0, 0x52fe8 | goto label_1;
| }
0x00052fca tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x00052fce beq 0x52fe8 | goto label_1;
| }
0x00052fd0 ldr r3, [pc, 0x44] |
0x00052fd2 add r3, pc | r3 = 0xa5fee;
0x00052fd4 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00052fd6 cmp.w sb, 0 |
| if (sb == 0) {
0x00052fda beq 0x5300a | goto label_2;
| }
0x00052fdc mov r1, sb | r1 = sb;
0x00052fde bl 0x5253c | jsonw_null_field ();
| do {
| label_0:
0x00052fe2 movs r0, 0 | r0 = 0;
0x00052fe4 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x00052fe8 bl 0x5263c | r0 = is_json_context ();
0x00052fec cmp r0, 0 |
0x00052fee bne 0x52fe2 |
| } while (r0 != 0);
0x00052ff0 tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x00052ff4 beq 0x52fe2 | goto label_0;
| }
0x00052ff6 ldr r0, [pc, 0x24] |
0x00052ff8 mov r3, r8 | r3 = r8;
0x00052ffa mov r2, r5 | r2 = r5;
0x00052ffc mov r1, r7 | r1 = r7;
0x00052ffe ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x00053000 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00053004 ldr r0, [r0] | r0 = *(0x5301e);
0x00053006 b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x0005300a bl 0x52364 | jsonw_null ();
0x0005300e movs r0, 0 | r0 = 0;
0x00053010 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52d68 */
| #include <stdint.h>
|
; (fcn) sym.print_color_on_off () | void print_color_on_off (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052d68 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052d6c mov r4, r0 | r4 = r0;
0x00052d6e ldrb.w r8, [sp, 0x20] | r8 = *(arg_20h);
0x00052d72 mov r7, r1 | r7 = r1;
0x00052d74 mov sb, r2 | sb = r2;
0x00052d76 mov r6, r3 | r6 = r3;
0x00052d78 ldr r5, [pc, 0x68] |
0x00052d7a add r5, pc | r5 = 0xa5b62;
0x00052d7c cmp.w r8, 0 |
| if (r8 != 0) {
0x00052d80 bne 0x52dd0 | goto label_2;
| }
0x00052d82 ldr.w sl, [pc, 0x64] | sl = *(0x00052de8);
0x00052d86 add sl, pc | sl += pc;
| label_1:
0x00052d88 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052d8c cbz r0, 0x52dae | goto label_3;
| }
0x00052d8e tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x00052d92 beq 0x52dae | goto label_3;
| }
0x00052d94 ldr r3, [pc, 0x54] |
0x00052d96 add r3, pc | r3 = 0xa5b86;
0x00052d98 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00052d9a cmp.w sb, 0 |
| if (sb == 0) {
0x00052d9e beq 0x52dd8 | goto label_4;
| }
0x00052da0 mov r2, r8 | r2 = r8;
0x00052da2 mov r1, sb | r1 = sb;
0x00052da4 bl 0x52418 | jsonw_bool_field ();
| do {
| label_0:
0x00052da8 movs r0, 0 | r0 = 0;
0x00052daa pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_3:
0x00052dae bl 0x5263c | r0 = is_json_context ();
0x00052db2 cmp r0, 0 |
0x00052db4 bne 0x52da8 |
| } while (r0 != 0);
0x00052db6 tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x00052dba beq 0x52da8 | goto label_0;
| }
0x00052dbc ldr r0, [pc, 0x30] |
0x00052dbe mov r3, sl | r3 = sl;
0x00052dc0 mov r2, r6 | r2 = r6;
0x00052dc2 mov r1, r7 | r1 = r7;
0x00052dc4 ldr r0, [r5, r0] | r0 = *((r5 + r0));
0x00052dc6 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052dca ldr r0, [r0] | r0 = *(0x52df0);
0x00052dcc b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x00052dd0 ldr.w sl, [pc, 0x20] |
0x00052dd4 add sl, pc | sl = 0xa5bcc;
0x00052dd6 b 0x52d88 | goto label_1;
| label_4:
0x00052dd8 mov r1, r8 | r1 = r8;
0x00052dda bl 0x52344 | jsonw_bool ();
0x00052dde movs r0, 0 | r0 = 0;
0x00052de0 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x527bc */
| #include <stdint.h>
|
; (fcn) sym.print_color_s64 () | void print_color_s64 (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000527bc push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000527c0 mov r4, r0 | r4 = r0;
0x000527c2 ldr r7, [pc, 0x60] |
0x000527c4 mov r6, r1 | r6 = r1;
0x000527c6 mov r5, r2 | r5 = r2;
0x000527c8 mov sl, r3 | sl = r3;
0x000527ca ldrd r8, sb, [sp, 0x20] | __asm ("ldrd r8, sb, [arg_20h]");
0x000527ce add r7, pc | r7 = 0xa4ff8;
0x000527d0 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x000527d4 cbz r0, 0x527f4 | goto label_1;
| }
0x000527d6 tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x000527da beq 0x527f4 | goto label_1;
| }
0x000527dc ldr r3, [pc, 0x48] |
0x000527de mov r2, r8 | r2 = r8;
0x000527e0 add r3, pc | r3 = 0xa500c;
0x000527e2 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x000527e4 mov r3, sb | r3 = sb;
| if (r5 == 0) {
0x000527e6 cbz r5, 0x52818 | goto label_2;
| }
0x000527e8 mov r1, r5 | r1 = r5;
0x000527ea bl 0x52520 | jsonw_s64_field ();
| do {
| label_0:
0x000527ee movs r0, 0 | r0 = 0;
0x000527f0 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x000527f4 bl 0x5263c | r0 = is_json_context ();
0x000527f8 cmp r0, 0 |
0x000527fa bne 0x527ee |
| } while (r0 != 0);
0x000527fc tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x00052800 beq 0x527ee | goto label_0;
| }
0x00052802 ldr r3, [pc, 0x28] | r3 = *(0x5282e);
0x00052804 mov r2, sl | r2 = sl;
0x00052806 mov r1, r6 | r1 = r6;
0x00052808 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0005280a strd r8, sb, [sp, 0x20] | __asm ("strd r8, sb, [sp, 0x20]");
0x0005280e pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052812 ldr r0, [r3] | r0 = *(0x5282e);
0x00052814 b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x00052818 bl 0x523f4 | jsonw_s64 ();
0x0005281c movs r0, 0 | r0 = 0;
0x0005281e pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52bd0 */
| #include <stdint.h>
|
; (fcn) sym.print_color_string () | void print_color_string (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052bd0 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052bd4 mov r4, r0 | r4 = r0;
0x00052bd6 ldr r6, [pc, 0x8c] |
0x00052bd8 mov r7, r1 | r7 = r1;
0x00052bda mov sb, r2 | sb = r2;
0x00052bdc mov r5, r3 | r5 = r3;
0x00052bde ldr.w r8, [sp, 0x20] | r8 = *(arg_20h);
0x00052be2 add r6, pc | r6 = 0xa584c;
0x00052be4 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052be8 cbz r0, 0x52c26 | goto label_1;
| }
0x00052bea tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x00052bee beq 0x52c26 | goto label_1;
| }
0x00052bf0 subs.w r2, sb, 0 | r2 = sb - 0;
0x00052bf4 ldr r3, [pc, 0x70] |
0x00052bf6 it ne |
| if (r2 == sb) {
0x00052bf8 movne r2, 1 | r2 = 1;
| }
0x00052bfa cmp.w r8, 0 |
0x00052bfe it ne |
| if (r8 == 0) {
0x00052c00 movne r2, 0 | r2 = 0;
| }
0x00052c02 add r3, pc | r3 = 0xa586e;
0x00052c04 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
| if (r2 != 0) {
0x00052c06 cbnz r2, 0x52c56 | goto label_2;
| }
0x00052c08 clz r3, sb | r3 &= sb;
0x00052c0c cmp.w r8, 0 |
0x00052c10 lsr.w r3, r3, 5 | r3 >>= 5;
0x00052c14 it eq |
| if (r8 != 0) {
0x00052c16 moveq r3, 0 | r3 = 0;
| }
| if (r3 == 0) {
0x00052c18 cbz r3, 0x52c48 | goto label_3;
| }
0x00052c1a mov r1, r8 | r1 = r8;
0x00052c1c bl 0x52324 | jsonw_string ();
| do {
| label_0:
0x00052c20 movs r0, 0 | r0 = 0;
0x00052c22 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x00052c26 bl 0x5263c | r0 = is_json_context ();
0x00052c2a cmp r0, 0 |
0x00052c2c bne 0x52c20 |
| } while (r0 != 0);
0x00052c2e tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x00052c32 beq 0x52c20 | goto label_0;
| }
0x00052c34 ldr r0, [pc, 0x34] |
0x00052c36 mov r3, r8 | r3 = r8;
0x00052c38 mov r2, r5 | r2 = r5;
0x00052c3a mov r1, r7 | r1 = r7;
0x00052c3c ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x00052c3e pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052c42 ldr r0, [r0] | r0 = *(0x52c6c);
0x00052c44 b.w 0x53348 | void (*0x53348)() ();
| label_3:
0x00052c48 mov r2, r8 | r2 = r8;
0x00052c4a mov r1, sb | r1 = sb;
0x00052c4c bl 0x52400 | jsonw_string_field ();
0x00052c50 movs r0, 0 | r0 = 0;
0x00052c52 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_2:
0x00052c56 mov r1, sb | r1 = sb;
0x00052c58 bl 0x52164 | jsonw_name ();
0x00052c5c movs r0, 0 | r0 = 0;
0x00052c5e pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x5298c */
| #include <stdint.h>
|
; (fcn) sym.print_color_u64 () | void print_color_u64 (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0005298c push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00052990 mov r4, r0 | r4 = r0;
0x00052992 ldr r7, [pc, 0x60] |
0x00052994 mov r6, r1 | r6 = r1;
0x00052996 mov r5, r2 | r5 = r2;
0x00052998 mov sl, r3 | sl = r3;
0x0005299a ldrd r8, sb, [sp, 0x20] | __asm ("ldrd r8, sb, [arg_20h]");
0x0005299e add r7, pc | r7 = 0xa5398;
0x000529a0 bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x000529a4 cbz r0, 0x529c4 | goto label_1;
| }
0x000529a6 tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x000529aa beq 0x529c4 | goto label_1;
| }
0x000529ac ldr r3, [pc, 0x48] |
0x000529ae mov r2, r8 | r2 = r8;
0x000529b0 add r3, pc | r3 = 0xa53ac;
0x000529b2 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x000529b4 mov r3, sb | r3 = sb;
| if (r5 == 0) {
0x000529b6 cbz r5, 0x529e8 | goto label_2;
| }
0x000529b8 mov r1, r5 | r1 = r5;
0x000529ba bl 0x5246c | jsonw_u64_field ();
| do {
| label_0:
0x000529be movs r0, 0 | r0 = 0;
0x000529c0 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x000529c4 bl 0x5263c | r0 = is_json_context ();
0x000529c8 cmp r0, 0 |
0x000529ca bne 0x529be |
| } while (r0 != 0);
0x000529cc tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x000529d0 beq 0x529be | goto label_0;
| }
0x000529d2 ldr r3, [pc, 0x28] | r3 = *(0x529fe);
0x000529d4 mov r2, sl | r2 = sl;
0x000529d6 mov r1, r6 | r1 = r6;
0x000529d8 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x000529da strd r8, sb, [sp, 0x20] | __asm ("strd r8, sb, [sp, 0x20]");
0x000529de pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000529e2 ldr r0, [r3] | r0 = *(0x529fe);
0x000529e4 b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x000529e8 bl 0x523b0 | jsonw_u64 ();
0x000529ec movs r0, 0 | r0 = 0;
0x000529ee pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x52918 */
| #include <stdint.h>
|
; (fcn) sym.print_color_uint () | void print_color_uint (int16_t arg_20h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00052918 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0005291c mov r4, r0 | r4 = r0;
0x0005291e ldr r6, [pc, 0x60] |
0x00052920 mov r7, r1 | r7 = r1;
0x00052922 mov sb, r2 | sb = r2;
0x00052924 mov r5, r3 | r5 = r3;
0x00052926 ldr.w r8, [sp, 0x20] | r8 = *(arg_20h);
0x00052928 strh r0, [r4] | *(r4) = r0;
0x0005292a add r6, pc | r6 = 0xa52b0;
0x0005292c bl 0x5263c | r0 = is_json_context ();
| if (r0 == 0) {
0x00052930 cbz r0, 0x52952 | goto label_1;
| }
0x00052932 tst.w r4, 6 |
| if ((r4 & 6) == 0) {
0x00052936 beq 0x52952 | goto label_1;
| }
0x00052938 ldr r3, [pc, 0x48] |
0x0005293a add r3, pc | r3 = 0xa52c2;
0x0005293c ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x0005293e cmp.w sb, 0 |
| if (sb == 0) {
0x00052942 beq 0x52974 | goto label_2;
| }
0x00052944 mov r2, r8 | r2 = r8;
0x00052946 mov r1, sb | r1 = sb;
0x00052948 bl 0x52454 | jsonw_uint_field ();
| do {
| label_0:
0x0005294c movs r0, 0 | r0 = 0;
0x0005294e pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_1:
0x00052952 bl 0x5263c | r0 = is_json_context ();
0x00052956 cmp r0, 0 |
0x00052958 bne 0x5294c |
| } while (r0 != 0);
0x0005295a tst.w r4, 5 |
| if ((r4 & 5) == 0) {
0x0005295e beq 0x5294c | goto label_0;
| }
0x00052960 ldr r0, [pc, 0x24] |
0x00052962 mov r3, r8 | r3 = r8;
0x00052964 mov r2, r5 | r2 = r5;
0x00052966 mov r1, r7 | r1 = r7;
0x00052968 ldr r0, [r6, r0] | r0 = *((r6 + r0));
0x0005296a pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x0005296e ldr r0, [r0] | r0 = *(0x52988);
0x00052970 b.w 0x53348 | void (*0x53348)() ();
| label_2:
0x00052974 mov r1, r8 | r1 = r8;
0x00052976 bl 0x523a0 | jsonw_uint ();
0x0005297a movs r0, 0 | r0 = 0;
0x0005297c pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/ip.iproute2 @ 0x128a8 */
| #include <stdint.h>
|
; (fcn) sym.print_rta_ifidx () | void print_rta_ifidx (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x000128a8 push {r4, r5, r6, r7, lr} |
0x000128aa mov r5, r0 | r5 = r0;
0x000128ac sub sp, 0xc |
0x000128ae mov r0, r1 | r0 = r1;
0x000128b0 mov r7, r2 | r7 = r2;
0x000128b2 bl 0x51474 | r0 = ll_index_to_name ();
0x000128b6 mov r6, r0 | r6 = r0;
0x000128b8 bl 0x5263c | r0 = is_json_context ();
| if (r0 != 0) {
0x000128bc cbz r0, 0x128d0 |
0x000128be movs r3, 0 | r3 = 0;
0x000128c0 mov r2, r7 | r2 = r7;
0x000128c2 movs r1, 6 | r1 = 6;
0x000128c4 str r6, [sp] | *(sp) = r6;
0x000128c6 movs r0, 2 | r0 = 2;
0x000128c8 bl 0x52bd0 | print_color_string ();
0x000128cc add sp, 0xc |
0x000128ce pop {r4, r5, r6, r7, pc} |
| }
0x000128d0 ldr r2, [pc, 0x20] |
0x000128d2 mov r4, r0 | r4 = r0;
0x000128d4 mov r3, r7 | r3 = r7;
0x000128d6 movs r1, 1 | r1 = 1;
0x000128d8 mov r0, r5 | r0 = r5;
0x000128da add r2, pc | r2 = 0x251d2;
0x000128dc mov r7, r2 | r7 = r2;
0x000128de blx 0x9514 | fcn_00009514 ();
0x000128e2 mov r3, r6 | r3 = r6;
0x000128e4 mov r2, r7 | r2 = r7;
0x000128e6 mov r1, r4 | r1 = r4;
0x000128e8 mov r0, r5 | r0 = r5;
0x000128ea add sp, 0xc |
0x000128ec pop.w {r4, r5, r6, r7, lr} |
0x000128f0 b.w 0x53348 | return void (*0x53348)() ();
| }
[*] Function fprintf used 2 times ip.iproute2