[*] Binary protection state of ip_set_hash_ipportnet.ko
No RELRO No Canary found NX disabled REL No RPATH No RUNPATH Symbols
[*] Function printf tear down of ip_set_hash_ipportnet.ko
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/modules/5.10.52-axis8/kernel/net/netfilter/ipset/ip_set_hash_ipportnet.ko @ 0x800082c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.hash_ipportnet4_flush () | void hash_ipportnet4_flush (int32_t arg_8h, int32_t arg_10h, int32_t arg1) {
| int32_t var_0h_2;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_14h;
| r0 = arg1;
0x0800082c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x08000830 mov r5, r0 | r5 = r0;
0x08000834 mov r7, 0 | r7 = 0;
0x08000838 sub sp, sp, 0x14 |
0x0800083c mov r3, sp | r3 = sp;
0x08000840 bic r3, r3, 0x1fc0 | r3 = BIT_MASK (r3, 0x1fc0);
0x08000844 bic r3, r3, 0x3f | r3 = BIT_MASK (r3, 0x3f);
0x08000848 str r3, [sp, 8] | var_8h = r3;
0x0800084c ldr r3, [r0, 0x54] | r3 = *((r0 + 0x54));
0x08000850 str r3, [sp, 0xc] | var_ch = r3;
0x08000854 ldr fp, [r3] | fp = *(r3);
| label_1:
0x08000858 ldrb r3, [fp, 8] | r3 = *(arg_8h);
0x0800085c cmp r3, 9 |
| if (r3 <= 9) {
0x08000860 subhi r3, r3, 0xa | r3 -= 0xa;
| }
| if (r3 <= 9) {
0x08000864 movhi r1, 1 | r1 = 1;
| }
| if (r3 > 9) {
0x08000868 movls r3, 1 | r3 = 1;
| }
| if (r3 <= 9) {
0x0800086c lslhi r3, r1, r3 | r3 = r1 << r3;
| }
0x08000870 cmp r7, r3 |
| if (r7 >= r3) {
0x08000874 bhs 0x8000950 | goto label_2;
| }
0x08000878 ldr r2, [sp, 8] | r2 = var_8h;
0x0800087c lsl r1, r7, 3 | r1 = r7 << 3;
0x08000880 str r1, [sp] | *(sp) = r1;
0x08000884 ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x08000888 add r3, r3, 0x200 | r3 += 0x200;
0x0800088c add r3, r3, 1 | r3++;
0x08000890 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x08000894 ldrb r0, [fp, 8] | r0 = *(arg_8h);
0x08000898 mov sb, 1 | sb = 1;
0x0800089c mov r6, 0 | r6 = 0;
0x080008a0 cmp r0, 9 |
| if (r0 <= 9) {
0x080008a4 lslhi r4, r7, 0xa | r4 = r7 << 0xa;
| }
0x080008a8 add r7, r7, 1 | r7++;
| if (r0 > 9) {
0x080008ac movls r4, 0 | r4 = 0;
| }
0x080008b0 str r7, [sp, 4] | var_4h = r7;
0x080008b4 add r3, fp, r4, lsl 2 | r3 = fp + (r4 << 2);
0x080008b8 lsl r8, r7, 0xa | r8 = r7 << 0xa;
0x080008bc add sl, r3, 0x10 | sl = r3 + 0x10;
0x080008c0 b 0x80008e4 | goto label_3;
| label_0:
0x080008c4 add r3, r4, 4 | r3 = r4 + 4;
0x080008c8 mov r0, r7 | r0 = r7;
0x080008cc mov r1, 0 | r1 = 0;
0x080008d0 add r3, fp, r3, lsl 2 | r3 = fp + (r3 << 2);
0x080008d4 str r6, [r3, 4] | *((r3 + 4)) = r6;
0x080008d8 stmdaeq r0, {r1, r2, r3, r4, r5, r6, r7, sb, ip, pc} | __asm ("stmdaeq r0, {r1, r2, r3, r4, r5, r6, r7, sb, ip, pc}");
0x080008dc ldrb r0, [fp, 8] | r0 = *(arg_8h);
| do {
0x080008e0 add r4, r4, 1 | r4++;
| label_3:
0x080008e4 cmp r0, 9 |
| if (r0 > 9) {
0x080008e8 lslls r3, sb, r0 | r3 = sb << r0;
| }
| if (r0 <= 9) {
0x080008ec movhi r3, r8 | r3 = r8;
| }
0x080008f0 cmp r4, r3 |
| if (r4 >= r3) {
0x080008f4 bhs 0x8000920 | goto label_4;
| }
0x080008f8 ldr r7, [sl, 4]! | r7 = *((sl += 4));
0x080008fc cmp r7, 0 |
0x08000900 beq 0x80008e0 |
| } while (r7 == 0);
0x08000904 ldrsb r3, [r5, 0x32] | r3 = *((r5 + 0x32));
0x08000908 cmp r3, 0 |
| if (r3 >= 0) {
0x0800090c bge 0x80008c4 | goto label_0;
| }
0x08000910 mov r1, r7 | r1 = r7;
0x08000914 mov r0, r5 | r0 = r5;
0x08000918 bl 0x80004d8 | hash_ipportnet4_ext_cleanup ();
0x0800091c b 0x80008c4 | goto label_0;
| label_4:
0x08000920 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000924 mov ip, 0 |
0x08000928 ldr r2, [sp] | r2 = *(sp);
0x0800092c movw r1, 0x201 | r1 = 0x201;
0x08000930 ldr r0, [pc, 0x34] | r0 = *(0x8000968);
0x08000934 ldr r7, [sp, 4] | r7 = var_4h;
0x08000938 str ip, [r3, r2] | *((r3 + r2)) = ip;
0x0800093c ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000940 add r3, r3, r2 | r3 += r2;
0x08000944 str ip, [r3, 4] | *((r3 + 4)) = ip;
0x08000948 stmdaeq r0, {r1, r2, r4, r5, r6, r7, sb, ip, pc} | __asm ("stmdaeq r0, {r1, r2, r4, r5, r6, r7, sb, ip, pc}");
0x0800094c b 0x8000858 | goto label_1;
| label_2:
0x08000950 ldr r3, [sp, 0xc] | r3 = var_ch;
0x08000954 mov r2, 0x100 | r2 = 0x100;
0x08000958 mov r1, 0 | r1 = 0;
0x0800095c add r0, r3, 0x54 | r0 = r3 + 0x54;
0x08000960 add sp, sp, 0x14 |
0x08000964 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x08000968 stmdaeq r0, {r1, r3, r5, r6, r7, sb, ip, pc} | __asm ("stmdaeq r0, {r1, r3, r5, r6, r7, sb, ip, pc}");
0x0800096c stmdaeq r0, {r4, r5, r6} | __asm ("stmdaeq r0, {r4, r5, r6}");
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/modules/5.10.52-axis8/kernel/net/netfilter/ipset/ip_set_hash_ipportnet.ko @ 0x800055c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.hash_ipportnet6_flush () | void hash_ipportnet6_flush (int32_t arg_8h, int32_t arg_10h, int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_14h;
| r0 = arg1;
0x0800055c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x08000560 mov r5, r0 | r5 = r0;
0x08000564 mov r7, 0 | r7 = 0;
0x08000568 sub sp, sp, 0x14 |
0x0800056c mov r3, sp | r3 = sp;
0x08000570 bic r3, r3, 0x1fc0 | r3 = BIT_MASK (r3, 0x1fc0);
0x08000574 bic r3, r3, 0x3f | r3 = BIT_MASK (r3, 0x3f);
0x08000578 str r3, [sp, 8] | var_8h = r3;
0x0800057c ldr r3, [r0, 0x54] | r3 = *((r0 + 0x54));
0x08000580 str r3, [sp, 0xc] | var_ch = r3;
0x08000584 ldr fp, [r3] | fp = *(r3);
| label_1:
0x08000588 ldrb r3, [fp, 8] | r3 = *(arg_8h);
0x0800058c cmp r3, 9 |
| if (r3 <= 9) {
0x08000590 subhi r3, r3, 0xa | r3 -= 0xa;
| }
| if (r3 <= 9) {
0x08000594 movhi r1, 1 | r1 = 1;
| }
| if (r3 > 9) {
0x08000598 movls r3, 1 | r3 = 1;
| }
| if (r3 <= 9) {
0x0800059c lslhi r3, r1, r3 | r3 = r1 << r3;
| }
0x080005a0 cmp r7, r3 |
| if (r7 >= r3) {
0x080005a4 bhs 0x8000680 | goto label_2;
| }
0x080005a8 ldr r2, [sp, 8] | r2 = var_8h;
0x080005ac lsl r1, r7, 3 | r1 = r7 << 3;
0x080005b0 str r1, [sp] | *(sp) = r1;
0x080005b4 ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x080005b8 add r3, r3, 0x200 | r3 += 0x200;
0x080005bc add r3, r3, 1 | r3++;
0x080005c0 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x080005c4 ldrb r0, [fp, 8] | r0 = *(arg_8h);
0x080005c8 mov sb, 1 | sb = 1;
0x080005cc mov r6, 0 | r6 = 0;
0x080005d0 cmp r0, 9 |
| if (r0 <= 9) {
0x080005d4 lslhi r4, r7, 0xa | r4 = r7 << 0xa;
| }
0x080005d8 add r7, r7, 1 | r7++;
| if (r0 > 9) {
0x080005dc movls r4, 0 | r4 = 0;
| }
0x080005e0 str r7, [sp, 4] | var_4h = r7;
0x080005e4 add r3, fp, r4, lsl 2 | r3 = fp + (r4 << 2);
0x080005e8 lsl r8, r7, 0xa | r8 = r7 << 0xa;
0x080005ec add sl, r3, 0x10 | sl = r3 + 0x10;
0x080005f0 b 0x8000614 | goto label_3;
| label_0:
0x080005f4 add r3, r4, 4 | r3 = r4 + 4;
0x080005f8 mov r0, r7 | r0 = r7;
0x080005fc mov r1, 0 | r1 = 0;
0x08000600 add r3, fp, r3, lsl 2 | r3 = fp + (r3 << 2);
0x08000604 str r6, [r3, 4] | *((r3 + 4)) = r6;
0x08000608 stmdaeq r0, {r1, r2, r3, r4, r5, r6, r7, sb, ip, pc} | __asm ("stmdaeq r0, {r1, r2, r3, r4, r5, r6, r7, sb, ip, pc}");
0x0800060c ldrb r0, [fp, 8] | r0 = *(arg_8h);
| do {
0x08000610 add r4, r4, 1 | r4++;
| label_3:
0x08000614 cmp r0, 9 |
| if (r0 > 9) {
0x08000618 lslls r3, sb, r0 | r3 = sb << r0;
| }
| if (r0 <= 9) {
0x0800061c movhi r3, r8 | r3 = r8;
| }
0x08000620 cmp r4, r3 |
| if (r4 >= r3) {
0x08000624 bhs 0x8000650 | goto label_4;
| }
0x08000628 ldr r7, [sl, 4]! | r7 = *((sl += 4));
0x0800062c cmp r7, 0 |
0x08000630 beq 0x8000610 |
| } while (r7 == 0);
0x08000634 ldrsb r3, [r5, 0x32] | r3 = *((r5 + 0x32));
0x08000638 cmp r3, 0 |
| if (r3 >= 0) {
0x0800063c bge 0x80005f4 | goto label_0;
| }
0x08000640 mov r1, r7 | r1 = r7;
0x08000644 mov r0, r5 | r0 = r5;
0x08000648 bl 0x80004d8 | hash_ipportnet4_ext_cleanup ();
0x0800064c b 0x80005f4 | goto label_0;
| label_4:
0x08000650 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000654 mov ip, 0 |
0x08000658 ldr r2, [sp] | r2 = *(sp);
0x0800065c movw r1, 0x201 | r1 = 0x201;
0x08000660 ldr r0, [pc, 0x34] | r0 = *(0x8000698);
0x08000664 ldr r7, [sp, 4] | r7 = var_4h;
0x08000668 str ip, [r3, r2] | *((r3 + r2)) = ip;
0x0800066c ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000670 add r3, r3, r2 | r3 += r2;
0x08000674 str ip, [r3, 4] | *((r3 + 4)) = ip;
0x08000678 stmdaeq r0, {r1, r2, r4, r5, r6, r7, sb, ip, pc} | __asm ("stmdaeq r0, {r1, r2, r4, r5, r6, r7, sb, ip, pc}");
0x0800067c b 0x8000588 | goto label_1;
| label_2:
0x08000680 ldr r3, [sp, 0xc] | r3 = var_ch;
0x08000684 mov r2, 0x400 | r2 = 0x400;
0x08000688 mov r1, 0 | r1 = 0;
0x0800068c add r0, r3, 0x6c | r0 = r3 + 0x6c;
0x08000690 add sp, sp, 0x14 |
0x08000694 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x08000698 stmdaeq r0, {r1, r3, r5, r6, r7, sb, ip, pc} | __asm ("stmdaeq r0, {r1, r3, r5, r6, r7, sb, ip, pc}");
0x0800069c stmdaeq r0, {r4, r5, r6} | __asm ("stmdaeq r0, {r4, r5, r6}");
| }
[*] Function printf used 1 times ip_set_hash_ipportnet.ko