[*] Binary protection state of vdo-virtual-input-server
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of vdo-virtual-input-server
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/vdo-virtual-input-server @ 0x2660 */
| #include <stdint.h>
|
; (fcn) fcn.00002660 () | void fcn_00002660 () {
| label_2:
0x00002660 lui gp, 2 |
0x00002664 addiu gp, gp, -0x6610 |
0x00002668 addu gp, gp, t9 | gp += t9;
0x0000266c addiu sp, sp, -0x30 |
0x00002670 lw t9, -0x7ef8(gp) | t9 = sym.imp.g_fprintf
0x00002674 sw s1, 0x24(sp) | *(var_24h) = s1;
0x00002678 lw s1, -0x7f38(gp) | s1 = *((gp - 8142));
0x0000267c sw s0, 0x20(sp) | *(var_20h) = s0;
0x00002680 lw s0, -0x7fdc(gp) | s0 = *((gp - 8183));
0x00002684 lw v0, (s1) | v0 = *(s1);
0x00002688 sw a1, 0x34(sp) | *(arg_34h) = a1;
0x0000268c lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x00002690 sw s2, 0x28(sp) | *(var_28h) = s2;
0x00002694 move s2, a0 | s2 = a0;
0x00002698 lw a0, 0x4208(s0) | a0 = *((s0 + 4226));
0x0000269c sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x000026a0 sw gp, 0x10(sp) | *(var_10h) = gp;
0x000026a4 sw a3, 0x3c(sp) | *(arg_3ch) = a3;
0x000026a8 sw a2, 0x38(sp) | *(arg_38h) = a2;
0x000026ac addiu a1, a1, 0x3524 | a1 += str.e_2K_r;
0x000026b0 sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x000026b4 jalr t9 | t9 ();
0x000026b8 nop |
0x000026bc lw gp, 0x10(sp) | gp = *(var_10h);
0x000026c0 addiu v0, sp, 0x34 | v0 = sp + 0x34;
0x000026c4 lw a0, 0x4208(s0) | a0 = *((s0 + 4226));
0x000026c8 lw t9, -0x7f20(gp) | t9 = sym.imp.g_vfprintf
0x000026cc move a2, v0 | a2 = v0;
0x000026d0 move a1, s2 | a1 = s2;
0x000026d4 sw v0, 0x18(sp) | *(var_18h) = v0;
0x000026d8 jalr t9 | t9 ();
0x000026dc lw gp, 0x10(sp) | gp = *(var_10h);
0x000026e0 lw t9, -0x7ef4(gp) | t9 = sym.imp.fflush;
0x000026e4 lw a0, 0x4208(s0) | a0 = *((s0 + 4226));
0x000026e8 jalr t9 | t9 ();
0x000026ec lw v1, 0x1c(sp) | v1 = *(var_1ch);
0x000026f0 lw v0, (s1) | v0 = *(s1);
0x000026f4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v1 == v0) {
0x000026f8 bne v1, v0, 0x2714 |
0x000026fc lw ra, 0x2c(sp) | ra = *(var_2ch);
0x00002700 lw s2, 0x28(sp) | s2 = *(var_28h);
0x00002704 lw s1, 0x24(sp) | s1 = *(var_24h);
0x00002708 lw s0, 0x20(sp) | s0 = *(var_20h);
0x0000270c addiu sp, sp, 0x30 |
0x00002710 jr ra | return v0;
| }
0x00002714 lw t9, -0x7f58(gp) | t9 = sym.imp.__stack_chk_fail;
0x00002718 jalr t9 | t9 ();
0x0000271c nop |
0x00002720 lui gp, 2 |
0x00002724 addiu gp, gp, -0x66d0 |
0x00002728 addu gp, gp, t9 | gp += t9;
0x0000272c addiu sp, sp, -0x40 |
0x00002730 lw t9, -0x7f94(gp) | t9 = sym.imp.vdo_stream_get_id;
0x00002734 sw s2, 0x2c(sp) | *(var_2ch_2) = s2;
0x00002738 lw s2, -0x7f38(gp) | s2 = *((gp - 8142));
0x0000273c sw gp, 0x10(sp) | *(var_10h_2) = gp;
0x00002740 sw s1, 0x28(sp) | *(var_28h_2) = s1;
0x00002744 lw v0, (s2) | v0 = *(s2);
0x00002748 sw ra, 0x3c(sp) | *(var_3ch) = ra;
0x0000274c sw s5, 0x38(sp) | *(var_38h) = s5;
0x00002750 sw s4, 0x34(sp) | *(var_34h) = s4;
0x00002754 sw s3, 0x30(sp) | *(var_30h) = s3;
0x00002758 sw s0, 0x24(sp) | *(var_24h_2) = s0;
0x0000275c sw v0, 0x1c(sp) | *(var_1ch_2) = v0;
0x00002760 jalr t9 | t9 ();
0x00002764 nop |
0x00002768 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x0000276c move s1, v0 | s1 = v0;
0x00002770 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x00002774 lw v0, (v0) | v0 = *(v0);
0x00002778 lw s0, (v0) | s0 = *(v0);
| if (v0 == 0) {
0x0000277c bnel v0, zero, 0x2794 | goto label_6;
| }
0x00002780 b 0x27b0 | goto label_0;
0x00002784 nop |
| do {
| if (v0 == 0) {
0x00002788 beql v0, zero, 0x285c | goto label_7;
| }
0x0000278c lw v0, 0x10(s0) | v0 = *((s0 + 4));
0x00002790 lw s0, (v0) | s0 = *(v0);
| label_6:
0x00002794 lw v1, 4(s0) | v1 = *((s0 + 1));
0x00002798 lw v0, 4(v0) | v0 = *((v0 + 1));
0x0000279c bnel v1, s1, 0x2788 |
| } while (v1 == s1);
0x000027a0 lw v0, 0x10(s0) | v0 = *((s0 + 4));
0x000027a4 lw s4, (s0) | s4 = *(s0);
0x000027a8 sw zero, 0x18(sp) | *(var_18h_2) = 0;
0x000027ac beqz v0, 0x27e0 |
| while (a0 == 0) {
| label_0:
0x000027b0 lw v1, 0x1c(sp) | v1 = *(var_1ch_2);
0x000027b4 lw v0, (s2) | v0 = *(s2);
0x000027b8 lw ra, 0x3c(sp) | ra = *(var_3ch);
| if (v1 != v0) {
0x000027bc bne v1, v0, 0x2a78 | goto label_8;
| }
0x000027c0 lw s5, 0x38(sp) | s5 = *(var_38h);
0x000027c4 lw s4, 0x34(sp) | s4 = *(var_34h);
0x000027c8 lw s3, 0x30(sp) | s3 = *(var_30h);
0x000027cc lw s2, 0x2c(sp) | s2 = *(var_2ch_2);
0x000027d0 lw s1, 0x28(sp) | s1 = *(var_28h_2);
0x000027d4 lw s0, 0x24(sp) | s0 = *(var_24h_2);
0x000027d8 addiu sp, sp, 0x40 |
0x000027dc jr ra | return v0;
0x000027e0 lw t9, -0x7eac(gp) | t9 = sym.imp.vdo_stream_get_settings;
| label_1:
0x000027e4 addiu v0, zero, 1 | v0 = 1;
0x000027e8 addiu s5, sp, 0x18 | s5 = sp + 0x18;
0x000027ec sw v0, 0x10(s0) | *((s0 + 4)) = v0;
0x000027f0 move a1, s5 | a1 = s5;
0x000027f4 move a0, s4 | a0 = s4;
0x000027f8 jalr t9 | t9 ();
0x000027fc lw v1, 0x18(sp) | v1 = *(var_18h_2);
0x00002800 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002804 move s3, v0 | s3 = v0;
| if (v1 == 0) {
0x00002808 beqz v1, 0x2874 | goto label_9;
| }
0x0000280c lw v0, -0x7f0c(gp) | v0 = *((gp - 8131));
0x00002810 lw a2, -0x7fd4(gp) | a2 = *((gp - 8181));
0x00002814 lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x00002818 lw t9, -0x7ef8(gp) | t9 = sym.imp.g_fprintf
0x0000281c lw a3, 8(v1) | a3 = *((v1 + 2));
0x00002820 lw a0, (v0) | a0 = *(v0);
0x00002824 addiu a2, a2, 0x3454 | a2 += str.vdo_virtual_input_server;
0x00002828 addiu a1, a1, 0x3470 | a1 += str._s:__s_n;
0x0000282c jalr t9 | t9 ();
0x00002830 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002834 sw zero, 0x10(s0) | *((s0 + 4)) = 0;
| if (s3 != 0) {
0x00002838 bnez s3, 0x2a1c | goto label_10;
| }
0x0000283c lw a0, 0x18(sp) | a0 = *(var_18h_2);
0x00002840 beqz a0, 0x27b0 |
| }
0x00002844 nop |
| label_3:
0x00002848 lw t9, -0x7f84(gp) | t9 = sym.imp.g_error_free;
0x0000284c jalr t9 | t9 ();
0x00002850 nop |
0x00002854 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002858 b 0x27b0 | goto label_0;
| label_7:
0x0000285c lw s4, (s0) | s4 = *(s0);
0x00002860 lw s1, 4(s0) | s1 = *((s0 + 1));
0x00002864 sw zero, 0x18(sp) | *(var_18h_2) = 0;
| if (v0 != 0) {
0x00002868 bnez v0, 0x27b0 | goto label_0;
| }
0x0000286c lw t9, -0x7eac(gp) | t9 = sym.imp.vdo_stream_get_settings;
0x00002870 b 0x27e4 | goto label_1;
| label_9:
0x00002874 lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
| if (v0 == 0) {
0x00002878 beqz v0, 0x2a54 | goto label_11;
| }
0x0000287c lw t9, -0x7eec(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00002880 addiu a2, zero, -1 | a2 = -1;
0x00002884 addiu a1, a1, 0x352c | a1 += str.format;
0x00002888 move a0, v0 | a0 = v0;
0x0000288c jalr t9 | t9 ();
0x00002890 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002894 addiu a2, zero, 1 | a2 = 1;
0x00002898 move a0, s3 | a0 = s3;
0x0000289c lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x000028a0 lw t9, -0x7eec(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x000028a4 addiu a1, a1, 0x3534 | a1 += str.channel;
0x000028a8 sw v0, 0x24(s0) | *((s0 + 9)) = v0;
0x000028ac jalr t9 | t9 ();
0x000028b0 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000028b4 addiu a2, zero, 0x1e | a2 = 0x1e;
0x000028b8 move a0, s3 | a0 = s3;
0x000028bc lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x000028c0 lw t9, -0x7eec(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x000028c4 addiu a1, a1, 0x353c | a1 += str.framerate;
0x000028c8 sw v0, 8(s0) | *((s0 + 2)) = v0;
0x000028cc jalr t9 | t9 ();
0x000028d0 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000028d4 move a2, zero | a2 = 0;
0x000028d8 move a0, s3 | a0 = s3;
0x000028dc lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x000028e0 lw t9, -0x7eec(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x000028e4 addiu a1, a1, 0x3548 | a1 += str.width;
0x000028e8 sw v0, 0x30(s0) | *((s0 + 12)) = v0;
0x000028ec jalr t9 | t9 ();
0x000028f0 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000028f4 move a0, s3 | a0 = s3;
0x000028f8 sw v0, 0x28(s0) | *((s0 + 10)) = v0;
0x000028fc lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x00002900 lw t9, -0x7eec(gp) | t9 = sym.imp.vdo_map_get_uint32;
0x00002904 move a2, zero | a2 = 0;
0x00002908 addiu a1, a1, 0x3550 | a1 += str.height;
0x0000290c jalr t9 | t9 ();
0x00002910 lw a0, 0x24(s0) | a0 = *((s0 + 9));
0x00002914 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002918 addiu v1, zero, 3 | v1 = 3;
0x0000291c sw v0, 0x2c(s0) | *((s0 + 11)) = v0;
0x00002920 addiu v0, zero, -1 | v0 = -1;
0x00002924 sw v0, 0x18(s0) | *((s0 + 6)) = v0;
| if (a0 == v1) {
0x00002928 beq a0, v1, 0x2a5c | goto label_12;
| }
| label_5:
0x0000292c lw t9, -0x7ebc(gp) | t9 = sym.imp.vdo_stream_start;
0x00002930 move a1, s5 | a1 = s5;
0x00002934 move a0, s4 | a0 = s4;
0x00002938 jalr t9 | t9 ();
0x0000293c lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 == 0) {
0x00002940 beqz v0, 0x29e8 | goto label_13;
| }
0x00002944 move a1, s1 | a1 = s1;
0x00002948 lw s1, -0x7fd4(gp) | s1 = *((gp - 8181));
0x0000294c lw a0, -0x7fd4(gp) | a0 = *((gp - 8181));
0x00002950 lw a2, 8(s0) | a2 = *((s0 + 2));
0x00002954 addiu s1, s1, 0x2660 | s1 += fcn.00002660;
0x00002958 move t9, s1 | t9 = s1;
0x0000295c addiu a0, a0, 0x3558 | a0 += str.Input_is_running_for_stream:__d_channel__d_n;
0x00002960 bal 0x2660 | fcn_00002660 ();
| goto label_2;
0x00002964 lw v1, 0x18(s0) | v1 = *((s0 + 6));
0x00002968 addiu v0, zero, -1 | v0 = -1;
0x0000296c lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v1 == v0) {
0x00002970 beq v1, v0, 0x2a3c | goto label_14;
| }
0x00002974 lw a0, -0x7fd4(gp) | a0 = *((gp - 8181));
0x00002978 lw a1, 0x20(s0) | a1 = *((s0 + 8));
0x0000297c move t9, s1 | t9 = s1;
0x00002980 addiu a0, a0, 0x3598 | a0 += str.___using_data_from__s_n;
0x00002984 bal 0x2660 | fcn_00002660 ();
| goto label_2;
0x00002988 lw gp, 0x10(sp) | gp = *(var_10h_2);
| label_4:
0x0000298c lw a0, 0x30(s0) | a0 = *((s0 + 12));
0x00002990 addiu v0, zero, 0x3e8 | v0 = 0x3e8;
0x00002994 divu zero, v0, a0 | __asm ("divu zero, v0, a0");
0x00002998 teq a0, zero, 7 | __asm ("teq a0, zero, 7");
0x0000299c lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x000029a0 lw t9, -0x7f8c(gp) | t9 = sym.imp.g_timeout_add;
0x000029a4 move a2, s0 | a2 = s0;
0x000029a8 addiu a1, a1, 0x2c7c | a1 += 0x2c7c;
0x000029ac mflo a0 | __asm ("mflo a0");
0x000029b0 jalr t9 | t9 ();
0x000029b4 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000029b8 move a0, s3 | a0 = s3;
0x000029bc lw t9, -0x7ea4(gp) | t9 = sym.imp.g_object_unref;
0x000029c0 sw v0, 0xc(s0) | *((s0 + 3)) = v0;
0x000029c4 jalr t9 | t9 ();
0x000029c8 lw a0, 0x18(sp) | a0 = *(var_18h_2);
0x000029cc lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (a0 == 0) {
0x000029d0 beqz a0, 0x27b0 | goto label_0;
| }
0x000029d4 lw t9, -0x7f84(gp) | t9 = sym.imp.g_error_free;
0x000029d8 jalr t9 | t9 ();
0x000029dc nop |
0x000029e0 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000029e4 b 0x27b0 | goto label_0;
| label_13:
0x000029e8 lw v0, 0x18(sp) | v0 = *(var_18h_2);
0x000029ec lw a2, -0x7fd4(gp) | a2 = *((gp - 8181));
| if (v0 != 0) {
0x000029f0 beqz v0, 0x2a18 |
0x000029f4 lw a3, 8(v0) | a3 = *((v0 + 2));
0x000029f8 lw v0, -0x7f0c(gp) | v0 = *((gp - 8131));
0x000029fc lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x00002a00 lw t9, -0x7ef8(gp) | t9 = sym.imp.g_fprintf
0x00002a04 lw a0, (v0) | a0 = *(v0);
0x00002a08 addiu a2, a2, 0x3454 | a2 += str.vdo_virtual_input_server;
0x00002a0c addiu a1, a1, 0x3470 | a1 += str._s:__s_n;
0x00002a10 jalr t9 | t9 ();
0x00002a14 lw gp, 0x10(sp) | gp = *(var_10h_2);
| }
0x00002a18 sw zero, 0x10(s0) | *((s0 + 4)) = 0;
| label_10:
0x00002a1c lw t9, -0x7ea4(gp) | t9 = sym.imp.g_object_unref;
0x00002a20 move a0, s3 | a0 = s3;
0x00002a24 jalr t9 | t9 ();
0x00002a28 lw a0, 0x18(sp) | a0 = *(var_18h_2);
0x00002a2c lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (a0 != 0) {
0x00002a30 bnez a0, 0x2848 | goto label_3;
| }
0x00002a34 b 0x27b0 | goto label_0;
0x00002a38 nop |
| label_14:
0x00002a3c lw a0, -0x7fd4(gp) | a0 = *((gp - 8181));
0x00002a40 move t9, s1 | t9 = s1;
0x00002a44 addiu a0, a0, 0x3584 | a0 += str.___using_fake_data_n;
0x00002a48 bal 0x2660 | fcn_00002660 ();
| goto label_2;
0x00002a4c lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002a50 b 0x298c | goto label_4;
| label_11:
0x00002a54 sw zero, 0x10(s0) | *((s0 + 4)) = 0;
0x00002a58 b 0x27b0 | goto label_0;
| label_12:
0x00002a5c lw t9, -0x7fd4(gp) | t9 = *((gp - 8181));
0x00002a60 move a1, s0 | a1 = s0;
0x00002a64 addiu t9, t9, 0x20e0 | t9 += fcn.000020e0;
0x00002a68 move a0, s3 | a0 = s3;
0x00002a6c bal 0x20e0 | fcn_000020e0 ();
0x00002a70 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002a74 b 0x292c | goto label_5;
| label_8:
0x00002a78 lw t9, -0x7f58(gp) | t9 = sym.imp.__stack_chk_fail;
0x00002a7c jalr t9 | t9 ();
0x00002a80 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/vdo-virtual-input-server @ 0x1430 */
| #include <stdint.h>
|
; (fcn) loc._ftext () | void loc_ftext () {
| /* [13] -r-x section size 7008 named .text */
0x00001430 lui gp, 2 |
0x00001434 addiu gp, gp, -0x53e0 |
0x00001438 addu gp, gp, t9 | gp += t9;
0x0000143c addiu sp, sp, -0x28 |
0x00001440 lw v0, -0x7f38(gp) | v0 = *((gp - 8142));
0x00001444 sw s0, 0x20(sp) | *(var_20h) = s0;
0x00001448 lw s0, -0x7f0c(gp) | s0 = *((gp - 8131));
0x0000144c lw v0, (v0) | v0 = *(v0);
0x00001450 lw t9, -0x7ef8(gp) | t9 = sym.imp.g_fprintf
0x00001454 lw a0, (s0) | a0 = *(s0);
0x00001458 sw a1, 0x2c(sp) | *(arg_2ch) = a1;
0x0000145c sw a2, 0x30(sp) | *(arg_30h) = a2;
0x00001460 lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x00001464 lw a2, -0x7fd4(gp) | a2 = *((gp - 8181));
0x00001468 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0000146c sw ra, 0x24(sp) | *(var_24h) = ra;
0x00001470 sw a3, 0x34(sp) | *(arg_34h) = a3;
0x00001474 addiu a2, a2, 0x3454 | a2 += str.vdo_virtual_input_server;
0x00001478 addiu a1, a1, 0x35cc | a1 += str._s:_;
0x0000147c sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x00001480 jalr t9 | t9 ();
0x00001484 nop |
0x00001488 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000148c addiu a2, sp, 0x2c | a2 = sp + 0x2c;
0x00001490 lw a0, (s0) | a0 = *(s0);
0x00001494 lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x00001498 lw t9, -0x7f20(gp) | t9 = sym.imp.g_vfprintf
0x0000149c sw a2, 0x18(sp) | *(var_18h) = a2;
0x000014a0 addiu a1, a1, 0x3474 | a1 += 0x3474;
0x000014a4 jalr t9 | t9 ();
0x000014a8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000014ac lw t9, -0x7fa4(gp) | t9 = sym.imp.exit;
0x000014b0 addiu a0, zero, 1 | a0 = 1;
0x000014b4 jalr t9 | return t9 ();
| }
[*] Function fprintf used 7 times vdo-virtual-input-server