[*] Binary protection state of vdo-mode-ctrl
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of vdo-mode-ctrl
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/vdo-mode-ctrl @ 0x11c0 */
| #include <stdint.h>
|
; (fcn) fcn.000011c0 () | void fcn_000011c0 () {
| label_1:
0x000011c0 lui gp, 2 |
0x000011c4 addiu gp, gp, -0x71b0 |
0x000011c8 addu gp, gp, t9 | gp += t9;
0x000011cc lw v0, -0x7f70(gp) | v0 = *((gp - 8156));
0x000011d0 addiu sp, sp, -0x20 |
0x000011d4 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x000011d8 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000011dc lw t9, -0x7f64(gp) | t9 = sym.imp.g_fprintf
0x000011e0 lw a3, 8(a0) | a3 = *((a0 + 2));
0x000011e4 sw s0, 0x18(sp) | *(var_18h) = s0;
0x000011e8 move s0, a0 | s0 = a0;
0x000011ec lw a0, (v0) | a0 = *(v0);
0x000011f0 sw gp, 0x10(sp) | *(var_10h) = gp;
0x000011f4 sw ra, 0x1c(sp) | *(var_1ch) = ra;
0x000011f8 addiu a2, a2, 0x16a8 | a2 += str.vdo_mode_ctrl;
0x000011fc addiu a1, a1, 0x16b8 | a1 += str._s:__s_n;
0x00001200 jalr t9 | t9 ();
0x00001204 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001208 lw t9, -0x7f9c(gp) | t9 = sym.imp.g_error_free;
0x0000120c move a0, s0 | a0 = s0;
0x00001210 jalr t9 | t9 ();
0x00001214 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001218 lw t9, -0x7fac(gp) | t9 = sym.imp.exit;
0x0000121c addiu a0, zero, 1 | a0 = 1;
0x00001220 jalr t9 | t9 ();
0x00001224 lui gp, 2 |
0x00001228 addiu gp, gp, -0x7214 |
0x0000122c addu gp, gp, t9 | gp += t9;
0x00001230 addiu sp, sp, -0x40 |
0x00001234 lw t9, -0x7fb4(gp) | t9 = sym.imp.vdo_mode_new;
0x00001238 sw s0, 0x24(sp) | *(var_24h) = s0;
0x0000123c move s0, a3 | s0 = a3;
0x00001240 sw gp, 0x18(sp) | *(var_18h_2) = gp;
0x00001244 sw s5, 0x38(sp) | *(var_38h) = s5;
0x00001248 sw s4, 0x34(sp) | *(var_34h) = s4;
0x0000124c sw s2, 0x2c(sp) | *(var_2ch) = s2;
0x00001250 sw ra, 0x3c(sp) | *(var_3ch) = ra;
0x00001254 sw s3, 0x30(sp) | *(var_30h) = s3;
0x00001258 sw s1, 0x28(sp) | *(var_28h) = s1;
0x0000125c move s4, a0 | s4 = a0;
0x00001260 move a0, a3 | a0 = a3;
0x00001264 move s2, a1 | s2 = a1;
0x00001268 move s5, a2 | s5 = a2;
0x0000126c jalr t9 | t9 ();
0x00001270 lw a0, (s0) | a0 = *(s0);
0x00001274 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (a0 != 0) {
0x00001278 bnez a0, 0x13cc | goto label_2;
| }
0x0000127c lw t9, -0x7f94(gp) | t9 = sym.imp.vdo_mode_get_info;
0x00001280 move a0, v0 | a0 = v0;
0x00001284 move a1, s0 | a1 = s0;
0x00001288 move s1, v0 | s1 = v0;
0x0000128c jalr t9 | t9 ();
0x00001290 lw a0, (s0) | a0 = *(s0);
0x00001294 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00001298 move s3, v0 | s3 = v0;
| if (a0 != 0) {
0x0000129c bnez a0, 0x13cc | goto label_2;
| }
0x000012a0 lw t9, -0x7fa4(gp) | t9 = sym.imp.vdo_map_get_type;
0x000012a4 jalr t9 | t9 ();
0x000012a8 nop |
0x000012ac lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000012b0 move a0, s5 | a0 = s5;
0x000012b4 lw t9, -0x7f84(gp) | t9 = sym.imp.g_type_check_instance_cast;
0x000012b8 move a1, v0 | a1 = v0;
0x000012bc jalr t9 | t9 ();
0x000012c0 move s5, v0 | s5 = v0;
0x000012c4 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (s2 == 0) {
0x000012c8 beqz s2, 0x1394 | goto label_3;
| }
0x000012cc lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000012d0 lw t9, -0x7f40(gp) | t9 = sym.imp.g_strcmp0;
0x000012d4 addiu a1, a1, 0x16dc | a1 += str.__set_view_mode;
0x000012d8 move a0, s4 | a0 = s4;
0x000012dc jalr t9 | t9 ();
0x000012e0 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x000012e4 beqz v0, 0x1370 | goto label_4;
| }
0x000012e8 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000012ec lw t9, -0x7f40(gp) | t9 = sym.imp.g_strcmp0;
0x000012f0 addiu a1, a1, 0x16fc | a1 += str.__set_capture_mode;
0x000012f4 move a0, s4 | a0 = s4;
0x000012f8 jalr t9 | t9 ();
0x000012fc lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 != 0) {
0x00001300 bnez v0, 0x13dc | goto label_5;
| }
0x00001304 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001308 lw t9, -0x7f8c(gp) | t9 = sym.imp.vdo_map_set_string;
0x0000130c move a2, s2 | a2 = s2;
0x00001310 addiu a1, a1, 0x1710 | a1 += str.capture_mode;
0x00001314 move a0, s5 | a0 = s5;
0x00001318 jalr t9 | t9 ();
0x0000131c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00001320 addiu s2, zero, 1 | s2 = 1;
| do {
| label_0:
0x00001324 lw t9, -0x7f3c(gp) | t9 = sym.imp.g_object_unref;
| if (s3 != 0) {
0x00001328 beqz s3, 0x1338 |
0x0000132c move a0, s3 | a0 = s3;
0x00001330 jalr t9 | t9 ();
0x00001334 lw gp, 0x18(sp) | gp = *(var_18h_2);
| }
0x00001338 lw t9, -0x7f3c(gp) | t9 = sym.imp.g_object_unref;
| if (s1 != 0) {
0x0000133c beqz s1, 0x1348 |
0x00001340 move a0, s1 | a0 = s1;
0x00001344 jalr t9 | t9 ();
| }
0x00001348 lw ra, 0x3c(sp) | ra = *(var_3ch);
0x0000134c move v0, s2 | v0 = s2;
0x00001350 lw s5, 0x38(sp) | s5 = *(var_38h);
0x00001354 lw s4, 0x34(sp) | s4 = *(var_34h);
0x00001358 lw s3, 0x30(sp) | s3 = *(var_30h);
0x0000135c lw s2, 0x2c(sp) | s2 = *(var_2ch);
0x00001360 lw s1, 0x28(sp) | s1 = *(var_28h);
0x00001364 lw s0, 0x24(sp) | s0 = *(var_24h);
0x00001368 addiu sp, sp, 0x40 |
0x0000136c jr ra | return v0;
| label_4:
0x00001370 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001374 lw t9, -0x7f8c(gp) | t9 = sym.imp.vdo_map_set_string;
0x00001378 move a2, s2 | a2 = s2;
0x0000137c addiu a1, a1, 0x16ec | a1 += str.view_mode.name;
0x00001380 move a0, s5 | a0 = s5;
0x00001384 jalr t9 | t9 ();
0x00001388 addiu s2, zero, 1 | s2 = 1;
0x0000138c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00001390 b 0x1324 |
| } while (1);
| label_3:
0x00001394 lw t9, -0x7f68(gp) | t9 = sym.imp.vdo_error_quark;
0x00001398 jalr t9 | t9 ();
0x0000139c nop |
0x000013a0 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000013a4 sw s4, 0x10(sp) | *(var_10h_2) = s4;
0x000013a8 addiu a2, zero, 3 | a2 = 3;
0x000013ac lw a3, -0x7fdc(gp) | a3 = *((gp - 8183));
0x000013b0 lw t9, -0x7f78(gp) | t9 = sym.imp.g_set_error;
0x000013b4 addiu a3, a3, 0x16c0 | a3 += str.failed_to_parse_option__s;
0x000013b8 move a1, v0 | a1 = v0;
0x000013bc move a0, s0 | a0 = s0;
0x000013c0 jalr t9 | t9 ();
0x000013c4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000013c8 b 0x1324 | goto label_0;
| label_2:
0x000013cc lw t9, -0x7fdc(gp) | t9 = *((gp - 8183));
0x000013d0 addiu t9, t9, 0x11c0 | t9 += fcn.000011c0;
0x000013d4 bal 0x11c0 | fcn_000011c0 ();
| goto label_1;
0x000013d8 nop |
| label_5:
0x000013dc lw a3, -0x7fdc(gp) | a3 = *((gp - 8183));
0x000013e0 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000013e4 lw t9, -0x7f58(gp) | t9 = sym.imp.g_assertion_message_expr;
0x000013e8 sw zero, 0x10(sp) | *(var_10h_2) = 0;
0x000013ec addiu a3, a3, 0x17f0 | a3 += str.set_setting;
0x000013f0 addiu a2, zero, 0x36 | a2 = 0x36;
0x000013f4 addiu a1, a1, 0x1720 | a1 += str.vdo_mode_ctrl.c;
0x000013f8 move a0, zero | a0 = 0;
0x000013fc jalr t9 | return t9 ();
| }
[*] Function fprintf used 2 times vdo-mode-ctrl