[*] Binary protection state of vdo

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


[*] Function sprintf tear down of vdo

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/vdo @ 0x4d538 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.0004d538 ()                  | void fcn_0004d538 () {
    0x0004d538 lui gp, 3                     |     
    0x0004d53c addiu gp, gp, -0x1448         |     
    0x0004d540 addu gp, gp, t9               |     gp += t9;
    0x0004d544 addiu sp, sp, -0x58           |     
    0x0004d548 lw a3, -0x7fa0(gp)            |     a3 = *(gp);
    0x0004d54c sw s1, 0x48(sp)               |     *(var_48h) = s1;
    0x0004d550 lw s1, -0x7490(gp)            |     s1 = *((gp - 7460));
    0x0004d554 lw t9, -0x7568(gp)            |     t9 = sym.imp.__sprintf_chk
    0x0004d558 addiu v1, a0, -1              |     v1 = a0 + -1;
    0x0004d55c lw v0, (s1)                   |     v0 = *(s1);
    0x0004d560 sw s0, 0x44(sp)               |     *(var_44h) = s0;
    0x0004d564 addiu s0, sp, 0x24            |     s0 = sp + 0x24;
    0x0004d568 sw gp, 0x18(sp)               |     *(var_18h) = gp;
    0x0004d56c sw ra, 0x54(sp)               |     *(var_54h) = ra;
    0x0004d570 sw s3, 0x50(sp)               |     *(var_50h) = s3;
    0x0004d574 sw s2, 0x4c(sp)               |     *(var_4ch) = s2;
                                             |     /* str._dev_camov_d */
    0x0004d578 addiu a3, a3, -0x3374         |     a3 += -0x3374;
    0x0004d57c addiu a2, zero, 0x18          |     a2 = 0x18;
    0x0004d580 sw v1, 0x10(sp)               |     *(var_10h) = v1;
    0x0004d584 move s2, a0                   |     s2 = a0;
    0x0004d588 move s3, a1                   |     s3 = a1;
    0x0004d58c move a0, s0                   |     a0 = s0;
    0x0004d590 addiu a1, zero, 1             |     a1 = 1;
    0x0004d594 sw v0, 0x3c(sp)               |     *(var_3ch) = v0;
    0x0004d598 jalr t9                       |     t9 ();
    0x0004d59c nop                           |     
    0x0004d5a0 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004d5a4 move a0, s0                   |     a0 = s0;
    0x0004d5a8 lw t9, -0x7408(gp)            |     t9 = sym.imp.open;
    0x0004d5ac addiu a1, zero, 2             |     a1 = 2;
    0x0004d5b0 jalr t9                       |     t9 ();
    0x0004d5b4 move s0, v0                   |     s0 = v0;
    0x0004d5b8 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004d5bc bltz v0, 0x4d5ec              |     
                                             |     while (1) {
    0x0004d5c0 lw a0, 0x3c(sp)               |         a0 = *(var_3ch);
    0x0004d5c4 lw v1, (s1)                   |         v1 = *(s1);
    0x0004d5c8 move v0, s0                   |         v0 = s0;
                                             |         if (a0 != v1) {
    0x0004d5cc bne a0, v1, 0x4d624           |             goto label_0;
                                             |         }
    0x0004d5d0 lw ra, 0x54(sp)               |         ra = *(var_54h);
    0x0004d5d4 lw s3, 0x50(sp)               |         s3 = *(var_50h);
    0x0004d5d8 lw s2, 0x4c(sp)               |         s2 = *(var_4ch);
    0x0004d5dc lw s1, 0x48(sp)               |         s1 = *(var_48h);
    0x0004d5e0 lw s0, 0x44(sp)               |         s0 = *(var_44h);
    0x0004d5e4 addiu sp, sp, 0x58            |         
    0x0004d5e8 jr ra                         |         return v0;
    0x0004d5ec lw t9, -0x7eb8(gp)            |         t9 = sym.vdo_error_quark;
    0x0004d5f0 jalr t9                       |         t9 ();
    0x0004d5f4 nop                           |         
    0x0004d5f8 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x0004d5fc sw s2, 0x10(sp)               |         *(var_10h) = s2;
    0x0004d600 addiu a2, zero, 8             |         a2 = 8;
    0x0004d604 lw a3, -0x7fa0(gp)            |         a3 = *(gp);
    0x0004d608 lw t9, -0x78ec(gp)            |         t9 = sym.imp.g_set_error;
                                             |         /* str.Invalid_Input:__u */
    0x0004d60c addiu a3, a3, -0x3364         |         a3 += -0x3364;
    0x0004d610 move a1, v0                   |         a1 = v0;
    0x0004d614 move a0, s3                   |         a0 = s3;
    0x0004d618 jalr t9                       |         t9 ();
    0x0004d61c lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x0004d620 b 0x4d5c0                     |         
                                             |     }
                                             | label_0:
    0x0004d624 lw t9, -0x7704(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x0004d628 jalr t9                       |     t9 ();
    0x0004d62c nop                           |     
                                             | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/vdo @ 0x4f8f4 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.artpec_stream_new ()         | void artpec_stream_new () {
    0x0004f8f4 lui gp, 3                     |     
    0x0004f8f8 addiu gp, gp, -0x3804         |     
    0x0004f8fc addu gp, gp, t9               |     gp += t9;
    0x0004f900 addiu sp, sp, -0x68           |     
    0x0004f904 lw t9, -0x79a0(gp)            |     t9 = sym.artpec_stream_get_type;
    0x0004f908 sw s4, 0x50(sp)               |     *(var_50h) = s4;
    0x0004f90c lw s4, -0x7490(gp)            |     s4 = *((gp - 7460));
    0x0004f910 sw ra, 0x64(sp)               |     *(var_64h) = ra;
    0x0004f914 sw gp, 0x18(sp)               |     *(var_18h) = gp;
    0x0004f918 lw v0, (s4)                   |     v0 = *(s4);
    0x0004f91c sw s3, 0x4c(sp)               |     *(var_4ch) = s3;
    0x0004f920 sw s2, 0x48(sp)               |     *(var_48h) = s2;
    0x0004f924 sw s1, 0x44(sp)               |     *(var_44h) = s1;
    0x0004f928 sw s0, 0x40(sp)               |     *(var_40h) = s0;
    0x0004f92c sw fp, 0x60(sp)               |     *(var_60h) = fp;
    0x0004f930 sw s7, 0x5c(sp)               |     *(var_5ch) = s7;
    0x0004f934 sw s6, 0x58(sp)               |     *(var_58h) = s6;
    0x0004f938 sw s5, 0x54(sp)               |     *(var_54h) = s5;
    0x0004f93c sw v0, 0x3c(sp)               |     *(var_3ch) = v0;
    0x0004f940 move s1, a0                   |     s1 = a0;
    0x0004f944 move s2, a1                   |     s2 = a1;
    0x0004f948 bal 0x4e5f4                   |     sym_artpec_stream_get_type ();
    0x0004f94c lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004f950 move a1, zero                 |     a1 = 0;
    0x0004f954 lw t9, -0x7404(gp)            |     t9 = sym.imp.g_object_new;
    0x0004f958 move a0, v0                   |     a0 = v0;
    0x0004f95c jalr t9                       |     t9 ();
    0x0004f960 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004f964 lw a0, 0x1c(v0)               |     a0 = *((v0 + 7));
    0x0004f968 move a1, s1                   |     a1 = s1;
    0x0004f96c lw t9, -0x7ac8(gp)            |     t9 = sym.hal_stream_settings_merge;
    0x0004f970 move s0, v0                   |     s0 = v0;
    0x0004f974 bal 0x4f6ec                   |     sym_hal_stream_settings_merge ();
    0x0004f978 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004f97c lw s1, 0x1c(s0)               |     s1 = *((s0 + 7));
    0x0004f980 lw s3, -0x7fdc(gp)            |     s3 = *(gp);
    0x0004f984 lw t9, -0x7dc4(gp)            |     t9 = sym.vdo_map_contains;
                                             |     /* str.input */
    0x0004f988 addiu a1, s3, 0x5fd0          |     a1 = s3 + 0x5fd0;
    0x0004f98c move a0, s1                   |     a0 = s1;
    0x0004f990 jalr t9                       |     t9 ();
    0x0004f994 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004f998 addiu a2, zero, 1             |     a2 = 1;
    0x0004f99c lw t9, -0x7ed0(gp)            |     t9 = sym.vdo_map_get_uint32;
                                             |     if (v0 == 0) {
    0x0004f9a0 beqz v0, 0x4fbdc              |         goto label_11;
                                             |     }
                                             |     /* str.input */
    0x0004f9a4 addiu a1, s3, 0x5fd0          |     a1 = s3 + 0x5fd0;
    0x0004f9a8 move a0, s1                   |     a0 = s1;
    0x0004f9ac jalr t9                       |     t9 ();
    0x0004f9b0 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004f9b4 move a1, s2                   |     a1 = s2;
    0x0004f9b8 move a0, v0                   |     a0 = v0;
                                             | label_1:
    0x0004f9bc lw t9, -0x7fdc(gp)            |     t9 = *(gp);
                                             |     /* fcn.0004d538 */
    0x0004f9c0 addiu t9, t9, -0x2ac8         |     t9 += -0x2ac8;
    0x0004f9c4 bal 0x4d538                   |     fcn_0004d538 ();
    0x0004f9c8 nop                           |     
    0x0004f9cc move s3, v0                   |     s3 = v0;
    0x0004f9d0 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004f9d4 sw v0, 0x2c(s0)               |     *((s0 + 11)) = v0;
                                             | label_2:
    0x0004f9d8 lw a1, -0x7fdc(gp)            |     a1 = *(gp);
                                             |     if (s3 < 0) {
    0x0004f9dc bltz s3, 0x4fb6c              |         goto label_6;
                                             |     }
    0x0004f9e0 lw t9, -0x7ed0(gp)            |     t9 = sym.vdo_map_get_uint32;
    0x0004f9e4 addiu a2, zero, -1            |     a2 = -1;
                                             |     /* str.format */
    0x0004f9e8 addiu a1, a1, 0x5fe0          |     a1 += 0x5fe0;
    0x0004f9ec move a0, s1                   |     a0 = s1;
    0x0004f9f0 jalr t9                       |     t9 ();
    0x0004f9f4 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004f9f8 lw a2, 0x18(s0)               |     a2 = *((s0 + 6));
    0x0004f9fc move a0, s1                   |     a0 = s1;
    0x0004fa00 lw a1, -0x7fa0(gp)            |     a1 = *(gp);
    0x0004fa04 lw t9, -0x7ed0(gp)            |     t9 = sym.vdo_map_get_uint32;
                                             |     /* str.buffer.strategy */
    0x0004fa08 addiu a1, a1, -0x5f40         |     a1 += -0x5f40;
    0x0004fa0c sw v0, 0xc(s0)                |     *((s0 + 3)) = v0;
    0x0004fa10 jalr t9                       |     t9 ();
    0x0004fa14 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fa18 lhu a2, 0x48(s0)              |     a2 = *((s0 + 36));
    0x0004fa1c move a0, s1                   |     a0 = s1;
    0x0004fa20 lw a1, -0x7fa0(gp)            |     a1 = *(gp);
    0x0004fa24 lw t9, -0x7a50(gp)            |     t9 = sym.vdo_map_get_uint16;
                                             |     /* str.timestamp.type */
    0x0004fa28 addiu a1, a1, -0x597c         |     a1 += -0x597c;
    0x0004fa2c sw v0, 0x18(s0)               |     *((s0 + 6)) = v0;
    0x0004fa30 jalr t9                       |     t9 ();
    0x0004fa34 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fa38 lw a0, 0x2c(s0)               |     a0 = *((s0 + 11));
    0x0004fa3c sw v0, 0x48(s0)               |     *((s0 + 18)) = v0;
    0x0004fa40 lw a2, -0x7fdc(gp)            |     a2 = *(gp);
    0x0004fa44 lw t9, -0x77d4(gp)            |     t9 = sym.imp.g_unix_fd_add;
    0x0004fa48 move a3, s0                   |     a3 = s0;
    0x0004fa4c addiu a2, a2, -0x28b4         |     a2 += -0x28b4;
    0x0004fa50 addiu a1, zero, 3             |     a1 = 3;
    0x0004fa54 jalr t9                       |     t9 ();
    0x0004fa58 lw s3, 0xc(s0)                |     s3 = *((s0 + 3));
    0x0004fa5c addiu v1, zero, 3             |     v1 = 3;
    0x0004fa60 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fa64 sw v0, 0x24(s0)               |     *((s0 + 9)) = v0;
    0x0004fa68 sw zero, 0x28(s0)             |     *((s0 + 10)) = 0;
    0x0004fa6c sw zero, 0x14(s0)             |     *((s0 + 5)) = 0;
                                             |     if (s3 == v1) {
    0x0004fa70 beq s3, v1, 0x4fb04           |         goto label_12;
                                             |     }
                                             | label_0:
    0x0004fa74 lw t9, -0x7fdc(gp)            |     t9 = *(gp);
                                             |     /* fcn.0004ddb4 */
    0x0004fa78 addiu t9, t9, -0x224c         |     t9 += -aav.0x0000224c;
    0x0004fa7c move a0, s0                   |     a0 = s0;
    0x0004fa80 bal 0x4ddb4                   |     fcn_0004ddb4 ();
    0x0004fa84 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 == 0) {
    0x0004fa88 beqz v0, 0x4fb6c              |         goto label_6;
                                             |     }
    0x0004fa8c lw s3, -0x7fa0(gp)            |     s3 = *(gp);
    0x0004fa90 lw t9, -0x7ed0(gp)            |     t9 = sym.vdo_map_get_uint32;
    0x0004fa94 lw a0, 0x1c(s0)               |     a0 = *((s0 + 7));
    0x0004fa98 addiu a2, zero, 3             |     a2 = 3;
                                             |     /* str.buffer.count */
    0x0004fa9c addiu a1, s3, -0x31bc         |     a1 = s3 + -0x31bc;
    0x0004faa0 jalr t9                       |     t9 ();
    0x0004faa4 move s1, v0                   |     s1 = v0;
    0x0004faa8 sltiu v0, v0, 6               |     v0 = (v0 < 6) ? 1 : 0;
    0x0004faac lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 == 0) {
    0x0004fab0 beqz v0, 0x4fc54              |         goto label_13;
                                             |     }
                                             |     if (s1 != 0) {
    0x0004fab4 beql s1, zero, 0x4fabc        |         
    0x0004fab8 addiu s1, zero, 1             |         s1 = 1;
                                             |     }
    0x0004fabc lw v0, 0xc(s0)                |     v0 = *((s0 + 3));
    0x0004fac0 sltiu v0, v0, 3               |     v0 = (v0 < 3) ? 1 : 0;
    0x0004fac4 lw t9, -0x7abc(gp)            |     t9 = sym.vdo_map_set_uint32;
                                             |     if (v0 == 0) {
    0x0004fac8 beqz v0, 0x4fc68              |         goto label_14;
                                             |     }
                                             | label_3:
    0x0004facc lw s2, -0x7fdc(gp)            |     s2 = *(gp);
    0x0004fad0 addiu s1, zero, 3             |     s1 = 3;
                                             |     /* fcn.0004d298 */
    0x0004fad4 addiu s2, s2, -0x2d68         |     s2 += -aav.0x00002d68;
                                             |     do {
    0x0004fad8 move a2, zero                 |         a2 = 0;
    0x0004fadc lui a1, 0x10                  |         a1 = 0x100000;
    0x0004fae0 move t9, s2                   |         t9 = s2;
    0x0004fae4 move a0, s0                   |         a0 = s0;
    0x0004fae8 bal 0x4d298                   |         fcn_0004d298 ();
    0x0004faec addiu s1, s1, -1              |         s1 += -1;
    0x0004faf0 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x0004faf4 sw zero, 0x10(v0)             |         *((v0 + 4)) = 0;
    0x0004faf8 bnez s1, 0x4fad8              |         
                                             |     } while (s1 != 0);
    0x0004fafc b 0x4fb9c                     |     goto label_4;
    0x0004fb00 nop                           |     
                                             | label_12:
    0x0004fb04 lw a3, -0x7fa0(gp)            |     a3 = *(gp);
    0x0004fb08 lw a1, -0x7fa0(gp)            |     a1 = *(gp);
    0x0004fb0c lw t9, -0x7dbc(gp)            |     t9 = sym.vdo_map_get_string;
    0x0004fb10 move a0, s1                   |     a0 = s1;
    0x0004fb14 addiu a3, a3, -0x560c         |     a3 += -0x560c;
    0x0004fb18 move a2, zero                 |     a2 = 0;
                                             |     /* str.subformat */
    0x0004fb1c addiu a1, a1, -0x5964         |     a1 += -0x5964;
    0x0004fb20 jalr t9                       |     t9 ();
    0x0004fb24 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fb28 move a0, v0                   |     a0 = v0;
    0x0004fb2c move s1, v0                   |     s1 = v0;
    0x0004fb30 lw a1, -0x7fa0(gp)            |     a1 = *(gp);
    0x0004fb34 lw t9, -0x7808(gp)            |     t9 = sym.imp.g_ascii_strcasecmp;
                                             |     /* str.Y800 */
    0x0004fb38 addiu a1, a1, -0x3350         |     a1 += -0x3350;
    0x0004fb3c jalr t9                       |     t9 ();
    0x0004fb40 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x0004fb44 bnez v0, 0x4fdd0              |         goto label_15;
                                             |     }
                                             | label_8:
    0x0004fb48 addiu v0, zero, 2             |     v0 = 2;
    0x0004fb4c sw v0, 0x10(s0)               |     *((s0 + 4)) = v0;
                                             | label_9:
    0x0004fb50 lw v0, 0x14(s0)               |     v0 = *((s0 + 5));
    0x0004fb54 lw t9, -0x7fdc(gp)            |     t9 = *(gp);
                                             |     if (v0 == 0) {
    0x0004fb58 beqz v0, 0x4fa74              |         goto label_0;
                                             |     }
                                             |     /* fcn.0004d130 */
    0x0004fb5c addiu t9, t9, -0x2ed0         |     t9 += -aav.0x00002ed0;
    0x0004fb60 move a0, s0                   |     a0 = s0;
    0x0004fb64 bal 0x4d130                   |     fcn_0004d130 ();
    0x0004fb68 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             | label_6:
    0x0004fb6c lw a1, -0x7fa0(gp)            |     a1 = *(gp);
                                             |     if (s2 == 0) {
    0x0004fb70 beqz s2, 0x4fd60              |         goto label_16;
                                             |     }
    0x0004fb74 lw t9, -0x7938(gp)            |     t9 = sym.imp.g_prefix_error;
                                             |     /* str.Failed_to_create_stream:_ */
    0x0004fb78 addiu a1, a1, -0x3194         |     a1 += -0x3194;
    0x0004fb7c move a0, s2                   |     a0 = s2;
    0x0004fb80 jalr t9                       |     t9 ();
    0x0004fb84 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             | label_7:
    0x0004fb88 lw t9, -0x77ec(gp)            |     t9 = *((gp - 7675));
    0x0004fb8c move a0, s0                   |     a0 = s0;
    0x0004fb90 jalr t9                       |     t9 ();
    0x0004fb94 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fb98 move s0, zero                 |     s0 = 0;
                                             | label_4:
    0x0004fb9c lw a0, 0x3c(sp)               |     a0 = *(var_3ch);
    0x0004fba0 lw v1, (s4)                   |     v1 = *(s4);
    0x0004fba4 move v0, s0                   |     v0 = s0;
                                             |     if (a0 != v1) {
    0x0004fba8 bne a0, v1, 0x4feec           |         goto label_17;
                                             |     }
    0x0004fbac lw ra, 0x64(sp)               |     ra = *(var_64h);
    0x0004fbb0 lw fp, 0x60(sp)               |     fp = *(var_60h);
    0x0004fbb4 lw s7, 0x5c(sp)               |     s7 = *(var_5ch);
    0x0004fbb8 lw s6, 0x58(sp)               |     s6 = *(var_58h);
    0x0004fbbc lw s5, 0x54(sp)               |     s5 = *(var_54h);
    0x0004fbc0 lw s4, 0x50(sp)               |     s4 = *(var_50h);
    0x0004fbc4 lw s3, 0x4c(sp)               |     s3 = *(var_4ch);
    0x0004fbc8 lw s2, 0x48(sp)               |     s2 = *(var_48h);
    0x0004fbcc lw s1, 0x44(sp)               |     s1 = *(var_44h);
    0x0004fbd0 lw s0, 0x40(sp)               |     s0 = *(var_40h);
    0x0004fbd4 addiu sp, sp, 0x68            |     
    0x0004fbd8 jr ra                         |     return v0;
                                             | label_11:
    0x0004fbdc lw a1, -0x7fa0(gp)            |     a1 = *(gp);
    0x0004fbe0 move a0, s1                   |     a0 = s1;
                                             |     /* esilref: 'channel' */
    0x0004fbe4 addiu a1, a1, -0x3274         |     a1 += -0x3274;
    0x0004fbe8 jalr t9                       |     t9 ();
    0x0004fbec move s5, v0                   |     s5 = v0;
    0x0004fbf0 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 == 0) {
    0x0004fbf4 bnez v0, 0x4fc04              |         
    0x0004fbf8 move a1, s2                   |         a1 = s2;
    0x0004fbfc addiu a0, zero, 1             |         a0 = 1;
    0x0004fc00 b 0x4f9bc                     |         goto label_1;
                                             |     }
    0x0004fc04 lw a3, -0x7fa0(gp)            |     a3 = *(gp);
    0x0004fc08 lw t9, -0x7568(gp)            |     t9 = sym.imp.__sprintf_chk
    0x0004fc0c addiu s3, sp, 0x24            |     s3 = sp + 0x24;
    0x0004fc10 addiu v0, v0, -1              |     v0 += -1;
    0x0004fc14 move a0, s3                   |     a0 = s3;
                                             |     /* str._dev_cam_d */
    0x0004fc18 addiu a3, a3, -0x31e8         |     a3 += -0x31e8;
    0x0004fc1c addiu a2, zero, 0x18          |     a2 = 0x18;
    0x0004fc20 addiu a1, zero, 1             |     a1 = 1;
    0x0004fc24 sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x0004fc28 jalr t9                       |     t9 ();
    0x0004fc2c lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fc30 move a0, s3                   |     a0 = s3;
    0x0004fc34 lw t9, -0x7408(gp)            |     t9 = sym.imp.open;
    0x0004fc38 addiu a1, zero, 2             |     a1 = 2;
    0x0004fc3c jalr t9                       |     t9 ();
    0x0004fc40 move s3, v0                   |     s3 = v0;
    0x0004fc44 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 < 0) {
    0x0004fc48 bltz v0, 0x4fd94              |         goto label_18;
                                             |     }
    0x0004fc4c sw s3, 0x2c(s0)               |     *((s0 + 11)) = s3;
    0x0004fc50 b 0x4f9d8                     |     goto label_2;
                                             | label_13:
    0x0004fc54 lw v0, 0xc(s0)                |     v0 = *((s0 + 3));
    0x0004fc58 sltiu v0, v0, 3               |     v0 = (v0 < 3) ? 1 : 0;
    0x0004fc5c addiu s1, zero, 5             |     s1 = 5;
                                             |     if (v0 != 0) {
    0x0004fc60 bnez v0, 0x4facc              |         goto label_3;
                                             |     }
    0x0004fc64 lw t9, -0x7abc(gp)            |     t9 = sym.vdo_map_set_uint32;
                                             | label_14:
    0x0004fc68 lw a0, 0x20(s0)               |     a0 = *((s0 + 8));
    0x0004fc6c move a2, s1                   |     a2 = s1;
                                             |     /* str.buffer.count */
    0x0004fc70 addiu a1, s3, -0x31bc         |     a1 = s3 + -0x31bc;
    0x0004fc74 jalr t9                       |     t9 ();
    0x0004fc78 lw v0, 0xc(s0)                |     v0 = *((s0 + 3));
    0x0004fc7c sltiu v0, v0, 3               |     v0 = (v0 < 3) ? 1 : 0;
    0x0004fc80 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x0004fc84 bnez v0, 0x4facc              |         goto label_3;
                                             |     }
    0x0004fc88 lw v1, 0x18(s0)               |     v1 = *((s0 + 6));
    0x0004fc8c addiu v0, zero, 4             |     v0 = 4;
    0x0004fc90 lw t9, -0x7bf4(gp)            |     t9 = sym.hal_stream_get_type;
                                             |     if (v1 != v0) {
    0x0004fc94 bne v1, v0, 0x4fb9c           |         goto label_4;
                                             |     }
    0x0004fc98 lw v0, 0x14(s0)               |     v0 = *((s0 + 5));
    0x0004fc9c move s5, zero                 |     s5 = 0;
                                             |     if (v0 == 0) {
    0x0004fca0 beqz v0, 0x4fdf4              |         goto label_19;
                                             |     }
    0x0004fca4 bal 0x3ac08                   |     sym_hal_stream_get_type ();
    0x0004fca8 nop                           |     
    0x0004fcac lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fcb0 move a1, v0                   |     a1 = v0;
    0x0004fcb4 lw t9, -0x74d0(gp)            |     t9 = sym.imp.g_type_check_instance_cast;
    0x0004fcb8 move a0, s0                   |     a0 = s0;
    0x0004fcbc jalr t9                       |     t9 ();
    0x0004fcc0 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fcc4 lw t9, -0x7a80(gp)            |     t9 = sym.hal_stream_get_buffer_size;
    0x0004fcc8 move a0, v0                   |     a0 = v0;
    0x0004fccc bal 0x3d618                   |     sym_hal_stream_get_buffer_size ();
    0x0004fcd0 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fcd4 move s6, v0                   |     s6 = v0;
    0x0004fcd8 lw s7, -0x7fdc(gp)            |     s7 = *(gp);
                                             |     /* fcn.0004cfe4 */
    0x0004fcdc addiu s7, s7, -0x301c         |     s7 += -0x301c;
    0x0004fce0 b 0x4fd14                     |     goto label_20;
                                             | label_5:
    0x0004fce4 lw t9, -0x7b28(gp)            |     t9 = sym.hal_buffer_get_offset;
    0x0004fce8 move a0, v0                   |     a0 = v0;
    0x0004fcec bal 0x42ec4                   |     sym_hal_buffer_get_offset ();
    0x0004fcf0 move a2, v0                   |     a2 = v0;
    0x0004fcf4 move a1, s6                   |     a1 = s6;
    0x0004fcf8 move a0, s0                   |     a0 = s0;
    0x0004fcfc move t9, s7                   |     t9 = s7;
    0x0004fd00 addiu s5, s5, 1               |     s5++;
    0x0004fd04 bal 0x4cfe4                   |     fcn_0004cfe4 ();
    0x0004fd08 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fd0c sw s3, 0x14(v0)               |     *((v0 + 5)) = s3;
                                             |     if (s1 == s5) {
    0x0004fd10 beq s1, s5, 0x4fb9c           |         goto label_4;
                                             |     }
                                             | label_20:
    0x0004fd14 lw t9, -0x7bf4(gp)            |     t9 = sym.hal_stream_get_type;
    0x0004fd18 bal 0x3ac08                   |     sym_hal_stream_get_type ();
    0x0004fd1c nop                           |     
    0x0004fd20 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fd24 move a1, v0                   |     a1 = v0;
    0x0004fd28 lw t9, -0x74d0(gp)            |     t9 = sym.imp.g_type_check_instance_cast;
    0x0004fd2c move a0, s0                   |     a0 = s0;
    0x0004fd30 jalr t9                       |     t9 ();
    0x0004fd34 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fd38 move a2, s2                   |     a2 = s2;
    0x0004fd3c move a1, s6                   |     a1 = s6;
    0x0004fd40 lw t9, -0x7a6c(gp)            |     t9 = sym.hal_stream_new_buffer;
    0x0004fd44 move a0, v0                   |     a0 = v0;
    0x0004fd48 bal 0x3d8c4                   |     sym_hal_stream_new_buffer ();
    0x0004fd4c move s3, v0                   |     s3 = v0;
    0x0004fd50 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x0004fd54 bnez v0, 0x4fce4              |         goto label_5;
                                             |     }
    0x0004fd58 b 0x4fb6c                     |     goto label_6;
    0x0004fd5c nop                           |     
                                             | label_16:
    0x0004fd60 lw t9, -0x7eb8(gp)            |     t9 = sym.vdo_error_quark;
    0x0004fd64 jalr t9                       |     t9 ();
    0x0004fd68 nop                           |     
    0x0004fd6c lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fd70 addiu a2, zero, 9             |     a2 = 9;
    0x0004fd74 move a1, v0                   |     a1 = v0;
    0x0004fd78 lw a3, -0x7fa0(gp)            |     a3 = *(gp);
    0x0004fd7c lw t9, -0x78ec(gp)            |     t9 = sym.imp.g_set_error;
                                             |     /* str.Failed_to_create_stream */
    0x0004fd80 addiu a3, a3, -0x31ac         |     a3 += -aav.0x000031ac;
    0x0004fd84 move a0, zero                 |     a0 = 0;
    0x0004fd88 jalr t9                       |     t9 ();
    0x0004fd8c lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fd90 b 0x4fb88                     |     goto label_7;
                                             | label_18:
    0x0004fd94 lw t9, -0x7eb8(gp)            |     t9 = sym.vdo_error_quark;
    0x0004fd98 jalr t9                       |     t9 ();
    0x0004fd9c nop                           |     
    0x0004fda0 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fda4 sw s5, 0x10(sp)               |     *(var_10h) = s5;
    0x0004fda8 addiu a2, zero, 8             |     a2 = 8;
    0x0004fdac lw a3, -0x7fa0(gp)            |     a3 = *(gp);
    0x0004fdb0 lw t9, -0x78ec(gp)            |     t9 = sym.imp.g_set_error;
                                             |     /* str.Invalid_Channel:__u */
    0x0004fdb4 addiu a3, a3, -0x31dc         |     a3 += -0x31dc;
    0x0004fdb8 move a1, v0                   |     a1 = v0;
    0x0004fdbc move a0, s2                   |     a0 = s2;
    0x0004fdc0 jalr t9                       |     t9 ();
    0x0004fdc4 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fdc8 sw s3, 0x2c(s0)               |     *((s0 + 11)) = s3;
    0x0004fdcc b 0x4f9d8                     |     goto label_2;
                                             | label_15:
    0x0004fdd0 lw a1, -0x7fa0(gp)            |     a1 = *(gp);
    0x0004fdd4 lw t9, -0x7940(gp)            |     t9 = sym.imp.g_strcmp0;
                                             |     /* str.analytics */
    0x0004fdd8 addiu a1, a1, -0x31c8         |     a1 += -0x31c8;
    0x0004fddc move a0, s1                   |     a0 = s1;
    0x0004fde0 jalr t9                       |     t9 ();
    0x0004fde4 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 == 0) {
    0x0004fde8 beqz v0, 0x4fb48              |         goto label_8;
                                             |     }
    0x0004fdec sw s3, 0x10(s0)               |     *((s0 + 4)) = s3;
    0x0004fdf0 b 0x4fb50                     |     goto label_9;
                                             | label_19:
    0x0004fdf4 bal 0x3ac08                   |     sym_hal_stream_get_type ();
    0x0004fdf8 nop                           |     
    0x0004fdfc lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fe00 move a1, v0                   |     a1 = v0;
    0x0004fe04 lw t9, -0x74d0(gp)            |     t9 = sym.imp.g_type_check_instance_cast;
    0x0004fe08 move a0, s0                   |     a0 = s0;
    0x0004fe0c jalr t9                       |     t9 ();
    0x0004fe10 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fe14 lw t9, -0x7a80(gp)            |     t9 = sym.hal_stream_get_buffer_size;
    0x0004fe18 move a0, v0                   |     a0 = v0;
    0x0004fe1c bal 0x3d618                   |     sym_hal_stream_get_buffer_size ();
    0x0004fe20 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fe24 lw t9, -0x7bf4(gp)            |     t9 = sym.hal_stream_get_type;
    0x0004fe28 move s6, v0                   |     s6 = v0;
    0x0004fe2c bal 0x3ac08                   |     sym_hal_stream_get_type ();
    0x0004fe30 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fe34 move a1, v0                   |     a1 = v0;
    0x0004fe38 lw t9, -0x74d0(gp)            |     t9 = sym.imp.g_type_check_instance_cast;
    0x0004fe3c move a0, s0                   |     a0 = s0;
    0x0004fe40 jalr t9                       |     t9 ();
    0x0004fe44 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fe48 lw t9, -0x799c(gp)            |     t9 = sym.hal_stream_get_buffer_alloc_size;
    0x0004fe4c move a0, v0                   |     a0 = v0;
    0x0004fe50 bal 0x3ea5c                   |     sym_hal_stream_get_buffer_alloc_size ();
    0x0004fe54 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fe58 move fp, v0                   |     fp = v0;
    0x0004fe5c lw s7, -0x7fdc(gp)            |     s7 = *(gp);
                                             |     /* fcn.0004d298 */
    0x0004fe60 addiu s7, s7, -0x2d68         |     s7 += -aav.0x00002d68;
    0x0004fe64 b 0x4fea0                     |     goto label_21;
                                             | label_10:
    0x0004fe68 lw t9, -0x7b28(gp)            |     t9 = sym.hal_buffer_get_offset;
    0x0004fe6c move a0, v0                   |     a0 = v0;
    0x0004fe70 bal 0x42ec4                   |     sym_hal_buffer_get_offset ();
    0x0004fe74 move a2, v0                   |     a2 = v0;
    0x0004fe78 move a1, s6                   |     a1 = s6;
    0x0004fe7c move t9, s7                   |     t9 = s7;
    0x0004fe80 move a0, s0                   |     a0 = s0;
    0x0004fe84 bal 0x4d298                   |     fcn_0004d298 ();
    0x0004fe88 lw v1, 4(v0)                  |     v1 = *((v0 + 1));
    0x0004fe8c addiu s5, s5, 1               |     s5++;
    0x0004fe90 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fe94 sw s3, 0x10(v0)               |     *((v0 + 4)) = s3;
    0x0004fe98 sw fp, 0x238(v1)              |     *(v1) = fp;
                                             |     if (s1 == s5) {
    0x0004fe9c beq s1, s5, 0x4fb9c           |         goto label_4;
                                             |     }
                                             | label_21:
    0x0004fea0 lw t9, -0x7bf4(gp)            |     t9 = sym.hal_stream_get_type;
    0x0004fea4 bal 0x3ac08                   |     sym_hal_stream_get_type ();
    0x0004fea8 nop                           |     
    0x0004feac lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004feb0 move a1, v0                   |     a1 = v0;
    0x0004feb4 lw t9, -0x74d0(gp)            |     t9 = sym.imp.g_type_check_instance_cast;
    0x0004feb8 move a0, s0                   |     a0 = s0;
    0x0004febc jalr t9                       |     t9 ();
    0x0004fec0 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0004fec4 move a2, s2                   |     a2 = s2;
    0x0004fec8 move a1, s6                   |     a1 = s6;
    0x0004fecc lw t9, -0x7a6c(gp)            |     t9 = sym.hal_stream_new_buffer;
    0x0004fed0 move a0, v0                   |     a0 = v0;
    0x0004fed4 bal 0x3d8c4                   |     sym_hal_stream_new_buffer ();
    0x0004fed8 move s3, v0                   |     s3 = v0;
    0x0004fedc lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x0004fee0 bnez v0, 0x4fe68              |         goto label_10;
                                             |     }
    0x0004fee4 b 0x4fb6c                     |     goto label_6;
    0x0004fee8 nop                           |     
                                             | label_17:
    0x0004feec lw t9, -0x7704(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x0004fef0 jalr t9                       |     t9 ();
    0x0004fef4 nop                           |     
                                             | }

[*] Function sprintf used 3 times vdo