[*] Binary protection state of temperature_ctrld
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of temperature_ctrld
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/temperature_ctrld @ 0x113a4 */
| #include <stdint.h>
|
; (fcn) fcn.000113a4 () | void fcn_000113a4 () {
0x000113a4 lui gp, 4 |
0x000113a8 addiu gp, gp, 0xc6c |
0x000113ac addu gp, gp, t9 | gp += t9;
0x000113b0 addiu sp, sp, -0x70 |
0x000113b4 lw v0, -0x7fc8(gp) | v0 = *(gp);
0x000113b8 sw s1, 0x64(sp) | *(var_64h) = s1;
0x000113bc lw s1, -0x7b50(gp) | s1 = *((gp - 7892));
| /* str.AAID */
0x000113c0 addiu v0, v0, 0x4a00 | v0 += 0x4a00;
0x000113c4 sw v0, 0x14(sp) | *(var_14h) = v0;
0x000113c8 lw v1, 0x1f4(a0) | v1 = *((a0 + 125));
0x000113cc lw v0, (s1) | v0 = *(s1);
0x000113d0 lw a3, -0x7fc8(gp) | a3 = *(gp);
0x000113d4 lw t9, -0x7c48(gp) | t9 = sym.imp.__sprintf_chk
0x000113d8 sw s0, 0x60(sp) | *(var_60h) = s0;
0x000113dc addiu s0, sp, 0x28 | s0 = sp + 0x28;
0x000113e0 sw gp, 0x18(sp) | *(var_18h) = gp;
0x000113e4 move a0, s0 | a0 = s0;
0x000113e8 sw ra, 0x6c(sp) | *(var_6ch) = ra;
| /* str._s_s */
0x000113ec addiu a3, a3, 0x49f8 | a3 += 0x49f8;
0x000113f0 addiu a2, zero, 0x32 | a2 = 0x32;
0x000113f4 addiu a1, zero, 1 | a1 = 1;
0x000113f8 sw v1, 0x10(sp) | *(var_10h) = v1;
0x000113fc sw s2, 0x68(sp) | *(var_68h) = s2;
0x00011400 sw v0, 0x5c(sp) | *(var_5ch) = v0;
0x00011404 jalr t9 | t9 ();
0x00011408 nop |
0x0001140c lw gp, 0x18(sp) | gp = *(var_18h);
0x00011410 move a0, s0 | a0 = s0;
0x00011414 lw t9, -0x7938(gp) | t9 = sym.imp.open;
0x00011418 move a1, zero | a1 = 0;
0x0001141c jalr t9 | t9 ();
0x00011420 move s0, v0 | s0 = v0;
0x00011424 addiu v0, zero, -1 | v0 = -1;
0x00011428 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s0 == v0) {
0x0001142c beq s0, v0, 0x114b8 | goto label_3;
| }
0x00011430 lw t9, -0x7a54(gp) | t9 = sym.imp.read;
0x00011434 addiu s2, sp, 0x24 | s2 = sp + 0x24;
0x00011438 addiu a2, zero, 2 | a2 = 2;
0x0001143c move a1, s2 | a1 = s2;
0x00011440 move a0, s0 | a0 = s0;
0x00011444 jalr t9 | t9 ();
0x00011448 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 > 0) {
0x0001144c bgtz v0, 0x1148c | goto label_4;
| }
0x00011450 addiu s2, zero, -1 | s2 = -1;
| do {
0x00011454 lw t9, -0x7b88(gp) | t9 = sym.imp.close;
0x00011458 move a0, s0 | a0 = s0;
0x0001145c jalr t9 | t9 ();
0x00011460 lw gp, 0x18(sp) | gp = *(var_18h);
| label_0:
0x00011464 lw a0, 0x5c(sp) | a0 = *(var_5ch);
0x00011468 lw v1, (s1) | v1 = *(s1);
0x0001146c move v0, s2 | v0 = s2;
| if (a0 != v1) {
0x00011470 bne a0, v1, 0x114c0 | goto label_5;
| }
0x00011474 lw ra, 0x6c(sp) | ra = *(var_6ch);
0x00011478 lw s2, 0x68(sp) | s2 = *(var_68h);
0x0001147c lw s1, 0x64(sp) | s1 = *(var_64h);
0x00011480 lw s0, 0x60(sp) | s0 = *(var_60h);
0x00011484 addiu sp, sp, 0x70 |
0x00011488 jr ra | return v0;
| label_4:
0x0001148c addiu v1, sp, 0x60 | v1 = sp + 0x60;
0x00011490 addu v0, v1, v0 | v0 = v1 + v0;
0x00011494 lw t9, -0x7a6c(gp) | t9 = sym.imp.strtol;
0x00011498 move a0, s2 | a0 = s2;
0x0001149c addiu a2, zero, 0xa | a2 = 0xa;
0x000114a0 move a1, zero | a1 = 0;
0x000114a4 sb zero, -0x3c(v0) | *(var_3ch_2) = 0;
0x000114a8 jalr t9 | t9 ();
0x000114ac move s2, v0 | s2 = v0;
0x000114b0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000114b4 b 0x11454 |
| } while (1);
| label_3:
0x000114b8 addiu s2, zero, -1 | s2 = -1;
0x000114bc b 0x11464 | goto label_0;
| label_5:
0x000114c0 lw t9, -0x7bb8(gp) | t9 = sym.imp.__stack_chk_fail;
0x000114c4 jalr t9 | t9 ();
0x000114c8 nop |
0x000114cc lui gp, 4 |
0x000114d0 addiu gp, gp, 0xb44 |
0x000114d4 addu gp, gp, t9 | gp += t9;
0x000114d8 addiu sp, sp, -0x48 |
0x000114dc lw v0, -0x7fc8(gp) | v0 = *(gp);
0x000114e0 sw s0, 0x38(sp) | *(var_38h) = s0;
0x000114e4 lw s0, -0x7b50(gp) | s0 = *((gp - 7892));
0x000114e8 lw t9, -0x7c54(gp) | t9 = sym.imp.__snprintf_chk;
0x000114ec sw s1, 0x3c(sp) | *(var_3ch) = s1;
0x000114f0 lw v1, (s0) | v1 = *(s0);
| /* esilref: '&d' */
0x000114f4 addiu v0, v0, 0x4348 | v0 += 0x4348;
0x000114f8 addiu s1, sp, 0x2c | s1 = sp + 0x2c;
0x000114fc sw gp, 0x18(sp) | *(var_18h_2) = gp;
0x00011500 sw s2, 0x40(sp) | *(var_40h) = s2;
0x00011504 sw a1, 0x14(sp) | *(var_14h_2) = a1;
0x00011508 sw v1, 0x34(sp) | *(var_34h) = v1;
0x0001150c sw ra, 0x44(sp) | *(var_44h) = ra;
0x00011510 move s2, a0 | s2 = a0;
0x00011514 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00011518 addiu a3, zero, 6 | a3 = 6;
0x0001151c addiu a2, zero, 1 | a2 = 1;
0x00011520 addiu a1, zero, 6 | a1 = 6;
0x00011524 move a0, s1 | a0 = s1;
0x00011528 jalr t9 | t9 ();
0x0001152c slti v1, v0, 6 | v1 = (v0 < 6) ? 1 : 0;
0x00011530 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v1 == 0) {
0x00011534 beqz v1, 0x115d4 | goto label_6;
| }
0x00011538 lw t9, -0x79f0(gp) | t9 = sym.imp.write;
0x0001153c lw a0, 0x210(s2) | a0 = *((s2 + 132));
0x00011540 move a2, v0 | a2 = v0;
0x00011544 move a1, s1 | a1 = s1;
0x00011548 jalr t9 | t9 ();
0x0001154c lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 < 0) {
0x00011550 bltz v0, 0x11598 | goto label_7;
| }
0x00011554 lw t9, -0x7c50(gp) | t9 = sym.imp.lseek;
0x00011558 lw a0, 0x210(s2) | a0 = *((s2 + 132));
0x0001155c move a2, zero | a2 = 0;
0x00011560 move a1, zero | a1 = 0;
0x00011564 jalr t9 | t9 ();
0x00011568 addiu v1, zero, -1 | v1 = -1;
0x0001156c lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == v1) {
0x00011570 beq v0, v1, 0x115c0 | goto label_8;
| }
| do {
| label_2:
0x00011574 lw a0, 0x34(sp) | a0 = *(var_34h);
0x00011578 lw v1, (s0) | v1 = *(s0);
0x0001157c lw ra, 0x44(sp) | ra = *(var_44h);
| if (a0 != v1) {
0x00011580 bne a0, v1, 0x115fc | goto label_9;
| }
0x00011584 lw s2, 0x40(sp) | s2 = *(var_40h);
0x00011588 lw s1, 0x3c(sp) | s1 = *(var_3ch);
0x0001158c lw s0, 0x38(sp) | s0 = *(var_38h);
0x00011590 addiu sp, sp, 0x48 |
0x00011594 jr ra | return v0;
| label_7:
0x00011598 lw a2, -0x7fc8(gp) | a2 = *(gp);
0x0001159c lw t9, -0x7b74(gp) | t9 = sym.imp.__syslog_chk;
0x000115a0 sw v0, 0x24(sp) | *(var_24h) = v0;
| /* str.Write_failure_to_heater__m */
0x000115a4 addiu a2, a2, 0x4a34 | a2 += 0x4a34;
| label_1:
0x000115a8 addiu a1, zero, 1 | a1 = 1;
0x000115ac addiu a0, zero, 3 | a0 = 3;
0x000115b0 jalr t9 | t9 ();
0x000115b4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000115b8 lw v0, 0x24(sp) | v0 = *(var_24h);
0x000115bc b 0x11574 |
| } while (1);
| label_8:
0x000115c0 lw a2, -0x7fc8(gp) | a2 = *(gp);
0x000115c4 sw v0, 0x24(sp) | *(var_24h) = v0;
0x000115c8 lw t9, -0x7b74(gp) | t9 = sym.imp.__syslog_chk;
| /* str.Failed_to_reset_file_descriptor__m */
0x000115cc addiu a2, a2, 0x4a50 | a2 += 0x4a50;
0x000115d0 b 0x115a8 | goto label_1;
| label_6:
0x000115d4 lw a2, -0x7fc8(gp) | a2 = *(gp);
0x000115d8 lw t9, -0x7b74(gp) | t9 = sym.imp.__syslog_chk;
0x000115dc lw a3, 0x208(s2) | a3 = *((s2 + 130));
| /* str.Write_failure_to_heater__d___to_large_value */
0x000115e0 addiu a2, a2, 0x4a08 | a2 += 0x4a08;
0x000115e4 addiu a1, zero, 1 | a1 = 1;
0x000115e8 addiu a0, zero, 3 | a0 = 3;
0x000115ec jalr t9 | t9 ();
0x000115f0 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000115f4 addiu v0, zero, -1 | v0 = -1;
0x000115f8 b 0x11574 | goto label_2;
| label_9:
0x000115fc lw t9, -0x7bb8(gp) | t9 = sym.imp.__stack_chk_fail;
0x00011600 jalr t9 | t9 ();
0x00011604 nop |
| }
[*] Function sprintf used 2 times temperature_ctrld