[*] Binary protection state of blkid.util-linux
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function system tear down of blkid.util-linux
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/blkid.util-linux @ 0x1508c */
| #include <stdint.h>
|
; (fcn) sym.sysfs_blkdev_next_subsystem () | void sysfs_blkdev_next_subsystem () {
| label_1:
0x0001508c lui gp, 2 |
0x00015090 addiu gp, gp, 0xfc4 |
0x00015094 addu gp, gp, t9 | gp += t9;
0x00015098 addiu sp, sp, -0x1050 |
0x0001509c sw s2, 0x1030(sp) | *(var_1030h) = s2;
0x000150a0 lw s2, -0x7bc0(gp) | s2 = *((gp - 7920));
0x000150a4 sw gp, 0x10(sp) | *(var_10h) = gp;
0x000150a8 sw ra, 0x104c(sp) | *(var_104ch) = ra;
0x000150ac lw v0, (s2) | v0 = *(s2);
0x000150b0 sw fp, 0x1048(sp) | *(var_1048h) = fp;
0x000150b4 sw s7, 0x1044(sp) | *(var_1044h) = s7;
0x000150b8 sw s6, 0x1040(sp) | *(var_1040h) = s6;
0x000150bc sw s5, 0x103c(sp) | *(var_103ch) = s5;
0x000150c0 sw s4, 0x1038(sp) | *(var_1038h) = s4;
0x000150c4 sw s3, 0x1034(sp) | *(var_1034h) = s3;
0x000150c8 sw s1, 0x102c(sp) | *(var_102ch) = s1;
0x000150cc sw s0, 0x1028(sp) | *(var_1028h) = s0;
0x000150d0 sw v0, 0x1024(sp) | *(var_1024h) = v0;
| if (a2 == 0) {
0x000150d4 beql a2, zero, 0x151d8 | goto label_0;
| }
0x000150d8 addiu v0, zero, -0x16 | v0 = -0x16;
0x000150dc move s7, a1 | s7 = a1;
| if (a1 == 0) {
0x000150e0 beqz a1, 0x15224 | goto label_4;
| }
0x000150e4 sw zero, (a2) | *(a2) = 0;
0x000150e8 lb v0, (a1) | v0 = *(a1);
0x000150ec move s1, a2 | s1 = a2;
| if (v0 == 0) {
0x000150f0 beqz v0, 0x1521c | goto label_5;
| }
0x000150f4 lw t9, -0x7cbc(gp) | t9 = sym.imp.strlen;
0x000150f8 move a0, a1 | a0 = a1;
0x000150fc jalr t9 | t9 ();
0x00015100 addiu v1, v0, 0xb | v1 = v0 + 0xb;
0x00015104 sltiu v1, v1, 0x1001 | v1 = (v1 < 0x1001) ? 1 : 0;
0x00015108 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v1 == 0) {
0x0001510c beqz v1, 0x1521c | goto label_5;
| }
0x00015110 lw a0, -0x7fd0(gp) | a0 = *((gp - 8180));
0x00015114 addiu v1, sp, 0x24 | v1 = sp + 0x24;
0x00015118 sw v1, 0x1c(sp) | *(var_1ch_3) = v1;
| /* str._subsystem */
0x0001511c addiu v1, a0, -0x2890 | v1 = a0 + -0x2890;
0x00015120 lw s3, -0x2890(a0) | s3 = *((a0 - 2596));
0x00015124 lw fp, 4(v1) | fp = *((v1 + 1));
0x00015128 lbu s6, 8(v1) | s6 = *((v1 + 8));
0x0001512c lbu s5, 9(v1) | s5 = *((v1 + 9));
0x00015130 lbu s4, 0xa(v1) | s4 = *((v1 + 10));
| do {
0x00015134 addu s0, s7, v0 | s0 = s7 + v0;
0x00015138 lw t9, -0x7c10(gp) | t9 = sym.imp.readlink;
0x0001513c swl s3, 3(s0) | __asm ("swl s3, 3(s0)");
0x00015140 swr s3, (s0) | __asm ("swr s3, (s0)");
0x00015144 swl fp, 7(s0) | __asm ("swl fp, 7(s0)");
0x00015148 lw a1, 0x1c(sp) | a1 = *(var_1ch_3);
0x0001514c swr fp, 4(s0) | __asm ("swr fp, 4(s0)");
0x00015150 addiu a2, zero, 0xfff | a2 = 0xfff;
0x00015154 move a0, s7 | a0 = s7;
0x00015158 sb s6, 8(s0) | *((s0 + 8)) = s6;
0x0001515c sb s5, 9(s0) | *((s0 + 9)) = s5;
0x00015160 sb s4, 0xa(s0) | *((s0 + 10)) = s4;
0x00015164 jalr t9 | t9 ();
0x00015168 lw gp, 0x10(sp) | gp = *(var_10h);
0x0001516c sb zero, (s0) | *(s0) = 0;
0x00015170 addiu a1, zero, 0x2f | a1 = 0x2f;
0x00015174 lw t9, -0x7d60(gp) | t9 = sym.imp.strrchr;
0x00015178 move a0, s7 | a0 = s7;
0x0001517c move s0, v0 | s0 = v0;
0x00015180 jalr t9 | t9 ();
0x00015184 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00015188 beqz v0, 0x15214 | goto label_6;
| }
0x0001518c sb zero, (v0) | *(v0) = 0;
0x00015190 subu v0, v0, s7 | __asm ("subu v0, v0, s7");
0x00015194 blez s0, 0x15134 |
| } while (s0 <= 0);
0x00015198 addiu v0, sp, 0x1028 | v0 = sp + 0x1028;
| do {
0x0001519c addu s0, v0, s0 | s0 = v0 + s0;
0x000151a0 lw t9, -0x7d20(gp) | t9 = sym.imp.__xpg_basename;
0x000151a4 lw a0, 0x1c(sp) | a0 = *(var_1ch_3);
0x000151a8 sb zero, -0x1004(s0) | *(var_1004h) = 0;
0x000151ac jalr t9 | t9 ();
0x000151b0 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x000151b4 beqz v0, 0x1521c | goto label_5;
| }
0x000151b8 lw t9, -0x7bac(gp) | t9 = sym.imp.strdup;
0x000151bc move a0, v0 | a0 = v0;
0x000151c0 jalr t9 | t9 ();
0x000151c4 addiu v1, zero, -0xc | v1 = -0xc;
| if (v0 == 0) {
0x000151c8 movn v1, zero, v0 | v1 = 0;
| }
0x000151cc lw gp, 0x10(sp) | gp = *(var_10h);
0x000151d0 sw v0, (s1) | *(s1) = v0;
0x000151d4 move v0, v1 | v0 = v1;
| label_0:
0x000151d8 lw a0, 0x1024(sp) | a0 = *(var_1024h);
0x000151dc lw v1, (s2) | v1 = *(s2);
0x000151e0 lw ra, 0x104c(sp) | ra = *(var_104ch);
| if (a0 != v1) {
0x000151e4 bne a0, v1, 0x1522c | goto label_7;
| }
0x000151e8 lw fp, 0x1048(sp) | fp = *(var_1048h);
0x000151ec lw s7, 0x1044(sp) | s7 = *(var_1044h);
0x000151f0 lw s6, 0x1040(sp) | s6 = *(var_1040h);
0x000151f4 lw s5, 0x103c(sp) | s5 = *(var_103ch);
0x000151f8 lw s4, 0x1038(sp) | s4 = *(var_1038h);
0x000151fc lw s3, 0x1034(sp) | s3 = *(var_1034h);
0x00015200 lw s2, 0x1030(sp) | s2 = *(var_1030h);
0x00015204 lw s1, 0x102c(sp) | s1 = *(var_102ch);
0x00015208 lw s0, 0x1028(sp) | s0 = *(var_1028h);
0x0001520c addiu sp, sp, 0x1050 |
0x00015210 jr ra | return v0;
| label_6:
0x00015214 bgtzl s0, 0x1519c |
| } while (s0 > 0);
0x00015218 addiu v0, sp, 0x1028 | v0 = sp + 0x1028;
| label_5:
0x0001521c addiu v0, zero, 1 | v0 = 1;
0x00015220 b 0x151d8 | goto label_0;
| label_4:
0x00015224 addiu v0, zero, -0x16 | v0 = -0x16;
0x00015228 b 0x151d8 | goto label_0;
| label_7:
0x0001522c lw t9, -0x7bec(gp) | t9 = sym.imp.__stack_chk_fail;
0x00015230 jalr t9 | t9 ();
0x00015234 nop |
0x00015238 lui gp, 2 |
0x0001523c addiu gp, gp, 0xe18 |
0x00015240 addu gp, gp, t9 | gp += t9;
0x00015244 addiu sp, sp, -0x1050 |
0x00015248 lw a2, -0x7fd0(gp) | a2 = *((gp - 8180));
0x0001524c sw s7, 0x1044(sp) | *(var_1044h_2) = s7;
0x00015250 lw s7, -0x7bc0(gp) | s7 = *((gp - 7920));
0x00015254 lw t9, -0x7f34(gp) | t9 = sym.ul_path_read_s32;
0x00015258 sw gp, 0x10(sp) | *(var_10h_2) = gp;
0x0001525c lw v0, (s7) | v0 = *(s7);
0x00015260 sw s4, 0x1038(sp) | *(var_1038h_2) = s4;
0x00015264 sw ra, 0x104c(sp) | *(var_104ch_2) = ra;
0x00015268 sw fp, 0x1048(sp) | *(var_1048h_2) = fp;
0x0001526c sw s6, 0x1040(sp) | *(var_1040h_2) = s6;
0x00015270 sw s5, 0x103c(sp) | *(var_103ch_2) = s5;
0x00015274 sw s3, 0x1034(sp) | *(var_1034h_2) = s3;
0x00015278 sw s2, 0x1030(sp) | *(var_1030h_2) = s2;
0x0001527c sw s1, 0x102c(sp) | *(var_102ch_2) = s1;
0x00015280 sw s0, 0x1028(sp) | *(var_1028h_2) = s0;
| /* str.removable */
0x00015284 addiu a2, a2, -0x2880 | a2 += -0x2880;
0x00015288 addiu a1, sp, 0x20 | a1 = sp + 0x20;
0x0001528c sw v0, 0x1024(sp) | *(var_1024h_2) = v0;
0x00015290 sw zero, 0x20(sp) | *(var_20h) = 0;
0x00015294 move s4, a0 | s4 = a0;
0x00015298 bal 0x12c70 | sym_ul_path_read_s32 ();
0x0001529c lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 == 0) {
0x000152a0 bnez v0, 0x152b4 |
0x000152a4 lw v0, 0x20(sp) | v0 = *(var_20h);
0x000152a8 addiu v1, zero, 1 | v1 = 1;
| if (v0 == v1) {
0x000152ac beq v0, v1, 0x15364 | goto label_8;
| }
0x000152b0 nop |
| }
0x000152b4 lw t9, -0x7e4c(gp) | t9 = sym.sysfs_blkdev_get_devchain;
0x000152b8 addiu a2, zero, 0x1000 | a2 = 0x1000;
0x000152bc addiu a1, sp, 0x24 | a1 = sp + 0x24;
0x000152c0 move a0, s4 | a0 = s4;
0x000152c4 bal 0x14f20 | sym_sysfs_blkdev_get_devchain ();
0x000152c8 move s5, v0 | s5 = v0;
0x000152cc lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000152d0 addiu fp, sp, 0x1c | fp = sp + 0x1c;
| if (v0 == 0) {
0x000152d4 beqz v0, 0x15360 | goto label_9;
| }
0x000152d8 lw s2, -0x7fdc(gp) | s2 = *((gp - 8183));
0x000152dc lw s3, -0x7fd0(gp) | s3 = *((gp - 8180));
0x000152e0 lw s6, -0x7fdc(gp) | s6 = *((gp - 8183));
| /* section..data */
0x000152e4 addiu s2, s2, -0x2000 | s2 += -0x2000;
| /* esilref: 'usb' */
0x000152e8 addiu s3, s3, -0x2884 | s3 += -0x2884;
| label_2:
0x000152ec lw t9, -0x7e48(gp) | t9 = sym.sysfs_blkdev_next_subsystem
0x000152f0 move a2, fp | a2 = fp;
0x000152f4 move a1, s5 | a1 = s5;
0x000152f8 move a0, s4 | a0 = s4;
0x000152fc bal 0x1508c | sym_sysfs_blkdev_next_subsystem ()
| goto label_1;
0x00015300 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 != 0) {
0x00015304 bnez v0, 0x15360 | goto label_9;
| }
0x00015308 lw s1, 0x1c(sp) | s1 = *(var_1ch_2);
0x0001530c lw t9, -0x7b68(gp) | t9 = sym.imp.strcmp;
0x00015310 move a1, s3 | a1 = s3;
0x00015314 move a0, s1 | a0 = s1;
0x00015318 jalr t9 | t9 ();
| /* esilref: 'ieee1394' */
0x0001531c addiu s0, s6, -0x2010 | s0 = s6 + -aav.0x00002010;
0x00015320 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 == 0) {
0x00015324 beqz v0, 0x15348 | goto label_10;
| }
| do {
0x00015328 lw t9, -0x7b68(gp) | t9 = sym.imp.strcmp;
| if (s0 == s2) {
0x0001532c beq s0, s2, 0x153a0 | goto label_11;
| }
0x00015330 lw a1, (s0) | a1 = *(s0);
0x00015334 move a0, s1 | a0 = s1;
0x00015338 jalr t9 | t9 ();
0x0001533c addiu s0, s0, 4 | s0 += 4;
0x00015340 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00015344 bnez v0, 0x15328 |
| } while (v0 != 0);
| label_10:
0x00015348 lw t9, -0x7ba8(gp) | t9 = sym.imp.free;
0x0001534c addiu v0, zero, 1 | v0 = 1;
0x00015350 move a0, s1 | a0 = s1;
0x00015354 sw v0, 0x20(sp) | *(var_20h) = v0;
0x00015358 jalr t9 | t9 ();
0x0001535c lw gp, 0x10(sp) | gp = *(var_10h_2);
| label_9:
0x00015360 lw v0, 0x20(sp) | v0 = *(var_20h);
| label_8:
0x00015364 lw a0, 0x1024(sp) | a0 = *(var_1024h_2);
0x00015368 lw v1, (s7) | v1 = *(s7);
0x0001536c lw ra, 0x104c(sp) | ra = *(var_104ch_2);
| if (a0 == v1) {
0x00015370 bne a0, v1, 0x153b8 |
0x00015374 lw fp, 0x1048(sp) | fp = *(var_1048h_2);
0x00015378 lw s7, 0x1044(sp) | s7 = *(var_1044h_2);
0x0001537c lw s6, 0x1040(sp) | s6 = *(var_1040h_2);
0x00015380 lw s5, 0x103c(sp) | s5 = *(var_103ch_2);
0x00015384 lw s4, 0x1038(sp) | s4 = *(var_1038h_2);
0x00015388 lw s3, 0x1034(sp) | s3 = *(var_1034h_2);
0x0001538c lw s2, 0x1030(sp) | s2 = *(var_1030h_2);
0x00015390 lw s1, 0x102c(sp) | s1 = *(var_102ch_2);
0x00015394 lw s0, 0x1028(sp) | s0 = *(var_1028h_2);
0x00015398 addiu sp, sp, 0x1050 |
0x0001539c jr ra | return v0;
| label_11:
0x000153a0 lw t9, -0x7ba8(gp) | t9 = sym.imp.free;
0x000153a4 move a0, s1 | a0 = s1;
0x000153a8 sw zero, 0x20(sp) | *(var_20h) = 0;
0x000153ac jalr t9 | t9 ();
0x000153b0 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000153b4 b 0x152ec | goto label_2;
| }
0x000153b8 lw t9, -0x7bec(gp) | t9 = sym.imp.__stack_chk_fail;
0x000153bc jalr t9 | t9 ();
0x000153c0 nop |
0x000153c4 lui gp, 2 |
0x000153c8 addiu gp, gp, 0xc8c |
0x000153cc addu gp, gp, t9 | gp += t9;
0x000153d0 addiu sp, sp, -0x38 |
0x000153d4 lw t9, -0x7f64(gp) | t9 = sym.ul_new_sysfs_path;
0x000153d8 sw s1, 0x28(sp) | *(var_28h) = s1;
0x000153dc lw s1, -0x7bc0(gp) | s1 = *((gp - 7920));
0x000153e0 sw gp, 0x10(sp) | *(var_10h_3) = gp;
0x000153e4 sw s2, 0x2c(sp) | *(var_2ch) = s2;
0x000153e8 lw v0, (s1) | v0 = *(s1);
0x000153ec sw s0, 0x24(sp) | *(var_24h_2) = s0;
0x000153f0 sw ra, 0x34(sp) | *(var_34h) = ra;
0x000153f4 sw s3, 0x30(sp) | *(var_30h) = s3;
0x000153f8 move s2, a2 | s2 = a2;
0x000153fc move a3, zero | a3 = 0;
0x00015400 move a2, zero | a2 = 0;
0x00015404 sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x00015408 sw zero, 0x18(sp) | *(var_18h) = 0;
0x0001540c bal 0x145c0 | sym_ul_new_sysfs_path ();
0x00015410 nop |
0x00015414 move s0, v0 | s0 = v0;
0x00015418 lw gp, 0x10(sp) | gp = *(var_10h_3);
| if (v0 == 0) {
0x0001541c beqz v0, 0x154b0 | goto label_12;
| }
0x00015420 lw a2, -0x7fd0(gp) | a2 = *((gp - 8180));
0x00015424 lw t9, -0x7f4c(gp) | t9 = sym.ul_path_read_string;
| /* str.dm_uuid */
0x00015428 addiu a2, a2, -0x2874 | a2 += -0x2874;
0x0001542c addiu a1, sp, 0x18 | a1 = sp + 0x18;
0x00015430 move a0, v0 | a0 = v0;
0x00015434 bal 0x1245c | sym_ul_path_read_string ();
0x00015438 lw gp, 0x10(sp) | gp = *(var_10h_3);
| if (v0 <= 0) {
0x0001543c blez v0, 0x154b0 | goto label_12;
| }
0x00015440 lw s3, 0x18(sp) | s3 = *(var_18h);
0x00015444 lw a1, -0x7fd0(gp) | a1 = *((gp - 8180));
| if (s3 == 0) {
0x00015448 beqz s3, 0x154b0 | goto label_12;
| }
0x0001544c lw t9, -0x7dac(gp) | t9 = sym.imp.strncmp;
0x00015450 addiu a2, zero, 4 | a2 = 4;
| /* str.LVM_ */
0x00015454 addiu a1, a1, -0x286c | a1 += -0x286c;
0x00015458 move a0, s3 | a0 = s3;
0x0001545c jalr t9 | t9 ();
0x00015460 lw gp, 0x10(sp) | gp = *(var_10h_3);
| if (v0 != 0) {
0x00015464 bnez v0, 0x154fc | goto label_13;
| }
0x00015468 lw t9, -0x7d60(gp) | t9 = sym.imp.strrchr;
0x0001546c addiu a1, zero, 0x2d | a1 = 0x2d;
0x00015470 addiu a0, s3, 4 | a0 = s3 + 4;
0x00015474 jalr t9 | t9 ();
0x00015478 lw gp, 0x10(sp) | gp = *(var_10h_3);
| if (v0 == 0) {
0x0001547c beqz v0, 0x154b0 | goto label_12;
| }
0x00015480 lw t9, -0x7f60(gp) | t9 = sym.ul_unref_path;
0x00015484 lb s3, 1(v0) | s3 = *((v0 + 1));
0x00015488 move a0, s0 | a0 = s0;
0x0001548c bal 0x10e3c | sym_ul_unref_path ();
0x00015490 sltu s3, zero, s3 | s3 = (0 < s3) ? 1 : 0;
0x00015494 lw gp, 0x10(sp) | gp = *(var_10h_3);
| if (s2 != 0) {
0x00015498 bnez s2, 0x154c8 | goto label_14;
| }
| do {
0x0001549c lw t9, -0x7ba8(gp) | t9 = sym.imp.free;
0x000154a0 lw a0, 0x18(sp) | a0 = *(var_18h);
0x000154a4 jalr t9 | t9 ();
0x000154a8 lw gp, 0x10(sp) | gp = *(var_10h_3);
0x000154ac b 0x154d0 | goto label_15;
| label_12:
0x000154b0 move s3, zero | s3 = 0;
| label_3:
0x000154b4 lw t9, -0x7f60(gp) | t9 = sym.ul_unref_path;
0x000154b8 move a0, s0 | a0 = s0;
0x000154bc bal 0x10e3c | sym_ul_unref_path ();
0x000154c0 lw gp, 0x10(sp) | gp = *(var_10h_3);
0x000154c4 beqz s2, 0x1549c |
| } while (s2 == 0);
| label_14:
0x000154c8 lw v0, 0x18(sp) | v0 = *(var_18h);
0x000154cc sw v0, (s2) | *(s2) = v0;
| label_15:
0x000154d0 lw a0, 0x1c(sp) | a0 = *(var_1ch);
0x000154d4 lw v1, (s1) | v1 = *(s1);
0x000154d8 move v0, s3 | v0 = s3;
| if (a0 == v1) {
0x000154dc bne a0, v1, 0x15520 |
0x000154e0 lw ra, 0x34(sp) | ra = *(var_34h);
0x000154e4 lw s3, 0x30(sp) | s3 = *(var_30h);
0x000154e8 lw s2, 0x2c(sp) | s2 = *(var_2ch);
0x000154ec lw s1, 0x28(sp) | s1 = *(var_28h);
0x000154f0 lw s0, 0x24(sp) | s0 = *(var_24h_2);
0x000154f4 addiu sp, sp, 0x38 |
0x000154f8 jr ra | return v0;
| label_13:
0x000154fc lw a1, -0x7fd0(gp) | a1 = *((gp - 8180));
0x00015500 lw t9, -0x7dac(gp) | t9 = sym.imp.strncmp;
0x00015504 move a0, s3 | a0 = s3;
0x00015508 addiu a2, zero, 0x11 | a2 = 0x11;
| /* str.stratis_1_private */
0x0001550c addiu a1, a1, -0x2864 | a1 += -0x2864;
0x00015510 jalr t9 | t9 ();
0x00015514 sltiu s3, v0, 1 | s3 = (v0 < 1) ? 1 : 0;
0x00015518 lw gp, 0x10(sp) | gp = *(var_10h_3);
0x0001551c b 0x154b4 | goto label_3;
| }
0x00015520 lw t9, -0x7bec(gp) | t9 = sym.imp.__stack_chk_fail;
0x00015524 jalr t9 | t9 ();
0x00015528 nop |
| }
[*] Function system used 5 times blkid.util-linux