[*] Binary protection state of dmsetup
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of dmsetup
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/dmsetup @ 0xcde4 */
| #include <stdint.h>
|
; (fcn) fcn.0000cde4 () | void fcn_0000cde4 () {
0x0000cde4 lui gp, 3 |
0x0000cde8 addiu gp, gp, -0x2374 |
0x0000cdec addu gp, gp, t9 | gp += t9;
0x0000cdf0 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x0000cdf4 lw a3, -0x7fdc(gp) | a3 = *((gp - 8183));
0x0000cdf8 addiu sp, sp, -0x30 |
0x0000cdfc lw v1, 0x4a30(v0) | v1 = *((v0 + 4748));
0x0000ce00 addiu a3, a3, -0x274 | a3 += -0x274;
0x0000ce04 sll v0, v1, 1 | v0 = v1 << 1;
0x0000ce08 addu v0, v0, v1 | v0 += v1;
0x0000ce0c sll v0, v0, 3 | v0 <<= 3;
0x0000ce10 addu v1, a3, v0 | v1 = a3 + v0;
0x0000ce14 addiu a1, zero, 1 | a1 = 1;
0x0000ce18 lw v1, 0x14(v1) | v1 = *((v1 + 5));
0x0000ce1c sw gp, 0x18(sp) | *(var_18h) = gp;
0x0000ce20 sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x0000ce24 sw s2, 0x28(sp) | *(var_28h) = s2;
0x0000ce28 sw s1, 0x24(sp) | *(var_24h) = s1;
0x0000ce2c sw s0, 0x20(sp) | *(var_20h) = s0;
0x0000ce30 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
| if (v1 != a1) {
0x0000ce34 beq v1, a1, 0xce70 |
0x0000ce38 move s0, a0 | s0 = a0;
| if (v1 == 0) {
0x0000ce3c beqz v1, 0xcf5c | goto label_0;
| }
0x0000ce40 addiu a1, zero, 2 | a1 = 2;
0x0000ce44 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
| if (v1 == a1) {
0x0000ce48 beq v1, a1, 0xcec8 | goto label_1;
| }
0x0000ce4c addiu v0, zero, 3 | v0 = 3;
| if (v1 == v0) {
0x0000ce50 beql v1, v0, 0xce9c | goto label_2;
| }
0x0000ce54 move a3, a0 | a3 = a0;
0x0000ce58 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x0000ce5c lw s2, 0x28(sp) | s2 = *(var_28h);
0x0000ce60 lw s1, 0x24(sp) | s1 = *(var_24h);
0x0000ce64 lw s0, 0x20(sp) | s0 = *(var_20h);
0x0000ce68 addiu sp, sp, 0x30 |
0x0000ce6c jr ra | return v0;
| }
0x0000ce70 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x0000ce74 lw s2, 0x28(sp) | s2 = *(var_28h);
0x0000ce78 lw s1, 0x24(sp) | s1 = *(var_24h);
0x0000ce7c lw s0, 0x20(sp) | s0 = *(var_20h);
0x0000ce80 addiu v0, v0, 4 | v0 += 4;
0x0000ce84 lw t9, -0x7f40(gp) | t9 = sym.imp.__fprintf_chk
0x0000ce88 addu a3, a3, v0 | a3 += v0;
| /* str.Usage:_n_n_s___d_a____e_encryption____o_offset____floop_device___file__n_n */
0x0000ce8c addiu a2, a2, -0x3e38 | a2 += -0x3e38;
0x0000ce90 addiu a1, zero, 1 | a1 = 1;
0x0000ce94 addiu sp, sp, 0x30 |
0x0000ce98 jr t9 | t9 ();
| label_2:
0x0000ce9c lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x0000cea0 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x0000cea4 lw s2, 0x28(sp) | s2 = *(var_28h);
0x0000cea8 lw s1, 0x24(sp) | s1 = *(var_24h);
0x0000ceac lw s0, 0x20(sp) | s0 = *(var_20h);
0x0000ceb0 lw t9, -0x7d2c(gp) | t9 = sym.imp.fwrite;
0x0000ceb4 addiu a2, zero, 0x24 | a2 = 0x24;
0x0000ceb8 addiu a1, zero, 1 | a1 = 1;
| /* str.Usage:_devmap_name__major___minor__n_n */
0x0000cebc addiu a0, a0, -0x3bec | a0 += -0x3bec;
0x0000cec0 addiu sp, sp, 0x30 |
0x0000cec4 jr t9 | t9 ();
| label_1:
0x0000cec8 lw t9, -0x7f40(gp) | t9 = sym.imp.__fprintf_chk
0x0000cecc addiu v0, v0, 4 | v0 += 4;
0x0000ced0 addu a3, a3, v0 | a3 += v0;
| /* str.Usage:_n_n_s_n__________h__help__n__________v__verbose___v__verbose_...___n___________areas__nr_areas______areasize__size___n___________userdata__data______clear__n___________count__count______interval__seconds___n__________o__fields_____O__sort__sort_fields___n_t_________programid__id___n___________start__start______length__length___n___________segments_____units__units___n_n */
0x0000ced4 addiu a2, a2, -0x3dec | a2 += -0x3dec;
0x0000ced8 addiu a1, zero, 1 | a1 = 1;
0x0000cedc jalr t9 | t9 ();
0x0000cee0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000cee4 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x0000cee8 lw a3, 0x28a0(v0) | a3 = *((v0 + 2600));
0x0000ceec lw s2, -0x7fdc(gp) | s2 = *((gp - 8183));
| if (a3 == 0) {
0x0000cef0 beqz a3, 0xcf2c | goto label_3;
| }
0x0000cef4 lw s1, -0x7fd8(gp) | s1 = *((gp - 8182));
| /* str._t_s__s_n */
0x0000cef8 addiu s2, s2, -0x414c | s2 += -0x414c;
0x0000cefc addiu s1, s1, 0x28a4 | s1 += 0x28a4;
| do {
0x0000cf00 lw v0, (s1) | v0 = *(s1);
0x0000cf04 lw t9, -0x7f40(gp) | t9 = sym.imp.__fprintf_chk
0x0000cf08 addiu s1, s1, 0x1c | s1 += 0x1c;
0x0000cf0c sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000cf10 move a2, s2 | a2 = s2;
0x0000cf14 addiu a1, zero, 1 | a1 = 1;
0x0000cf18 move a0, s0 | a0 = s0;
0x0000cf1c jalr t9 | t9 ();
0x0000cf20 lw a3, -4(s1) | a3 = *((s1 - 1));
0x0000cf24 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000cf28 bnez a3, 0xcf00 |
| } while (a3 != 0);
| label_3:
0x0000cf2c lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x0000cf30 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x0000cf34 lw s2, 0x28(sp) | s2 = *(var_28h);
0x0000cf38 lw s1, 0x24(sp) | s1 = *(var_24h);
0x0000cf3c move a3, s0 | a3 = s0;
0x0000cf40 lw t9, -0x7d2c(gp) | t9 = sym.imp.fwrite;
0x0000cf44 lw s0, 0x20(sp) | s0 = *(var_20h);
0x0000cf48 addiu a2, zero, 0x89 | a2 = 0x89;
0x0000cf4c addiu a1, zero, 1 | a1 = 1;
| /* str._n_device__may_be_device_name_or__if_only_one___u__uuid__or__j__major___m__minor__n_fields__are_comma_separated.__Use_help__c_for_list._n_n */
0x0000cf50 addiu a0, a0, -0x3c78 | a0 += -0x3c78;
0x0000cf54 addiu sp, sp, 0x30 |
0x0000cf58 jr t9 | t9 ();
| label_0:
0x0000cf5c lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x0000cf60 lw t9, -0x7f40(gp) | t9 = sym.imp.__fprintf_chk
0x0000cf64 addiu v0, v0, 4 | v0 += 4;
0x0000cf68 addu a3, a3, v0 | a3 += v0;
| /* str.Usage:_n_n_s_n___________version____h__help___c_C__columns___n__________v__verbose___v__verbose_..._____f__force__n___________checks_____manglename_nonehexauto__n__________r__readonly_____noopencount_____noflush_____nolockfs_____inactive__n___________udevcookie__cookie______noudevrules_____noudevsync_____verifyudev__n__________y__yes_____readahead____sectors_autonone_____retry__n__________c_C__columns____o__fields_____O__sort__sort_fields___n__________S__select__selection______nameprefixes_____noheadings__n___________separator__separator___n_n */
0x0000cf6c addiu a2, a2, -0x437c | a2 += -0x437c;
0x0000cf70 addiu a1, zero, 1 | a1 = 1;
0x0000cf74 jalr t9 | t9 ();
0x0000cf78 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000cf7c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x0000cf80 lw a3, 0x2520(v0) | a3 = *((v0 + 2376));
0x0000cf84 lw s2, -0x7fdc(gp) | s2 = *((gp - 8183));
| if (a3 == 0) {
0x0000cf88 beqz a3, 0xcfc4 | goto label_4;
| }
0x0000cf8c lw s1, -0x7fd8(gp) | s1 = *((gp - 8182));
| /* str._t_s__s_n */
0x0000cf90 addiu s2, s2, -0x414c | s2 += -0x414c;
| /* esilref: '[-c|-C|--columns]' */
0x0000cf94 addiu s1, s1, 0x2524 | s1 += 0x2524;
| do {
0x0000cf98 lw v0, (s1) | v0 = *(s1);
0x0000cf9c lw t9, -0x7f40(gp) | t9 = sym.imp.__fprintf_chk
0x0000cfa0 addiu s1, s1, 0x1c | s1 += 0x1c;
0x0000cfa4 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000cfa8 move a2, s2 | a2 = s2;
0x0000cfac addiu a1, zero, 1 | a1 = 1;
0x0000cfb0 move a0, s0 | a0 = s0;
0x0000cfb4 jalr t9 | t9 ();
0x0000cfb8 lw a3, -4(s1) | a3 = *((s1 - 1));
0x0000cfbc lw gp, 0x18(sp) | gp = *(var_18h);
0x0000cfc0 bnez a3, 0xcf98 |
| } while (a3 != 0);
| label_4:
0x0000cfc4 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x0000cfc8 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x0000cfcc lw s2, 0x28(sp) | s2 = *(var_28h);
0x0000cfd0 lw s1, 0x24(sp) | s1 = *(var_24h);
0x0000cfd4 move a3, s0 | a3 = s0;
0x0000cfd8 lw t9, -0x7d2c(gp) | t9 = sym.imp.fwrite;
0x0000cfdc lw s0, 0x20(sp) | s0 = *(var_20h);
0x0000cfe0 addiu a2, zero, 0x30b | a2 = 0x30b;
0x0000cfe4 addiu a1, zero, 1 | a1 = 1;
| /* str._n_device__may_be_device_name_or__if_only_one___u__uuid__or__j__major___m__minor__n_mangling_mode__is_one_of_none__auto_and_hex._n_fields__are_comma_separated.__Use_help__c_for_list._n_concise_device_specification__has_single_device_entries_separated_by_semi_colons:_n_____name___uuid___minor___flags___table__n________where__flags__is_ro_or_rw__the_default__and_any_of__uuid____minor__n________and__flags__may_be_empty._Separate_extra_table_lines_with_commas._n____E.g.:_dev1____0_100_linear_253:1_0_100_100_error_dev2___ro_0_1_error_nTable_file_contents_may_be_supplied_on_stdin._nOptions_are:_devno__devname__blkdevname._nTree_specific_options_are:_ascii__utf__vt100__compact__inverted__notrunc__n___________________________blkdevname___no_device__active__open__rw_and_uuid._n_n */
0x0000cfe8 addiu a0, a0, -0x4144 | a0 += -0x4144;
0x0000cfec addiu sp, sp, 0x30 |
0x0000cff0 jr t9 | return t9 ();
| }
[*] Function fprintf used 6 times dmsetup