[*] Binary protection state of libonig.so.5.3.0
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of libonig.so.5.3.0
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libonig.so.5.3.0 @ 0x207b8 */
| #include <stdint.h>
|
; (fcn) sym.onigenc_unicode_fold1_key () | void onigenc_unicode_fold1_key (int16_t arg1) {
| r0 = arg1;
0x000207b8 mvnsmi lr, sp, lsr 18 | __asm ("mvnsmi lr, sp, lsr 18");
0x000207bc movs r1, 2 | r1 = 2;
0x000207be ldr r4, [pc, 0x68] |
0x000207c0 mov r5, r0 | r5 = r0;
0x000207c2 blx 0x7dd4 | r0 = fprintf_chk ()
0x000207c6 uxtb r3, r0 | r3 = (int8_t) r0;
0x000207c8 add r4, pc | r4 = 0x40ff6;
0x000207ca movs r1, 1 | r1 = 1;
0x000207cc ldr r7, [pc, 0x5c] |
0x000207ce adds r3, 3 | r3 += 3;
0x000207d0 mov r0, r5 | r0 = r5;
0x000207d2 ldrh.w r8, [r4, r3, lsl 1] | offset_0 = r3 << 1;
| r8 = *((r4 + offset_0));
0x000207d6 blx 0x7dd4 | r0 = fprintf_chk ()
0x000207da uxtb r0, r0 | r0 = (int8_t) r0;
0x000207dc movs r1, 0 | r1 = 0;
0x000207de add r7, pc | r7 = 0x4100e;
0x000207e0 ldrh.w r6, [r4, r0, lsl 1] | offset_1 = r0 << 1;
| r6 = *((r4 + offset_1));
0x000207e4 mov r0, r5 | r0 = r5;
0x000207e6 blx 0x7dd4 | r0 = fprintf_chk ()
0x000207ea uxtb r0, r0 | r0 = (int8_t) r0;
0x000207ec movw r2, 0x74c | r2 = 0x74c;
0x000207f0 add r6, r8 | r6 += r8;
0x000207f2 ldrh.w r3, [r4, r0, lsl 1] | offset_2 = r0 << 1;
| r3 = *((r4 + offset_2));
0x000207f6 add r3, r6 | r3 += r6;
0x000207f8 cmp r3, r2 |
| if (r3 > r2) {
0x000207fa bgt 0x20820 | goto label_0;
| }
0x000207fc add.w r4, r4, r3, lsl 1 | r4 += (r3 << 1);
0x00020800 ldrsh.w r4, [r4, 0x208] | r4 = *((r4 + 0x208));
0x00020804 cmp r4, 0 |
| if (r4 < 0) {
0x00020806 blt 0x20820 | goto label_0;
| }
0x00020808 ldr r3, [pc, 0x24] | r3 = *(0x20830);
0x0002080a movs r2, 1 | r2 = 1;
0x0002080c mov r0, r5 | r0 = r5;
0x0002080e ldr r1, [r7, r3] | r1 = *((r7 + r3));
0x00020810 add.w r1, r1, r4, lsl 2 | r1 += (r4 << 2);
0x00020814 blx 0x793c | r0 = fcn_0000793c ();
0x00020818 cbnz r0, 0x20820 |
| while (1) {
0x0002081a mov r0, r4 | r0 = r4;
0x0002081c pop.w {r4, r5, r6, r7, r8, pc} |
| label_0:
0x00020820 mov.w r4, -1 | r4 = -1;
0x00020824 b 0x2081a |
| }
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libonig.so.5.3.0 @ 0x20834 */
| #include <stdint.h>
|
; (fcn) sym.onigenc_unicode_fold2_key () | void onigenc_unicode_fold2_key (int16_t arg1) {
| r0 = arg1;
0x00020834 push {r3, r4, r5, r6, r7, lr} |
0x00020836 movs r1, 5 | r1 = 5;
0x00020838 ldr r4, [pc, 0x48] |
0x0002083a mov r5, r0 | r5 = r0;
0x0002083c blx 0x7dd4 | r0 = fprintf_chk ()
0x00020840 uxtb r0, r0 | r0 = (int8_t) r0;
0x00020842 add r4, pc | r4 = 0x410ca;
0x00020844 movs r1, 2 | r1 = 2;
0x00020846 ldr r6, [pc, 0x40] |
0x00020848 ldrb r7, [r4, r0] | r7 = *((r4 + r0));
0x0002084a mov r0, r5 | r0 = r5;
0x0002084c blx 0x7dd4 | r0 = fprintf_chk ()
0x00020850 uxtb r0, r0 | r0 = (int8_t) r0;
0x00020852 add r6, pc | r6 = 0x410e0;
0x00020854 ldrb r3, [r4, r0] | r3 = *((r4 + r0));
0x00020856 add r3, r7 | r3 += r7;
0x00020858 cmp r3, 0x3a |
| if (r3 > 0x3a) {
0x0002085a bgt 0x2087e | goto label_0;
| }
0x0002085c add.w r4, r4, r3, lsl 1 | r4 += (r3 << 1);
0x00020860 ldrsh.w r4, [r4, 0x100] | r4 = *((r4 + 0x100));
0x00020864 cmp r4, 0 |
| if (r4 < 0) {
0x00020866 blt 0x2087e | goto label_0;
| }
0x00020868 ldr r3, [pc, 0x20] | r3 = *(0x2088c);
0x0002086a movs r2, 2 | r2 = 2;
0x0002086c mov r0, r5 | r0 = r5;
0x0002086e ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x00020870 add.w r1, r1, r4, lsl 2 | r1 += (r4 << 2);
0x00020874 blx 0x793c | r0 = fcn_0000793c ();
0x00020878 cbnz r0, 0x2087e |
| while (1) {
0x0002087a mov r0, r4 | r0 = r4;
0x0002087c pop {r3, r4, r5, r6, r7, pc} |
| label_0:
0x0002087e mov.w r4, -1 | r4 = -1;
0x00020882 b 0x2087a |
| }
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libonig.so.5.3.0 @ 0x20890 */
| #include <stdint.h>
|
; (fcn) sym.onigenc_unicode_fold3_key () | void onigenc_unicode_fold3_key (int16_t arg1) {
| r0 = arg1;
0x00020890 push.w {r4, r5, r6, r7, r8, lr} |
0x00020894 movs r1, 8 | r1 = 8;
0x00020896 ldr r4, [pc, 0x5c] |
0x00020898 mov r5, r0 | r5 = r0;
0x0002089a blx 0x7dd4 | r0 = fprintf_chk ()
0x0002089e uxtb r0, r0 | r0 = (int8_t) r0;
0x000208a0 add r4, pc | r4 = 0x4119a;
0x000208a2 movs r1, 5 | r1 = 5;
0x000208a4 ldr r7, [pc, 0x50] |
0x000208a6 ldrb.w r8, [r4, r0] | r8 = *((r4 + r0));
0x000208aa mov r0, r5 | r0 = r5;
0x000208ac blx 0x7dd4 | r0 = fprintf_chk ()
0x000208b0 uxtb r0, r0 | r0 = (int8_t) r0;
0x000208b2 movs r1, 2 | r1 = 2;
0x000208b4 add r7, pc | r7 = 0x411b0;
0x000208b6 ldrb r6, [r4, r0] | r6 = *((r4 + r0));
0x000208b8 mov r0, r5 | r0 = r5;
0x000208ba blx 0x7dd4 | r0 = fprintf_chk ()
0x000208be uxtb r0, r0 | r0 = (int8_t) r0;
0x000208c0 add r6, r8 | r6 += r8;
0x000208c2 ldrb r3, [r4, r0] | r3 = *((r4 + r0));
0x000208c4 add r3, r6 | r3 += r6;
0x000208c6 cmp r3, 0xd |
| if (r3 > 0xd) {
0x000208c8 bgt 0x208ee | goto label_0;
| }
0x000208ca add.w r4, r4, r3, lsl 1 | r4 += (r3 << 1);
0x000208ce ldrsh.w r4, [r4, 0x100] | r4 = *((r4 + 0x100));
0x000208d2 cmp r4, 0 |
| if (r4 < 0) {
0x000208d4 blt 0x208ee | goto label_0;
| }
0x000208d6 ldr r3, [pc, 0x24] | r3 = *(0x208fe);
0x000208d8 movs r2, 3 | r2 = 3;
0x000208da mov r0, r5 | r0 = r5;
0x000208dc ldr r1, [r7, r3] | r1 = *((r7 + r3));
0x000208de add.w r1, r1, r4, lsl 2 | r1 += (r4 << 2);
0x000208e2 blx 0x793c | r0 = fcn_0000793c ();
0x000208e6 cbnz r0, 0x208ee |
| while (1) {
0x000208e8 mov r0, r4 | r0 = r4;
0x000208ea pop.w {r4, r5, r6, r7, r8, pc} |
| label_0:
0x000208ee mov.w r4, -1 | r4 = -1;
0x000208f2 b 0x208e8 |
| }
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libonig.so.5.3.0 @ 0x20744 */
| #include <stdint.h>
|
; (fcn) sym.onigenc_unicode_unfold_key () | void onigenc_unicode_unfold_key (int16_t arg1) {
| int16_t var_4h;
| r0 = arg1;
0x00020744 push {r4, r5, r6, lr} |
0x00020746 sub sp, 8 |
0x00020748 add r5, sp, 4 | r5 += var_4h;
0x0002074a movs r1, 2 | r1 = 2;
0x0002074c str r0, [sp, 4] | var_4h = r0;
0x0002074e mov r0, r5 | r0 = r5;
0x00020750 ldr r4, [pc, 0x5c] |
0x00020752 blx 0x7dd4 | r0 = fprintf_chk ()
0x00020756 uxtb r3, r0 | r3 = (int8_t) r0;
0x00020758 movs r1, 1 | r1 = 1;
0x0002075a add r4, pc | r4 = 0x40f0e;
0x0002075c adds r3, 0x23 | r3 += 0x23;
0x0002075e mov r0, r5 | r0 = r5;
0x00020760 ldrh.w r6, [r4, r3, lsl 1] | offset_0 = r3 << 1;
| r6 = *((r4 + offset_0));
0x00020764 blx 0x7dd4 | r0 = fprintf_chk ()
0x00020768 uxtb r3, r0 | r3 = (int8_t) r0;
0x0002076a movs r1, 0 | r1 = 0;
0x0002076c mov r0, r5 | r0 = r5;
0x0002076e adds r3, 1 | r3++;
0x00020770 ldrh.w r5, [r4, r3, lsl 1] | offset_1 = r3 << 1;
| r5 = *((r4 + offset_1));
0x00020774 blx 0x7dd4 | r0 = fprintf_chk ()
0x00020778 uxtb r0, r0 | r0 = (int8_t) r0;
0x0002077a movw r2, 0x79b | r2 = 0x79b;
0x0002077e add r5, r6 | r5 += r6;
0x00020780 ldrh.w r3, [r4, r0, lsl 1] | offset_2 = r0 << 1;
| r3 = *((r4 + offset_2));
0x00020784 add r3, r5 | r3 += r5;
0x00020786 cmp r3, r2 |
| if (r3 <= r2) {
0x00020788 bgt 0x207aa |
0x0002078a ldr r0, [pc, 0x28] |
0x0002078c ldr r1, [sp, 4] | r1 = var_4h;
0x0002078e add r0, pc | r0 = 0x40f48;
0x00020790 ldr.w r2, [r0, r3, lsl 3] | r2 = *(0x40f48);
0x00020794 cmp r1, r2 |
| if (r1 != r2) {
0x00020796 bne 0x207aa | goto label_0;
| }
0x00020798 add.w r0, r0, r3, lsl 3 | r0 += (r3 << 3);
0x0002079c ldrsh.w r3, [r0, 4] | r3 = *((r0 + 4));
0x000207a0 cmp r3, 0 |
0x000207a2 it lt |
| if (r3 >= 0) {
0x000207a4 movlt r0, 0 | r0 = 0;
| }
0x000207a6 add sp, 8 |
0x000207a8 pop {r4, r5, r6, pc} |
| }
| label_0:
0x000207aa movs r0, 0 | r0 = 0;
0x000207ac add sp, 8 |
0x000207ae pop {r4, r5, r6, pc} |
| }
[*] Function fprintf used 12 times libonig.so.5.3.0