[*] Binary protection state of wsdd
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of wsdd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/wsdd @ 0xce34 */
| #include <stdint.h>
|
; (fcn) sym.common_generate_uuid () | void common_generate_uuid () {
0x0000ce34 lui gp, 3 |
0x0000ce38 addiu gp, gp, 0x42ac |
0x0000ce3c addu gp, gp, t9 | gp += t9;
0x0000ce40 addiu sp, sp, -0x78 |
0x0000ce44 lw t9, -0x7998(gp) | t9 = sym.imp.uuid_clear;
0x0000ce48 sw s1, 0x64(sp) | *(var_64h) = s1;
0x0000ce4c lw s1, -0x774c(gp) | s1 = *((gp - 7635));
0x0000ce50 sw s0, 0x60(sp) | *(var_60h) = s0;
0x0000ce54 addiu s0, sp, 0x24 | s0 = sp + 0x24;
0x0000ce58 lw v0, (s1) | v0 = *(s1);
0x0000ce5c sw ra, 0x74(sp) | *(var_74h) = ra;
0x0000ce60 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0000ce64 sw v0, 0x5c(sp) | *(var_5ch) = v0;
0x0000ce68 sw s4, 0x70(sp) | *(var_70h) = s4;
0x0000ce6c sw s2, 0x68(sp) | *(var_68h) = s2;
0x0000ce70 sw s3, 0x6c(sp) | *(var_6ch) = s3;
0x0000ce74 move s4, a0 | s4 = a0;
0x0000ce78 sw zero, 0x34(sp) | *(var_34h) = 0;
0x0000ce7c move a0, s0 | a0 = s0;
0x0000ce80 sw zero, 0x38(sp) | *(var_38h) = 0;
0x0000ce84 sw zero, 0x3c(sp) | *(var_3ch) = 0;
0x0000ce88 sw zero, 0x40(sp) | *(var_40h) = 0;
0x0000ce8c sw zero, 0x44(sp) | *(var_44h) = 0;
0x0000ce90 sw zero, 0x48(sp) | *(var_48h) = 0;
0x0000ce94 sw zero, 0x4c(sp) | *(var_4ch) = 0;
0x0000ce98 sw zero, 0x50(sp) | *(var_50h) = 0;
0x0000ce9c sw zero, 0x54(sp) | *(var_54h) = 0;
0x0000cea0 sb zero, 0x58(sp) | *(var_58h) = 0;
0x0000cea4 move s2, a1 | s2 = a1;
0x0000cea8 jalr t9 | t9 ();
0x0000ceac lw gp, 0x18(sp) | gp = *(var_18h);
0x0000ceb0 lw t9, -0x7884(gp) | t9 = sym.imp.uuid_generate;
0x0000ceb4 move a0, s0 | a0 = s0;
0x0000ceb8 jalr t9 | t9 ();
0x0000cebc lw gp, 0x18(sp) | gp = *(var_18h);
0x0000cec0 lw t9, -0x78ac(gp) | t9 = sym.imp.uuid_is_null;
0x0000cec4 move a0, s0 | a0 = s0;
0x0000cec8 jalr t9 | t9 ();
0x0000cecc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0000ced0 bnez v0, 0xcf98 | goto label_3;
| }
0x0000ced4 lw t9, -0x78d4(gp) | t9 = sym.imp.uuid_unparse;
0x0000ced8 addiu s3, sp, 0x34 | s3 = sp + 0x34;
0x0000cedc move a1, s3 | a1 = s3;
0x0000cee0 move a0, s0 | a0 = s0;
0x0000cee4 jalr t9 | t9 ();
0x0000cee8 lb v0, 0x34(sp) | v0 = *(var_34h);
0x0000ceec lw gp, 0x18(sp) | gp = *(var_18h);
0x0000cef0 beqz v0, 0xcf68 |
| while (1) {
0x0000cef4 lw t9, -0x7998(gp) | t9 = sym.imp.uuid_clear;
0x0000cef8 move a0, s0 | a0 = s0;
0x0000cefc jalr t9 | t9 ();
0x0000cf00 lb v0, 0x34(sp) | v0 = *(var_34h);
0x0000cf04 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0000cf08 beqz v0, 0xcfc8 | goto label_4;
| }
| if (s2 == 0) {
| label_1:
0x0000cf0c beql s2, zero, 0xcf90 | goto label_5;
| }
0x0000cf10 lw s2, -0x7fdc(gp) | s2 = *(gp);
| label_0:
0x0000cf14 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0000cf18 lw t9, -0x77f8(gp) | t9 = sym.imp.__sprintf_chk
0x0000cf1c sw s3, 0x14(sp) | *(var_14h) = s3;
0x0000cf20 sw s2, 0x10(sp) | *(var_10h) = s2;
| /* str._s_s */
0x0000cf24 addiu a3, a3, 0x60d4 | a3 += 0x60d4;
0x0000cf28 addiu a2, zero, -1 | a2 = -1;
0x0000cf2c addiu a1, zero, 1 | a1 = 1;
0x0000cf30 move a0, s4 | a0 = s4;
0x0000cf34 jalr t9 | t9 ();
0x0000cf38 lw gp, 0x18(sp) | gp = *(var_18h);
| label_2:
0x0000cf3c lw v1, 0x5c(sp) | v1 = *(var_5ch);
0x0000cf40 lw v0, (s1) | v0 = *(s1);
0x0000cf44 lw ra, 0x74(sp) | ra = *(var_74h);
| if (v1 != v0) {
0x0000cf48 bne v1, v0, 0xcfe0 | goto label_6;
| }
0x0000cf4c lw s4, 0x70(sp) | s4 = *(var_70h);
0x0000cf50 lw s3, 0x6c(sp) | s3 = *(var_6ch);
0x0000cf54 lw s2, 0x68(sp) | s2 = *(var_68h);
0x0000cf58 lw s1, 0x64(sp) | s1 = *(var_64h);
0x0000cf5c lw s0, 0x60(sp) | s0 = *(var_60h);
0x0000cf60 addiu sp, sp, 0x78 |
0x0000cf64 jr ra | return v0;
0x0000cf68 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0000cf6c lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000cf70 lw t9, -0x77a4(gp) | t9 = sym.imp.g_log;
0x0000cf74 addiu a3, a3, 0x734c | a3 += 0x734c;
| /* str._sFailed_to_export_UUID */
0x0000cf78 addiu a2, a2, 0x7068 | a2 += 0x7068;
0x0000cf7c addiu a1, zero, 0x10 | a1 = 0x10;
0x0000cf80 move a0, zero | a0 = 0;
0x0000cf84 jalr t9 | t9 ();
0x0000cf88 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000cf8c b 0xcef4 |
| }
| label_5:
0x0000cf90 addiu s2, s2, 0x734c | s2 += 0x734c;
0x0000cf94 b 0xcf14 | goto label_0;
| label_3:
0x0000cf98 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0000cf9c lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000cfa0 lw t9, -0x77a4(gp) | t9 = sym.imp.g_log;
0x0000cfa4 addiu a3, a3, 0x734c | a3 += 0x734c;
| /* str._sFailed_to_create_UUID */
0x0000cfa8 addiu a2, a2, 0x7050 | a2 += 0x7050;
0x0000cfac addiu a1, zero, 0x10 | a1 = 0x10;
0x0000cfb0 move a0, zero | a0 = 0;
0x0000cfb4 jalr t9 | t9 ();
0x0000cfb8 lb v0, 0x34(sp) | v0 = *(var_34h);
0x0000cfbc lw gp, 0x18(sp) | gp = *(var_18h);
0x0000cfc0 addiu s3, sp, 0x34 | s3 = sp + 0x34;
| if (v0 != 0) {
0x0000cfc4 bnez v0, 0xcf0c | goto label_1;
| }
| label_4:
0x0000cfc8 lw t9, -0x7aec(gp) | t9 = sym.imp.strcpy;
0x0000cfcc move a1, s3 | a1 = s3;
0x0000cfd0 move a0, s4 | a0 = s4;
0x0000cfd4 jalr t9 | t9 ();
0x0000cfd8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000cfdc b 0xcf3c | goto label_2;
| label_6:
0x0000cfe0 lw t9, -0x7934(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000cfe4 jalr t9 | t9 ();
0x0000cfe8 nop |
| }
[*] Function sprintf used 2 times wsdd