[*] Binary protection state of mixer
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of mixer
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mixer @ 0x4029f8 */
| #include <stdint.h>
|
; (fcn) fcn.004029f8 () | void fcn_004029f8 () {
0x004029f8 lui gp, 2 |
0x004029fc addiu gp, gp, -0x69d8 |
0x00402a00 addu gp, gp, t9 | gp += t9;
0x00402a04 addiu sp, sp, -0x58 |
0x00402a08 sw ra, 0x54(sp) | *(var_54h) = ra;
0x00402a0c sw fp, 0x50(sp) | *(var_50h) = fp;
0x00402a10 sw s2, 0x4c(sp) | *(var_4ch) = s2;
0x00402a14 sw s1, 0x48(sp) | *(var_48h) = s1;
0x00402a18 sw s0, 0x44(sp) | *(var_44h) = s0;
0x00402a1c move fp, sp | fp = sp;
0x00402a20 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00402a24 addiu s2, fp, 0x20 | s2 = fp + 0x20;
0x00402a28 lw t9, -0x7f70(gp) | t9 = sym.imp.sprintf
0x00402a2c move a2, zero | a2 = 0;
| /* str.hw:_d */
0x00402a30 addiu a1, a1, 0x371c | a1 += 0x371c;
0x00402a34 move s1, a0 | s1 = a0;
0x00402a38 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00402a3c move a0, s2 | a0 = s2;
0x00402a40 jalr t9 | t9 ();
0x00402a44 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402a48 lw t9, -0x7f3c(gp) | t9 = sym.imp.snd_ctl_elem_id_sizeof;
0x00402a4c jalr t9 | t9 ();
0x00402a50 nop |
0x00402a54 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402a58 addiu v0, v0, 0xe | v0 += 0xe;
0x00402a5c srl t8, v0, 3 | t8 = v0 >> 3;
0x00402a60 sll t8, t8, 3 | t8 <<= 3;
0x00402a64 lw t9, -0x7f3c(gp) | t9 = sym.imp.snd_ctl_elem_id_sizeof;
0x00402a68 subu sp, sp, t8 |
0x00402a6c jalr t9 | t9 ();
0x00402a70 addiu s0, sp, 0x18 | s0 = sp + 0x18;
0x00402a74 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402a78 move a0, s0 | a0 = s0;
0x00402a7c move a1, zero | a1 = 0;
0x00402a80 lw t9, -0x7f5c(gp) | t9 = sym.imp.memset;
0x00402a84 move a2, v0 | a2 = v0;
0x00402a88 jalr t9 | t9 ();
0x00402a8c addiu a0, fp, 0x30 | a0 = fp + 0x30;
0x00402a90 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402a94 move a1, s2 | a1 = s2;
0x00402a98 lw t9, -0x7f38(gp) | t9 = sym.imp.snd_hctl_open;
0x00402a9c move a2, zero | a2 = 0;
0x00402aa0 jalr t9 | t9 ();
0x00402aa4 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 < 0) {
0x00402aa8 bgez v0, 0x402acc |
0x00402aac lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00402ab0 addiu a0, zero, 4 | a0 = 4;
0x00402ab4 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00402ab8 addiu a3, zero, 0xa7 | a3 = 0xa7;
0x00402abc sw zero, 0x10(sp) | *(var_10h) = 0;
| /* str.__s___d_failed_to_open_card__d_n */
0x00402ac0 addiu a1, a1, 0x3724 | a1 += 0x3724;
| /* str.rts_amixer_init */
0x00402ac4 addiu a2, a2, 0x3820 | a2 += 0x3820;
0x00402ac8 b 0x402afc |
| } else {
0x00402acc lw t9, -0x7f78(gp) | t9 = sym.imp.snd_hctl_load;
0x00402ad0 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x00402ad4 jalr t9 | t9 ();
0x00402ad8 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 >= 0) {
0x00402adc bgez v0, 0x402b10 | goto label_0;
| }
0x00402ae0 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00402ae4 addiu a0, zero, 4 | a0 = 4;
0x00402ae8 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00402aec addiu a3, zero, 0xad | a3 = 0xad;
0x00402af0 sw zero, 0x10(sp) | *(var_10h) = 0;
| /* str.__s___d_failed_to_load_card__d_n */
0x00402af4 addiu a1, a1, 0x3744 | a1 += 0x3744;
| /* str.rts_amixer_init */
0x00402af8 addiu a2, a2, 0x3820 | a2 += 0x3820;
| }
0x00402afc lw t9, -0x7f84(gp) | t9 = sym.imp.rts_log;
0x00402b00 jalr t9 | t9 ();
0x00402b04 nop |
0x00402b08 move v0, zero | v0 = 0;
0x00402b0c b 0x402b7c | goto label_1;
| label_0:
0x00402b10 lw t9, -0x7f54(gp) | t9 = sym.imp.snd_ctl_elem_id_set_interface;
0x00402b14 move a0, s0 | a0 = s0;
0x00402b18 addiu a1, zero, 2 | a1 = 2;
0x00402b1c jalr t9 | t9 ();
0x00402b20 move a0, s0 | a0 = s0;
0x00402b24 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402b28 lw t9, -0x7f94(gp) | t9 = sym.imp.snd_ctl_elem_id_set_name;
0x00402b2c move a1, s1 | a1 = s1;
0x00402b30 jalr t9 | t9 ();
0x00402b34 move a1, s0 | a1 = s0;
0x00402b38 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00402b3c lw t9, -0x7f48(gp) | t9 = sym.imp.snd_hctl_find_elem;
0x00402b40 lw a0, 0x30(fp) | a0 = *(arg_30h);
0x00402b44 jalr t9 | t9 ();
0x00402b48 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 == 0) {
0x00402b4c bnez v0, 0x402b7c |
0x00402b50 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00402b54 addiu a0, zero, 4 | a0 = 4;
0x00402b58 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00402b5c addiu a3, zero, 0xb6 | a3 = 0xb6;
0x00402b60 lw t9, -0x7f84(gp) | t9 = sym.imp.rts_log;
| /* str.__s___d_failed_to_find_control:__s_n */
0x00402b64 addiu a1, a1, 0x3764 | a1 += 0x3764;
0x00402b68 sw v0, 0x38(fp) | *(arg_38h) = v0;
| /* str.rts_amixer_init */
0x00402b6c addiu a2, a2, 0x3820 | a2 += 0x3820;
0x00402b70 sw s1, 0x10(sp) | *(var_10h) = s1;
0x00402b74 jalr t9 | t9 ();
0x00402b78 lw v0, 0x38(fp) | v0 = *(arg_38h);
| }
| label_1:
0x00402b7c move sp, fp |
0x00402b80 lw ra, 0x54(sp) | ra = *(var_54h);
0x00402b84 lw fp, 0x50(sp) | fp = *(var_50h);
0x00402b88 lw s2, 0x4c(sp) | s2 = *(var_4ch);
0x00402b8c lw s1, 0x48(sp) | s1 = *(var_48h);
0x00402b90 lw s0, 0x44(sp) | s0 = *(var_44h);
0x00402b94 addiu sp, sp, 0x58 |
0x00402b98 jr ra | return v0;
| }
[*] Function sprintf used 2 times mixer