[*] Binary protection state of video-service-legacy

  
  	Full RELRO     Canary found      NX disabled  PIE enabled  No RPATH     No RUNPATH   No Symbols


[*] Function printf tear down of video-service-legacy

    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/video-service-legacy @ 0x1ae0 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.resolution_get_list ()           | void resolution_get_list () {
    0x00001ae0 lui gp, 2                         |     
    0x00001ae4 addiu gp, gp, -0x6ad0             |     
    0x00001ae8 addu gp, gp, t9                   |     gp += t9;
    0x00001aec addiu sp, sp, -0x30               |     
    0x00001af0 move a1, a0                       |     a1 = a0;
    0x00001af4 sw s0, 0x20(sp)                   |     *(var_20h) = s0;
    0x00001af8 lw s0, -0x7f68(gp)                |     s0 = *((gp - 8154));
    0x00001afc sw ra, 0x2c(sp)                   |     *(var_2ch) = ra;
    0x00001b00 sw gp, 0x10(sp)                   |     *(var_10h) = gp;
    0x00001b04 sw s2, 0x28(sp)                   |     *(var_28h) = s2;
    0x00001b08 sw s1, 0x24(sp)                   |     *(var_24h) = s1;
    0x00001b0c lw v0, (s0)                       |     v0 = *(s0);
    0x00001b10 move s1, a0                       |     s1 = a0;
    0x00001b14 lw a0, -0x7fd8(gp)                |     a0 = *((gp - 8182));
    0x00001b18 lw t9, -0x7f44(gp)                |     t9 = sym.imp.g_strdup_printf
    0x00001b1c addiu a0, a0, 0x257c              |     a0 += str.Channel_i;
    0x00001b20 sw v0, 0x1c(sp)                   |     *(var_1ch) = v0;
    0x00001b24 sw zero, 0x18(sp)                 |     *(var_18h) = 0;
    0x00001b28 jalr t9                           |     t9 ();
    0x00001b2c nop                               |     
    0x00001b30 lw gp, 0x10(sp)                   |     gp = *(var_10h);
    0x00001b34 addiu a2, sp, 0x18                |     a2 = sp + 0x18;
    0x00001b38 move a0, v0                       |     a0 = v0;
    0x00001b3c lw a1, -0x7fd8(gp)                |     a1 = *((gp - 8182));
    0x00001b40 lw t9, -0x7fc0(gp)                |     t9 = sym.conf_get_bool;
    0x00001b44 addiu a1, a1, 0x2588              |     a1 += str.show_all;
    0x00001b48 move s2, v0                       |     s2 = v0;
    0x00001b4c bal 0x1d5c                        |     sym_conf_get_bool ();
    0x00001b50 lw gp, 0x10(sp)                   |     gp = *(var_10h);
    0x00001b54 lw t9, -0x7f14(gp)                |     t9 = sym.imp.g_free;
    0x00001b58 move a0, s2                       |     a0 = s2;
    0x00001b5c jalr t9                           |     t9 ();
    0x00001b60 lw gp, 0x10(sp)                   |     gp = *(var_10h);
    0x00001b64 lw a1, 0x18(sp)                   |     a1 = *(var_18h);
    0x00001b68 addiu v1, zero, 2                 |     v1 = 2;
    0x00001b6c addiu v0, zero, 3                 |     v0 = 3;
                                                 |     if (a1 == 0) {
    0x00001b70 movn v0, v1, a1                   |         v0 = v1;
                                                 |     }
    0x00001b74 lw t9, -0x7f58(gp)                |     t9 = sym.imp.get_resolutions_string;
    0x00001b78 move a0, s1                       |     a0 = s1;
    0x00001b7c move a1, v0                       |     a1 = v0;
    0x00001b80 jalr t9                           |     t9 ();
    0x00001b84 lw a0, 0x1c(sp)                   |     a0 = *(var_1ch);
    0x00001b88 lw v1, (s0)                       |     v1 = *(s0);
    0x00001b8c lw gp, 0x10(sp)                   |     gp = *(var_10h);
                                                 |     if (a0 == v1) {
    0x00001b90 bne a0, v1, 0x1bac                |         
    0x00001b94 lw ra, 0x2c(sp)                   |         ra = *(var_2ch);
    0x00001b98 lw s2, 0x28(sp)                   |         s2 = *(var_28h);
    0x00001b9c lw s1, 0x24(sp)                   |         s1 = *(var_24h);
    0x00001ba0 lw s0, 0x20(sp)                   |         s0 = *(var_20h);
    0x00001ba4 addiu sp, sp, 0x30                |         
    0x00001ba8 jr ra                             |         return v1;
                                                 |     }
    0x00001bac lw t9, -0x7f7c(gp)                |     t9 = sym.imp.__stack_chk_fail;
    0x00001bb0 jalr t9                           |     t9 ();
    0x00001bb4 nop                               |     
    0x00001bb8 nop                               |     
    0x00001bbc nop                               |     
                                                 | }
    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/video-service-legacy @ 0x1920 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) sym.video_legacy_setup ()    | void video_legacy_setup () {
    0x00001920 lui gp, 2                 |     
    0x00001924 addiu gp, gp, -0x6910     |     
    0x00001928 addu gp, gp, t9           |     gp += t9;
    0x0000192c addiu sp, sp, -0x50       |     
    0x00001930 lw a1, -0x7fd8(gp)        |     a1 = *((gp - 8182));
    0x00001934 sw s6, 0x40(sp)           |     *(var_40h) = s6;
    0x00001938 lw s6, -0x7f68(gp)        |     s6 = *((gp - 8154));
    0x0000193c sw gp, 0x18(sp)           |     *(var_18h) = gp;
    0x00001940 sw s5, 0x3c(sp)           |     *(var_3ch) = s5;
    0x00001944 sw ra, 0x4c(sp)           |     *(var_4ch) = ra;
    0x00001948 sw fp, 0x48(sp)           |     *(var_48h) = fp;
    0x0000194c sw s7, 0x44(sp)           |     *(var_44h) = s7;
    0x00001950 sw s4, 0x38(sp)           |     *(var_38h) = s4;
    0x00001954 sw s3, 0x34(sp)           |     *(var_34h) = s3;
    0x00001958 sw s2, 0x30(sp)           |     *(var_30h) = s2;
    0x0000195c sw s1, 0x2c(sp)           |     *(var_2ch) = s1;
    0x00001960 sw s0, 0x28(sp)           |     *(var_28h) = s0;
    0x00001964 lw v0, (s6)               |     v0 = *(s6);
    0x00001968 move s5, a0               |     s5 = a0;
    0x0000196c lw a0, -0x7fd8(gp)        |     a0 = *((gp - 8182));
    0x00001970 lw t9, -0x7fbc(gp)        |     t9 = sym.conf_get_int;
    0x00001974 addiu a2, sp, 0x20        |     a2 = sp + 0x20;
    0x00001978 addiu a1, a1, 0x2694      |     a1 += str.num_channels;
    0x0000197c addiu a0, a0, 0x25d8      |     a0 += str.settings;
    0x00001980 sw v0, 0x24(sp)           |     *(var_24h) = v0;
    0x00001984 sw zero, 0x20(sp)         |     *(var_20h) = 0;
    0x00001988 bal 0x1ec4                |     sym_conf_get_int ();
    0x0000198c nop                       |     
    0x00001990 lw v0, 0x20(sp)           |     v0 = *(var_20h);
    0x00001994 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 <= 0) {
    0x00001998 blez v0, 0x1aa8           |         goto label_0;
                                         |     }
    0x0000199c lw s4, -0x7fc8(gp)        |     s4 = *((gp - 8178));
    0x000019a0 lw s3, -0x7fd8(gp)        |     s3 = *((gp - 8182));
    0x000019a4 lw s2, -0x7fd8(gp)        |     s2 = *((gp - 8182));
    0x000019a8 lw s1, -0x7fd8(gp)        |     s1 = *((gp - 8182));
    0x000019ac addiu s0, zero, 1         |     s0 = 1;
                                         |     /* section..data.rel.ro */
    0x000019b0 addiu s4, s4, 0x2f80      |     s4 += 0x2f80;
    0x000019b4 addiu s3, s3, 0x2608      |     s3 += str._com_axis_VideoLegacy1_Channel;
    0x000019b8 addiu s2, s2, 0x2628      |     s2 += str._s__d;
    0x000019bc addiu s1, s1, 0x2640      |     s1 += str.com.axis.Configuration.Legacy;
    0x000019c0 b 0x19d8                  |     
                                         |     while (fp >= 0) {
    0x000019c4 lw v0, 0x20(sp)           |         v0 = *(var_20h);
    0x000019c8 addiu s0, s0, 1           |         s0++;
    0x000019cc slt v0, v0, s0            |         v0 = (v0 < s0) ? 1 : 0;
    0x000019d0 addiu v0, zero, 1         |         v0 = 1;
                                         |         if (v0 != 0) {
    0x000019d4 bnez v0, 0x1a6c           |             goto label_1;
                                         |         }
    0x000019d8 lw t9, -0x7f44(gp)        |         t9 = sym.imp.g_strdup_printf
    0x000019dc move a2, s0               |         a2 = s0;
    0x000019e0 move a1, s3               |         a1 = s3;
    0x000019e4 move a0, s2               |         a0 = s2;
    0x000019e8 jalr t9                   |         t9 ();
    0x000019ec lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x000019f0 move a3, s1               |         a3 = s1;
    0x000019f4 move a2, v0               |         a2 = v0;
    0x000019f8 lw t9, -0x7f8c(gp)        |         t9 = sym.imp.sd_bus_add_object_vtable;
    0x000019fc move a1, zero             |         a1 = 0;
    0x00001a00 move a0, s5               |         a0 = s5;
    0x00001a04 sw s0, 0x14(sp)           |         *(var_14h) = s0;
    0x00001a08 sw s4, 0x10(sp)           |         *(var_10h_2) = s4;
    0x00001a0c move s7, v0               |         s7 = v0;
    0x00001a10 jalr t9                   |         t9 ();
    0x00001a14 lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x00001a18 move fp, v0               |         fp = v0;
    0x00001a1c lw t9, -0x7f14(gp)        |         t9 = sym.imp.g_free;
    0x00001a20 move a0, s7               |         a0 = s7;
    0x00001a24 jalr t9                   |         t9 ();
    0x00001a28 lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x00001a2c bgez fp, 0x19c4           |         
                                         |     }
    0x00001a30 lw t9, -0x7f18(gp)        |     t9 = sym.imp.strerror;
    0x00001a34 negu a0, fp               |     __asm ("negu a0, fp");
    0x00001a38 jalr t9                   |     t9 ();
    0x00001a3c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00001a40 sw v0, 0x10(sp)           |     *(var_10h_2) = v0;
    0x00001a44 addiu a1, zero, 0x100     |     a1 = 0x100;
    0x00001a48 lw a3, -0x7fd8(gp)        |     a3 = *((gp - 8182));
    0x00001a4c lw a2, -0x7fd8(gp)        |     a2 = *((gp - 8182));
    0x00001a50 lw t9, -0x7f98(gp)        |     t9 = sym.imp.g_log;
    0x00001a54 addiu a3, a3, 0x2848      |     a3 += 0x2848;
    0x00001a58 addiu a2, a2, 0x2768      |     a2 += str._sFailed_to_create_dbus_interface:__s;
    0x00001a5c move a0, zero             |     a0 = 0;
    0x00001a60 jalr t9                   |     t9 ();
    0x00001a64 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00001a68 move v0, zero             |     v0 = 0;
                                         |     do {
                                         | label_1:
    0x00001a6c lw a0, 0x24(sp)           |         a0 = *(var_24h);
    0x00001a70 lw v1, (s6)               |         v1 = *(s6);
    0x00001a74 lw ra, 0x4c(sp)           |         ra = *(var_4ch);
                                         |         if (a0 != v1) {
    0x00001a78 bne a0, v1, 0x1ad4        |             goto label_2;
                                         |         }
    0x00001a7c lw fp, 0x48(sp)           |         fp = *(var_48h);
    0x00001a80 lw s7, 0x44(sp)           |         s7 = *(var_44h);
    0x00001a84 lw s6, 0x40(sp)           |         s6 = *(var_40h);
    0x00001a88 lw s5, 0x3c(sp)           |         s5 = *(var_3ch);
    0x00001a8c lw s4, 0x38(sp)           |         s4 = *(var_38h);
    0x00001a90 lw s3, 0x34(sp)           |         s3 = *(var_34h);
    0x00001a94 lw s2, 0x30(sp)           |         s2 = *(var_30h);
    0x00001a98 lw s1, 0x2c(sp)           |         s1 = *(var_2ch);
    0x00001a9c lw s0, 0x28(sp)           |         s0 = *(var_28h);
    0x00001aa0 addiu sp, sp, 0x50        |         
    0x00001aa4 jr ra                     |         return v0;
                                         | label_0:
    0x00001aa8 lw a3, -0x7fd8(gp)        |         a3 = *((gp - 8182));
    0x00001aac lw a2, -0x7fd8(gp)        |         a2 = *((gp - 8182));
    0x00001ab0 lw t9, -0x7f98(gp)        |         t9 = sym.imp.g_log;
    0x00001ab4 addiu a3, a3, 0x2848      |         a3 += 0x2848;
    0x00001ab8 addiu a2, a2, 0x2734      |         a2 += str._sFailed_to_get_number_of_channels_from_conf_file.;
    0x00001abc addiu a1, zero, 0x100     |         a1 = 0x100;
    0x00001ac0 move a0, zero             |         a0 = 0;
    0x00001ac4 jalr t9                   |         t9 ();
    0x00001ac8 lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x00001acc move v0, zero             |         v0 = 0;
    0x00001ad0 b 0x1a6c                  |         
                                         |     } while (1);
                                         | label_2:
    0x00001ad4 lw t9, -0x7f7c(gp)        |     t9 = sym.imp.__stack_chk_fail;
    0x00001ad8 jalr t9                   |     t9 ();
    0x00001adc nop                       |     
                                         | }

[*] Function printf used 3 times video-service-legacy