[*] Binary protection state of libgobject-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 libgobject-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/libgobject-2.0.so.0.5600.4 @ 0x2579c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0002579c () | void fcn_0002579c (int32_t arg1, void * arg2) {
| int32_t var_0h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x0002579c push {r0, r1, r2, r4, r5, r6, r7, r8, sb, lr} |
0x000257a0 ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x000257a4 cmp r1, 0 |
0x000257a8 clz r3, r3 | r3 &= r3;
0x000257ac lsr r3, r3, 5 | r3 >>= 5;
| if (r1 != 0) {
0x000257b0 moveq r3, 0 | r3 = 0;
| }
0x000257b4 cmp r3, 0 |
| if (r3 == 0) {
0x000257b8 beq 0x259cc | goto label_1;
| }
0x000257bc cmp r2, 0 |
0x000257c0 mov r6, r0 | r6 = r0;
0x000257c4 mov r8, r2 | r8 = r2;
0x000257c8 mov r4, r1 | r4 = r1;
| if (r2 == 0) {
0x000257cc bne 0x257f8 |
0x000257d0 ldr r0, [r0, 0x2c] | r0 = *((r0 + 0x2c));
0x000257d4 bl 0x24a84 | r0 = fcn_00024a84 (r0);
0x000257d8 cmp r0, 0 |
| if (r0 == 0) {
0x000257dc ldrne r3, [r0, 0x14] | r3 = *((r0 + 0x14));
| }
| if (r0 == 0) {
0x000257e0 movne r5, r2 | r5 = r2;
| }
| if (r0 == 0) {
0x000257e4 ldrne r7, [r3] | r7 = *(r3);
| }
| if (r0 != 0) {
0x000257e8 bne 0x2582c | goto label_2;
| }
0x000257ec ldr r8, [pc, 0x328] |
0x000257f0 add r8, pc, r8 | r8 = pc + r8;
0x000257f4 add r8, r8, 0x5c | r8 = 0x25b74;
| }
0x000257f8 ldr r0, [r8, 0x10] | r0 = *((r8 + 0x10));
0x000257fc cmp r0, 0 |
| if (r0 != 0) {
0x00025800 moveq r5, 0x20 | r5 = 0x20;
| }
| if (r0 != 0) {
0x00025804 beq 0x25810 |
0x00025808 bl 0x9598 | r0 = strlen (r0);
0x0002580c add r5, r0, 0x20 | r5 = r0 + 0x20;
| }
0x00025810 ldr r0, [r8, 0x18] | r0 = *((r8 + 0x18));
0x00025814 cmp r0, 0 |
| if (r0 != 0) {
0x00025818 beq 0x25824 |
0x0002581c bl 0x9598 | r0 = strlen (r0);
0x00025820 add r5, r5, r0 | r5 += r0;
| }
0x00025824 add r5, r5, 2 | r5 += 2;
0x00025828 mov r7, 0 | r7 = 0;
| label_2:
0x0002582c ldrb r3, [r6, 0xe] | r3 = *((r6 + 0xe));
0x00025830 tst r3, 4 |
| if ((r3 & 4) == 0) {
0x00025834 beq 0x259fc | goto label_3;
| }
0x00025838 ldr r0, [r6, 0x2c] | r0 = *((r6 + 0x2c));
0x0002583c bl 0x24a84 | r0 = fcn_00024a84 (r0);
0x00025840 mov sb, r0 | sb = r0;
0x00025844 add r0, r5, 0x30 | r0 = r5 + 0x30;
0x00025848 bl 0x9130 | g_malloc0 ();
0x0002584c ldrh r3, [r4] | r3 = *(r4);
0x00025850 ldrh r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00025854 cmp r5, 0 |
0x00025858 strh r3, [r0, 4] | *((r0 + 4)) = r3;
0x0002585c ldr r3, [r4, 4] | r3 = *((r4 + 4));
| if (r5 == 0) {
0x00025860 addne r7, r0, 0x30 | r7 = r0 + 0x30;
| }
0x00025864 str r3, [r0, 0xc] | *((r0 + 0xc)) = r3;
0x00025868 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0002586c strh r2, [r0, 0x24] | *((r0 + 0x24)) = r2;
0x00025870 str r3, [r0, 0x10] | *((r0 + 0x10)) = r3;
0x00025874 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00025878 str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
0x0002587c ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00025880 str r3, [r0, 0x18] | *((r0 + 0x18)) = r3;
0x00025884 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00025888 str r3, [r0, 0x1c] | *((r0 + 0x1c)) = r3;
0x0002588c mov r3, 0 | r3 = 0;
0x00025890 cmp sb, r3 |
0x00025894 strh r3, [r0, 6] | *((r0 + 6)) = r3;
0x00025898 str r3, [r0, 0x20] | *((r0 + 0x20)) = r3;
0x0002589c str r3, [r0, 8] | *((r0 + 8)) = r3;
0x000258a0 strh r3, [r0, 0x26] | *((r0 + 0x26)) = r3;
| if (sb == r3) {
0x000258a4 ldrne r3, [sb, 0x14] | r3 = *((sb + 0x14));
| }
0x000258a8 ldrhne r3, [r3, 6] | __asm ("ldrhne r3, [r3, 6]");
0x000258ac strhne r3, [r0, 6] | __asm ("strhne r3, [r0, 6]");
0x000258b0 ldrh r3, [r4, 0x1a] | r3 = *((r4 + 0x1a));
0x000258b4 cmp r3, 0x400 |
| if (r3 < 0x400) {
0x000258b8 movhs r3, 0x400 | r3 = 0x400;
| }
0x000258bc strh r3, [r0, 0x28] | *((r0 + 0x28)) = r3;
0x000258c0 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x000258c4 str r3, [r0, 0x2c] | *((r0 + 0x2c)) = r3;
| do {
| label_0:
0x000258c8 cmp r5, 0 |
0x000258cc str r0, [r6, 0x14] | *((r6 + 0x14)) = r0;
| if (r5 != 0) {
0x000258d0 beq 0x2593c |
0x000258d4 mov lr, r8 | lr = r8;
0x000258d8 ldm lr!, {r0, r1, r2, r3} | r0 = *(lr!);
| r1 = *((lr! + 4));
| r2 = *((lr! + 8));
| r3 = *((lr! + 12));
0x000258dc mov ip, r7 |
0x000258e0 stm ip!, {r0, r1, r2, r3} | *(ip!) = r0;
| *((ip! + 4)) = r1;
| *((ip! + 8)) = r2;
| *((ip! + 12)) = r3;
0x000258e4 ldm lr, {r0, r1, r2, r3} | r0 = *(lr);
| r1 = *((lr + 4));
| r2 = *((lr + 8));
| r3 = *((lr + 12));
0x000258e8 add r4, r7, 0x20 | r4 = r7 + 0x20;
0x000258ec stm ip, {r0, r1, r2, r3} | *(ip) = r0;
| *((ip + 4)) = r1;
| *((ip + 8)) = r2;
| *((ip + 12)) = r3;
0x000258f0 mov r3, 0 | r3 = 0;
0x000258f4 strb r3, [r7, 0x20] | *((r7 + 0x20)) = r3;
0x000258f8 str r4, [r7, 0x10] | *((r7 + 0x10)) = r4;
0x000258fc ldr r1, [r8, 0x10] | r1 = *((r8 + 0x10));
0x00025900 cmp r1, r3 |
| if (r1 != r3) {
0x00025904 beq 0x2591c |
0x00025908 mov r0, r4 | r0 = r4;
0x0002590c bl 0x9154 | strcat (r0, r1)
0x00025910 ldr r0, [r8, 0x10] | r0 = *((r8 + 0x10));
0x00025914 bl 0x9598 | r0 = strlen (r0);
0x00025918 add r4, r4, r0 | r4 += r0;
| }
0x0002591c mov r3, 0 | r3 = 0;
0x00025920 add r0, r4, 1 | r0 = r4 + 1;
0x00025924 strb r3, [r4, 1] | *((r4 + 1)) = r3;
0x00025928 str r0, [r7, 0x18] | *((r7 + 0x18)) = r0;
0x0002592c ldr r1, [r8, 0x18] | r1 = *((r8 + 0x18));
0x00025930 cmp r1, r3 |
| if (r1 == r3) {
0x00025934 beq 0x2593c | goto label_4;
| }
0x00025938 bl 0x9154 | strcat (r0, r1)
| }
| label_4:
0x0002593c ldr r3, [r6, 0x14] | r3 = *((r6 + 0x14));
0x00025940 str r7, [r3] | *(r3) = r7;
0x00025944 ldr r3, [r6, 0x14] | r3 = *((r6 + 0x14));
0x00025948 ldr r3, [r3] | r3 = *(r3);
0x0002594c ldr r3, [r3] | r3 = *(r3);
0x00025950 cmp r3, 0 |
| if (r3 != 0) {
0x00025954 moveq r2, r3 | r2 = r3;
| }
| if (r3 != 0) {
0x00025958 beq 0x2597c |
0x0002595c ldr r3, [pc, 0x1bc] | r3 = *(0x25b1c);
0x00025960 mov r0, r6 | r0 = r6;
0x00025964 add r3, pc, r3 | r3 = pc + r3;
0x00025968 ldr r1, [r3, 0x404] | r1 = *(0x25f20);
0x0002596c bl 0x24ae4 | fcn_00024ae4 (r0, r1);
0x00025970 tst r0, 0x30 |
| if ((r0 & 0x30) != 0) {
0x00025974 moveq r2, 1 | r2 = 1;
| }
| if ((r0 & 0x30) != 0) {
0x00025978 movne r2, 0 | r2 = 0;
| goto label_5;
| }
| }
| label_5:
0x0002597c ldrb r3, [r6, 0xe] | r3 = *((r6 + 0xe));
0x00025980 bic r3, r3, 8 | r3 = BIT_MASK (r3, 8);
0x00025984 orr r3, r3, r2, lsl 3 | r3 |= (r2 << 3);
0x00025988 strb r3, [r6, 0xe] | *((r6 + 0xe)) = r3;
0x0002598c ldr r3, [r6, 0x14] | r3 = *((r6 + 0x14));
0x00025990 ldr r3, [r3] | r3 = *(r3);
0x00025994 cmp r3, 0 |
| if (r3 != 0) {
0x00025998 bne 0x25b04 | goto label_6;
| }
0x0002599c ldr r3, [pc, 0x180] | r3 = *(0x25b20);
0x000259a0 ldr r1, [pc, 0x180] | r1 = *(0x25b24);
0x000259a4 add r3, pc, r3 | r3 = pc + r3;
0x000259a8 str r3, [sp] | *(sp) = r3;
0x000259ac ldr r3, [pc, 0x178] |
0x000259b0 ldr r0, [pc, 0x178] | r0 = *(0x25b2c);
0x000259b4 add r3, pc, r3 | r3 = pc + r3;
0x000259b8 add r3, r3, 0x7c | r3 = 0x25ba4;
0x000259bc ldr r2, [pc, 0x170] | r2 = *(0x25b30);
0x000259c0 add r1, pc, r1 | r1 = pc + r1;
0x000259c4 add r0, pc, r0 | r0 = pc + r0;
0x000259c8 b 0x259f8 | goto label_7;
| label_1:
0x000259cc ldr r3, [pc, 0x164] | r3 = *(0x25b34);
0x000259d0 ldr r1, [pc, 0x164] | r1 = *(0x25b38);
0x000259d4 add r3, pc, r3 | r3 = pc + r3;
0x000259d8 str r3, [sp] | *(sp) = r3;
0x000259dc ldr r3, [pc, 0x15c] |
0x000259e0 ldr r0, [pc, 0x15c] | r0 = *(0x25b40);
0x000259e4 ldr r2, [pc, 0x15c] | r2 = *(0x25b44);
0x000259e8 add r3, pc, r3 | r3 = pc + r3;
0x000259ec add r3, r3, 0x7c | r3 = 0x25bb8;
0x000259f0 add r1, pc, r1 | r1 = pc + r1;
0x000259f4 add r0, pc, r0 | r0 = pc + r0;
| label_7:
0x000259f8 bl 0x93f4 | g_assertion_message_expr ();
| label_3:
0x000259fc tst r3, 2 |
| if ((r3 & 2) == 0) {
0x00025a00 beq 0x25a74 | goto label_8;
| }
0x00025a04 ldr r0, [r6, 0x2c] | r0 = *((r6 + 0x2c));
0x00025a08 bl 0x24a84 | r0 = fcn_00024a84 (r0);
0x00025a0c mov sb, r0 | sb = r0;
0x00025a10 add r0, r5, 0x24 | r0 = r5 + 0x24;
0x00025a14 bl 0x9130 | g_malloc0 ();
0x00025a18 ldrh r3, [r4] | r3 = *(r4);
0x00025a1c cmp r5, 0 |
0x00025a20 strh r3, [r0, 4] | *((r0 + 4)) = r3;
0x00025a24 ldr r3, [r4, 4] | r3 = *((r4 + 4));
| if (r5 == 0) {
0x00025a28 addne r7, r0, 0x24 | r7 = r0 + 0x24;
| }
0x00025a2c str r3, [r0, 0xc] | *((r0 + 0xc)) = r3;
0x00025a30 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00025a34 str r3, [r0, 0x10] | *((r0 + 0x10)) = r3;
0x00025a38 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00025a3c str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
0x00025a40 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00025a44 str r3, [r0, 0x18] | *((r0 + 0x18)) = r3;
0x00025a48 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00025a4c str r3, [r0, 0x1c] | *((r0 + 0x1c)) = r3;
0x00025a50 mov r3, 0 | r3 = 0;
0x00025a54 cmp sb, r3 |
0x00025a58 strh r3, [r0, 6] | *((r0 + 6)) = r3;
0x00025a5c str r3, [r0, 0x20] | *((r0 + 0x20)) = r3;
| if (sb == r3) {
0x00025a60 ldrne r2, [sb, 0x14] | r2 = *((sb + 0x14));
| }
0x00025a64 ldrhne r2, [r2, 6] | __asm ("ldrhne r2, [r2, 6]");
0x00025a68 str r3, [r0, 8] | *((r0 + 8)) = r3;
0x00025a6c strhne r2, [r0, 6] | __asm ("strhne r2, [r0, 6]");
0x00025a70 b 0x258c8 |
| } while (1);
| label_8:
0x00025a74 ldrb r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00025a78 add r3, r3, 0xa | r3 += 0xa;
0x00025a7c ldr r3, [r6, r3, lsl 2] | offset_0 = r3 << 2;
| r3 = *((r6 + offset_0));
0x00025a80 cmp r3, 8 |
| if (r3 == 8) {
0x00025a84 bne 0x25ad4 |
0x00025a88 add r0, r5, 0x20 | r0 = r5 + 0x20;
0x00025a8c bl 0x9130 | g_malloc0 ();
0x00025a90 ldrh r3, [r4] | r3 = *(r4);
0x00025a94 cmp r5, 0 |
0x00025a98 strh r3, [r0, 4] | *((r0 + 4)) = r3;
0x00025a9c ldr r3, [r4, 4] | r3 = *((r4 + 4));
| if (r5 == 0) {
0x00025aa0 addne r7, r0, 0x20 | r7 = r0 + 0x20;
| }
0x00025aa4 str r3, [r0, 8] | *((r0 + 8)) = r3;
0x00025aa8 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00025aac str r3, [r0, 0xc] | *((r0 + 0xc)) = r3;
0x00025ab0 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00025ab4 str r3, [r0, 0x10] | *((r0 + 0x10)) = r3;
0x00025ab8 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00025abc str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
0x00025ac0 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00025ac4 str r3, [r0, 0x18] | *((r0 + 0x18)) = r3;
0x00025ac8 mov r3, 0 | r3 = 0;
0x00025acc str r3, [r0, 0x1c] | *((r0 + 0x1c)) = r3;
0x00025ad0 b 0x258c8 | goto label_0;
| }
0x00025ad4 cmp r3, 0x48 |
| if (r3 == 0x48) {
0x00025ad8 bne 0x25af0 |
0x00025adc add r0, r5, 0xc | r0 = r5 + 0xc;
0x00025ae0 bl 0x9130 | g_malloc0 ();
0x00025ae4 cmp r5, 0 |
| if (r5 == 0) {
0x00025ae8 addne r7, r0, 0xc | r7 = r0 + 0xc;
| }
0x00025aec b 0x258c8 | goto label_0;
| }
0x00025af0 add r0, r5, 4 | r0 = r5 + 4;
0x00025af4 bl 0x9130 | g_malloc0 ();
0x00025af8 cmp r5, 0 |
| if (r5 == 0) {
0x00025afc addne r7, r0, 4 | r7 = r0 + 4;
| }
0x00025b00 b 0x258c8 | goto label_0;
| label_6:
0x00025b04 bl 0x329a8 | fcn_000329a8 ();
0x00025b08 mov r3, 1 | r3 = 1;
0x00025b0c str r3, [r6] | *(r6) = r3;
0x00025b10 bl 0x329a8 | fcn_000329a8 ();
0x00025b14 add sp, sp, 0xc |
0x00025b18 pop {r4, r5, r6, r7, r8, sb, pc} |
| }
[*] Function strcat used 3 times libgobject-2.0.so.0.5600.4