[*] 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 strcat 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 @ 0x4bed8 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0004bed8 () | void fcn_0004bed8 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0004bed8 push {r4, r5, r6, r7, r8, lr} |
0x0004bedc ldr r7, [pc, 0x1e4] | r7 = *(0x4c0c4);
0x0004bee0 subs r8, r2, 0 | r8 = r2 - 0;
0x0004bee4 add r7, pc, r7 | r7 = pc + r7;
0x0004bee8 mov r4, r0 | r4 = r0;
0x0004beec mov r6, r1 | r6 = r1;
| if (r8 == r2) {
0x0004bef0 beq 0x4bf70 | goto label_5;
| }
0x0004bef4 tst r1, 4 |
| if ((r1 & 4) != 0) {
0x0004bef8 bne 0x4bf7c | goto label_6;
| }
0x0004befc tst r1, 8 |
| if ((r1 & 8) != 0) {
0x0004bf00 bne 0x4bf88 | goto label_7;
| }
0x0004bf04 tst r1, 0x10 |
| if ((r1 & 0x10) != 0) {
0x0004bf08 bne 0x4bf94 | goto label_8;
| }
0x0004bf0c tst r1, 0xe0 |
| if ((r1 & 0xe0) != 0) {
0x0004bf10 bne 0x4bfa0 | goto label_9;
| }
0x0004bf14 ldr r1, [pc, 0x1b0] | r1 = *(0x4c0c8);
0x0004bf18 add r1, pc, r1 | r1 = pc + r1;
| do {
| label_0:
0x0004bf1c mov r0, r4 | r0 = r4;
0x0004bf20 bic r5, r6, 3 | r5 = BIT_MASK (r6, 3);
0x0004bf24 bl 0x170d8 | strcpy (r0, r1);
0x0004bf28 cmp r5, 0x10 |
| if (r5 == 0x10) {
0x0004bf2c beq 0x4c004 | goto label_10;
| }
| if (r5 > 0x10) {
0x0004bf30 bgt 0x4bfac | goto label_11;
| }
0x0004bf34 cmp r5, 4 |
| if (r5 == 4) {
0x0004bf38 beq 0x4bfd0 | goto label_12;
| }
0x0004bf3c cmp r5, 8 |
| if (r5 == 8) {
0x0004bf40 beq 0x4bff8 | goto label_13;
| }
| label_1:
0x0004bf44 cmp r6, 0 |
| if (r6 == 0) {
0x0004bf48 beq 0x4c048 | goto label_14;
| }
0x0004bf4c ldr r1, [pc, 0x17c] | r1 = *(0x4c0cc);
0x0004bf50 mov r0, r4 | r0 = r4;
0x0004bf54 add r1, pc, r1 | r1 = pc + r1;
0x0004bf58 bl 0x17090 | strcat (r0, r1)
0x0004bf5c cmp r5, 0 |
| if (r5 != 0) {
0x0004bf60 bne 0x4c034 | goto label_15;
| }
0x0004bf64 mov r3, 0x30 | r3 = 0x30;
0x0004bf68 strh r3, [r4, 4] | *((r4 + 4)) = r3;
0x0004bf6c b 0x4c020 | goto label_4;
| label_5:
0x0004bf70 ldr r1, [pc, 0x15c] | r1 = *(0x4c0d0);
0x0004bf74 add r1, pc, r1 | r1 = pc + r1;
0x0004bf78 b 0x4bf1c |
| } while (1);
| label_6:
0x0004bf7c ldr r1, [pc, 0x154] | r1 = *(0x4c0d4);
0x0004bf80 add r1, pc, r1 | r1 = pc + r1;
0x0004bf84 b 0x4bf1c | goto label_0;
| label_7:
0x0004bf88 ldr r1, [pc, 0x14c] | r1 = "array_foreach";
0x0004bf8c add r1, pc, r1 | r1 = pc + r1;
0x0004bf90 b 0x4bf1c | goto label_0;
| label_8:
0x0004bf94 ldr r1, [pc, 0x144] | r1 = *(0x4c0dc);
0x0004bf98 add r1, pc, r1 | r1 = pc + r1;
0x0004bf9c b 0x4bf1c | goto label_0;
| label_9:
0x0004bfa0 ldr r1, [pc, 0x13c] | r1 = *(0x4c0e0);
0x0004bfa4 add r1, pc, r1 | r1 = pc + r1;
0x0004bfa8 b 0x4bf1c | goto label_0;
| label_11:
0x0004bfac cmp r5, 0x40 |
| if (r5 == 0x40) {
0x0004bfb0 beq 0x4c010 | goto label_16;
| }
0x0004bfb4 cmp r5, 0x80 |
| if (r5 == 0x80) {
0x0004bfb8 beq 0x4c028 | goto label_17;
| }
0x0004bfbc cmp r5, 0x20 |
| if (r5 != 0x20) {
0x0004bfc0 bne 0x4bf44 | goto label_1;
| }
0x0004bfc4 ldr r1, [pc, 0x11c] | r1 = *(0x4c0e4);
0x0004bfc8 add r1, pc, r1 | r1 = pc + r1;
0x0004bfcc b 0x4bfd8 | goto label_2;
| label_12:
0x0004bfd0 ldr r1, [pc, 0x114] | r1 = *(0x4c0e8);
0x0004bfd4 add r1, pc, r1 | r1 = pc + r1;
| do {
| label_2:
0x0004bfd8 mov r0, r4 | r0 = r4;
0x0004bfdc bl 0x17090 | strcat (r0, r1)
0x0004bfe0 mov r5, 0 | r5 = 0;
| label_3:
0x0004bfe4 cmp r8, 0 |
| if (r8 == 0) {
0x0004bfe8 beq 0x4c0bc | goto label_18;
| }
0x0004bfec ldr r1, [pc, 0xfc] | r1 = *(0x4c0ec);
0x0004bff0 add r1, pc, r1 | r1 = pc + r1;
0x0004bff4 b 0x4c06c | goto label_19;
| label_13:
0x0004bff8 ldr r1, [pc, 0xf4] | r1 = *(0x4c0f0);
0x0004bffc add r1, pc, r1 | r1 = pc + r1;
0x0004c000 b 0x4bfd8 |
| } while (1);
| label_10:
0x0004c004 ldr r1, [pc, 0xec] | r1 = *(0x4c0f4);
0x0004c008 add r1, pc, r1 | r1 = pc + r1;
0x0004c00c b 0x4bfd8 | goto label_2;
| label_16:
0x0004c010 ldr r1, [pc, 0xe4] | r1 = *(0x4c0f8);
0x0004c014 add r1, pc, r1 | r1 = pc + r1;
| do {
0x0004c018 mov r0, r4 | r0 = r4;
0x0004c01c bl 0x17090 | strcat (r0, r1)
| label_4:
0x0004c020 mov r5, 1 | r5 = 1;
0x0004c024 b 0x4bfe4 | goto label_3;
| label_17:
0x0004c028 ldr r1, [pc, 0xd0] | r1 = *(0x4c0fc);
0x0004c02c add r1, pc, r1 | r1 = pc + r1;
0x0004c030 b 0x4c018 |
| } while (1);
| label_15:
0x0004c034 mov r2, 0x10 | r2 = 0x10;
0x0004c038 mov r1, r5 | r1 = r5;
0x0004c03c add r0, r4, 4 | r0 = r4 + 4;
0x0004c040 bl 0x4be44 | fcn_0004be44 (r0, r1);
0x0004c044 b 0x4c020 | goto label_4;
| label_14:
0x0004c048 ldr r1, [pc, 0xb4] | r1 = *(0x4c100);
0x0004c04c mov r0, r4 | r0 = r4;
0x0004c050 add r1, pc, r1 | r1 = pc + r1;
0x0004c054 bl 0x17090 | strcat (r0, r1)
0x0004c058 cmp r8, 0 |
0x0004c05c mov r5, 1 | r5 = 1;
| if (r8 == 0) {
0x0004c060 beq 0x4c08c | goto label_20;
| }
0x0004c064 ldr r1, [pc, 0x9c] | r1 = *(0x4c104);
0x0004c068 add r1, pc, r1 | r1 = pc + r1;
| do {
| label_19:
0x0004c06c mov r0, r4 | r0 = r4;
0x0004c070 bl 0x17090 | strcat (r0, r1)
0x0004c074 tst r6, 1 |
| if ((r6 & 1) != 0) {
0x0004c078 beq 0x4c08c |
0x0004c07c ldr r1, [pc, 0x88] | r1 = *(0x4c108);
0x0004c080 mov r0, r4 | r0 = r4;
0x0004c084 add r1, pc, r1 | r1 = pc + r1;
0x0004c088 bl 0x17090 | strcat (r0, r1)
| }
| label_20:
0x0004c08c tst r6, 0x1c |
| if ((r6 & 0x1c) != 0) {
0x0004c090 beq 0x4c0a4 |
0x0004c094 ldr r1, [pc, 0x74] | r1 = *(0x4c10c);
0x0004c098 mov r0, r4 | r0 = r4;
0x0004c09c add r1, pc, r1 | r1 = pc + r1;
0x0004c0a0 bl 0x17090 | strcat (r0, r1)
| }
0x0004c0a4 cmp r5, 0 |
0x0004c0a8 ldr r3, [pc, 0x64] | r3 = *(0x4c110);
| if (r5 != 0) {
0x0004c0ac ldreq r3, [pc, 0x64] | r3 = *((pc + 0x64));
| }
0x0004c0b0 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0004c0b4 ldr r0, [r3] | r0 = *(0x4c110);
0x0004c0b8 pop {r4, r5, r6, r7, r8, pc} |
| label_18:
0x0004c0bc ldr r1, [pc, 0x58] | r1 = *(0x4c118);
0x0004c0c0 add r1, pc, r1 | r1 = pc + r1;
0x0004c0c4 b 0x4c06c |
| } while (1);
| }
[*] Function strcat used 8 times libglib-2.0.so.0.5600.4