[*] Binary protection state of mixer
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf 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 @ 0x4016f4 */
| #include <stdint.h>
|
; (fcn) sym.setMic_8000b_int_ () | void setMic_8000b_int_ () {
| /* setMic_8000b(int) */
0x004016f4 lui gp, 2 |
0x004016f8 addiu gp, gp, -0x56d4 |
0x004016fc addu gp, gp, t9 | gp += t9;
0x00401700 addiu sp, sp, -0x38 |
0x00401704 sw ra, 0x34(sp) | *(var_34h) = ra;
0x00401708 sw fp, 0x30(sp) | *(var_30h) = fp;
0x0040170c move fp, sp | fp = sp;
0x00401710 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00401714 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x00401718 lw t8, -0x7ee0(gp) | t8 = *((gp - 8120));
0x0040171c lw t8, (t8) | t8 = *(t8);
0x00401720 sw t8, 0x2c(fp) | *(arg_2ch) = t8;
0x00401724 sw zero, 0x24(fp) | *(arg_24h) = 0;
0x00401728 lw t8, 0x1c(fp) | t8 = *(arg_1ch);
0x0040172c sll t8, t8, 1 | t8 <<= 1;
0x00401730 sll v0, t8, 4 | v0 = t8 << 4;
0x00401734 subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x00401738 lui v0, 0x51eb | v0 = 0x51eb851f;
0x0040173c ori v0, v0, 0x851f |
0x00401740 mult t8, v0 | __asm ("mult t8, v0");
0x00401744 mfhi v0 | __asm ("mfhi v0");
0x00401748 sra v0, v0, 5 | v0 >>= 5;
0x0040174c sra t8, t8, 0x1f | t8 >>= 0x1f;
0x00401750 subu t8, v0, t8 | __asm ("subu t8, v0, t8");
0x00401754 addiu t8, t8, 0x3c | t8 += 0x3c;
0x00401758 sw t8, 0x28(fp) | *(arg_28h) = t8;
0x0040175c lw t8, -0x7fc8(gp) | t8 = sym.rts_audio_capture_unmute;
0x00401760 move t9, t8 | t9 = t8;
0x00401764 jalr t9 | t9 ();
0x00401768 nop |
0x0040176c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00401770 move t8, v0 | t8 = v0;
0x00401774 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x00401778 lw t8, 0x24(fp) | t8 = *(arg_24h);
| if (t8 != 0) {
0x0040177c beqz t8, 0x4017a0 |
0x00401780 nop |
0x00401784 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.fail_to_set_capture_unmute */
0x00401788 addiu a0, t8, 0x3514 | a0 = t8 + 0x3514;
0x0040178c lw t8, -0x7f98(gp) | t8 = sym.imp.puts;
0x00401790 move t9, t8 | t9 = t8;
0x00401794 jalr t9 | t9 ();
0x00401798 nop |
0x0040179c lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x004017a0 lw a0, 0x1c(fp) | a0 = *(arg_1ch);
0x004017a4 lw t8, -0x7fc4(gp) | t8 = sym.rts_audio_set_capture_volume;
0x004017a8 move t9, t8 | t9 = t8;
0x004017ac jalr t9 | t9 ();
0x004017b0 nop |
0x004017b4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004017b8 move t8, v0 | t8 = v0;
0x004017bc sw t8, 0x24(fp) | *(arg_24h) = t8;
0x004017c0 lw t8, 0x24(fp) | t8 = *(arg_24h);
| if (t8 != 0) {
0x004017c4 beqz t8, 0x4017e8 |
0x004017c8 nop |
0x004017cc lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.fail_to_set_capture_volume */
0x004017d0 addiu a0, t8, 0x3530 | a0 = t8 + 0x3530;
0x004017d4 lw t8, -0x7f98(gp) | t8 = sym.imp.puts;
0x004017d8 move t9, t8 | t9 = t8;
0x004017dc jalr t9 | t9 ();
0x004017e0 nop |
0x004017e4 lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x004017e8 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.mic_vol___d_n */
0x004017ec addiu a0, t8, 0x354c | a0 = t8 + 0x354c;
0x004017f0 lw a1, 0x1c(fp) | a1 = *(arg_1ch);
0x004017f4 lw t8, -0x7f90(gp) | t8 = sym.imp.printf
0x004017f8 move t9, t8 | t9 = t8;
0x004017fc jalr t9 | t9 ();
0x00401800 nop |
0x00401804 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00401808 lw t8, 0x24(fp) | t8 = *(arg_24h);
0x0040180c move v0, t8 | v0 = t8;
0x00401810 lw t8, -0x7ee0(gp) | t8 = *((gp - 8120));
0x00401814 lw v1, 0x2c(fp) | v1 = *(arg_2ch);
0x00401818 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x0040181c beq v1, t8, 0x401834 |
0x00401820 nop |
0x00401824 lw t8, -0x7f34(gp) | t8 = sym.imp.__stack_chk_fail;
0x00401828 move t9, t8 | t9 = t8;
0x0040182c jalr t9 | t9 ();
0x00401830 nop |
| }
0x00401834 move sp, fp |
0x00401838 lw ra, 0x34(sp) | ra = *(var_34h);
0x0040183c lw fp, 0x30(sp) | fp = *(var_30h);
0x00401840 addiu sp, sp, 0x38 |
0x00401844 jr ra | return v1;
0x00401848 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/mixer @ 0x401518 */
| #include <stdint.h>
|
; (fcn) sym.setVolume_8000b_int_ () | void setVolume_8000b_int_ () {
| /* setVolume_8000b(int) */
0x00401518 lui gp, 2 |
0x0040151c addiu gp, gp, -0x54f8 |
0x00401520 addu gp, gp, t9 | gp += t9;
0x00401524 addiu sp, sp, -0x30 |
0x00401528 sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x0040152c sw fp, 0x28(sp) | *(var_28h) = fp;
0x00401530 move fp, sp | fp = sp;
0x00401534 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00401538 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x0040153c lw t8, -0x7ee0(gp) | t8 = *((gp - 8120));
0x00401540 lw t8, (t8) | t8 = *(t8);
0x00401544 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x00401548 sw zero, 0x20(fp) | *(arg_20h) = 0;
0x0040154c lw t8, -0x7fd4(gp) | t8 = sym.rts_audio_playback_unmute;
0x00401550 move t9, t8 | t9 = t8;
0x00401554 jalr t9 | t9 ();
0x00401558 nop |
0x0040155c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00401560 move t8, v0 | t8 = v0;
0x00401564 sw t8, 0x20(fp) | *(arg_20h) = t8;
0x00401568 lw t8, 0x20(fp) | t8 = *(arg_20h);
| if (t8 != 0) {
0x0040156c beqz t8, 0x401590 |
0x00401570 nop |
0x00401574 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.fail_to_set_playback_unmute */
0x00401578 addiu a0, t8, 0x34ac | a0 = t8 + 0x34ac;
0x0040157c lw t8, -0x7f98(gp) | t8 = sym.imp.puts;
0x00401580 move t9, t8 | t9 = t8;
0x00401584 jalr t9 | t9 ();
0x00401588 nop |
0x0040158c lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x00401590 lw a0, 0x1c(fp) | a0 = *(arg_1ch);
0x00401594 lw t8, -0x7fd0(gp) | t8 = sym.rts_audio_set_playback_volume;
0x00401598 move t9, t8 | t9 = t8;
0x0040159c jalr t9 | t9 ();
0x004015a0 nop |
0x004015a4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004015a8 move t8, v0 | t8 = v0;
0x004015ac sw t8, 0x20(fp) | *(arg_20h) = t8;
0x004015b0 lw t8, 0x20(fp) | t8 = *(arg_20h);
| if (t8 != 0) {
0x004015b4 beqz t8, 0x4015d8 |
0x004015b8 nop |
0x004015bc lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.fail_to_set_playback_volume */
0x004015c0 addiu a0, t8, 0x34c8 | a0 = t8 + 0x34c8;
0x004015c4 lw t8, -0x7f98(gp) | t8 = sym.imp.puts;
0x004015c8 move t9, t8 | t9 = t8;
0x004015cc jalr t9 | t9 ();
0x004015d0 nop |
0x004015d4 lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x004015d8 lw t8, -0x7fd8(gp) | t8 = *(gp);
| /* str.speaker_vol___d_n */
0x004015dc addiu a0, t8, 0x34e4 | a0 = t8 + 0x34e4;
0x004015e0 lw a1, 0x1c(fp) | a1 = *(arg_1ch);
0x004015e4 lw t8, -0x7f90(gp) | t8 = sym.imp.printf
0x004015e8 move t9, t8 | t9 = t8;
0x004015ec jalr t9 | t9 ();
0x004015f0 nop |
0x004015f4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004015f8 lw t8, 0x20(fp) | t8 = *(arg_20h);
0x004015fc move v0, t8 | v0 = t8;
0x00401600 lw t8, -0x7ee0(gp) | t8 = *((gp - 8120));
0x00401604 lw v1, 0x24(fp) | v1 = *(arg_24h);
0x00401608 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x0040160c beq v1, t8, 0x401624 |
0x00401610 nop |
0x00401614 lw t8, -0x7f34(gp) | t8 = sym.imp.__stack_chk_fail;
0x00401618 move t9, t8 | t9 = t8;
0x0040161c jalr t9 | t9 ();
0x00401620 nop |
| }
0x00401624 move sp, fp |
0x00401628 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x0040162c lw fp, 0x28(sp) | fp = *(var_28h);
0x00401630 addiu sp, sp, 0x30 |
0x00401634 jr ra | return v1;
0x00401638 nop |
| }
[*] Function printf used 3 times mixer