[*] Binary protection state of recording_fixer
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of recording_fixer
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/recording_fixer @ 0x33e0 */
| #include <stdint.h>
|
; (fcn) sym.file_utils_check_file_size () | void file_utils_check_file_size () {
0x000033e0 lui gp, 2 |
0x000033e4 addiu gp, gp, -0x13d0 |
0x000033e8 addu gp, gp, t9 | gp += t9;
0x000033ec addiu sp, sp, -0xc8 |
0x000033f0 lw t9, -0x7cb8(gp) | t9 = sym.imp.g_path_get_dirname;
0x000033f4 sw s1, 0xb8(sp) | *(var_b8h) = s1;
0x000033f8 lw s1, -0x7e20(gp) | s1 = *((gp - 8072));
0x000033fc sw ra, 0xc4(sp) | *(var_c4h) = ra;
0x00003400 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00003404 lw v0, (s1) | v0 = *(s1);
0x00003408 sw s3, 0xc0(sp) | *(var_c0h) = s3;
0x0000340c sw s2, 0xbc(sp) | *(var_bch) = s2;
0x00003410 sw s0, 0xb4(sp) | *(var_b4h) = s0;
0x00003414 sw v0, 0xac(sp) | *(var_ach) = v0;
0x00003418 move s0, a0 | s0 = a0;
0x0000341c move a0, a1 | a0 = a1;
0x00003420 move s3, a2 | s3 = a2;
0x00003424 jalr t9 | t9 ();
0x00003428 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000342c move a3, s3 | a3 = s3;
0x00003430 move a2, s0 | a2 = s0;
0x00003434 lw a0, -0x7fd0(gp) | a0 = *((gp - 8180));
0x00003438 lw t9, -0x7d90(gp) | t9 = sym.imp.g_strdup_printf
0x0000343c move a1, v0 | a1 = v0;
0x00003440 addiu a0, a0, -0x6ca8 | a0 += -0x6ca8;
0x00003444 move s2, v0 | s2 = v0;
0x00003448 jalr t9 | t9 ();
0x0000344c lw gp, 0x10(sp) | gp = *(var_10h);
0x00003450 addiu a1, sp, 0x1c | a1 = sp + 0x1c;
0x00003454 move a0, v0 | a0 = v0;
0x00003458 lw t9, -0x7fb8(gp) | t9 = sym.g_stat_wrapper;
0x0000345c move s3, v0 | s3 = v0;
0x00003460 bal 0x58a0 | sym_g_stat_wrapper ();
0x00003464 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x00003468 bltz v0, 0x34c0 | goto label_0;
| }
0x0000346c lw s0, 0x4c(sp) | s0 = *(var_4ch);
0x00003470 sltu s0, zero, s0 | s0 = (0 < s0) ? 1 : 0;
| do {
0x00003474 lw t9, -0x7ca4(gp) | t9 = sym.imp.g_free;
0x00003478 move a0, s3 | a0 = s3;
0x0000347c jalr t9 | t9 ();
0x00003480 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003484 lw t9, -0x7ca4(gp) | t9 = sym.imp.g_free;
0x00003488 move a0, s2 | a0 = s2;
0x0000348c jalr t9 | t9 ();
0x00003490 lw a0, 0xac(sp) | a0 = *(var_ach);
0x00003494 lw v1, (s1) | v1 = *(s1);
0x00003498 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000349c move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x000034a0 bne a0, v1, 0x34c8 | goto label_1;
| }
0x000034a4 lw ra, 0xc4(sp) | ra = *(var_c4h);
0x000034a8 lw s3, 0xc0(sp) | s3 = *(var_c0h);
0x000034ac lw s2, 0xbc(sp) | s2 = *(var_bch);
0x000034b0 lw s1, 0xb8(sp) | s1 = *(var_b8h);
0x000034b4 lw s0, 0xb4(sp) | s0 = *(var_b4h);
0x000034b8 addiu sp, sp, 0xc8 |
0x000034bc jr ra | return v0;
| label_0:
0x000034c0 move s0, zero | s0 = 0;
0x000034c4 b 0x3474 |
| } while (1);
| label_1:
0x000034c8 lw t9, -0x7e60(gp) | t9 = sym.imp.__stack_chk_fail;
0x000034cc jalr t9 | t9 ();
0x000034d0 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/recording_fixer @ 0x34d4 */
| #include <stdint.h>
|
; (fcn) sym.file_utils_replace_file () | void file_utils_replace_file () {
0x000034d4 lui gp, 2 |
0x000034d8 addiu gp, gp, -0x14c4 |
0x000034dc addu gp, gp, t9 | gp += t9;
0x000034e0 addiu sp, sp, -0x30 |
0x000034e4 lw t9, -0x7f34(gp) | t9 = sym.imp.g_file_test;
0x000034e8 sw s0, 0x1c(sp) | *(var_1ch_2) = s0;
0x000034ec move s0, a1 | s0 = a1;
0x000034f0 sw gp, 0x10(sp) | *(var_10h_2) = gp;
0x000034f4 sw s1, 0x20(sp) | *(var_20h) = s1;
0x000034f8 sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x000034fc sw s3, 0x28(sp) | *(var_28h) = s3;
0x00003500 sw s2, 0x24(sp) | *(var_24h) = s2;
0x00003504 move s1, a0 | s1 = a0;
0x00003508 addiu a1, zero, 1 | a1 = 1;
0x0000350c move a0, s0 | a0 = s0;
0x00003510 jalr t9 | t9 ();
0x00003514 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 == 0) {
0x00003518 bnez v0, 0x3540 |
0x0000351c lw ra, 0x2c(sp) | ra = *(var_2ch);
0x00003520 move s0, zero | s0 = 0;
0x00003524 move v0, s0 | v0 = s0;
0x00003528 lw s3, 0x28(sp) | s3 = *(var_28h);
0x0000352c lw s2, 0x24(sp) | s2 = *(var_24h);
0x00003530 lw s1, 0x20(sp) | s1 = *(var_20h);
0x00003534 lw s0, 0x1c(sp) | s0 = *(var_1ch_2);
0x00003538 addiu sp, sp, 0x30 |
0x0000353c jr ra | return v0;
| }
0x00003540 lw a0, -0x7fd0(gp) | a0 = *((gp - 8180));
0x00003544 lw t9, -0x7d90(gp) | t9 = sym.imp.g_strdup_printf
0x00003548 move a1, s1 | a1 = s1;
0x0000354c addiu a0, a0, -0x6c9c | a0 += -0x6c9c;
0x00003550 jalr t9 | t9 ();
0x00003554 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00003558 move a1, v0 | a1 = v0;
0x0000355c move a0, s1 | a0 = s1;
0x00003560 lw t9, -0x7fb4(gp) | t9 = sym.g_rename_wrapper;
0x00003564 move s2, v0 | s2 = v0;
0x00003568 addiu s3, zero, -1 | s3 = -1;
0x0000356c bal 0x58c0 | sym_g_rename_wrapper ();
0x00003570 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 == s3) {
0x00003574 beq v0, s3, 0x35d0 | goto label_0;
| }
0x00003578 lw t9, -0x7fb4(gp) | t9 = sym.g_rename_wrapper;
0x0000357c move a1, s1 | a1 = s1;
0x00003580 move a0, s0 | a0 = s0;
0x00003584 bal 0x58c0 | sym_g_rename_wrapper ();
0x00003588 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 == s3) {
0x0000358c beq v0, s3, 0x35d0 | goto label_0;
| }
0x00003590 lw t9, -0x7fb0(gp) | t9 = sym.g_remove_wrapper;
0x00003594 move a0, s2 | a0 = s2;
0x00003598 bal 0x58d8 | sym_g_remove_wrapper ();
0x0000359c lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000035a0 addiu s0, zero, 1 | s0 = 1;
| do {
0x000035a4 lw t9, -0x7ca4(gp) | t9 = sym.imp.g_free;
0x000035a8 move a0, s2 | a0 = s2;
0x000035ac jalr t9 | t9 ();
0x000035b0 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x000035b4 move v0, s0 | v0 = s0;
0x000035b8 lw s3, 0x28(sp) | s3 = *(var_28h);
0x000035bc lw s2, 0x24(sp) | s2 = *(var_24h);
0x000035c0 lw s1, 0x20(sp) | s1 = *(var_20h);
0x000035c4 lw s0, 0x1c(sp) | s0 = *(var_1ch_2);
0x000035c8 addiu sp, sp, 0x30 |
0x000035cc jr ra | return v0;
| label_0:
0x000035d0 move s0, zero | s0 = 0;
0x000035d4 b 0x35a4 |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/recording_fixer @ 0x4880 */
| #include <stdint.h>
|
; (fcn) sym.recording_block_get_fixed_block_file_path () | void recording_block_get_fixed_block_file_path () {
0x00004880 lui gp, 2 |
0x00004884 addiu gp, gp, -0x2870 |
0x00004888 addu gp, gp, t9 | gp += t9;
0x0000488c addiu sp, sp, -0x30 |
0x00004890 lw t9, -0x7cb8(gp) | t9 = sym.imp.g_path_get_dirname;
0x00004894 sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x00004898 sw s2, 0x28(sp) | *(var_28h) = s2;
0x0000489c sw s1, 0x24(sp) | *(var_24h) = s1;
0x000048a0 sw s0, 0x20(sp) | *(var_20h_2) = s0;
0x000048a4 sw gp, 0x10(sp) | *(var_10h_2) = gp;
0x000048a8 move s1, a0 | s1 = a0;
0x000048ac move a0, a1 | a0 = a1;
0x000048b0 move s2, a2 | s2 = a2;
0x000048b4 jalr t9 | t9 ();
0x000048b8 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000048bc move a3, s2 | a3 = s2;
0x000048c0 move a2, s1 | a2 = s1;
0x000048c4 lw a0, -0x7fd0(gp) | a0 = *((gp - 8180));
0x000048c8 lw t9, -0x7d90(gp) | t9 = sym.imp.g_strdup_printf
0x000048cc move a1, v0 | a1 = v0;
0x000048d0 addiu a0, a0, -0x69d0 | a0 += -0x69d0;
0x000048d4 move s0, v0 | s0 = v0;
0x000048d8 jalr t9 | t9 ();
0x000048dc lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000048e0 sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x000048e4 lw t9, -0x7ca4(gp) | t9 = sym.imp.g_free;
0x000048e8 move a0, s0 | a0 = s0;
0x000048ec jalr t9 | t9 ();
0x000048f0 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x000048f4 lw v0, 0x1c(sp) | v0 = *(var_1ch);
0x000048f8 lw s2, 0x28(sp) | s2 = *(var_28h);
0x000048fc lw s1, 0x24(sp) | s1 = *(var_24h);
0x00004900 lw s0, 0x20(sp) | s0 = *(var_20h_2);
0x00004904 addiu sp, sp, 0x30 |
0x00004908 jr ra | return v0;
| }
[*] Function printf used 4 times recording_fixer