[*] Binary protection state of vdo-stream-ctrl
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of vdo-stream-ctrl
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/vdo-stream-ctrl @ 0x1940 */
| #include <stdint.h>
|
; (fcn) fcn.00001940 () | void fcn_00001940 () {
0x00001940 lui gp, 2 |
0x00001944 addiu gp, gp, -0x6930 |
0x00001948 addu gp, gp, t9 | gp += t9;
0x0000194c addiu sp, sp, -0x60 |
0x00001950 lw t9, -0x7f2c(gp) | t9 = sym.imp.vdo_stream_get_info;
0x00001954 move a1, zero | a1 = 0;
0x00001958 sw gp, 0x28(sp) | *(var_28h) = gp;
0x0000195c sw ra, 0x5c(sp) | *(var_5ch) = ra;
0x00001960 sw s2, 0x40(sp) | *(var_40h) = s2;
0x00001964 sw s1, 0x3c(sp) | *(var_3ch) = s1;
0x00001968 sw s0, 0x38(sp) | *(var_38h) = s0;
0x0000196c sw fp, 0x58(sp) | *(var_58h) = fp;
0x00001970 sw s7, 0x54(sp) | *(var_54h) = s7;
0x00001974 sw s6, 0x50(sp) | *(var_50h) = s6;
0x00001978 sw s5, 0x4c(sp) | *(var_4ch) = s5;
0x0000197c sw s4, 0x48(sp) | *(var_48h) = s4;
0x00001980 sw s3, 0x44(sp) | *(var_44h) = s3;
0x00001984 move s2, a0 | s2 = a0;
0x00001988 jalr t9 | t9 ();
0x0000198c lw gp, 0x28(sp) | gp = *(var_28h);
0x00001990 move a1, zero | a1 = 0;
0x00001994 move a0, s2 | a0 = s2;
0x00001998 lw t9, -0x7f18(gp) | t9 = sym.imp.vdo_stream_get_settings;
0x0000199c move s0, v0 | s0 = v0;
0x000019a0 jalr t9 | t9 ();
0x000019a4 move s1, v0 | s1 = v0;
0x000019a8 lw gp, 0x28(sp) | gp = *(var_28h);
| if (s0 == 0) {
0x000019ac beqz s0, 0x1d00 | goto label_0;
| }
0x000019b0 lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
| if (v0 == 0) {
0x000019b4 beqz v0, 0x1c94 | goto label_1;
| }
0x000019b8 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000019bc addiu a2, zero, -1 | a2 = -1;
0x000019c0 addiu a1, a1, 0x2968 | a1 += str.format;
0x000019c4 move a0, v0 | a0 = v0;
0x000019c8 jalr t9 | t9 ();
0x000019cc lw gp, 0x28(sp) | gp = *(var_28h);
0x000019d0 addiu v1, zero, 3 | v1 = 3;
0x000019d4 move a2, zero | a2 = 0;
0x000019d8 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000019dc lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x000019e0 addiu a1, a1, 0x2970 | a1 += str.width;
| if (v0 == v1) {
0x000019e4 beq v0, v1, 0x1ccc | goto label_2;
| }
0x000019e8 addiu v1, zero, 6 | v1 = 6;
| if (v0 == v1) {
0x000019ec beq v0, v1, 0x1ccc | goto label_2;
| }
0x000019f0 nop |
0x000019f4 move a0, s1 | a0 = s1;
0x000019f8 jalr t9 | t9 ();
0x000019fc lw gp, 0x28(sp) | gp = *(var_28h);
0x00001a00 move a2, zero | a2 = 0;
0x00001a04 move a0, s1 | a0 = s1;
0x00001a08 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001a0c lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00001a10 addiu a1, a1, 0x2978 | a1 += str.height;
0x00001a14 move s3, v0 | s3 = v0;
0x00001a18 jalr t9 | t9 ();
0x00001a1c lw gp, 0x28(sp) | gp = *(var_28h);
0x00001a20 move s4, v0 | s4 = v0;
| do {
0x00001a24 lw t9, -0x7f70(gp) | t9 = sym.imp.vdo_stream_get_id;
0x00001a28 move a0, s2 | a0 = s2;
0x00001a2c jalr t9 | t9 ();
0x00001a30 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001a34 move a1, v0 | a1 = v0;
0x00001a38 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001a3c lw t9, -0x7f5c(gp) | t9 = sym.imp.g_strdup_printf
0x00001a40 addiu a0, a0, 0x2980 | a0 += str._08x;
0x00001a44 jalr t9 | t9 ();
0x00001a48 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001a4c move a2, s4 | a2 = s4;
0x00001a50 move a1, s3 | a1 = s3;
0x00001a54 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001a58 lw t9, -0x7f5c(gp) | t9 = sym.imp.g_strdup_printf
0x00001a5c addiu a0, a0, 0x2988 | a0 += str._ux_u;
0x00001a60 move s5, v0 | s5 = v0;
0x00001a64 jalr t9 | t9 ();
0x00001a68 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001a6c move a2, zero | a2 = 0;
0x00001a70 move a3, zero | a3 = 0;
0x00001a74 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001a78 lw t9, -0x7f94(gp) | t9 = sym.imp.vdo_map_get_int64;
0x00001a7c addiu a1, a1, 0x2990 | a1 += str.statistics.duration;
0x00001a80 move a0, s0 | a0 = s0;
0x00001a84 move s4, v0 | s4 = v0;
0x00001a88 jalr t9 | t9 ();
0x00001a8c lw gp, 0x28(sp) | gp = *(var_28h);
0x00001a90 lui a2, 0xf | a2 = 0xf4240;
0x00001a94 ori a2, a2, 0x4240 |
0x00001a98 lw t9, -0x7fd8(gp) | t9 = *(gp);
0x00001a9c move a3, zero | a3 = 0;
0x00001aa0 move a0, v0 | a0 = v0;
0x00001aa4 move a1, v1 | a1 = v1;
0x00001aa8 move s2, v0 | s2 = v0;
0x00001aac move s3, v1 | s3 = v1;
0x00001ab0 bal 0x1d70 | fcn_00001d70 ();
0x00001ab4 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001ab8 addiu a2, zero, 0x3c | a2 = 0x3c;
0x00001abc move a3, zero | a3 = 0;
0x00001ac0 lw t9, -0x7fd4(gp) | t9 = *(gp);
0x00001ac4 move a0, v0 | a0 = v0;
0x00001ac8 move a1, v1 | a1 = v1;
0x00001acc bal 0x2210 | fcn_00002210 ();
0x00001ad0 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001ad4 lui a2, 0x393 | a2 = 0x3930000;
0x00001ad8 move a0, s2 | a0 = s2;
0x00001adc lw t9, -0x7fd8(gp) | t9 = *(gp);
0x00001ae0 move a1, s3 | a1 = s3;
0x00001ae4 ori a2, a2, 0x8700 | a2 |= 0x8700;
0x00001ae8 move a3, zero | a3 = 0;
0x00001aec move s6, v0 | s6 = v0;
0x00001af0 bal 0x1d70 | fcn_00001d70 ();
0x00001af4 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001af8 addiu a2, zero, 0x3c | a2 = 0x3c;
0x00001afc move a3, zero | a3 = 0;
0x00001b00 lw t9, -0x7fd4(gp) | t9 = *(gp);
0x00001b04 move a0, v0 | a0 = v0;
0x00001b08 move a1, v1 | a1 = v1;
0x00001b0c bal 0x2210 | fcn_00002210 ();
0x00001b10 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001b14 lui a2, 0xd693 | a2 = 0xd6930000;
0x00001b18 move a0, s2 | a0 = s2;
0x00001b1c lw t9, -0x7fd8(gp) | t9 = *(gp);
0x00001b20 move a1, s3 | a1 = s3;
0x00001b24 ori a2, a2, 0xa400 | a2 |= 0xa400;
0x00001b28 move a3, zero | a3 = 0;
0x00001b2c move s2, v0 | s2 = v0;
0x00001b30 bal 0x1d70 | fcn_00001d70 ();
0x00001b34 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001b38 move a3, s6 | a3 = s6;
0x00001b3c move a2, s2 | a2 = s2;
0x00001b40 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001b44 lw t9, -0x7f5c(gp) | t9 = sym.imp.g_strdup_printf
0x00001b48 move a1, v0 | a1 = v0;
0x00001b4c addiu a0, a0, 0x29a4 | a0 += str._u:_02u:_02u;
0x00001b50 jalr t9 | t9 ();
0x00001b54 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001b58 move a2, zero | a2 = 0;
0x00001b5c move a0, s1 | a0 = s1;
0x00001b60 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001b64 lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00001b68 addiu a1, a1, 0x29b4 | a1 += str.channel;
0x00001b6c move s2, v0 | s2 = v0;
0x00001b70 jalr t9 | t9 ();
0x00001b74 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001b78 move a2, zero | a2 = 0;
0x00001b7c move a0, s0 | a0 = s0;
0x00001b80 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001b84 lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00001b88 addiu a1, a1, 0x29bc | a1 += str.statistics.framerate;
0x00001b8c sw v0, 0x34(sp) | *(var_34h) = v0;
0x00001b90 jalr t9 | t9 ();
0x00001b94 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001b98 move a2, zero | a2 = 0;
0x00001b9c move a0, s0 | a0 = s0;
0x00001ba0 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001ba4 lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00001ba8 addiu a1, a1, 0x29d4 | a1 += str.statistics.bitrate;
0x00001bac move s3, v0 | s3 = v0;
0x00001bb0 jalr t9 | t9 ();
0x00001bb4 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001bb8 move a2, zero | a2 = 0;
0x00001bbc move a0, s0 | a0 = s0;
0x00001bc0 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001bc4 lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00001bc8 addiu a1, a1, 0x29e8 | a1 += str.statistics.frame_count;
0x00001bcc move s6, v0 | s6 = v0;
0x00001bd0 jalr t9 | t9 ();
0x00001bd4 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001bd8 move a2, zero | a2 = 0;
0x00001bdc move a0, s0 | a0 = s0;
0x00001be0 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001be4 lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00001be8 addiu a1, a1, 0x2a00 | a1 += str.statistics.failed_frames;
0x00001bec move s7, v0 | s7 = v0;
0x00001bf0 jalr t9 | t9 ();
0x00001bf4 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001bf8 move a2, zero | a2 = 0;
0x00001bfc move a0, s0 | a0 = s0;
0x00001c00 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001c04 lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00001c08 addiu a1, a1, 0x2a1c | a1 += str.statistics.bit_count;
0x00001c0c move fp, v0 | fp = v0;
0x00001c10 jalr t9 | t9 ();
0x00001c14 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001c18 lw v1, 0x34(sp) | v1 = *(var_34h);
0x00001c1c sw v0, 0x24(sp) | *(var_24h) = v0;
0x00001c20 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001c24 lw t9, -0x7f1c(gp) | t9 = sym.imp.g_print;
0x00001c28 move a3, s4 | a3 = s4;
0x00001c2c move a2, s5 | a2 = s5;
0x00001c30 move a1, v1 | a1 = v1;
0x00001c34 addiu a0, a0, 0x2a34 | a0 += str._10u_16s_12s_16s_12u_16u_12u_12u_16u_n;
0x00001c38 sw fp, 0x20(sp) | *(var_20h) = fp;
0x00001c3c sw s7, 0x1c(sp) | *(var_1ch) = s7;
0x00001c40 sw s6, 0x18(sp) | *(var_18h) = s6;
0x00001c44 sw s3, 0x14(sp) | *(var_14h) = s3;
0x00001c48 sw s2, 0x10(sp) | *(var_10h) = s2;
0x00001c4c jalr t9 | t9 ();
0x00001c50 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001c54 lw t9, -0x7f14(gp) | t9 = sym.imp.g_free;
0x00001c58 move a0, s5 | a0 = s5;
0x00001c5c jalr t9 | t9 ();
0x00001c60 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001c64 lw t9, -0x7f14(gp) | t9 = sym.imp.g_free;
0x00001c68 move a0, s4 | a0 = s4;
0x00001c6c jalr t9 | t9 ();
0x00001c70 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001c74 lw t9, -0x7f14(gp) | t9 = sym.imp.g_free;
0x00001c78 move a0, s2 | a0 = s2;
0x00001c7c jalr t9 | t9 ();
0x00001c80 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001c84 lw t9, -0x7f28(gp) | t9 = *((gp - 8138));
0x00001c88 move a0, s1 | a0 = s1;
0x00001c8c jalr t9 | t9 ();
0x00001c90 lw gp, 0x28(sp) | gp = *(var_28h);
| label_1:
0x00001c94 lw ra, 0x5c(sp) | ra = *(var_5ch);
0x00001c98 lw fp, 0x58(sp) | fp = *(var_58h);
0x00001c9c lw s7, 0x54(sp) | s7 = *(var_54h);
0x00001ca0 lw s6, 0x50(sp) | s6 = *(var_50h);
0x00001ca4 lw s5, 0x4c(sp) | s5 = *(var_4ch);
0x00001ca8 lw s4, 0x48(sp) | s4 = *(var_48h);
0x00001cac lw s3, 0x44(sp) | s3 = *(var_44h);
0x00001cb0 lw s2, 0x40(sp) | s2 = *(var_40h);
0x00001cb4 lw s1, 0x3c(sp) | s1 = *(var_3ch);
0x00001cb8 move a0, s0 | a0 = s0;
0x00001cbc lw t9, -0x7f28(gp) | t9 = *((gp - 8138));
0x00001cc0 lw s0, 0x38(sp) | s0 = *(var_38h);
0x00001cc4 addiu sp, sp, 0x60 |
0x00001cc8 jr t9 | t9 ();
| label_2:
0x00001ccc move a0, s0 | a0 = s0;
0x00001cd0 jalr t9 | t9 ();
0x00001cd4 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001cd8 move a2, zero | a2 = 0;
0x00001cdc move a0, s0 | a0 = s0;
0x00001ce0 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001ce4 lw t9, -0x7f80(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00001ce8 addiu a1, a1, 0x2978 | a1 += str.height;
0x00001cec move s3, v0 | s3 = v0;
0x00001cf0 jalr t9 | t9 ();
0x00001cf4 move s4, v0 | s4 = v0;
0x00001cf8 lw gp, 0x28(sp) | gp = *(var_28h);
0x00001cfc b 0x1a24 |
| } while (1);
| label_0:
0x00001d00 lw ra, 0x5c(sp) | ra = *(var_5ch);
| if (v0 != 0) {
0x00001d04 beqz v0, 0x1d3c |
0x00001d08 lw fp, 0x58(sp) | fp = *(var_58h);
0x00001d0c lw s7, 0x54(sp) | s7 = *(var_54h);
0x00001d10 lw s6, 0x50(sp) | s6 = *(var_50h);
0x00001d14 lw s5, 0x4c(sp) | s5 = *(var_4ch);
0x00001d18 lw s4, 0x48(sp) | s4 = *(var_48h);
0x00001d1c lw s3, 0x44(sp) | s3 = *(var_44h);
0x00001d20 lw s2, 0x40(sp) | s2 = *(var_40h);
0x00001d24 lw s0, 0x38(sp) | s0 = *(var_38h);
0x00001d28 move a0, s1 | a0 = s1;
0x00001d2c lw t9, -0x7f28(gp) | t9 = *((gp - 8138));
0x00001d30 lw s1, 0x3c(sp) | s1 = *(var_3ch);
0x00001d34 addiu sp, sp, 0x60 |
0x00001d38 jr t9 | t9 ();
| }
0x00001d3c lw fp, 0x58(sp) | fp = *(var_58h);
0x00001d40 lw s7, 0x54(sp) | s7 = *(var_54h);
0x00001d44 lw s6, 0x50(sp) | s6 = *(var_50h);
0x00001d48 lw s5, 0x4c(sp) | s5 = *(var_4ch);
0x00001d4c lw s4, 0x48(sp) | s4 = *(var_48h);
0x00001d50 lw s3, 0x44(sp) | s3 = *(var_44h);
0x00001d54 lw s2, 0x40(sp) | s2 = *(var_40h);
0x00001d58 lw s1, 0x3c(sp) | s1 = *(var_3ch);
0x00001d5c lw s0, 0x38(sp) | s0 = *(var_38h);
0x00001d60 addiu sp, sp, 0x60 |
0x00001d64 jr ra | return v0;
| }
[*] Function printf used 4 times vdo-stream-ctrl