[*] Binary protection state of ip_set_hash_netportnet.ko
No RELRO No Canary found NX disabled REL No RPATH No RUNPATH Symbols
[*] Function strcat tear down of ip_set_hash_netportnet.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_netportnet.ko @ 0x8000850 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.hash_netportnet4_flush () | void hash_netportnet4_flush (int32_t arg_8h, int32_t arg_10h, int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h_2;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_14h;
| r0 = arg1;
0x08000850 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x08000854 mov r5, r0 | r5 = r0;
0x08000858 mov r7, 0 | r7 = 0;
0x0800085c sub sp, sp, 0x14 |
0x08000860 mov r3, sp | r3 = sp;
0x08000864 bic r3, r3, 0x1fc0 | r3 = BIT_MASK (r3, 0x1fc0);
0x08000868 bic r3, r3, 0x3f | r3 = BIT_MASK (r3, 0x3f);
0x0800086c str r3, [sp, 8] | var_8h = r3;
0x08000870 ldr r3, [r0, 0x54] | r3 = *((r0 + 0x54));
0x08000874 str r3, [sp, 0xc] | var_ch = r3;
0x08000878 ldr fp, [r3] | fp = *(r3);
| label_1:
0x0800087c ldrb r3, [fp, 8] | r3 = *(arg_8h);
0x08000880 cmp r3, 9 |
| if (r3 <= 9) {
0x08000884 subhi r3, r3, 0xa | r3 -= 0xa;
| }
| if (r3 <= 9) {
0x08000888 movhi r1, 1 | r1 = 1;
| }
| if (r3 > 9) {
0x0800088c movls r3, 1 | r3 = 1;
| }
| if (r3 <= 9) {
0x08000890 lslhi r3, r1, r3 | r3 = r1 << r3;
| }
0x08000894 cmp r7, r3 |
| if (r7 >= r3) {
0x08000898 bhs 0x8000974 | goto label_2;
| }
0x0800089c ldr r2, [sp, 8] | r2 = var_8h;
0x080008a0 lsl r1, r7, 3 | r1 = r7 << 3;
0x080008a4 str r1, [sp] | *(sp) = r1;
0x080008a8 ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x080008ac add r3, r3, 0x200 | r3 += 0x200;
0x080008b0 add r3, r3, 1 | r3++;
0x080008b4 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x080008b8 ldrb r0, [fp, 8] | r0 = *(arg_8h);
0x080008bc mov sb, 1 | sb = 1;
0x080008c0 mov r6, 0 | r6 = 0;
0x080008c4 cmp r0, 9 |
| if (r0 <= 9) {
0x080008c8 lslhi r4, r7, 0xa | r4 = r7 << 0xa;
| }
0x080008cc add r7, r7, 1 | r7++;
| if (r0 > 9) {
0x080008d0 movls r4, 0 | r4 = 0;
| }
0x080008d4 str r7, [sp, 4] | var_4h_2 = r7;
0x080008d8 add r3, fp, r4, lsl 2 | r3 = fp + (r4 << 2);
0x080008dc lsl r8, r7, 0xa | r8 = r7 << 0xa;
0x080008e0 add sl, r3, 0x10 | sl = r3 + 0x10;
0x080008e4 b 0x8000908 | goto label_3;
| label_0:
0x080008e8 add r3, r4, 4 | r3 = r4 + 4;
0x080008ec mov r0, r7 | r0 = r7;
0x080008f0 mov r1, 0 | r1 = 0;
0x080008f4 add r3, fp, r3, lsl 2 | r3 = fp + (r3 << 2);
0x080008f8 str r6, [r3, 4] | *((r3 + 4)) = r6;
0x080008fc stmdaeq r0, {r1, r6, r7, r8, sb, sl, ip, pc} | __asm ("stmdaeq r0, {r1, r6, r7, r8, sb, sl, ip, pc}");
0x08000900 ldrb r0, [fp, 8] | r0 = *(arg_8h);
| do {
0x08000904 add r4, r4, 1 | r4++;
| label_3:
0x08000908 cmp r0, 9 |
| if (r0 > 9) {
0x0800090c lslls r3, sb, r0 | r3 = sb << r0;
| }
| if (r0 <= 9) {
0x08000910 movhi r3, r8 | r3 = r8;
| }
0x08000914 cmp r4, r3 |
| if (r4 >= r3) {
0x08000918 bhs 0x8000944 | goto label_4;
| }
0x0800091c ldr r7, [sl, 4]! | r7 = *((sl += 4));
0x08000920 cmp r7, 0 |
0x08000924 beq 0x8000904 |
| } while (r7 == 0);
0x08000928 ldrsb r3, [r5, 0x32] | r3 = *((r5 + 0x32));
0x0800092c cmp r3, 0 |
| if (r3 >= 0) {
0x08000930 bge 0x80008e8 | goto label_0;
| }
0x08000934 mov r1, r7 | r1 = r7;
0x08000938 mov r0, r5 | r0 = r5;
0x0800093c bl 0x80004fc | hash_netportnet4_ext_cleanup ();
0x08000940 b 0x80008e8 | goto label_0;
| label_4:
0x08000944 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000948 mov ip, 0 |
0x0800094c ldr r2, [sp] | r2 = *(sp);
0x08000950 movw r1, 0x201 | r1 = 0x201;
0x08000954 ldr r0, [pc, 0x34] | r0 = *(0x800098c);
0x08000958 ldr r7, [sp, 4] | r7 = var_4h_2;
0x0800095c str ip, [r3, r2] | *((r3 + r2)) = ip;
0x08000960 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000964 add r3, r3, r2 | r3 += r2;
0x08000968 str ip, [r3, 4] | *((r3 + 4)) = ip;
0x0800096c stmdaeq r0, {r1, r3, r4, r5, r7, r8, sb, sl, ip, pc} | __asm ("stmdaeq r0, {r1, r3, r4, r5, r7, r8, sb, sl, ip, pc}");
0x08000970 b 0x800087c | goto label_1;
| label_2:
0x08000974 ldr r3, [sp, 0xc] | r3 = var_ch;
0x08000978 mov r2, 0x180 | r2 = 0x180;
0x0800097c mov r1, 0 | r1 = 0;
0x08000980 add r0, r3, 0x58 | r0 = r3 + 0x58;
0x08000984 add sp, sp, 0x14 |
0x08000988 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0800098c stmdaeq r0, {r1, r2, r3, r5, r7, r8, sb, sl, ip, pc} | __asm ("stmdaeq r0, {r1, r2, r3, r5, r7, r8, sb, sl, ip, pc}");
0x08000990 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_netportnet.ko @ 0x8000580 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.hash_netportnet6_flush () | void hash_netportnet6_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;
0x08000580 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x08000584 mov r5, r0 | r5 = r0;
0x08000588 mov r7, 0 | r7 = 0;
0x0800058c sub sp, sp, 0x14 |
0x08000590 mov r3, sp | r3 = sp;
0x08000594 bic r3, r3, 0x1fc0 | r3 = BIT_MASK (r3, 0x1fc0);
0x08000598 bic r3, r3, 0x3f | r3 = BIT_MASK (r3, 0x3f);
0x0800059c str r3, [sp, 8] | var_8h = r3;
0x080005a0 ldr r3, [r0, 0x54] | r3 = *((r0 + 0x54));
0x080005a4 str r3, [sp, 0xc] | var_ch = r3;
0x080005a8 ldr fp, [r3] | fp = *(r3);
| label_1:
0x080005ac ldrb r3, [fp, 8] | r3 = *(arg_8h);
0x080005b0 cmp r3, 9 |
| if (r3 <= 9) {
0x080005b4 subhi r3, r3, 0xa | r3 -= 0xa;
| }
| if (r3 <= 9) {
0x080005b8 movhi r1, 1 | r1 = 1;
| }
| if (r3 > 9) {
0x080005bc movls r3, 1 | r3 = 1;
| }
| if (r3 <= 9) {
0x080005c0 lslhi r3, r1, r3 | r3 = r1 << r3;
| }
0x080005c4 cmp r7, r3 |
| if (r7 >= r3) {
0x080005c8 bhs 0x80006a4 | goto label_2;
| }
0x080005cc ldr r2, [sp, 8] | r2 = var_8h;
0x080005d0 lsl r1, r7, 3 | r1 = r7 << 3;
0x080005d4 str r1, [sp] | *(sp) = r1;
0x080005d8 ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x080005dc add r3, r3, 0x200 | r3 += 0x200;
0x080005e0 add r3, r3, 1 | r3++;
0x080005e4 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x080005e8 ldrb r0, [fp, 8] | r0 = *(arg_8h);
0x080005ec mov sb, 1 | sb = 1;
0x080005f0 mov r6, 0 | r6 = 0;
0x080005f4 cmp r0, 9 |
| if (r0 <= 9) {
0x080005f8 lslhi r4, r7, 0xa | r4 = r7 << 0xa;
| }
0x080005fc add r7, r7, 1 | r7++;
| if (r0 > 9) {
0x08000600 movls r4, 0 | r4 = 0;
| }
0x08000604 str r7, [sp, 4] | var_4h = r7;
0x08000608 add r3, fp, r4, lsl 2 | r3 = fp + (r4 << 2);
0x0800060c lsl r8, r7, 0xa | r8 = r7 << 0xa;
0x08000610 add sl, r3, 0x10 | sl = r3 + 0x10;
0x08000614 b 0x8000638 | goto label_3;
| label_0:
0x08000618 add r3, r4, 4 | r3 = r4 + 4;
0x0800061c mov r0, r7 | r0 = r7;
0x08000620 mov r1, 0 | r1 = 0;
0x08000624 add r3, fp, r3, lsl 2 | r3 = fp + (r3 << 2);
0x08000628 str r6, [r3, 4] | *((r3 + 4)) = r6;
0x0800062c stmdaeq r0, {r1, r6, r7, r8, sb, sl, ip, pc} | __asm ("stmdaeq r0, {r1, r6, r7, r8, sb, sl, ip, pc}");
0x08000630 ldrb r0, [fp, 8] | r0 = *(arg_8h);
| do {
0x08000634 add r4, r4, 1 | r4++;
| label_3:
0x08000638 cmp r0, 9 |
| if (r0 > 9) {
0x0800063c lslls r3, sb, r0 | r3 = sb << r0;
| }
| if (r0 <= 9) {
0x08000640 movhi r3, r8 | r3 = r8;
| }
0x08000644 cmp r4, r3 |
| if (r4 >= r3) {
0x08000648 bhs 0x8000674 | goto label_4;
| }
0x0800064c ldr r7, [sl, 4]! | r7 = *((sl += 4));
0x08000650 cmp r7, 0 |
0x08000654 beq 0x8000634 |
| } while (r7 == 0);
0x08000658 ldrsb r3, [r5, 0x32] | r3 = *((r5 + 0x32));
0x0800065c cmp r3, 0 |
| if (r3 >= 0) {
0x08000660 bge 0x8000618 | goto label_0;
| }
0x08000664 mov r1, r7 | r1 = r7;
0x08000668 mov r0, r5 | r0 = r5;
0x0800066c bl 0x80004fc | hash_netportnet4_ext_cleanup ();
0x08000670 b 0x8000618 | goto label_0;
| label_4:
0x08000674 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000678 mov ip, 0 |
0x0800067c ldr r2, [sp] | r2 = *(sp);
0x08000680 movw r1, 0x201 | r1 = 0x201;
0x08000684 ldr r0, [pc, 0x34] | r0 = *(0x80006bc);
0x08000688 ldr r7, [sp, 4] | r7 = var_4h;
0x0800068c str ip, [r3, r2] | *((r3 + r2)) = ip;
0x08000690 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000694 add r3, r3, r2 | r3 += r2;
0x08000698 str ip, [r3, 4] | *((r3 + 4)) = ip;
0x0800069c stmdaeq r0, {r1, r3, r4, r5, r7, r8, sb, sl, ip, pc} | __asm ("stmdaeq r0, {r1, r3, r4, r5, r7, r8, sb, sl, ip, pc}");
0x080006a0 b 0x80005ac | goto label_1;
| label_2:
0x080006a4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x080006a8 mov r2, 0x600 | r2 = 0x600;
0x080006ac mov r1, 0 | r1 = 0;
0x080006b0 add r0, r3, 0x70 | r0 = r3 + 0x70;
0x080006b4 add sp, sp, 0x14 |
0x080006b8 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x080006bc stmdaeq r0, {r1, r2, r3, r5, r7, r8, sb, sl, ip, pc} | __asm ("stmdaeq r0, {r1, r2, r3, r5, r7, r8, sb, sl, ip, pc}");
0x080006c0 stmdaeq r0, {r4, r5, r6} | __asm ("stmdaeq r0, {r4, r5, r6}");
| }
[*] Function strcat used 1 times ip_set_hash_netportnet.ko