[*] Binary protection state of bootblocktool
Full RELRO No Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of bootblocktool
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/bootblocktool @ 0x970 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 2736 named .text */
0x00000970 lui gp, 2 |
0x00000974 addiu gp, gp, -0x6960 |
0x00000978 addu gp, gp, t9 | gp += t9;
0x0000097c addiu sp, sp, -0x50 |
0x00000980 sw s0, 0x28(sp) | *(var_28h) = s0;
0x00000984 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00000988 addiu s0, a0, -1 | s0 = a0 + -1;
0x0000098c sw ra, 0x4c(sp) | *(var_4ch) = ra;
0x00000990 sw fp, 0x48(sp) | *(var_48h) = fp;
0x00000994 sw s7, 0x44(sp) | *(var_44h) = s7;
0x00000998 sw s6, 0x40(sp) | *(var_40h) = s6;
0x0000099c sw s5, 0x3c(sp) | *(var_3ch) = s5;
0x000009a0 sw s4, 0x38(sp) | *(var_38h) = s4;
0x000009a4 sw s3, 0x34(sp) | *(var_34h) = s3;
0x000009a8 sw s2, 0x30(sp) | *(var_30h) = s2;
0x000009ac sw s1, 0x2c(sp) | *(var_2ch) = s1;
0x000009b0 move s1, a0 | s1 = a0;
| if (s0 <= 0) {
0x000009b4 blez s0, 0xc10 | goto label_6;
| }
0x000009b8 move s5, a1 | s5 = a1;
0x000009bc lw a0, 4(a1) | a0 = *((a1 + 1));
0x000009c0 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000009c4 lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x000009c8 addiu a1, a1, 0x15c8 | a1 += str._nocgi;
0x000009cc jalr t9 | t9 ();
0x000009d0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000009d4 beqz v0, 0xc04 | goto label_12;
| }
0x000009d8 addiu s5, s5, 4 | s5 += 4;
| label_2:
0x000009dc lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000009e0 lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x000009e4 lw a0, (s5) | a0 = *(s5);
0x000009e8 addiu a1, a1, 0x15d0 | a1 += str._err;
0x000009ec jalr t9 | t9 ();
0x000009f0 addiu s6, s0, -1 | s6 = s0 + -1;
0x000009f4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000009f8 beqz v0, 0x1028 | goto label_13;
| }
0x000009fc move s6, s0 | s6 = s0;
| label_9:
0x00000a00 lw s7, -0x7fdc(gp) | s7 = *((gp - 8183));
0x00000a04 lw fp, -0x7fdc(gp) | fp = *((gp - 8183));
0x00000a08 lw s4, -0x7fdc(gp) | s4 = *((gp - 8183));
0x00000a0c addiu v0, s7, 0x1bbc | v0 = s7 + 0x1bbc;
0x00000a10 addiu fp, fp, 0x1ae0 | fp += str.setenv__s___s__n;
0x00000a14 addiu s4, s4, 0x15c4 | s4 += 0x15c4;
0x00000a18 sw v0, 0x24(sp) | *(var_24h) = v0;
| label_1:
0x00000a1c addiu s3, s6, -1 | s3 = s6 + -1;
| if (s6 <= 0) {
0x00000a20 blez s6, 0xdcc | goto label_14;
| }
0x00000a24 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000a28 lw s0, (s5) | s0 = *(s5);
0x00000a2c lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x00000a30 addiu a1, a1, 0x1820 | a1 += 0x1820;
0x00000a34 move a0, s0 | a0 = s0;
0x00000a38 jalr t9 | t9 ();
0x00000a3c addiu s2, s5, 4 | s2 = s5 + 4;
0x00000a40 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000a44 beqz v0, 0x1044 | goto label_15;
| }
0x00000a48 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000a4c lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x00000a50 addiu a1, a1, 0x1a6c | a1 += 0x1a6c;
0x00000a54 move a0, s0 | a0 = s0;
0x00000a58 jalr t9 | t9 ();
0x00000a5c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000a60 beqz v0, 0xd54 | goto label_16;
| }
0x00000a64 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000a68 lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x00000a6c addiu a1, a1, 0x1a94 | a1 += 0x1a94;
0x00000a70 move a0, s0 | a0 = s0;
0x00000a74 jalr t9 | t9 ();
0x00000a78 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000a7c beqz v0, 0xc40 | goto label_17;
| }
0x00000a80 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000a84 lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x00000a88 addiu a1, a1, 0x1a98 | a1 += str._lenv;
0x00000a8c move a0, s0 | a0 = s0;
0x00000a90 jalr t9 | t9 ();
0x00000a94 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000a98 beqz v0, 0xc40 | goto label_17;
| }
0x00000a9c lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000aa0 lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x00000aa4 addiu a1, a1, 0x1aa0 | a1 += 0x1aa0;
0x00000aa8 move a0, s0 | a0 = s0;
0x00000aac jalr t9 | t9 ();
0x00000ab0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000ab4 beqz v0, 0xc40 | goto label_17;
| }
0x00000ab8 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000abc lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x00000ac0 addiu a1, a1, 0x1aa4 | a1 += 0x1aa4;
0x00000ac4 move a0, s0 | a0 = s0;
0x00000ac8 jalr t9 | t9 ();
0x00000acc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000ad0 beqz v0, 0xc40 | goto label_17;
| }
0x00000ad4 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000ad8 lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x00000adc addiu a1, a1, 0x1b00 | a1 += 0x1b00;
0x00000ae0 move a0, s0 | a0 = s0;
0x00000ae4 jalr t9 | t9 ();
0x00000ae8 move s1, v0 | s1 = v0;
0x00000aec lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000af0 beqz v0, 0xf70 | goto label_18;
| }
0x00000af4 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000af8 lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x00000afc addiu a1, a1, 0x1b50 | a1 += 0x1b50;
0x00000b00 move a0, s0 | a0 = s0;
0x00000b04 jalr t9 | t9 ();
0x00000b08 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00000b0c bnez v0, 0xe14 | goto label_19;
| }
0x00000b10 lw t9, -0x7fa8(gp) | t9 = sym.imp.strtok;
| if (s3 <= 0) {
0x00000b14 blez s3, 0xc10 | goto label_6;
| }
0x00000b18 lw a0, 4(s5) | a0 = *((s5 + 1));
0x00000b1c move a1, s4 | a1 = s4;
0x00000b20 jalr t9 | t9 ();
0x00000b24 move s0, v0 | s0 = v0;
0x00000b28 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000b2c beqz v0, 0xbf0 | goto label_20;
| }
0x00000b30 lw s2, -0x7fdc(gp) | s2 = *((gp - 8183));
0x00000b34 lw s1, -0x7fdc(gp) | s1 = *((gp - 8183));
0x00000b38 addiu s2, s2, 0x1a70 | s2 += str.Warning:_Parameter__s_not_found._n;
0x00000b3c lw s3, -0x7fd8(gp) | s3 = *((gp - 8182));
0x00000b40 addiu s1, s1, 0x1b54 | s1 += 0x1b54;
0x00000b44 b 0xb94 |
| while (v0 != 0) {
0x00000b48 lw v0, 4(s5) | v0 = *((s5 + 1));
0x00000b4c lw t9, -0x7f9c(gp) | t9 = sym.imp.putchar;
| if (v0 != s0) {
0x00000b50 beq v0, s0, 0xb60 |
0x00000b54 addiu a0, zero, 0x20 | a0 = 0x20;
0x00000b58 jalr t9 | t9 ();
0x00000b5c lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x00000b60 lw t9, -0x7fa0(gp) | t9 = sym.imp.__printf_chk
0x00000b64 move a2, s7 | a2 = s7;
0x00000b68 move a1, s1 | a1 = s1;
0x00000b6c addiu a0, zero, 1 | a0 = 1;
0x00000b70 jalr t9 | t9 ();
0x00000b74 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000b78 move a1, s4 | a1 = s4;
0x00000b7c lw t9, -0x7fa8(gp) | t9 = sym.imp.strtok;
0x00000b80 move a0, zero | a0 = 0;
0x00000b84 jalr t9 | t9 ();
0x00000b88 move s0, v0 | s0 = v0;
0x00000b8c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000b90 beqz v0, 0xbf0 | goto label_20;
| }
| label_0:
0x00000b94 lw t9, -0x7f74(gp) | t9 = sym.imp.bootblock_get;
0x00000b98 move a0, s0 | a0 = s0;
0x00000b9c jalr t9 | t9 ();
0x00000ba0 move s7, v0 | s7 = v0;
0x00000ba4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000ba8 bnez v0, 0xb48 |
| }
0x00000bac lw v0, -0x7f6c(gp) | v0 = *((gp - 8155));
0x00000bb0 lw t9, -0x7fb0(gp) | t9 = sym.imp.__fprintf_chk
0x00000bb4 move a3, s0 | a3 = s0;
0x00000bb8 lw a0, (v0) | a0 = *(v0);
0x00000bbc move a2, s2 | a2 = s2;
0x00000bc0 addiu a1, zero, 1 | a1 = 1;
0x00000bc4 jalr t9 | t9 ();
0x00000bc8 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000bcc addiu v0, zero, 1 | v0 = 1;
0x00000bd0 sw v0, 0x20d0(s3) | *((s3 + 2100)) = v0;
0x00000bd4 lw t9, -0x7fa8(gp) | t9 = sym.imp.strtok;
0x00000bd8 move a1, s4 | a1 = s4;
0x00000bdc move a0, zero | a0 = 0;
0x00000be0 jalr t9 | t9 ();
0x00000be4 move s0, v0 | s0 = v0;
0x00000be8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00000bec bnez v0, 0xb94 | goto label_0;
| }
| label_20:
0x00000bf0 addiu s3, s6, -2 | s3 = s6 + -2;
0x00000bf4 addiu s2, s5, 8 | s2 = s5 + 8;
0x00000bf8 move s5, s2 | s5 = s2;
| label_4:
0x00000bfc move s6, s3 | s6 = s3;
0x00000c00 b 0xa1c | goto label_1;
| label_12:
0x00000c04 addiu s0, s1, -2 | s0 = s1 + -2;
0x00000c08 addiu s5, s5, 8 | s5 += 8;
| if (s0 > 0) {
0x00000c0c bgtz s0, 0x9dc | goto label_2;
| }
| label_6:
0x00000c10 lw v0, -0x7f6c(gp) | v0 = *((gp - 8155));
| label_10:
0x00000c14 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00000c18 lw t9, -0x7f78(gp) | t9 = sym.imp.fwrite;
0x00000c1c lw a3, (v0) | a3 = *(v0);
0x00000c20 addiu a0, a0, 0x15d8 | a0 += str.Usage:_bootblocktool__options__command_nNB:_Options_are_processed_in_the_order_they_appear_on_cmd_line._nOptions:_n___nocgi_____Deprecated._Dummy_option__kept_for_backwards_compatibility_n___err_______Set_exit_status___0_on_parameter_errors_nCommands:_n___x_name1_name2_...____________get_n___c_name:name2:name3___________get_check_n___a_name1_value1_name2_value2_...___set_n___w_namevalue:name2value2_________set_n___l_______list_parameters_n___lenv____list_parameters_in_setenv_format_n___l;
0x00000c24 addiu a2, zero, 0x247 | a2 = 0x247;
| label_11:
0x00000c28 addiu a1, zero, 1 | a1 = 1;
0x00000c2c jalr t9 | t9 ();
0x00000c30 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000c34 lw t9, -0x7f8c(gp) | t9 = sym.imp.exit;
0x00000c38 addiu a0, zero, 1 | a0 = 1;
0x00000c3c jalr t9 | t9 ();
| label_17:
0x00000c40 lw t9, -0x7fa4(gp) | t9 = sym.imp.bootblock_get_all;
0x00000c44 lb s0, 2(s0) | s0 = *((s0 + 2));
0x00000c48 jalr t9 | t9 ();
0x00000c4c move s1, v0 | s1 = v0;
0x00000c50 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000c54 beqz v0, 0x10b4 | goto label_21;
| }
0x00000c58 lw a2, (v0) | a2 = *(v0);
0x00000c5c move s7, zero | s7 = 0;
| if (a2 == 0) {
0x00000c60 beqz a2, 0xcec | goto label_22;
| }
0x00000c64 lw s6, -0x7fdc(gp) | s6 = *((gp - 8183));
0x00000c68 lw s5, -0x7fdc(gp) | s5 = *((gp - 8183));
0x00000c6c b 0xca8 |
| while (s0 != v0) {
0x00000c70 lw t9, -0x7fa0(gp) | t9 = sym.imp.__printf_chk
| if (s0 == v0) {
0x00000c74 bne s0, v0, 0xc98 |
0x00000c78 sw a3, 0x10(sp) | *(var_10h) = a3;
0x00000c7c move a3, a2 | a3 = a2;
0x00000c80 lw a2, 0x24(sp) | a2 = *(var_24h);
| if (s7 == 0) {
0x00000c84 movn a2, s4, s7 | a2 = s4;
| }
0x00000c88 addiu a1, s5, 0x1af8 | a1 = s5 + str._s_s_s;
0x00000c8c addiu a0, zero, 1 | a0 = 1;
0x00000c90 jalr t9 | t9 ();
0x00000c94 lw gp, 0x18(sp) | gp = *(var_18h);
| }
| label_5:
0x00000c98 addiu s1, s1, 8 | s1 += 8;
0x00000c9c lw a2, (s1) | a2 = *(s1);
0x00000ca0 addiu s7, s7, 1 | s7++;
| if (a2 == 0) {
0x00000ca4 beqz a2, 0xcec | goto label_22;
| }
| label_3:
0x00000ca8 addiu v0, zero, 0x61 | v0 = 0x61;
0x00000cac lw a3, 4(s1) | a3 = *((s1 + 1));
| if (s0 == v0) {
0x00000cb0 beq s0, v0, 0xd3c | goto label_23;
| }
0x00000cb4 slti v0, s0, 0x62 | v0 = (s0 < 0x62) ? 1 : 0;
0x00000cb8 addiu v0, zero, 0x65 | v0 = 0x65;
| if (v0 != 0) {
0x00000cbc bnez v0, 0xd1c | goto label_24;
| }
0x00000cc0 addiu v0, zero, 0x77 | v0 = 0x77;
0x00000cc4 bne s0, v0, 0xc70 |
| }
0x00000cc8 lw t9, -0x7fa0(gp) | t9 = sym.imp.__printf_chk
0x00000ccc addiu s1, s1, 8 | s1 += 8;
0x00000cd0 move a1, fp | a1 = fp;
0x00000cd4 addiu a0, zero, 1 | a0 = 1;
0x00000cd8 jalr t9 | t9 ();
0x00000cdc lw a2, (s1) | a2 = *(s1);
0x00000ce0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000ce4 addiu s7, s7, 1 | s7++;
| if (a2 != 0) {
0x00000ce8 bnez a2, 0xca8 | goto label_3;
| }
| label_22:
0x00000cec addiu v0, zero, 0x61 | v0 = 0x61;
0x00000cf0 addiu v0, zero, 0x77 | v0 = 0x77;
| if (s0 == v0) {
0x00000cf4 beq s0, v0, 0xd00 | goto label_25;
| }
0x00000cf8 move s5, s2 | s5 = s2;
| if (s0 == v0) {
0x00000cfc bnel s0, v0, 0xbfc | goto label_4;
| }
| label_25:
0x00000d00 lw t9, -0x7f9c(gp) | t9 = sym.imp.putchar;
0x00000d04 addiu a0, zero, 0xa | a0 = 0xa;
0x00000d08 jalr t9 | t9 ();
0x00000d0c move s5, s2 | s5 = s2;
0x00000d10 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000d14 move s6, s3 | s6 = s3;
0x00000d18 b 0xa1c | goto label_1;
| label_24:
0x00000d1c lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
| if (s0 != 0) {
0x00000d20 bnez s0, 0xc98 | goto label_5;
| }
0x00000d24 lw t9, -0x7fa0(gp) | t9 = sym.imp.__printf_chk
0x00000d28 addiu a1, a1, 0x1ad8 | a1 += str._s_s_n;
0x00000d2c addiu a0, zero, 1 | a0 = 1;
0x00000d30 jalr t9 | t9 ();
0x00000d34 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000d38 b 0xc98 | goto label_5;
| label_23:
0x00000d3c lw t9, -0x7fa0(gp) | t9 = sym.imp.__printf_chk
0x00000d40 addiu a1, s6, 0x1af0 | a1 = s6 + str._s__s_;
0x00000d44 addiu a0, zero, 1 | a0 = 1;
0x00000d48 jalr t9 | t9 ();
0x00000d4c lw gp, 0x18(sp) | gp = *(var_18h);
0x00000d50 b 0xc98 | goto label_5;
| label_16:
0x00000d54 lw s4, -0x7f6c(gp) | s4 = *((gp - 8155));
| if (s3 <= 0) {
0x00000d58 blez s3, 0xc10 | goto label_6;
| }
0x00000d5c lw s0, -0x7fdc(gp) | s0 = *((gp - 8183));
0x00000d60 addiu s0, s0, 0x1a70 | s0 += str.Warning:_Parameter__s_not_found._n;
0x00000d64 lw s1, -0x7fd8(gp) | s1 = *((gp - 8182));
0x00000d68 b 0xd88 |
| while (v0 != 0) {
0x00000d6c lw t9, -0x7f80(gp) | t9 = sym.imp.puts;
0x00000d70 move a0, v0 | a0 = v0;
0x00000d74 addiu s3, s3, -1 | s3 += -1;
0x00000d78 jalr t9 | t9 ();
0x00000d7c addiu s2, s2, 4 | s2 += 4;
0x00000d80 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s3 == 0) {
0x00000d84 beqz s3, 0xdcc | goto label_14;
| }
| label_7:
0x00000d88 lw t9, -0x7f74(gp) | t9 = sym.imp.bootblock_get;
0x00000d8c lw a0, (s2) | a0 = *(s2);
0x00000d90 jalr t9 | t9 ();
0x00000d94 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000d98 bnez v0, 0xd6c |
| }
0x00000d9c lw t9, -0x7fb0(gp) | t9 = sym.imp.__fprintf_chk
0x00000da0 lw a3, (s2) | a3 = *(s2);
0x00000da4 lw a0, (s4) | a0 = *(s4);
0x00000da8 move a2, s0 | a2 = s0;
0x00000dac addiu a1, zero, 1 | a1 = 1;
0x00000db0 jalr t9 | t9 ();
0x00000db4 addiu s3, s3, -1 | s3 += -1;
0x00000db8 addiu v0, zero, 1 | v0 = 1;
0x00000dbc lw gp, 0x18(sp) | gp = *(var_18h);
0x00000dc0 sw v0, 0x20d0(s1) | *((s1 + 2100)) = v0;
0x00000dc4 addiu s2, s2, 4 | s2 += 4;
| if (s3 != 0) {
0x00000dc8 bnez s3, 0xd88 | goto label_7;
| }
| label_14:
0x00000dcc lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00000dd0 lbu v0, 0x20d4(v0) | v0 = *((v0 + 8404));
0x00000dd4 move v0, zero | v0 = 0;
| if (v0 != 0) {
0x00000dd8 beqz v0, 0xde4 |
0x00000ddc lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00000de0 lw v0, 0x20d0(v0) | v0 = *((v0 + 2100));
| }
0x00000de4 lw ra, 0x4c(sp) | ra = *(var_4ch);
0x00000de8 lw fp, 0x48(sp) | fp = *(var_48h);
0x00000dec lw s7, 0x44(sp) | s7 = *(var_44h);
0x00000df0 lw s6, 0x40(sp) | s6 = *(var_40h);
0x00000df4 lw s5, 0x3c(sp) | s5 = *(var_3ch);
0x00000df8 lw s4, 0x38(sp) | s4 = *(var_38h);
0x00000dfc lw s3, 0x34(sp) | s3 = *(var_34h);
0x00000e00 lw s2, 0x30(sp) | s2 = *(var_30h);
0x00000e04 lw s1, 0x2c(sp) | s1 = *(var_2ch);
0x00000e08 lw s0, 0x28(sp) | s0 = *(var_28h);
0x00000e0c addiu sp, sp, 0x50 |
0x00000e10 jr ra | return v0;
| label_19:
0x00000e14 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000e18 lw t9, -0x7f60(gp) | t9 = sym.imp.strcmp;
0x00000e1c addiu a1, a1, 0x1b58 | a1 += 0x1b58;
0x00000e20 move a0, s0 | a0 = s0;
0x00000e24 jalr t9 | t9 ();
0x00000e28 move s1, v0 | s1 = v0;
0x00000e2c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00000e30 bnez v0, 0x10d0 | goto label_26;
| }
0x00000e34 lw t9, -0x7f94(gp) | t9 = sym.imp.strlen;
| if (s3 <= 0) {
0x00000e38 blez s3, 0xc10 | goto label_6;
| }
0x00000e3c lw s0, 4(s5) | s0 = *((s5 + 1));
0x00000e40 move a0, s0 | a0 = s0;
0x00000e44 jalr t9 | t9 ();
0x00000e48 addu v0, s0, v0 | v0 = s0 + v0;
0x00000e4c move v1, s0 | v1 = s0;
0x00000e50 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000e54 addiu a0, zero, 2 | a0 = 2;
0x00000e58 addiu a2, zero, 0x3a | a2 = 0x3a;
| if (v1 == v0) {
0x00000e5c beq v1, v0, 0xe78 | goto label_27;
| }
0x00000e60 lb a1, (v1) | a1 = *(v1);
| do {
| if (a1 == a2) {
0x00000e64 beql a1, a2, 0xf68 | goto label_28;
| }
0x00000e68 addiu a0, a0, 1 | a0++;
0x00000e6c addiu v1, v1, 1 | v1++;
| label_8:
0x00000e70 lb a1, (v1) | a1 = *(v1);
0x00000e74 bnel v1, v0, 0xe64 |
| } while (v1 == v0);
| label_27:
0x00000e78 lw t9, -0x7f7c(gp) | t9 = sym.imp.malloc;
0x00000e7c sll a0, a0, 3 | a0 <<= 3;
0x00000e80 jalr t9 | t9 ();
0x00000e84 move s7, v0 | s7 = v0;
0x00000e88 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000e8c beqz v0, 0x10ec | goto label_29;
| }
0x00000e90 lw t9, -0x7fa8(gp) | t9 = sym.imp.strtok;
0x00000e94 move a0, s0 | a0 = s0;
0x00000e98 move a1, s4 | a1 = s4;
0x00000e9c jalr t9 | t9 ();
0x00000ea0 move s0, v0 | s0 = v0;
0x00000ea4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000ea8 beqz v0, 0xf24 | goto label_30;
| }
0x00000eac lw s2, -0x7fdc(gp) | s2 = *((gp - 8183));
0x00000eb0 move s3, s7 | s3 = s7;
0x00000eb4 addiu s2, s2, 0x1bc0 | s2 += str._w:__s_n;
| do {
0x00000eb8 lw t9, -0x7f90(gp) | t9 = sym.imp.strchr;
0x00000ebc addiu a1, zero, 0x3d | a1 = 0x3d;
0x00000ec0 move a0, s0 | a0 = s0;
0x00000ec4 jalr t9 | t9 ();
0x00000ec8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000ecc beqz v0, 0x1064 | goto label_31;
| }
0x00000ed0 lb a0, 1(v0) | a0 = *((v0 + 1));
0x00000ed4 addiu a1, v0, 1 | a1 = v0 + 1;
0x00000ed8 sb zero, (v0) | *(v0) = 0;
| if (a0 == 0) {
0x00000edc beqz a0, 0x1080 | goto label_32;
| }
0x00000ee0 lw t9, -0x7fa0(gp) | t9 = sym.imp.__printf_chk
0x00000ee4 sw s0, (s3) | *(s3) = s0;
0x00000ee8 move a2, s0 | a2 = s0;
0x00000eec sw a1, 4(s3) | *((s3 + 1)) = a1;
0x00000ef0 addiu a0, zero, 1 | a0 = 1;
0x00000ef4 move a1, s2 | a1 = s2;
0x00000ef8 jalr t9 | t9 ();
0x00000efc lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f00 move a1, s4 | a1 = s4;
0x00000f04 move a0, zero | a0 = 0;
0x00000f08 lw t9, -0x7fa8(gp) | t9 = sym.imp.strtok;
0x00000f0c addiu s1, s1, 1 | s1++;
0x00000f10 jalr t9 | t9 ();
0x00000f14 move s0, v0 | s0 = v0;
0x00000f18 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f1c addiu s3, s3, 8 | s3 += 8;
0x00000f20 bnez v0, 0xeb8 |
| } while (v0 != 0);
| label_30:
0x00000f24 sll s1, s1, 3 | s1 <<= 3;
0x00000f28 lw t9, -0x7fdc(gp) | t9 = *((gp - 8183));
0x00000f2c addu s1, s7, s1 | s1 = s7 + s1;
0x00000f30 move a0, s7 | a0 = s7;
0x00000f34 addiu t9, t9, 0x1280 | t9 += fcn.00001280;
0x00000f38 sw zero, (s1) | *(s1) = 0;
0x00000f3c bal 0x1280 | fcn_00001280 ();
0x00000f40 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f44 move a0, s7 | a0 = s7;
0x00000f48 addiu s3, s6, -2 | s3 = s6 + -2;
0x00000f4c lw t9, -0x7f70(gp) | t9 = sym.imp.free;
0x00000f50 addiu s2, s5, 8 | s2 = s5 + 8;
0x00000f54 jalr t9 | t9 ();
0x00000f58 move s5, s2 | s5 = s2;
0x00000f5c lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f60 move s6, s3 | s6 = s3;
0x00000f64 b 0xa1c | goto label_1;
| label_28:
0x00000f68 addiu v1, v1, 1 | v1++;
0x00000f6c b 0xe70 | goto label_8;
| label_18:
0x00000f70 lw t9, -0x7f7c(gp) | t9 = sym.imp.malloc;
| if (s3 <= 0) {
0x00000f74 blez s3, 0xc10 | goto label_6;
| }
0x00000f78 sra a0, s3, 1 | a0 = s3 >> 1;
0x00000f7c addiu a0, a0, 1 | a0++;
0x00000f80 sll a0, a0, 3 | a0 <<= 3;
0x00000f84 jalr t9 | t9 ();
0x00000f88 move s0, v0 | s0 = v0;
0x00000f8c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00000f90 beqz v0, 0x10ec | goto label_29;
| }
0x00000f94 addiu v0, zero, 1 | v0 = 1;
0x00000f98 sll v1, s1, 3 | v1 = s1 << 3;
| if (s3 == v0) {
0x00000f9c beq s3, v0, 0xff0 | goto label_33;
| }
0x00000fa0 lw a0, 8(s5) | a0 = *((s5 + 2));
0x00000fa4 lw a3, 4(s5) | a3 = *((s5 + 1));
0x00000fa8 lb v0, (a0) | v0 = *(a0);
0x00000fac addiu s2, s5, 0xc | s2 = s5 + 0xc;
| if (v0 == 0) {
0x00000fb0 beqz v0, 0x109c | goto label_34;
| }
0x00000fb4 move v1, s0 | v1 = s0;
0x00000fb8 b 0xfd4 |
| while (a1 == 0) {
0x00000fbc lw a3, (s2) | a3 = *(s2);
0x00000fc0 addiu s2, s2, 8 | s2 += 8;
0x00000fc4 lw a0, -4(s2) | a0 = *((s2 - 1));
0x00000fc8 lb a1, (a0) | a1 = *(a0);
0x00000fcc addiu v1, v1, 8 | v1 += 8;
| if (a1 == 0) {
0x00000fd0 beqz a1, 0x109c | goto label_34;
| }
0x00000fd4 addiu s3, s3, -2 | s3 += -2;
0x00000fd8 slti a1, s3, 2 | a1 = (s3 < 2) ? 1 : 0;
0x00000fdc sw a3, (v1) | *(v1) = a3;
0x00000fe0 sw a0, 4(v1) | *((v1 + 1)) = a0;
0x00000fe4 addiu s1, s1, 1 | s1++;
0x00000fe8 beqz a1, 0xfbc |
| }
0x00000fec sll v1, s1, 3 | v1 = s1 << 3;
| label_33:
0x00000ff0 addu v1, s0, v1 | v1 = s0 + v1;
0x00000ff4 lw t9, -0x7fdc(gp) | t9 = *((gp - 8183));
0x00000ff8 move a0, s0 | a0 = s0;
0x00000ffc addiu t9, t9, 0x1280 | t9 += fcn.00001280;
0x00001000 sw zero, (v1) | *(v1) = 0;
0x00001004 bal 0x1280 | fcn_00001280 ();
0x00001008 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000100c move a0, s0 | a0 = s0;
0x00001010 move s5, s2 | s5 = s2;
0x00001014 lw t9, -0x7f70(gp) | t9 = sym.imp.free;
0x00001018 move s6, s3 | s6 = s3;
0x0000101c jalr t9 | t9 ();
0x00001020 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001024 b 0xa1c | goto label_1;
| label_13:
0x00001028 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x0000102c addiu v1, zero, 1 | v1 = 1;
0x00001030 addiu s5, s5, 4 | s5 += 4;
0x00001034 sb v1, 0x20d4(v0) | *((v0 + 8404)) = v1;
| if (s6 != 0) {
0x00001038 bnez s6, 0xa00 | goto label_9;
| }
0x0000103c lw v0, -0x7f6c(gp) | v0 = *((gp - 8155));
0x00001040 b 0xc14 | goto label_10;
| label_15:
0x00001044 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001048 lw t9, -0x7f80(gp) | t9 = sym.imp.puts;
0x0000104c addiu a0, a0, 0x1824 | a0 += str.Usage:_bootblocktool__options__command_nNB:_Options_are_processed_in_the_order_they_appear_on_cmd_line._nOptions:_n___nocgi_____Deprecated._Dummy_option__kept_for_backwards_compatibility_n___err_______Set_exit_status___0_on_parameter_errors_nCommands:_n___x_name1_name2_...____________get_n___c_name:name2:name3___________get_check_n___a_name1_value1_name2_value2_...___set_n___w_namevalue:name2value2_________set_n___l_______list_parameters_n___lenv____list_parameters_in_setenv_format_n___l;
0x00001050 jalr t9 | t9 ();
0x00001054 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001058 lw t9, -0x7f8c(gp) | t9 = sym.imp.exit;
0x0000105c move a0, zero | a0 = 0;
0x00001060 jalr t9 | t9 ();
| label_31:
0x00001064 lw v0, -0x7f6c(gp) | v0 = *((gp - 8155));
0x00001068 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x0000106c lw t9, -0x7fb0(gp) | t9 = sym.imp.__fprintf_chk
0x00001070 lw a0, (v0) | a0 = *(v0);
0x00001074 move a3, s0 | a3 = s0;
0x00001078 addiu a2, a2, 0x1b5c | a2 += str.Error:_Parameter__s_submitted_without_value._n;
0x0000107c b 0xc28 | goto label_11;
| label_32:
0x00001080 lw v0, -0x7f6c(gp) | v0 = *((gp - 8155));
0x00001084 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00001088 lw t9, -0x7fb0(gp) | t9 = sym.imp.__fprintf_chk
0x0000108c lw a0, (v0) | a0 = *(v0);
0x00001090 move a3, s0 | a3 = s0;
0x00001094 addiu a2, a2, 0x1b8c | a2 += str.Error:_Parameter__s_submitted_with_empty_value._n;
0x00001098 b 0xc28 | goto label_11;
| label_34:
0x0000109c lw v0, -0x7f6c(gp) | v0 = *((gp - 8155));
0x000010a0 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x000010a4 lw t9, -0x7fb0(gp) | t9 = sym.imp.__fprintf_chk
0x000010a8 lw a0, (v0) | a0 = *(v0);
0x000010ac addiu a2, a2, 0x1b1c | a2 += str.Error:_Parameter__s_submitted_with_an_empty_value._n;
0x000010b0 b 0xc28 | goto label_11;
| label_21:
0x000010b4 lw v0, -0x7f6c(gp) | v0 = *((gp - 8155));
0x000010b8 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x000010bc lw t9, -0x7f78(gp) | t9 = sym.imp.fwrite;
0x000010c0 lw a3, (v0) | a3 = *(v0);
0x000010c4 addiu a0, a0, 0x1aa8 | a0 += str.Error:_Failed_to_read_parameters_from_media._n;
0x000010c8 addiu a2, zero, 0x2d | a2 = 0x2d;
0x000010cc b 0xc28 | goto label_11;
| label_26:
0x000010d0 lw v0, -0x7f6c(gp) | v0 = *((gp - 8155));
0x000010d4 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x000010d8 lw t9, -0x7fb0(gp) | t9 = sym.imp.__fprintf_chk
0x000010dc lw a0, (v0) | a0 = *(v0);
0x000010e0 move a3, s0 | a3 = s0;
0x000010e4 addiu a2, a2, 0x1bc8 | a2 += str.Error:_Unknown_parameter__s._n;
0x000010e8 b 0xc28 | goto label_11;
| label_29:
0x000010ec lw v0, -0x7f6c(gp) | v0 = *((gp - 8155));
0x000010f0 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x000010f4 lw t9, -0x7f78(gp) | t9 = sym.imp.fwrite;
0x000010f8 lw a3, (v0) | a3 = *(v0);
0x000010fc addiu a0, a0, 0x1b04 | a0 += str.Error:_Out_of_memory._n;
0x00001100 addiu a2, zero, 0x16 | a2 = 0x16;
0x00001104 b 0xc28 | goto label_11;
| }
[*] Function printf used 13 times bootblocktool