[*] Binary protection state of tc.iproute2
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of tc.iproute2
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/tc.iproute2 @ 0x4c294 */
| #include <stdint.h>
|
; (fcn) fcn.0004c294 () | void fcn_0004c294 () {
0x0004c294 lui gp, 3 |
0x0004c298 addiu gp, gp, 0x44fc |
0x0004c29c addu gp, gp, t9 | gp += t9;
0x0004c2a0 lw v0, -0x7a1c(gp) | v0 = *((gp - 7815));
0x0004c2a4 addiu sp, sp, -0x2068 |
0x0004c2a8 lw t9, -0x7b0c(gp) | t9 = sym.imp.memset;
0x0004c2ac sw s1, 0x2044(sp) | *(arg_2044h) = s1;
0x0004c2b0 sw v0, 0x30(sp) | *(arg_30h) = v0;
0x0004c2b4 lw s1, -0x7fd0(gp) | s1 = *(gp);
0x0004c2b8 lw v0, (v0) | v0 = *(v0);
0x0004c2bc sw s0, 0x2040(sp) | *(arg_2040h) = s0;
0x0004c2c0 addiu s0, sp, 0x3c | s0 = sp + 0x3c;
0x0004c2c4 sw gp, 0x18(sp) | *(arg_18h) = gp;
0x0004c2c8 sw ra, 0x2064(sp) | *(arg_2064h) = ra;
0x0004c2cc addiu a2, zero, 0x1000 | a2 = 0x1000;
0x0004c2d0 move a1, zero | a1 = 0;
0x0004c2d4 move a0, s0 | a0 = s0;
0x0004c2d8 sw fp, 0x2060(sp) | *(arg_2060h) = fp;
0x0004c2dc sw s7, 0x205c(sp) | *(arg_205ch) = s7;
0x0004c2e0 sw s6, 0x2058(sp) | *(arg_2058h) = s6;
0x0004c2e4 sw s5, 0x2054(sp) | *(arg_2054h) = s5;
0x0004c2e8 sw s4, 0x2050(sp) | *(arg_2050h) = s4;
0x0004c2ec sw s3, 0x204c(sp) | *(arg_204ch) = s3;
0x0004c2f0 sw s2, 0x2048(sp) | *(arg_2048h) = s2;
0x0004c2f4 sw v0, 0x203c(sp) | *(arg_203ch) = v0;
0x0004c2f8 sw s1, 0x20(sp) | *(arg_20h) = s1;
0x0004c2fc jalr t9 | t9 ();
0x0004c300 nop |
0x0004c304 lw gp, 0x18(sp) | gp = *(arg_18h);
| /* str._etc_iproute2_bpf_pinning */
0x0004c308 addiu a0, s1, 0x2554 | a0 = s1 + 0x2554;
0x0004c30c lw a1, -0x7fd0(gp) | a1 = *(gp);
0x0004c310 lw t9, -0x7b78(gp) | t9 = sym.imp.fopen64;
0x0004c314 addiu a1, a1, -0x20bc | a1 += -0x20bc;
0x0004c318 jalr t9 | t9 ();
0x0004c31c lw gp, 0x18(sp) | gp = *(arg_18h);
| if (v0 == 0) {
0x0004c320 beqz v0, 0x4c4b0 | goto label_5;
| }
0x0004c324 move s2, v0 | s2 = v0;
0x0004c328 lw s5, -0x7f88(gp) | s5 = *((gp - 8162));
0x0004c32c lw v0, -0x7fd0(gp) | v0 = *(gp);
0x0004c330 lw s3, -0x7fd0(gp) | s3 = *(gp);
0x0004c334 sw v0, 0x28(sp) | *(arg_28h) = v0;
0x0004c338 addiu v0, s5, -0x2970 | v0 = s5 + -0x2970;
0x0004c33c sw v0, 0x2c(sp) | *(arg_2ch) = v0;
0x0004c340 lw v0, -0x7fd0(gp) | v0 = *(gp);
0x0004c344 addiu s7, sp, 0x103c | s7 = sp + 0x103c;
| /* str.No_memory_left_for_db_entry__n */
0x0004c348 addiu v0, v0, 0x259c | v0 += 0x259c;
0x0004c34c sw v0, 0x34(sp) | *(arg_34h) = v0;
0x0004c350 lw v0, -0x7fd0(gp) | v0 = *(gp);
| /* str._i__s_n */
0x0004c354 addiu s3, s3, 0x25bc | s3 += 0x25bc;
0x0004c358 sw v0, 0x24(sp) | *(arg_24h) = v0;
| label_4:
0x0004c35c addiu s4, zero, 0x20 | s4 = 0x20;
0x0004c360 addiu s6, zero, 9 | s6 = 9;
0x0004c364 addiu s5, zero, 0x23 | s5 = 0x23;
0x0004c368 addiu s1, zero, 0xa | s1 = 0xa;
0x0004c36c lw t9, -0x7a20(gp) | t9 = sym.get_filter_kind;
| label_1:
0x0004c370 move a2, s2 | a2 = s2;
| label_2:
0x0004c374 addiu a1, zero, 0x1000 | a1 = 0x1000;
| label_3:
0x0004c378 move a0, s7 | a0 = s7;
0x0004c37c jalr t9 | t9 ();
0x0004c380 lw gp, 0x18(sp) | gp = *(arg_18h);
| if (v0 == 0) {
0x0004c384 beqz v0, 0x4c4a0 | goto label_6;
| }
0x0004c388 move fp, s7 | fp = s7;
| do {
| label_0:
0x0004c38c lb v0, (fp) | v0 = *(fp);
0x0004c390 beql v0, s4, 0x4c38c |
| } while (v0 == s4);
0x0004c394 addiu fp, fp, 1 | fp++;
| if (v0 == s6) {
0x0004c398 bne v0, s6, 0x4c3a8 |
0x0004c39c nop |
0x0004c3a0 addiu fp, fp, 1 | fp++;
0x0004c3a4 b 0x4c38c | goto label_0;
| }
0x0004c3a8 lw t9, -0x7a20(gp) | t9 = sym.get_filter_kind;
| if (v0 == s5) {
0x0004c3ac beq v0, s5, 0x4c370 | goto label_1;
| }
0x0004c3b0 move a2, s2 | a2 = s2;
| if (v0 == s1) {
0x0004c3b4 beq v0, s1, 0x4c374 | goto label_2;
| }
0x0004c3b8 addiu a1, zero, 0x1000 | a1 = 0x1000;
| if (v0 == 0) {
0x0004c3bc beqz v0, 0x4c378 | goto label_3;
| }
0x0004c3c0 lw t9, -0x7b64(gp) | t9 = sym.imp.sscanf;
0x0004c3c4 addiu s1, sp, 0x38 | s1 = sp + 0x38;
0x0004c3c8 move a3, s0 | a3 = s0;
0x0004c3cc move a2, s1 | a2 = s1;
0x0004c3d0 move a1, s3 | a1 = s3;
0x0004c3d4 move a0, fp | a0 = fp;
0x0004c3d8 jalr t9 | t9 ();
0x0004c3dc addiu s5, zero, 2 | s5 = 2;
0x0004c3e0 lw gp, 0x18(sp) | gp = *(arg_18h);
| if (v0 != s5) {
0x0004c3e4 beq v0, s5, 0x4c40c |
0x0004c3e8 lw v0, 0x28(sp) | v0 = *(arg_28h);
0x0004c3ec lw t9, -0x7b64(gp) | t9 = sym.imp.sscanf;
0x0004c3f0 move a3, s0 | a3 = s0;
0x0004c3f4 move a2, s1 | a2 = s1;
0x0004c3f8 addiu a1, v0, 0x25c4 | a1 = v0 + 0x25c4;
0x0004c3fc move a0, fp | a0 = fp;
0x0004c400 jalr t9 | t9 ();
0x0004c404 lw gp, 0x18(sp) | gp = *(arg_18h);
| if (v0 != s5) {
0x0004c408 bne v0, s5, 0x4c4f0 | goto label_7;
| }
| }
0x0004c40c lw s1, 0x38(sp) | s1 = *(arg_38h);
0x0004c410 sltiu v0, s1, 3 | v0 = (s1 < 3) ? 1 : 0;
0x0004c414 lw v0, -0x79fc(gp) | v0 = *((gp - 7807));
| if (v0 == 0) {
0x0004c418 bnez v0, 0x4c474 |
0x0004c41c lw t9, -0x7aac(gp) | t9 = sym.imp.malloc;
0x0004c420 addiu a0, zero, 0xc | a0 = 0xc;
0x0004c424 jalr t9 | t9 ();
0x0004c428 move s4, v0 | s4 = v0;
0x0004c42c lw gp, 0x18(sp) | gp = *(arg_18h);
| if (v0 == 0) {
0x0004c430 beqz v0, 0x4c548 | goto label_8;
| }
0x0004c434 lw t9, -0x7a0c(gp) | t9 = sym.imp.strdup;
0x0004c438 sw s1, (v0) | *(v0) = s1;
0x0004c43c move a0, s0 | a0 = s0;
0x0004c440 jalr t9 | t9 ();
0x0004c444 lw gp, 0x18(sp) | gp = *(arg_18h);
0x0004c448 sw v0, 4(s4) | *((s4 + 1)) = v0;
| if (v0 == 0) {
0x0004c44c beqz v0, 0x4c56c | goto label_9;
| }
0x0004c450 andi s1, s1, 0xff | s1 &= 0xff;
0x0004c454 lw v0, 0x2c(sp) | v0 = *(arg_2ch);
0x0004c458 addiu s1, s1, 0x240 | s1 += 0x240;
0x0004c45c sll s1, s1, 2 | s1 <<= 2;
0x0004c460 addu s1, s1, v0 | s1 += v0;
0x0004c464 lw v0, (s1) | v0 = *(s1);
0x0004c468 sw s4, (s1) | *(s1) = s4;
0x0004c46c sw v0, 8(s4) | *((s4 + 2)) = v0;
0x0004c470 b 0x4c35c | goto label_4;
| }
0x0004c474 sw s1, 0x10(sp) | *(arg_10h) = s1;
0x0004c478 lw t9, -0x7b90(gp) | t9 = sym.imp.__fprintf_chk;
0x0004c47c lw a0, (v0) | a0 = *(v0);
0x0004c480 lw v0, 0x20(sp) | v0 = *(arg_20h);
0x0004c484 addiu a1, zero, 1 | a1 = 1;
0x0004c488 addiu a3, v0, 0x2554 | a3 = v0 + 0x2554;
0x0004c48c lw v0, 0x24(sp) | v0 = *(arg_24h);
0x0004c490 addiu a2, v0, 0x2570 | a2 = v0 + 0x2570;
0x0004c494 jalr t9 | t9 ();
0x0004c498 lw gp, 0x18(sp) | gp = *(arg_18h);
0x0004c49c b 0x4c35c | goto label_4;
| label_6:
0x0004c4a0 lw t9, -0x7b6c(gp) | t9 = sym.imp.fclose;
0x0004c4a4 move a0, s2 | a0 = s2;
0x0004c4a8 jalr t9 | t9 ();
0x0004c4ac lw gp, 0x18(sp) | gp = *(arg_18h);
| do {
| label_5:
0x0004c4b0 lw v0, 0x30(sp) | v0 = *(arg_30h);
0x0004c4b4 lw v1, 0x203c(sp) | v1 = *(arg_203ch);
0x0004c4b8 lw v0, (v0) | v0 = *(v0);
0x0004c4bc lw ra, 0x2064(sp) | ra = *(arg_2064h);
| if (v1 != v0) {
0x0004c4c0 bne v1, v0, 0x4c5a0 | goto label_10;
| }
0x0004c4c4 lw fp, 0x2060(sp) | fp = *(arg_2060h);
0x0004c4c8 lw s7, 0x205c(sp) | s7 = *(arg_205ch);
0x0004c4cc lw s6, 0x2058(sp) | s6 = *(arg_2058h);
0x0004c4d0 lw s5, 0x2054(sp) | s5 = *(arg_2054h);
0x0004c4d4 lw s4, 0x2050(sp) | s4 = *(arg_2050h);
0x0004c4d8 lw s3, 0x204c(sp) | s3 = *(arg_204ch);
0x0004c4dc lw s2, 0x2048(sp) | s2 = *(arg_2048h);
0x0004c4e0 lw s1, 0x2044(sp) | s1 = *(arg_2044h);
0x0004c4e4 lw s0, 0x2040(sp) | s0 = *(arg_2040h);
0x0004c4e8 addiu sp, sp, 0x2068 |
0x0004c4ec jr ra | return v0;
| label_7:
0x0004c4f0 lw t9, -0x7b44(gp) | t9 = sym.imp.__strcpy_chk
0x0004c4f4 addiu a2, zero, 0x1000 | a2 = 0x1000;
0x0004c4f8 move a1, fp | a1 = fp;
0x0004c4fc move a0, s0 | a0 = s0;
0x0004c500 jalr t9 | t9 ();
0x0004c504 lw gp, 0x18(sp) | gp = *(arg_18h);
0x0004c508 addiu a1, zero, 1 | a1 = 1;
0x0004c50c lw v0, -0x79fc(gp) | v0 = *((gp - 7807));
0x0004c510 lw a2, -0x7fd0(gp) | a2 = *(gp);
0x0004c514 lw t9, -0x7b90(gp) | t9 = sym.imp.__fprintf_chk;
0x0004c518 lw a0, (v0) | a0 = *(v0);
0x0004c51c lw v0, 0x20(sp) | v0 = *(arg_20h);
| /* str.Database__s_is_corrupted_at:__s_n */
0x0004c520 addiu a2, a2, 0x25cc | a2 += 0x25cc;
0x0004c524 addiu a3, v0, 0x2554 | a3 = v0 + 0x2554;
0x0004c528 sw s0, 0x10(sp) | *(arg_10h) = s0;
0x0004c52c jalr t9 | t9 ();
0x0004c530 lw gp, 0x18(sp) | gp = *(arg_18h);
0x0004c534 lw t9, -0x7b6c(gp) | t9 = sym.imp.fclose;
0x0004c538 move a0, s2 | a0 = s2;
0x0004c53c jalr t9 | t9 ();
0x0004c540 lw gp, 0x18(sp) | gp = *(arg_18h);
0x0004c544 b 0x4c4b0 |
| } while (1);
| label_8:
0x0004c548 lw v0, -0x79fc(gp) | v0 = *((gp - 7807));
0x0004c54c lw t9, -0x7a7c(gp) | t9 = sym.imp.fwrite;
0x0004c550 lw a0, 0x34(sp) | a0 = *(arg_34h);
0x0004c554 lw a3, (v0) | a3 = *(v0);
0x0004c558 addiu a2, zero, 0x1d | a2 = 0x1d;
0x0004c55c addiu a1, zero, 1 | a1 = 1;
0x0004c560 jalr t9 | t9 ();
0x0004c564 lw gp, 0x18(sp) | gp = *(arg_18h);
0x0004c568 b 0x4c35c | goto label_4;
| label_9:
0x0004c56c lw v0, -0x79fc(gp) | v0 = *((gp - 7807));
0x0004c570 lw t9, -0x7a7c(gp) | t9 = sym.imp.fwrite;
0x0004c574 lw a0, 0x34(sp) | a0 = *(arg_34h);
0x0004c578 lw a3, (v0) | a3 = *(v0);
0x0004c57c addiu a2, zero, 0x1d | a2 = 0x1d;
0x0004c580 addiu a1, zero, 1 | a1 = 1;
0x0004c584 jalr t9 | t9 ();
0x0004c588 lw gp, 0x18(sp) | gp = *(arg_18h);
0x0004c58c lw t9, -0x7a08(gp) | t9 = sym.imp.free;
0x0004c590 move a0, s4 | a0 = s4;
0x0004c594 jalr t9 | t9 ();
0x0004c598 lw gp, 0x18(sp) | gp = *(arg_18h);
0x0004c59c b 0x4c35c | goto label_4;
| label_10:
0x0004c5a0 lw t9, -0x7a48(gp) | t9 = sym.imp.__stack_chk_fail;
0x0004c5a4 jalr t9 | t9 ();
0x0004c5a8 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/tc.iproute2 @ 0x4b088 */
| #include <stdint.h>
|
; (fcn) sym.db_names_load () | void db_names_load () {
0x0004b088 lui gp, 3 |
0x0004b08c addiu gp, gp, 0x5708 |
0x0004b090 addu gp, gp, t9 | gp += t9;
0x0004b094 lw v0, -0x7a1c(gp) | v0 = *((gp - 7815));
0x0004b098 addiu sp, sp, -0x478 |
0x0004b09c lw t9, -0x7b0c(gp) | t9 = sym.imp.memset;
0x0004b0a0 sw v0, 0x34(sp) | *(var_34h) = v0;
0x0004b0a4 lw v0, (v0) | v0 = *(v0);
0x0004b0a8 sw s0, 0x450(sp) | *(var_450h) = s0;
0x0004b0ac addiu s0, sp, 0x4c | s0 = sp + 0x4c;
0x0004b0b0 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0004b0b4 sw ra, 0x474(sp) | *(var_474h) = ra;
0x0004b0b8 sw s4, 0x460(sp) | *(var_460h) = s4;
0x0004b0bc sw s1, 0x454(sp) | *(var_454h) = s1;
0x0004b0c0 sw a1, 0x3c(sp) | *(var_3ch) = a1;
0x0004b0c4 move s1, a1 | s1 = a1;
0x0004b0c8 addiu a2, zero, 0x200 | a2 = aav.0x00000200;
0x0004b0cc move a1, zero | a1 = 0;
0x0004b0d0 sw fp, 0x470(sp) | *(var_470h) = fp;
0x0004b0d4 sw s7, 0x46c(sp) | *(var_46ch) = s7;
0x0004b0d8 sw s6, 0x468(sp) | *(var_468h) = s6;
0x0004b0dc sw s5, 0x464(sp) | *(var_464h) = s5;
0x0004b0e0 sw s3, 0x45c(sp) | *(var_45ch) = s3;
0x0004b0e4 sw s2, 0x458(sp) | *(var_458h) = s2;
0x0004b0e8 move s4, a0 | s4 = a0;
0x0004b0ec sw v0, 0x44c(sp) | *(var_44ch) = v0;
0x0004b0f0 move a0, s0 | a0 = s0;
0x0004b0f4 jalr t9 | t9 ();
0x0004b0f8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0004b0fc move a0, s1 | a0 = s1;
0x0004b100 lw a1, -0x7fd0(gp) | a1 = *(gp);
0x0004b104 lw t9, -0x7b78(gp) | t9 = sym.imp.fopen64;
0x0004b108 addiu a1, a1, -0x20bc | a1 += -0x20bc;
0x0004b10c jalr t9 | t9 ();
0x0004b110 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0004b114 beqz v0, 0x4b3e4 | goto label_9;
| }
0x0004b118 lw s5, -0x7fd0(gp) | s5 = *(gp);
0x0004b11c lw s6, -0x7fd0(gp) | s6 = *(gp);
0x0004b120 move s3, v0 | s3 = v0;
| /* str._x:_x__s_n */
0x0004b124 addiu v0, s5, 0x2300 | v0 = s5 + 0x2300;
0x0004b128 sw v0, 0x24(sp) | *(var_24h_2) = v0;
| /* str._x:_x__s_ */
0x0004b12c addiu v0, s6, 0x230c | v0 = s6 + 0x230c;
0x0004b130 sw v0, 0x28(sp) | *(var_28h_2) = v0;
0x0004b134 lw v0, -0x7fd0(gp) | v0 = *(gp);
0x0004b138 addiu s7, sp, 0x24c | s7 = sp + aav.0x0000024c;
0x0004b13c sw v0, 0x2c(sp) | *(var_2ch_2) = v0;
0x0004b140 lw v0, -0x7fd0(gp) | v0 = *(gp);
| /* str.0x_x__s_ */
0x0004b144 addiu v0, v0, 0x1dc4 | v0 += 0x1dc4;
0x0004b148 sw v0, 0x30(sp) | *(var_30h) = v0;
0x0004b14c lw v0, -0x7fd0(gp) | v0 = *(gp);
0x0004b150 sw v0, 0x38(sp) | *(var_38h) = v0;
| label_4:
0x0004b154 addiu s5, zero, 0x20 | s5 = 0x20;
0x0004b158 addiu s6, zero, 9 | s6 = 9;
0x0004b15c addiu s2, zero, 0x23 | s2 = 0x23;
0x0004b160 addiu s1, zero, 0xa | s1 = 0xa;
0x0004b164 lw t9, -0x7a20(gp) | t9 = sym.get_filter_kind;
| label_1:
0x0004b168 move a2, s3 | a2 = s3;
| label_2:
0x0004b16c addiu a1, zero, 0x200 | a1 = aav.0x00000200;
| label_3:
0x0004b170 move a0, s7 | a0 = s7;
0x0004b174 jalr t9 | t9 ();
0x0004b178 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0004b17c beqz v0, 0x4b2fc | goto label_10;
| }
0x0004b180 move fp, s7 | fp = s7;
| do {
| label_0:
0x0004b184 lb v0, (fp) | v0 = *(fp);
0x0004b188 beql v0, s5, 0x4b184 |
| } while (v0 == s5);
0x0004b18c addiu fp, fp, 1 | fp++;
| if (v0 == s6) {
0x0004b190 bne v0, s6, 0x4b1a0 |
0x0004b194 nop |
0x0004b198 addiu fp, fp, 1 | fp++;
0x0004b19c b 0x4b184 | goto label_0;
| }
0x0004b1a0 lw t9, -0x7a20(gp) | t9 = sym.get_filter_kind;
| if (v0 == s2) {
0x0004b1a4 beq v0, s2, 0x4b168 | goto label_1;
| }
0x0004b1a8 move a2, s3 | a2 = s3;
| if (v0 == s1) {
0x0004b1ac beq v0, s1, 0x4b16c | goto label_2;
| }
0x0004b1b0 addiu a1, zero, 0x200 | a1 = aav.0x00000200;
| if (v0 == 0) {
0x0004b1b4 beqz v0, 0x4b170 | goto label_3;
| }
0x0004b1b8 lw t9, -0x7b64(gp) | t9 = sym.imp.sscanf;
0x0004b1bc addiu s2, sp, 0x44 | s2 = sp + 0x44;
0x0004b1c0 addiu s1, sp, 0x48 | s1 = sp + 0x48;
0x0004b1c4 lw a1, 0x24(sp) | a1 = *(var_24h_2);
0x0004b1c8 sw s0, 0x10(sp) | *(var_10h_2) = s0;
0x0004b1cc move a3, s2 | a3 = s2;
0x0004b1d0 move a2, s1 | a2 = s1;
0x0004b1d4 move a0, fp | a0 = fp;
0x0004b1d8 jalr t9 | t9 ();
0x0004b1dc addiu s6, zero, 3 | s6 = 3;
0x0004b1e0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == s6) {
0x0004b1e4 beq v0, s6, 0x4b2e4 | goto label_11;
| }
0x0004b1e8 lw t9, -0x7b64(gp) | t9 = sym.imp.sscanf;
0x0004b1ec lw a1, 0x28(sp) | a1 = *(var_28h_2);
0x0004b1f0 sw s0, 0x10(sp) | *(var_10h_2) = s0;
0x0004b1f4 move a3, s2 | a3 = s2;
0x0004b1f8 move a2, s1 | a2 = s1;
0x0004b1fc move a0, fp | a0 = fp;
0x0004b200 jalr t9 | t9 ();
0x0004b204 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == s6) {
0x0004b208 beq v0, s6, 0x4b2e4 | goto label_11;
| }
0x0004b20c lw v0, 0x2c(sp) | v0 = *(var_2ch_2);
0x0004b210 lw t9, -0x7b64(gp) | t9 = sym.imp.sscanf;
0x0004b214 addiu s1, sp, 0x40 | s1 = sp + 0x40;
0x0004b218 move a3, s0 | a3 = s0;
0x0004b21c move a2, s1 | a2 = s1;
0x0004b220 addiu a1, v0, 0x1db8 | a1 = v0 + 0x1db8;
0x0004b224 move a0, fp | a0 = fp;
0x0004b228 jalr t9 | t9 ();
0x0004b22c addiu s2, zero, 2 | s2 = 2;
0x0004b230 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != s2) {
0x0004b234 beq v0, s2, 0x4b27c |
0x0004b238 lw t9, -0x7b64(gp) | t9 = sym.imp.sscanf;
0x0004b23c lw a1, 0x30(sp) | a1 = *(var_30h);
0x0004b240 move a3, s0 | a3 = s0;
0x0004b244 move a2, s1 | a2 = s1;
0x0004b248 move a0, fp | a0 = fp;
0x0004b24c jalr t9 | t9 ();
0x0004b250 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == s2) {
0x0004b254 beq v0, s2, 0x4b27c | goto label_6;
| }
0x0004b258 lw v0, 0x38(sp) | v0 = *(var_38h);
0x0004b25c lw t9, -0x7b64(gp) | t9 = sym.imp.sscanf;
0x0004b260 move a3, s0 | a3 = s0;
0x0004b264 move a2, s1 | a2 = s1;
0x0004b268 addiu a1, v0, 0x1dd0 | a1 = v0 + 0x1dd0;
0x0004b26c move a0, fp | a0 = fp;
0x0004b270 jalr t9 | t9 ();
0x0004b274 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != s2) {
0x0004b278 bne v0, s2, 0x4b354 | goto label_12;
| }
| }
| label_6:
0x0004b27c lw v0, 0x40(sp) | v0 = *(var_40h);
| label_5:
0x0004b280 lw t9, -0x7aac(gp) | t9 = sym.imp.malloc;
| if (v0 < 0) {
0x0004b284 bltz v0, 0x4b154 | goto label_4;
| }
0x0004b288 addiu a0, zero, 0xc | a0 = 0xc;
0x0004b28c jalr t9 | t9 ();
0x0004b290 move s1, v0 | s1 = v0;
0x0004b294 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0004b298 beqz v0, 0x4b3c4 | goto label_13;
| }
0x0004b29c lw t9, -0x7a0c(gp) | t9 = sym.imp.strdup;
0x0004b2a0 move a0, s0 | a0 = s0;
0x0004b2a4 jalr t9 | t9 ();
0x0004b2a8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0004b2ac sw v0, 8(s1) | *((s1 + 2)) = v0;
| if (v0 == 0) {
0x0004b2b0 beqz v0, 0x4b3cc | goto label_14;
| }
0x0004b2b4 lw v0, (s4) | v0 = *(s4);
0x0004b2b8 lw a0, 0x40(sp) | a0 = *(var_40h);
0x0004b2bc addiu v0, v0, -1 | v0 += -1;
0x0004b2c0 lw v1, 8(s4) | v1 = *((s4 + 2));
0x0004b2c4 and v0, v0, a0 | v0 &= a0;
0x0004b2c8 sll v0, v0, 2 | v0 <<= 2;
0x0004b2cc addu v0, v1, v0 | v0 = v1 + v0;
0x0004b2d0 sw a0, 4(s1) | *((s1 + 1)) = a0;
0x0004b2d4 lw v1, (v0) | v1 = *(v0);
0x0004b2d8 sw v1, (s1) | *(s1) = v1;
0x0004b2dc sw s1, (v0) | *(v0) = s1;
0x0004b2e0 b 0x4b154 | goto label_4;
| label_11:
0x0004b2e4 lw v0, 0x48(sp) | v0 = *(var_48h);
0x0004b2e8 lw v1, 0x44(sp) | v1 = *(var_44h);
0x0004b2ec sll v0, v0, 0x10 | v0 <<= 0x10;
0x0004b2f0 or v0, v0, v1 | v0 |= v1;
0x0004b2f4 sw v0, 0x40(sp) | *(var_40h) = v0;
0x0004b2f8 b 0x4b280 | goto label_5;
| label_10:
0x0004b2fc move s0, zero | s0 = 0;
| label_7:
0x0004b300 lw t9, -0x7b6c(gp) | t9 = sym.imp.fclose;
0x0004b304 move a0, s3 | a0 = s3;
0x0004b308 jalr t9 | t9 ();
0x0004b30c lw gp, 0x18(sp) | gp = *(var_18h);
| label_8:
0x0004b310 lw v0, 0x34(sp) | v0 = *(var_34h);
0x0004b314 lw a0, 0x44c(sp) | a0 = *(var_44ch);
0x0004b318 lw v1, (v0) | v1 = *(v0);
0x0004b31c move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x0004b320 bne a0, v1, 0x4b3ec | goto label_15;
| }
0x0004b324 lw ra, 0x474(sp) | ra = *(var_474h);
0x0004b328 lw fp, 0x470(sp) | fp = *(var_470h);
0x0004b32c lw s7, 0x46c(sp) | s7 = *(var_46ch);
0x0004b330 lw s6, 0x468(sp) | s6 = *(var_468h);
0x0004b334 lw s5, 0x464(sp) | s5 = *(var_464h);
0x0004b338 lw s4, 0x460(sp) | s4 = *(var_460h);
0x0004b33c lw s3, 0x45c(sp) | s3 = *(var_45ch);
0x0004b340 lw s2, 0x458(sp) | s2 = *(var_458h);
0x0004b344 lw s1, 0x454(sp) | s1 = *(var_454h);
0x0004b348 lw s0, 0x450(sp) | s0 = *(var_450h);
0x0004b34c addiu sp, sp, 0x478 |
0x0004b350 jr ra | return v0;
| label_12:
0x0004b354 lw a1, -0x7fd0(gp) | a1 = *(gp);
0x0004b358 lw t9, -0x7b64(gp) | t9 = sym.imp.sscanf;
0x0004b35c move a0, fp | a0 = fp;
0x0004b360 move a3, s0 | a3 = s0;
0x0004b364 move a2, s1 | a2 = s1;
| /* str._d__s_ */
0x0004b368 addiu a1, a1, 0x1dd8 | a1 += 0x1dd8;
0x0004b36c jalr t9 | t9 ();
0x0004b370 addiu a0, zero, 2 | a0 = 2;
0x0004b374 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == a0) {
0x0004b378 beq v0, a0, 0x4b27c | goto label_6;
| }
0x0004b37c lw t9, -0x7b44(gp) | t9 = sym.imp.__strcpy_chk
0x0004b380 move a0, s0 | a0 = s0;
0x0004b384 addiu a2, zero, 0x200 | a2 = aav.0x00000200;
0x0004b388 move a1, fp | a1 = fp;
0x0004b38c jalr t9 | t9 ();
0x0004b390 lw gp, 0x18(sp) | gp = *(var_18h);
0x0004b394 lw a3, 0x3c(sp) | a3 = *(var_3ch);
0x0004b398 addiu a1, zero, 1 | a1 = 1;
0x0004b39c lw v0, -0x79fc(gp) | v0 = *((gp - 7807));
0x0004b3a0 lw a2, -0x7fd0(gp) | a2 = *(gp);
0x0004b3a4 lw t9, -0x7b90(gp) | t9 = sym.imp.__fprintf_chk;
0x0004b3a8 lw a0, (v0) | a0 = *(v0);
| /* str.Database__s_is_corrupted_at__s_n */
0x0004b3ac addiu a2, a2, 0x1de0 | a2 += 0x1de0;
0x0004b3b0 sw s0, 0x10(sp) | *(var_10h_2) = s0;
0x0004b3b4 jalr t9 | t9 ();
0x0004b3b8 addiu s0, zero, -1 | s0 = -1;
0x0004b3bc lw gp, 0x18(sp) | gp = *(var_18h);
0x0004b3c0 b 0x4b300 | goto label_7;
| label_13:
0x0004b3c4 addiu s0, zero, -1 | s0 = -1;
0x0004b3c8 b 0x4b300 | goto label_7;
| label_14:
0x0004b3cc lw t9, -0x7a08(gp) | t9 = sym.imp.free;
0x0004b3d0 move a0, s1 | a0 = s1;
0x0004b3d4 jalr t9 | t9 ();
0x0004b3d8 addiu s0, zero, -1 | s0 = -1;
0x0004b3dc lw gp, 0x18(sp) | gp = *(var_18h);
0x0004b3e0 b 0x4b300 | goto label_7;
| label_9:
0x0004b3e4 addiu s0, zero, -2 | s0 = -2;
0x0004b3e8 b 0x4b310 | goto label_8;
| label_15:
0x0004b3ec lw t9, -0x7a48(gp) | t9 = sym.imp.__stack_chk_fail;
0x0004b3f0 jalr t9 | t9 ();
0x0004b3f4 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/tc.iproute2 @ 0x429ec */
| #include <stdint.h>
|
; (fcn) sym.ll_remember_index () | void ll_remember_index () {
0x000429ec lui gp, 4 |
0x000429f0 addiu gp, gp, -0x225c |
0x000429f4 addu gp, gp, t9 | gp += t9;
0x000429f8 addiu sp, sp, -0xf0 |
0x000429fc lhu a0, 4(a1) | a0 = *((a1 + 2));
0x00042a00 sw s3, 0xe0(sp) | *(var_e0h) = s3;
0x00042a04 lw s3, -0x7a1c(gp) | s3 = *((gp - 7815));
0x00042a08 addiu v0, a0, -0x10 | v0 = a0 + -0x10;
0x00042a0c sw gp, 0x10(sp) | *(var_10h) = gp;
0x00042a10 lw v1, (s3) | v1 = *(s3);
0x00042a14 sltiu v0, v0, 2 | v0 = (v0 < 2) ? 1 : 0;
0x00042a18 sw ra, 0xec(sp) | *(var_ech) = ra;
0x00042a1c sw s5, 0xe8(sp) | *(var_e8h) = s5;
0x00042a20 sw s4, 0xe4(sp) | *(var_e4h) = s4;
0x00042a24 sw s2, 0xdc(sp) | *(var_dch) = s2;
0x00042a28 sw s1, 0xd8(sp) | *(var_d8h) = s1;
0x00042a2c sw s0, 0xd4(sp) | *(var_d4h) = s0;
0x00042a30 sw v1, 0xcc(sp) | *(var_cch) = v1;
0x00042a34 move v0, zero | v0 = 0;
| if (v0 == 0) {
0x00042a38 beqz v0, 0x42bb0 | goto label_0;
| }
0x00042a3c lw a3, (a1) | a3 = *(a1);
0x00042a40 sltiu v0, a3, 0x20 | v0 = (a3 < 0x20) ? 1 : 0;
0x00042a44 move s2, a1 | s2 = a1;
| if (v0 != 0) {
0x00042a48 bnez v0, 0x42c80 | goto label_1;
| }
0x00042a4c lw v1, 0x14(a1) | v1 = *((a1 + 5));
0x00042a50 lw s1, -0x7f88(gp) | s1 = *((gp - 8162));
0x00042a54 andi s0, v1, 0x3ff | s0 = v1 & 0x3ff;
0x00042a58 sll s0, s0, 2 | s0 <<= 2;
0x00042a5c addiu s1, s1, -0x605c | s1 += -0x605c;
0x00042a60 lwx s0, s0(s1) | __asm ("lwx s0, s0(s1)");
0x00042a64 lw v0, 0x14(s0) | v0 = *((s0 + 5));
| if (s0 == 0) {
0x00042a68 bnel s0, zero, 0x42a80 | goto label_2;
| }
0x00042a6c addiu v0, zero, 0x11 | v0 = 0x11;
0x00042a70 b 0x42ad4 | goto label_3;
| do {
0x00042a74 addiu v0, zero, 0x11 | v0 = 0x11;
| if (s0 == 0) {
0x00042a78 beqz s0, 0x42ad4 | goto label_3;
| }
0x00042a7c lw v0, 0x14(s0) | v0 = *((s0 + 5));
| label_2:
0x00042a80 lw s0, (s0) | s0 = *(s0);
0x00042a84 bnel v1, v0, 0x42a74 |
| } while (v1 == v0);
0x00042a88 addiu v0, zero, 0x11 | v0 = 0x11;
0x00042a8c lw t9, -0x7f4c(gp) | t9 = sym.parse_rtattr;
| if (a0 != v0) {
0x00042a90 bne a0, v0, 0x42be0 | goto label_4;
| }
0x00042a94 lw v1, 0xc(s0) | v1 = *((s0 + 3));
0x00042a98 lw v0, 8(s0) | v0 = *((s0 + 2));
0x00042a9c sw v0, (v1) | *(v1) = v0;
| if (v0 != 0) {
0x00042aa0 beqz v0, 0x42aa8 |
0x00042aa4 sw v1, 4(v0) | *((v0 + 1)) = v1;
| }
0x00042aa8 lw v1, 4(s0) | v1 = *((s0 + 1));
0x00042aac lw v0, (s0) | v0 = *(s0);
0x00042ab0 sw v0, (v1) | *(v1) = v0;
| if (v0 != 0) {
0x00042ab4 beqz v0, 0x42abc |
0x00042ab8 sw v1, 4(v0) | *((v0 + 1)) = v1;
| }
0x00042abc lw t9, -0x7a08(gp) | t9 = sym.imp.free;
0x00042ac0 move a0, s0 | a0 = s0;
0x00042ac4 jalr t9 | t9 ();
0x00042ac8 lw gp, 0x10(sp) | gp = *(var_10h);
0x00042acc move v0, zero | v0 = 0;
0x00042ad0 b 0x42bb0 | goto label_0;
| label_3:
0x00042ad4 lw t9, -0x7f4c(gp) | t9 = sym.parse_rtattr;
| if (a0 == v0) {
0x00042ad8 beq a0, v0, 0x42bac | goto label_5;
| }
0x00042adc addiu a3, a3, -0x20 | a3 += -0x20;
0x00042ae0 addiu a2, s2, 0x20 | a2 = s2 + 0x20;
0x00042ae4 addiu a1, zero, 0x2b | a1 = 0x2b;
0x00042ae8 addiu a0, sp, 0x1c | a0 = sp + 0x1c;
0x00042aec bal 0x455a8 | sym_parse_rtattr ();
0x00042af0 lw s0, 0x28(sp) | s0 = *(var_28h_2);
0x00042af4 addiu s0, s0, 4 | s0 += 4;
0x00042af8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (s0 == 0) {
0x00042afc beqz s0, 0x42bac | goto label_5;
| }
0x00042b00 lw t9, -0x7aac(gp) | t9 = sym.imp.malloc;
0x00042b04 addiu a0, zero, 0x2c | a0 = 0x2c;
0x00042b08 jalr t9 | t9 ();
0x00042b0c move s4, v0 | s4 = v0;
0x00042b10 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00042b14 beqz v0, 0x42bac | goto label_5;
| }
0x00042b18 lw s5, 0x14(s2) | s5 = *((s2 + 5));
0x00042b1c lw t9, -0x7b44(gp) | t9 = sym.imp.__strcpy_chk
0x00042b20 move a1, s0 | a1 = s0;
0x00042b24 addiu a0, v0, 0x1a | a0 = v0 + 0x1a;
0x00042b28 sw s5, 0x14(v0) | *((v0 + 5)) = s5;
0x00042b2c addiu a2, zero, 0x12 | a2 = 0x12;
0x00042b30 jalr t9 | t9 ();
0x00042b34 andi v0, s5, 0x3ff | v0 = s5 & 0x3ff;
0x00042b38 sll v0, v0, 2 | v0 <<= 2;
0x00042b3c lhu a1, 0x12(s2) | a1 = *((s2 + 9));
0x00042b40 lw a0, 0x18(s2) | a0 = *((s2 + 6));
0x00042b44 lwx v1, v0(s1) | __asm ("lwx v1, v0(s1)");
0x00042b48 lw gp, 0x10(sp) | gp = *(var_10h);
0x00042b4c sh a1, 0x18(s4) | *((s4 + 12)) = a1;
0x00042b50 sw a0, 0x10(s4) | *((s4 + 4)) = a0;
0x00042b54 sw v1, (s4) | *(s4) = v1;
| if (v1 != 0) {
0x00042b58 beqz v1, 0x42b60 |
0x00042b5c sw s4, 4(v1) | *((v1 + 1)) = s4;
| }
0x00042b60 addu s1, s1, v0 | s1 += v0;
0x00042b64 lw t9, -0x7c64(gp) | t9 = sym.namehash;
0x00042b68 move a0, s0 | a0 = s0;
0x00042b6c sw s4, (s1) | *(s1) = s4;
0x00042b70 sw s1, 4(s4) | *((s4 + 1)) = s1;
0x00042b74 bal 0x429c0 | sym_namehash ();
0x00042b78 lw gp, 0x10(sp) | gp = *(var_10h);
0x00042b7c andi v0, v0, 0x3ff | v0 &= 0x3ff;
0x00042b80 sll a0, v0, 2 | a0 = v0 << 2;
0x00042b84 lw v1, -0x7f88(gp) | v1 = *((gp - 8162));
0x00042b88 addiu a1, s4, 8 | a1 = s4 + 8;
0x00042b8c addiu v0, v1, -0x705c | v0 = v1 + -0x705c;
0x00042b90 lwx v1, a0(v0) | __asm ("lwx v1, a0(v0)");
0x00042b94 sw v1, 8(s4) | *((s4 + 2)) = v1;
| if (v1 != 0) {
0x00042b98 beqz v1, 0x42ba0 |
0x00042b9c sw a1, 4(v1) | *((v1 + 1)) = a1;
| }
0x00042ba0 addu v0, v0, a0 | v0 += a0;
0x00042ba4 sw v0, 0xc(s4) | *((s4 + 3)) = v0;
0x00042ba8 sw a1, (v0) | *(v0) = a1;
| do {
| label_5:
0x00042bac move v0, zero | v0 = 0;
| label_0:
0x00042bb0 lw a0, 0xcc(sp) | a0 = *(var_cch);
0x00042bb4 lw v1, (s3) | v1 = *(s3);
0x00042bb8 lw ra, 0xec(sp) | ra = *(var_ech);
| if (a0 != v1) {
0x00042bbc bne a0, v1, 0x42c88 | goto label_6;
| }
0x00042bc0 lw s5, 0xe8(sp) | s5 = *(var_e8h);
0x00042bc4 lw s4, 0xe4(sp) | s4 = *(var_e4h);
0x00042bc8 lw s3, 0xe0(sp) | s3 = *(var_e0h);
0x00042bcc lw s2, 0xdc(sp) | s2 = *(var_dch);
0x00042bd0 lw s1, 0xd8(sp) | s1 = *(var_d8h);
0x00042bd4 lw s0, 0xd4(sp) | s0 = *(var_d4h);
0x00042bd8 addiu sp, sp, 0xf0 |
0x00042bdc jr ra | return v0;
| label_4:
0x00042be0 addiu a3, a3, -0x20 | a3 += -0x20;
0x00042be4 addiu a2, s2, 0x20 | a2 = s2 + 0x20;
0x00042be8 addiu a1, zero, 0x2b | a1 = 0x2b;
0x00042bec addiu a0, sp, 0x1c | a0 = sp + 0x1c;
0x00042bf0 bal 0x455a8 | sym_parse_rtattr ();
0x00042bf4 lw s1, 0x28(sp) | s1 = *(var_28h_2);
0x00042bf8 addiu s1, s1, 4 | s1 += 4;
0x00042bfc lw gp, 0x10(sp) | gp = *(var_10h);
0x00042c00 beqz s1, 0x42bac |
| } while (s1 == 0);
0x00042c04 lw t9, -0x79d4(gp) | t9 = sym.imp.strcmp;
0x00042c08 move a1, s1 | a1 = s1;
0x00042c0c addiu a0, s0, 0x1a | a0 = s0 + 0x1a;
0x00042c10 jalr t9 | t9 ();
0x00042c14 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00042c18 beqz v0, 0x42c70 |
0x00042c1c lw v1, 0xc(s0) | v1 = *((s0 + 3));
0x00042c20 lw v0, 8(s0) | v0 = *((s0 + 2));
0x00042c24 sw v0, (v1) | *(v1) = v0;
| if (v0 != 0) {
0x00042c28 beqz v0, 0x42c30 |
0x00042c2c sw v1, 4(v0) | *((v0 + 1)) = v1;
| }
0x00042c30 lw t9, -0x7c64(gp) | t9 = sym.namehash;
0x00042c34 move a0, s1 | a0 = s1;
0x00042c38 bal 0x429c0 | sym_namehash ();
0x00042c3c lw gp, 0x10(sp) | gp = *(var_10h);
0x00042c40 andi v0, v0, 0x3ff | v0 &= 0x3ff;
0x00042c44 sll a0, v0, 2 | a0 = v0 << 2;
0x00042c48 lw v1, -0x7f88(gp) | v1 = *((gp - 8162));
0x00042c4c addiu a1, s0, 8 | a1 = s0 + 8;
0x00042c50 addiu v0, v1, -0x705c | v0 = v1 + -0x705c;
0x00042c54 lwx v1, a0(v0) | __asm ("lwx v1, a0(v0)");
0x00042c58 sw v1, 8(s0) | *((s0 + 2)) = v1;
| if (v1 != 0) {
0x00042c5c beqz v1, 0x42c64 |
0x00042c60 sw a1, 4(v1) | *((v1 + 1)) = a1;
| }
0x00042c64 addu v0, v0, a0 | v0 += a0;
0x00042c68 sw a1, (v0) | *(v0) = a1;
0x00042c6c sw v0, 0xc(s0) | *((s0 + 3)) = v0;
| }
0x00042c70 lw v1, 0x18(s2) | v1 = *((s2 + 6));
0x00042c74 move v0, zero | v0 = 0;
0x00042c78 sw v1, 0x10(s0) | *((s0 + 4)) = v1;
0x00042c7c b 0x42bb0 | goto label_0;
| label_1:
0x00042c80 addiu v0, zero, -1 | v0 = -1;
0x00042c84 b 0x42bb0 | goto label_0;
| label_6:
0x00042c88 lw t9, -0x7a48(gp) | t9 = sym.imp.__stack_chk_fail;
0x00042c8c jalr t9 | t9 ();
0x00042c90 nop |
| }
[*] Function strcpy used 4 times tc.iproute2