[*] Binary protection state of video-service-legacy
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function system 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 @ 0xf10 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 4960 named .text */
0x00000f10 lui gp, 2 |
0x00000f14 addiu gp, gp, -0x5f00 |
0x00000f18 addu gp, gp, t9 | gp += t9;
0x00000f1c addiu sp, sp, -0x38 |
0x00000f20 lw t9, -0x7f1c(gp) | t9 = sym.imp.ax_log_stdout;
0x00000f24 sw s1, 0x2c(sp) | *(var_2ch) = s1;
0x00000f28 lw s1, -0x7f68(gp) | s1 = *((gp - 8154));
0x00000f2c sw gp, 0x18(sp) | *(var_18h) = gp;
0x00000f30 sw ra, 0x34(sp) | *(var_34h) = ra;
0x00000f34 sw s2, 0x30(sp) | *(var_30h) = s2;
0x00000f38 sw s0, 0x28(sp) | *(var_28h) = s0;
0x00000f3c lw v0, (s1) | v0 = *(s1);
0x00000f40 sw zero, 0x20(sp) | *(var_20h) = 0;
0x00000f44 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00000f48 jalr t9 | t9 ();
0x00000f4c nop |
0x00000f50 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f54 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00000f58 lw t9, -0x7fdc(gp) | t9 = sym.conf_setup;
0x00000f5c addiu a0, a0, 0x2484 | a0 += str._etc_video_service_legacy_video_service_legacy.conf;
0x00000f60 bal 0x1bc0 | sym_conf_setup ();
0x00000f64 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f68 bnez v0, 0xfb8 |
| while (v0 == 0) {
0x00000f6c addiu s0, zero, -1 | s0 = -1;
| label_2:
0x00000f70 lw t9, -0x7fd4(gp) | t9 = sym.conf_cleanup;
0x00000f74 bal 0x1d04 | sym_conf_cleanup ();
0x00000f78 nop |
0x00000f7c lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f80 lw t9, -0x7f70(gp) | t9 = sym.imp.sd_bus_unref;
0x00000f84 lw a0, 0x20(sp) | a0 = *(var_20h);
0x00000f88 jalr t9 | t9 ();
0x00000f8c lw a0, 0x24(sp) | a0 = *(var_24h);
0x00000f90 lw v1, (s1) | v1 = *(s1);
0x00000f94 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000f98 srl v0, s0, 0x1f | v0 = s0 >> 0x1f;
| if (a0 != v1) {
0x00000f9c bne a0, v1, 0x1154 | goto label_3;
| }
0x00000fa0 lw ra, 0x34(sp) | ra = *(var_34h);
0x00000fa4 lw s2, 0x30(sp) | s2 = *(var_30h);
0x00000fa8 lw s1, 0x2c(sp) | s1 = *(var_2ch);
0x00000fac lw s0, 0x28(sp) | s0 = *(var_28h);
0x00000fb0 addiu sp, sp, 0x38 |
0x00000fb4 jr ra | return v0;
0x00000fb8 lw t9, -0x7f5c(gp) | t9 = sym.imp.sd_bus_open_system
0x00000fbc addiu a0, sp, 0x20 | a0 = sp + 0x20;
0x00000fc0 jalr t9 | t9 ();
0x00000fc4 move s0, v0 | s0 = v0;
0x00000fc8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x00000fcc bltz v0, 0x10a0 | goto label_4;
| }
0x00000fd0 lw a0, 0x20(sp) | a0 = *(var_20h);
0x00000fd4 lw t9, -0x7fd0(gp) | t9 = sym.video_legacy_setup;
| if (a0 == 0) {
0x00000fd8 beqz a0, 0x10a0 | goto label_4;
| }
0x00000fdc bal 0x1920 | sym_video_legacy_setup ();
0x00000fe0 nop |
0x00000fe4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00000fe8 beqz v0, 0xf6c |
| }
0x00000fec lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00000ff0 lw t9, -0x7f84(gp) | t9 = sym.imp.sd_bus_request_name;
0x00000ff4 lw a0, 0x20(sp) | a0 = *(var_20h);
0x00000ff8 move a2, zero | a2 = 0;
0x00000ffc move a3, zero | a3 = 0;
0x00001000 addiu a1, a1, 0x24e0 | a1 += str.com.axis.VideoLegacy1;
0x00001004 jalr t9 | t9 ();
0x00001008 move s0, v0 | s0 = v0;
0x0000100c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x00001010 bltz v0, 0x1118 | goto label_5;
| }
0x00001014 addiu s2, zero, -4 | s2 = -4;
| label_0:
0x00001018 lw t9, -0x7f90(gp) | t9 = sym.imp.sd_bus_process;
| do {
| label_1:
0x0000101c lw a0, 0x20(sp) | a0 = *(var_20h);
0x00001020 move a1, zero | a1 = 0;
0x00001024 jalr t9 | t9 ();
0x00001028 move s0, v0 | s0 = v0;
0x0000102c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x00001030 bltz v0, 0x10dc | goto label_6;
| }
0x00001034 lw t9, -0x7f90(gp) | t9 = sym.imp.sd_bus_process;
0x00001038 bnez v0, 0x101c |
| } while (v0 != 0);
0x0000103c lw t9, -0x7f94(gp) | t9 = sym.imp.sd_bus_wait;
0x00001040 lw a0, 0x20(sp) | a0 = *(var_20h);
0x00001044 addiu a2, zero, -1 | a2 = -1;
0x00001048 addiu a3, zero, -1 | a3 = -1;
0x0000104c jalr t9 | t9 ();
0x00001050 move s0, v0 | s0 = v0;
0x00001054 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == s2) {
0x00001058 beq v0, s2, 0x1018 | goto label_0;
| }
0x0000105c lw t9, -0x7f90(gp) | t9 = sym.imp.sd_bus_process;
| if (v0 >= 0) {
0x00001060 bgez v0, 0x101c | goto label_1;
| }
0x00001064 lw t9, -0x7f18(gp) | t9 = sym.imp.strerror;
0x00001068 negu a0, v0 | __asm ("negu a0, v0");
0x0000106c jalr t9 | t9 ();
0x00001070 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001074 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00001078 addiu a1, zero, 0x100 | a1 = 0x100;
0x0000107c lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00001080 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00001084 lw t9, -0x7f98(gp) | t9 = sym.imp.g_log;
0x00001088 addiu a3, a3, 0x2848 | a3 += 0x2848;
0x0000108c addiu a2, a2, 0x253c | a2 += str._sFailed_to_wait_on_bus:__s;
0x00001090 move a0, zero | a0 = 0;
0x00001094 jalr t9 | t9 ();
0x00001098 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000109c b 0xf70 | goto label_2;
| label_4:
0x000010a0 lw t9, -0x7f18(gp) | t9 = sym.imp.strerror;
0x000010a4 negu a0, s0 | __asm ("negu a0, s0");
0x000010a8 jalr t9 | t9 ();
0x000010ac lw gp, 0x18(sp) | gp = *(var_18h);
0x000010b0 sw v0, 0x10(sp) | *(var_10h) = v0;
0x000010b4 addiu a1, zero, 0x100 | a1 = 0x100;
0x000010b8 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x000010bc lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x000010c0 lw t9, -0x7f98(gp) | t9 = sym.imp.g_log;
0x000010c4 addiu a3, a3, 0x2848 | a3 += 0x2848;
0x000010c8 addiu a2, a2, 0x24b8 | a2 += str._sFailed_to_connect_to_system_bus:__s
0x000010cc move a0, zero | a0 = 0;
0x000010d0 jalr t9 | t9 ();
0x000010d4 lw gp, 0x18(sp) | gp = *(var_18h);
0x000010d8 b 0xf70 | goto label_2;
| label_6:
0x000010dc lw t9, -0x7f18(gp) | t9 = sym.imp.strerror;
0x000010e0 negu a0, v0 | __asm ("negu a0, v0");
0x000010e4 jalr t9 | t9 ();
0x000010e8 lw gp, 0x18(sp) | gp = *(var_18h);
0x000010ec sw v0, 0x10(sp) | *(var_10h) = v0;
0x000010f0 addiu a1, zero, 0x100 | a1 = 0x100;
0x000010f4 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x000010f8 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x000010fc lw t9, -0x7f98(gp) | t9 = sym.imp.g_log;
0x00001100 addiu a3, a3, 0x2848 | a3 += 0x2848;
0x00001104 addiu a2, a2, 0x2520 | a2 += str._sFailed_to_process_bus:__s;
0x00001108 move a0, zero | a0 = 0;
0x0000110c jalr t9 | t9 ();
0x00001110 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001114 b 0xf70 | goto label_2;
| label_5:
0x00001118 lw t9, -0x7f18(gp) | t9 = sym.imp.strerror;
0x0000111c negu a0, v0 | __asm ("negu a0, v0");
0x00001120 jalr t9 | t9 ();
0x00001124 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001128 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000112c addiu a1, zero, 0x100 | a1 = 0x100;
0x00001130 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00001134 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00001138 lw t9, -0x7f98(gp) | t9 = sym.imp.g_log;
0x0000113c addiu a3, a3, 0x2848 | a3 += 0x2848;
0x00001140 addiu a2, a2, 0x24f8 | a2 += str._sFailed_to_acquire_service_name:__s;
0x00001144 move a0, zero | a0 = 0;
0x00001148 jalr t9 | t9 ();
0x0000114c lw gp, 0x18(sp) | gp = *(var_18h);
0x00001150 b 0xf70 | goto label_2;
| label_3:
0x00001154 lw t9, -0x7f7c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00001158 jalr t9 | t9 ();
0x0000115c nop |
| }
[*] Function system used 3 times video-service-legacy