[*] Binary protection state of libglib-2.0.so.0.5600.4
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function printf tear down of libglib-2.0.so.0.5600.4
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libglib-2.0.so.0.5600.4 @ 0x74be8 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.g_format_size_full () | void g_format_size_full (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| void * s1;
| r0 = arg1;
| r1 = arg2;
0x00074be8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00074bec mov r5, r1 | r5 = r1;
0x00074bf0 ldr r1, [pc, 0x28c] |
0x00074bf4 sub sp, sp, 0x254 |
0x00074bf8 add r6, sp, 0x10 | r6 += s1;
0x00074bfc add r1, pc, r1 | r1 = pc + r1;
0x00074c00 mov fp, r2 |
0x00074c04 add r1, r1, 0x40 | r1 = 0x74ec0;
0x00074c08 mov r2, 0x240 | r2 = 0x240;
0x00074c0c mov r4, r0 | r4 = r0;
0x00074c10 mov r0, r6 | r0 = r6;
0x00074c14 bl 0x176fc | memcpy (r0, r1, r2);
0x00074c18 mov r0, 0 | r0 = 0;
0x00074c1c bl 0x63968 | g_string_new ();
0x00074c20 bic r8, fp, 1 | r8 = BIT_MASK (fp, 1);
0x00074c24 mov r7, r0 | r7 = r0;
0x00074c28 cmp r8, 6 |
| if (r8 > 6) {
| /* switch table (7 cases) at 0x74c34 */
0x00074c2c addls pc, pc, r8, lsl 2 | pc += (r8 << 2);
| }
0x00074c30 b 0x74d74 | goto label_5;
0x00074c34 b 0x74da0 | goto label_6;
0x00074c38 b 0x74d74 | goto label_5;
0x00074c3c b 0x74da8 | goto label_7;
0x00074c40 b 0x74d74 | goto label_5;
0x00074c44 b 0x74c50 | goto label_8;
0x00074c48 b 0x74d74 | goto label_5;
0x00074c4c b 0x74d6c | goto label_9;
| label_8:
0x00074c50 mov sl, 2 | sl = 2;
| do {
| label_0:
0x00074c54 mov r3, 0x90 | r3 = 0x90;
0x00074c58 mul sb, sl, r3 | sb = sl * r3;
0x00074c5c ldrd r0, r1, [r6, sb] | __asm ("ldrd r0, r1, [r6, sb]");
0x00074c60 add ip, r6, sb |
0x00074c64 cmp r1, r5 |
0x00074c68 cmpeq r0, r4 | __asm ("cmpeq r0, r4");
| if (r1 < r5) {
0x00074c6c bls 0x74dcc | goto label_10;
| }
0x00074c70 cmp sl, 1 |
0x00074c74 mov r3, r4 | r3 = r4;
| if (sl > 1) {
0x00074c78 bhi 0x74db0 | goto label_11;
| }
0x00074c7c ldr r2, [pc, 0x204] | r2 = *(0x74e84);
0x00074c80 ldr r1, [pc, 0x204] | r1 = *(0x74e88);
0x00074c84 ldr r0, [pc, 0x204] | r0 = *(0x74e8c);
0x00074c88 add r2, pc, r2 | r2 = pc + r2;
0x00074c8c add r1, pc, r1 | r1 = pc + r1;
0x00074c90 add r0, pc, r0 | r0 = pc + r0;
| label_1:
0x00074c94 bl 0x35450 | g_dngettext ();
0x00074c98 mov r2, r4 | r2 = r4;
0x00074c9c mov r1, r0 | r1 = r0;
0x00074ca0 mov r0, r7 | r0 = r7;
0x00074ca4 bl 0x64548 | g_string_printf ()
| label_2:
0x00074ca8 tst r8, 1 |
| if ((r8 & 1) != 0) {
0x00074cac beq 0x74d58 |
0x00074cb0 ldr r2, [pc, 0x1dc] | r2 = "ingly.";
0x00074cb4 mov r3, 0 | r3 = 0;
0x00074cb8 cmp r5, r3 |
0x00074cbc cmpeq r4, r2 | __asm ("cmpeq r4, r2");
| if (r5 > r3) {
0x00074cc0 movls r3, r4 | r3 = r4;
| }
| if (r5 >= r3) {
0x00074cc4 bls 0x74ce0 |
0x00074cc8 mov r2, 0x3e8 | r2 = 0x3e8;
0x00074ccc mov r3, 0 | r3 = 0;
0x00074cd0 mov r0, r4 | r0 = r4;
0x00074cd4 mov r1, r5 | r1 = r5;
0x00074cd8 bl 0x87d34 | fcn_00087d34 (r0, r1);
0x00074cdc add r3, r2, 0x3e8 | r3 = r2 + 0x3e8;
| }
0x00074ce0 cmp sl, 1 |
| if (sl > 1) {
0x00074ce4 bhi 0x74e68 | goto label_12;
| }
0x00074ce8 ldr r2, [pc, 0x1a8] | r2 = *(0x74e94);
0x00074cec ldr r1, [pc, 0x1a8] | r1 = *(0x74e98);
0x00074cf0 ldr r0, [pc, 0x1a8] | r0 = *(0x74e9c);
0x00074cf4 add r2, pc, r2 | r2 = pc + r2;
0x00074cf8 add r1, pc, r1 | r1 = pc + r1;
0x00074cfc add r0, pc, r0 | r0 = pc + r0;
| label_4:
0x00074d00 bl 0x35450 | g_dngettext ();
0x00074d04 mov r2, r4 | r2 = r4;
0x00074d08 mov r3, r5 | r3 = r5;
0x00074d0c mov r6, r0 | r6 = r0;
0x00074d10 ldr r0, [pc, 0x18c] | r0 = *(0x74ea0);
0x00074d14 add r0, pc, r0 | r0 = pc + r0;
0x00074d18 bl 0x60764 | g_strdup_printf ()
0x00074d1c ldr r1, [pc, 0x184] | r1 = *(0x74ea4);
0x00074d20 add r1, pc, r1 | r1 = pc + r1;
0x00074d24 mov r4, r0 | r4 = r0;
0x00074d28 mov r0, r7 | r0 = r7;
0x00074d2c bl 0x638ac | g_string_append ();
0x00074d30 mov r1, r6 | r1 = r6;
0x00074d34 mov r2, r4 | r2 = r4;
0x00074d38 mov r0, r7 | r0 = r7;
0x00074d3c bl 0x64580 | g_string_append_printf ()
0x00074d40 mov r0, r4 | r0 = r4;
0x00074d44 bl 0x4b940 | g_free ();
0x00074d48 ldr r1, [pc, 0x15c] | r1 = *(0x74ea8);
0x00074d4c mov r0, r7 | r0 = r7;
0x00074d50 add r1, pc, r1 | r1 = pc + r1;
0x00074d54 bl 0x638ac | g_string_append ();
| }
0x00074d58 mov r1, 0 | r1 = 0;
0x00074d5c mov r0, r7 | r0 = r7;
0x00074d60 bl 0x6349c | g_string_free ();
0x00074d64 add sp, sp, 0x254 |
0x00074d68 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_9:
0x00074d6c mov sl, 3 | sl = 3;
0x00074d70 b 0x74c54 |
| } while (1);
| label_5:
0x00074d74 mov r3, 0 | r3 = 0;
0x00074d78 str r3, [sp] | *(sp) = r3;
0x00074d7c ldr r3, [pc, 0x12c] |
0x00074d80 ldr r1, [pc, 0x12c] | r1 = *(0x74eb0);
0x00074d84 ldr r0, [pc, 0x12c] | r0 = *(0x74eb4);
0x00074d88 add r3, pc, r3 | r3 = pc + r3;
0x00074d8c add r3, r3, 0x280 | r3 = 0x7512c;
0x00074d90 ldr r2, [pc, 0x124] | r2 = *(0x74eb8);
0x00074d94 add r1, pc, r1 | r1 = pc + r1;
0x00074d98 add r0, pc, r0 | r0 = pc + r0;
0x00074d9c bl 0x6848c | g_assertion_message_expr ();
| label_6:
0x00074da0 mov sl, 0 | sl = 0;
0x00074da4 b 0x74c54 | goto label_0;
| label_7:
0x00074da8 mov sl, 1 | sl = 1;
0x00074dac b 0x74c54 | goto label_0;
| label_11:
0x00074db0 ldr r2, [pc, 0x108] | r2 = *(0x74ebc);
0x00074db4 ldr r1, [pc, 0x108] | r1 = *(0x74ec0);
0x00074db8 ldr r0, [pc, 0x108] | r0 = *(0x74ec4);
0x00074dbc add r2, pc, r2 | r2 = pc + r2;
0x00074dc0 add r1, pc, r1 | r1 = pc + r1;
0x00074dc4 add r0, pc, r0 | r0 = pc + r0;
0x00074dc8 b 0x74c94 | goto label_1;
| label_10:
0x00074dcc mov r2, 1 | r2 = 1;
0x00074dd0 mov lr, 0x18 | lr = 0x18;
| do {
0x00074dd4 mul r1, lr, r2 | r1 = lr * r2;
0x00074dd8 ldrd r0, r1, [r1, ip] | __asm ("ldrd r0, r1, [r1, ip]");
0x00074ddc cmp r1, r5 |
0x00074de0 cmpeq r0, r4 | __asm ("cmpeq r0, r4");
| if (r1 >= r5) {
0x00074de4 bls 0x74e54 |
0x00074de8 sub r2, r2, 1 | r2--;
0x00074dec mla r3, lr, r2, sb | __asm ("mla r3, lr, r2, sb");
| label_3:
0x00074df0 add r3, r6, r3 | r3 = r6 + r3;
0x00074df4 add r0, r3, 8 | r0 = r3 + 8;
0x00074df8 str r3, [sp, 0xc] | var_ch = r3;
0x00074dfc bl 0x35298 | glib_gettext ();
0x00074e00 mov r1, r5 | r1 = r5;
0x00074e04 mov r6, r0 | r6 = r0;
0x00074e08 mov r0, r4 | r0 = r4;
0x00074e0c bl 0x875a0 | fcn_000875a0 (r0, r1);
0x00074e10 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00074e14 mov r8, r0 | r8 = r0;
0x00074e18 mov sb, r1 | sb = r1;
0x00074e1c ldrd r0, r1, [r3] | __asm ("ldrd r0, r1, [r3]");
0x00074e20 bl 0x875a0 | r0 = fcn_000875a0 (r0, r1);
0x00074e24 mov r2, r0 | r2 = r0;
0x00074e28 mov r3, r1 | r3 = r1;
0x00074e2c mov r0, r8 | r0 = r8;
0x00074e30 mov r1, sb | r1 = sb;
0x00074e34 bl 0x87880 | fcn_00087880 (r0);
0x00074e38 mov r8, fp | r8 = fp;
0x00074e3c mov r2, r0 | r2 = r0;
0x00074e40 mov r3, r1 | r3 = r1;
0x00074e44 mov r0, r7 | r0 = r7;
0x00074e48 mov r1, r6 | r1 = r6;
0x00074e4c bl 0x64548 | g_string_printf ()
0x00074e50 b 0x74ca8 | goto label_2;
| }
0x00074e54 add r2, r2, 1 | r2++;
0x00074e58 cmp r2, 6 |
0x00074e5c bne 0x74dd4 |
| } while (r2 != 6);
0x00074e60 add r3, sb, 0x78 | r3 = sb + 0x78;
0x00074e64 b 0x74df0 | goto label_3;
| label_12:
0x00074e68 ldr r2, [pc, 0x5c] | r2 = *(0x74ec8);
0x00074e6c ldr r1, [pc, 0x5c] | r1 = "st";
0x00074e70 ldr r0, [pc, 0x5c] | r0 = *(0x74ed0);
0x00074e74 add r2, pc, r2 | r2 = pc + r2;
0x00074e78 add r1, pc, r1 | r1 = pc + r1;
0x00074e7c add r0, pc, r0 | r0 = pc + r0;
0x00074e80 b 0x74d00 | goto label_4;
| }
[*] Function printf used 5 times libglib-2.0.so.0.5600.4