[*] Binary protection state of audiocontrol_convert
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of audiocontrol_convert
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/libexec/audiocontrol_convert @ 0x2024 */
| #include <stdint.h>
|
; (fcn) fcn.00002024 () | void fcn_00002024 () {
0x00002024 lui gp, 2 |
0x00002028 addiu gp, gp, -0x6014 |
0x0000202c addu gp, gp, t9 | gp += t9;
0x00002030 addiu sp, sp, -0x28 |
0x00002034 lw t9, -0x7f64(gp) | t9 = sym.imp.strlen;
0x00002038 sw s0, 0x18(sp) | *(var_18h) = s0;
0x0000203c move s0, a0 | s0 = a0;
0x00002040 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00002044 move a0, a1 | a0 = a1;
0x00002048 sw s2, 0x20(sp) | *(var_20h) = s2;
0x0000204c sw s1, 0x1c(sp) | *(var_1ch) = s1;
0x00002050 sw ra, 0x24(sp) | *(var_24h) = ra;
0x00002054 move s2, a1 | s2 = a1;
0x00002058 jalr t9 | t9 ();
0x0000205c lw a1, 4(s0) | a1 = *((s0 + 1));
0x00002060 lw a0, 8(s0) | a0 = *((s0 + 2));
0x00002064 move s1, v0 | s1 = v0;
0x00002068 subu v1, a1, a0 | __asm ("subu v1, a1, a0");
0x0000206c sltu v1, v0, v1 | v1 = (v0 < v1) ? 1 : 0;
0x00002070 lw gp, 0x10(sp) | gp = *(var_10h);
0x00002074 lw v0, (s0) | v0 = *(s0);
| if (v1 == 0) {
0x00002078 beqz v1, 0x20bc | goto label_1;
| }
0x0000207c lw t9, -0x7f1c(gp) | t9 = sym.imp.realloc;
0x00002080 beqz v0, 0x20c0 |
| while (1) {
0x00002084 lw t9, -0x7f70(gp) | t9 = sym.imp.strcpy
0x00002088 move a1, s2 | a1 = s2;
0x0000208c addu a0, v0, a0 | a0 = v0 + a0;
0x00002090 jalr t9 | t9 ();
0x00002094 lw v1, 8(s0) | v1 = *((s0 + 2));
0x00002098 addiu v0, zero, 1 | v0 = 1;
0x0000209c addu v1, v1, s1 | v1 += s1;
0x000020a0 sw v1, 8(s0) | *((s0 + 2)) = v1;
| label_0:
0x000020a4 lw ra, 0x24(sp) | ra = *(var_24h);
0x000020a8 lw s2, 0x20(sp) | s2 = *(var_20h);
0x000020ac lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x000020b0 lw s0, 0x18(sp) | s0 = *(var_18h);
0x000020b4 addiu sp, sp, 0x28 |
0x000020b8 jr ra | return v0;
| label_1:
0x000020bc lw t9, -0x7f1c(gp) | t9 = sym.imp.realloc;
0x000020c0 move a0, v0 | a0 = v0;
0x000020c4 addiu a1, a1, 0x200 | a1 += 0x200;
0x000020c8 jalr t9 | t9 ();
0x000020cc lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x000020d0 beqz v0, 0x20ec | goto label_2;
| }
0x000020d4 lw v1, 4(s0) | v1 = *((s0 + 1));
0x000020d8 lw a0, 8(s0) | a0 = *((s0 + 2));
0x000020dc addiu v1, v1, 0x200 | v1 += 0x200;
0x000020e0 sw v0, (s0) | *(s0) = v0;
0x000020e4 sw v1, 4(s0) | *((s0 + 1)) = v1;
0x000020e8 b 0x2084 |
| }
| label_2:
0x000020ec move v0, zero | v0 = 0;
0x000020f0 b 0x20a4 | goto label_0;
| }
[*] Function strcpy used 2 times audiocontrol_convert