[*] Binary protection state of libmbedtls.so.10
No RELRO No Canary found NX disabled DSO RPATH No RUNPATH Symbols
[*] Function printf tear down of libmbedtls.so.10
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/thirdlib/libmbedtls.so.10 @ 0x4130 */
| #include <stdint.h>
|
; (fcn) sym.mbedtls_debug_print_msg () | void mbedtls_debug_print_msg () {
0x00004130 lui gp, 5 |
0x00004134 addiu gp, gp, -0x2ad0 |
0x00004138 addu gp, gp, t9 | gp += t9;
0x0000413c addiu sp, sp, -0x230 |
0x00004140 sw ra, 0x22c(sp) | *(var_22ch) = ra;
0x00004144 sw fp, 0x228(sp) | *(var_228h) = fp;
0x00004148 move fp, sp | fp = sp;
0x0000414c sw gp, 0x18(sp) | *(var_18h) = gp;
0x00004150 sw a0, 0x230(fp) | *(arg_230h) = a0;
0x00004154 sw a1, 0x234(fp) | *(arg_234h) = a1;
0x00004158 sw a2, 0x238(fp) | *(arg_238h) = a2;
0x0000415c sw a3, 0x23c(fp) | *(arg_23ch) = a3;
0x00004160 lw v0, 0x230(fp) | v0 = *(arg_230h);
| if (v0 != 0) {
0x00004164 beqz v0, 0x4254 |
0x00004168 nop |
0x0000416c lw v0, 0x230(fp) | v0 = *(arg_230h);
0x00004170 lw v0, (v0) | v0 = *(v0);
| if (v0 == 0) {
0x00004174 beqz v0, 0x4254 | goto label_0;
| }
0x00004178 nop |
0x0000417c lw v0, 0x230(fp) | v0 = *(arg_230h);
0x00004180 lw v0, (v0) | v0 = *(v0);
0x00004184 lw v0, 0x10(v0) | v0 = *((v0 + 4));
| if (v0 == 0) {
0x00004188 beqz v0, 0x4254 | goto label_0;
| }
0x0000418c nop |
0x00004190 lw v0, -0x7fe4(gp) | v0 = *((gp - 8185));
0x00004194 lw v0, -0x6630(v0) | v0 = *((v0 - 6540));
0x00004198 lw v1, 0x234(fp) | v1 = *(arg_234h);
0x0000419c slt v0, v0, v1 | v0 = (v0 < v1) ? 1 : 0;
| if (v0 != 0) {
0x000041a0 bnez v0, 0x4254 | goto label_0;
| }
0x000041a4 nop |
0x000041a8 addiu v0, fp, 0x244 | v0 = fp + 0x244;
0x000041ac sw v0, 0x24(fp) | *(var_24h) = v0;
0x000041b0 lw v0, 0x24(fp) | v0 = *(var_24h);
0x000041b4 addiu v1, fp, 0x28 | v1 = fp + 0x28;
0x000041b8 move a0, v1 | a0 = v1;
0x000041bc addiu a1, zero, 0x200 | a1 = 0x200;
0x000041c0 lw a2, 0x240(fp) | a2 = *(arg_240h);
0x000041c4 move a3, v0 | a3 = v0;
0x000041c8 lw v0, -0x7d3c(gp) | v0 = sym.imp.vsnprintf
0x000041cc move t9, v0 | t9 = v0;
0x000041d0 jalr t9 | t9 ();
0x000041d4 nop |
0x000041d8 lw gp, 0x18(fp) | gp = *(var_18h);
0x000041dc sw v0, 0x20(fp) | *(var_20h) = v0;
0x000041e0 lw v0, 0x20(fp) | v0 = *(var_20h);
| if (v0 >= 0) {
0x000041e4 bltz v0, 0x4224 |
0x000041e8 nop |
0x000041ec lw v0, 0x20(fp) | v0 = *(var_20h);
0x000041f0 slti v0, v0, 0x1ff | v0 = (v0 < 0x1ff) ? 1 : 0;
| if (v0 == 0) {
0x000041f4 beqz v0, 0x4224 | goto label_1;
| }
0x000041f8 nop |
0x000041fc lw v0, 0x20(fp) | v0 = *(var_20h);
0x00004200 addiu v1, fp, 0x20 | v1 = fp + 0x20;
0x00004204 addu v0, v1, v0 | v0 = v1 + v0;
0x00004208 addiu v1, zero, 0xa | v1 = 0xa;
0x0000420c sb v1, 8(v0) | *(var_28h) = v1;
0x00004210 lw v0, 0x20(fp) | v0 = *(var_20h);
0x00004214 addiu v0, v0, 1 | v0++;
0x00004218 addiu v1, fp, 0x20 | v1 = fp + 0x20;
0x0000421c addu v0, v1, v0 | v0 = v1 + v0;
0x00004220 sb zero, 8(v0) | *(var_8h) = 0;
| }
| label_1:
0x00004224 addiu v0, fp, 0x28 | v0 = fp + 0x28;
0x00004228 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000422c lw a0, 0x230(fp) | a0 = *(arg_230h);
0x00004230 lw a1, 0x234(fp) | a1 = *(arg_234h);
0x00004234 lw a2, 0x238(fp) | a2 = *(arg_238h);
0x00004238 lw a3, 0x23c(fp) | a3 = *(arg_23ch);
0x0000423c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00004240 addiu v0, v0, 0x40bc | v0 += sym.debug_send_line;
0x00004244 move t9, v0 | t9 = v0;
0x00004248 bal 0x40bc | sym_debug_send_line ();
0x0000424c nop |
0x00004250 lw gp, 0x18(fp) | gp = *(var_18h);
| }
| label_0:
0x00004254 move sp, fp |
0x00004258 lw ra, 0x22c(sp) | ra = *(var_22ch);
0x0000425c lw fp, 0x228(sp) | fp = *(var_228h);
0x00004260 addiu sp, sp, 0x230 |
0x00004264 jr ra | return v0;
0x00004268 nop |
| }
[*] Function printf used 2 times libmbedtls.so.10