[*] Binary protection state of temperature_ctrld
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf 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 @ 0x21aac */
| #include <stdint.h>
|
; (fcn) sym.camblock_i2c_open () | void camblock_i2c_open () {
0x00021aac lui gp, 3 |
0x00021ab0 addiu gp, gp, 0x564 |
0x00021ab4 addu gp, gp, t9 | gp += t9;
0x00021ab8 addiu sp, sp, -0x38 |
0x00021abc lw t9, -0x7aa8(gp) | t9 = sym.imp.g_strdup_printf;
0x00021ac0 sw s2, 0x28(sp) | *(var_28h_2) = s2;
0x00021ac4 lw s2, -0x7b50(gp) | s2 = *((gp - 7892));
0x00021ac8 sw s4, 0x30(sp) | *(var_30h_2) = s4;
0x00021acc move s4, a1 | s4 = a1;
0x00021ad0 lw v0, (s2) | v0 = *(s2);
0x00021ad4 move a1, a0 | a1 = a0;
0x00021ad8 lw a0, -0x7fc8(gp) | a0 = *(gp);
0x00021adc sw gp, 0x10(sp) | *(var_10h_2) = gp;
0x00021ae0 sw ra, 0x34(sp) | *(var_34h_2) = ra;
0x00021ae4 sw s3, 0x2c(sp) | *(var_2ch_2) = s3;
0x00021ae8 sw s1, 0x24(sp) | *(var_24h_2) = s1;
| /* str._dev_i2c__i */
0x00021aec addiu a0, a0, 0x7afc | a0 += 0x7afc;
0x00021af0 sw s0, 0x20(sp) | *(var_20h) = s0;
0x00021af4 sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x00021af8 sw zero, 0x18(sp) | *(var_18h_2) = 0;
0x00021afc move s3, a2 | s3 = a2;
0x00021b00 jalr t9 | t9 ();
0x00021b04 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00021b08 addiu a1, zero, 2 | a1 = 2;
0x00021b0c move a0, v0 | a0 = v0;
0x00021b10 lw t9, -0x7938(gp) | t9 = sym.imp.open;
0x00021b14 move s1, v0 | s1 = v0;
0x00021b18 jalr t9 | t9 ();
0x00021b1c lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00021b20 sw v0, (s3) | *(s3) = v0;
| if (v0 < 0) {
0x00021b24 bltz v0, 0x21bf8 | goto label_1;
| }
0x00021b28 lw t9, -0x7ac8(gp) | t9 = sym.imp.ioctl;
0x00021b2c addiu a2, sp, 0x18 | a2 = sp + 0x18;
0x00021b30 addiu a1, zero, 0x705 | a1 = 0x705;
0x00021b34 move a0, v0 | a0 = v0;
0x00021b38 jalr t9 | t9 ();
0x00021b3c move s0, v0 | s0 = v0;
0x00021b40 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 < 0) {
0x00021b44 bltz v0, 0x21ba8 | goto label_2;
| }
0x00021b48 lw t9, -0x7ac8(gp) | t9 = sym.imp.ioctl;
0x00021b4c lw a0, (s3) | a0 = *(s3);
0x00021b50 move a2, s4 | a2 = s4;
0x00021b54 addiu a1, zero, 0x706 | a1 = 0x706;
0x00021b58 jalr t9 | t9 ();
0x00021b5c move s0, v0 | s0 = v0;
0x00021b60 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 < 0) {
0x00021b64 bltz v0, 0x21bd0 | goto label_3;
| }
| do {
| label_0:
0x00021b68 lw t9, -0x7928(gp) | t9 = *((gp - 7754));
0x00021b6c move a0, s1 | a0 = s1;
0x00021b70 jalr t9 | t9 ();
0x00021b74 lw a0, 0x1c(sp) | a0 = *(var_1ch);
0x00021b78 lw v1, (s2) | v1 = *(s2);
0x00021b7c lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00021b80 move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x00021b84 bne a0, v1, 0x21c24 | goto label_4;
| }
0x00021b88 lw ra, 0x34(sp) | ra = *(var_34h_2);
0x00021b8c lw s4, 0x30(sp) | s4 = *(var_30h_2);
0x00021b90 lw s3, 0x2c(sp) | s3 = *(var_2ch_2);
0x00021b94 lw s2, 0x28(sp) | s2 = *(var_28h_2);
0x00021b98 lw s1, 0x24(sp) | s1 = *(var_24h_2);
0x00021b9c lw s0, 0x20(sp) | s0 = *(var_20h);
0x00021ba0 addiu sp, sp, 0x38 |
0x00021ba4 jr ra | return v0;
| label_2:
0x00021ba8 lw v0, -0x7b00(gp) | v0 = *((gp - 7872));
0x00021bac lw a2, -0x7fc8(gp) | a2 = *(gp);
0x00021bb0 lw t9, -0x799c(gp) | t9 = sym.imp.__fprintf_chk
0x00021bb4 lw a0, (v0) | a0 = *(v0);
0x00021bb8 move a3, s0 | a3 = s0;
| /* str.Error_I2C_FUNCS__m_:_res___d_n */
0x00021bbc addiu a2, a2, 0x7b30 | a2 += 0x7b30;
0x00021bc0 addiu a1, zero, 1 | a1 = 1;
0x00021bc4 jalr t9 | t9 ();
0x00021bc8 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00021bcc b 0x21b68 |
| } while (1);
| label_3:
0x00021bd0 lw v0, -0x7b00(gp) | v0 = *((gp - 7872));
0x00021bd4 lw a2, -0x7fc8(gp) | a2 = *(gp);
0x00021bd8 lw t9, -0x799c(gp) | t9 = sym.imp.__fprintf_chk
0x00021bdc lw a0, (v0) | a0 = *(v0);
0x00021be0 move a3, s0 | a3 = s0;
| /* str.Error_I2C_SLAVE_FORCE__m_:_res___d_n */
0x00021be4 addiu a2, a2, 0x7b50 | a2 += 0x7b50;
0x00021be8 addiu a1, zero, 1 | a1 = 1;
0x00021bec jalr t9 | t9 ();
0x00021bf0 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00021bf4 b 0x21b68 | goto label_0;
| label_1:
0x00021bf8 lw v0, -0x7b00(gp) | v0 = *((gp - 7872));
0x00021bfc lw a2, -0x7fc8(gp) | a2 = *(gp);
0x00021c00 lw t9, -0x799c(gp) | t9 = sym.imp.__fprintf_chk
0x00021c04 lw a0, (v0) | a0 = *(v0);
0x00021c08 move a3, s1 | a3 = s1;
| /* str.Error_opening_i2c_device.__m._Path:__s_n */
0x00021c0c addiu a2, a2, 0x7b08 | a2 += 0x7b08;
0x00021c10 addiu a1, zero, 1 | a1 = 1;
0x00021c14 jalr t9 | t9 ();
0x00021c18 addiu s0, zero, -1 | s0 = -1;
0x00021c1c lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00021c20 b 0x21b68 | goto label_0;
| label_4:
0x00021c24 lw t9, -0x7bb8(gp) | t9 = sym.imp.__stack_chk_fail;
0x00021c28 jalr t9 | t9 ();
0x00021c2c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/temperature_ctrld @ 0x21c30 */
| #include <stdint.h>
|
; (fcn) sym.camblock_read_reg_buf () | void camblock_read_reg_buf () {
0x00021c30 lui gp, 3 |
0x00021c34 addiu gp, gp, 0x3e0 |
0x00021c38 addu gp, gp, t9 | gp += t9;
0x00021c3c addiu sp, sp, -0x58 |
0x00021c40 addiu v1, zero, 1 | v1 = 1;
0x00021c44 sw s1, 0x4c(sp) | *(var_4ch_2) = s1;
0x00021c48 lw s1, -0x7b50(gp) | s1 = *((gp - 7892));
0x00021c4c lw v0, 0x68(sp) | v0 = *(var_10h_2);
0x00021c50 sw gp, 0x18(sp) | *(var_18h_3) = gp;
0x00021c54 lw t0, (s1) | t0 = *(s1);
0x00021c58 sh v1, 0x3a(sp) | *(var_3ah_2) = v1;
0x00021c5c lw v1, 0x6c(sp) | v1 = *(var_6ch);
0x00021c60 sw s2, 0x50(sp) | *(var_50h) = s2;
0x00021c64 sw s0, 0x48(sp) | *(var_48h_2) = s0;
0x00021c68 sw ra, 0x54(sp) | *(var_54h) = ra;
0x00021c6c lw t9, -0x7ac8(gp) | t9 = sym.imp.ioctl;
0x00021c70 sb a2, (v0) | *(v0) = a2;
0x00021c74 addiu s0, zero, 2 | s0 = 2;
0x00021c78 sb a3, 1(v0) | *((v0 + 1)) = a3;
0x00021c7c sw v0, 0x34(sp) | *(var_34h_3) = v0;
0x00021c80 sw v0, 0x40(sp) | *(var_40h_2) = v0;
0x00021c84 addiu v0, sp, 0x2c | v0 = sp + 0x2c;
0x00021c88 sh a1, 0x2c(sp) | *(var_2ch_3) = a1;
0x00021c8c sh a1, 0x38(sp) | *(var_38h_2) = a1;
0x00021c90 sh zero, 0x2e(sp) | *(var_2eh_2) = 0;
0x00021c94 sh zero, 0x32(sp) | *(var_32h_2) = 0;
0x00021c98 sh zero, 0x3e(sp) | *(var_3eh) = 0;
0x00021c9c sh s0, 0x30(sp) | *(var_30h_3) = s0;
0x00021ca0 sh v1, 0x3c(sp) | *(var_3ch_2) = v1;
0x00021ca4 addiu a2, sp, 0x24 | a2 = sp + 0x24;
0x00021ca8 addiu a1, zero, 0x707 | a1 = 0x707;
0x00021cac sw t0, 0x44(sp) | *(var_44h_2) = t0;
0x00021cb0 sw v0, 0x24(sp) | *(var_24h_3) = v0;
0x00021cb4 sw s0, 0x28(sp) | *(var_28h_3) = s0;
0x00021cb8 jalr t9 | t9 ();
0x00021cbc move s2, v0 | s2 = v0;
0x00021cc0 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00021cc4 move v0, zero | v0 = 0;
0x00021cc8 bne s2, s0, 0x21cf0 |
| while (1) {
0x00021ccc lw a0, 0x44(sp) | a0 = *(var_44h_2);
0x00021cd0 lw v1, (s1) | v1 = *(s1);
0x00021cd4 lw ra, 0x54(sp) | ra = *(var_54h);
| if (a0 != v1) {
0x00021cd8 bne a0, v1, 0x21d40 | goto label_0;
| }
0x00021cdc lw s2, 0x50(sp) | s2 = *(var_50h);
0x00021ce0 lw s1, 0x4c(sp) | s1 = *(var_4ch_2);
0x00021ce4 lw s0, 0x48(sp) | s0 = *(var_48h_2);
0x00021ce8 addiu sp, sp, 0x58 |
0x00021cec jr ra | return v0;
0x00021cf0 lw v0, -0x7b00(gp) | v0 = *((gp - 7872));
0x00021cf4 lw t9, -0x7924(gp) | t9 = sym.imp.__errno_location;
0x00021cf8 lw s0, (v0) | s0 = *(v0);
0x00021cfc jalr t9 | t9 ();
0x00021d00 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00021d04 lw t9, -0x795c(gp) | t9 = sym.imp.strerror;
0x00021d08 lw a0, (v0) | a0 = *(v0);
0x00021d0c jalr t9 | t9 ();
0x00021d10 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00021d14 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x00021d18 move a3, s2 | a3 = s2;
0x00021d1c lw a2, -0x7fc8(gp) | a2 = *(gp);
0x00021d20 lw t9, -0x799c(gp) | t9 = sym.imp.__fprintf_chk
| /* str.read_reg_read_:_ret___d___s_n */
0x00021d24 addiu a2, a2, 0x7b78 | a2 += 0x7b78;
0x00021d28 addiu a1, zero, 1 | a1 = 1;
0x00021d2c move a0, s0 | a0 = s0;
0x00021d30 jalr t9 | t9 ();
0x00021d34 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00021d38 addiu v0, zero, -1 | v0 = -1;
0x00021d3c b 0x21ccc |
| }
| label_0:
0x00021d40 lw t9, -0x7bb8(gp) | t9 = sym.imp.__stack_chk_fail;
0x00021d44 jalr t9 | t9 ();
0x00021d48 nop |
| }
[*] Function fprintf used 5 times temperature_ctrld