[*] Binary protection state of ip_set.ko
No RELRO No Canary found NX disabled REL No RPATH No RUNPATH Symbols
[*] Function sprintf tear down of ip_set.ko
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/modules/5.10.52-axis9/kernel/net/netfilter/ipset/ip_set.ko @ 0x8000d34 */
| #include <stdint.h>
|
; (fcn) sym.ip_set_dump_done () | uint32_t ip_set_dump_done (int32_t arg1) {
| r0 = arg1;
0x08000d34 ldr r3, [r0, 0x44] | r3 = *((r0 + 0x44));
0x08000d38 cmp r3, 0 |
| if (r3 != 0) {
0x08000d3c beq 0x8000d84 |
0x08000d40 push {r4, lr} |
0x08000d44 ldr r3, [r0, 0x30] | r3 = *((r0 + 0x30));
0x08000d48 ldrh r2, [r0, 0x3c] | r2 = *((r0 + 0x3c));
0x08000d4c ldr r3, [r3] | r3 = *(r3);
0x08000d50 ldr r4, [r3, r2, lsl 2] | offset_0 = r2 << 2;
| r4 = *((r3 + offset_0));
0x08000d54 ldr r3, [r4, 0x2c] | r3 = *((r4 + 0x2c));
0x08000d58 ldr r3, [r3, 0x2c] | r3 = *((r3 + 0x2c));
0x08000d5c cmp r3, 0 |
| if (r3 != 0) {
0x08000d60 beq 0x8000d74 |
0x08000d64 mov r1, r0 | r1 = r0;
0x08000d68 mov r2, 0 | r2 = 0;
0x08000d6c mov r0, r4 | r0 = r4;
0x08000d70 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
| }
0x08000d74 mov r0, r4 | r0 = r4;
0x08000d78 bl 0x8000cf0 | ip_set_put_netlink ();
0x08000d7c mov r0, 0 | r0 = 0;
0x08000d80 pop {r4, pc} |
| }
0x08000d84 mov r0, 0 | r0 = 0;
0x08000d88 bx lr | return r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/modules/5.10.52-axis9/kernel/net/netfilter/ipset/ip_set.ko @ 0x80015f0 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.ip_set_dump_do () | void ip_set_dump_do (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_1eh;
| int32_t var_24h;
| r0 = arg1;
| r1 = arg2;
0x080015f0 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x080015f4 mov r4, r1 | r4 = r1;
0x080015f8 stmdaeq r0, {r4, sb, fp, ip, lr} | __asm ("stmdaeq r0, {r4, sb, fp, ip, lr}");
0x080015fc stmdaeq r0, {r4, sb, fp, ip, lr} | __asm ("stmdaeq r0, {r4, sb, fp, ip, lr}");
0x08001600 ldr r1, [r0, 0xc] | r1 = *((r0 + 0xc));
0x08001604 ldr r2, [r4] | r2 = *(r4);
0x08001608 sub sp, sp, 0x24 |
0x0800160c mov r5, r0 | r5 = r0;
0x08001610 ldr r7, [r1, 0x24] | r7 = *((r1 + 0x24));
0x08001614 ldr r6, [r3] | r6 = *(r3);
0x08001618 ldr r3, [r2, 0x24] | r3 = *((r2 + 0x24));
0x0800161c str r3, [sp, 0x10] | var_10h = r3;
0x08001620 stmdaeq r0, {r6, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r6, r7, r8, sb, fp, ip, pc}");
0x08001624 ldr r3, [r7, 0x6d8] | r3 = *((r7 + 0x6d8));
0x08001628 ldr r7, [r3, r6, lsl 2] | offset_0 = r6 << 2;
| r7 = *((r3 + offset_0));
0x0800162c stmdaeq r0, {r2, r6, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r2, r6, r7, r8, sb, fp, ip, pc}");
0x08001630 ldr fp, [r4, 0x38] | fp = *((r4 + 0x38));
0x08001634 cmp fp, 0 |
| if (fp == 0) {
0x08001638 beq 0x8001b20 | goto label_13;
| }
0x0800163c ldr r6, [r4, 0x3c] | r6 = *((r4 + 0x3c));
0x08001640 ldrh sl, [r7, 4] | sl = *((r7 + 4));
0x08001644 cmp r6, sl |
| if (r6 >= sl) {
0x08001648 bge 0x8001834 | goto label_0;
| }
0x0800164c uxth r3, fp | r3 = (int16_t) fp;
0x08001650 cmp r3, 2 |
0x08001654 beq 0x8001844 |
| while (r6 < sl) {
0x08001658 str r3, [sp, 0xc] | var_ch = r3;
0x0800165c mov r3, sp | r3 = sp;
0x08001660 bic r8, r3, 0x1fc0 | r8 = BIT_MASK (r3, 0x1fc0);
0x08001664 mov r1, r6 | r1 = r6;
0x08001668 bic r8, r8, 0x3f | r8 = BIT_MASK (r8, 0x3f);
0x0800166c movw r3, 0x201 | r3 = 0x201;
| label_1:
0x08001670 ldr r2, [r8, 4] | r2 = *((r8 + 4));
0x08001674 add r2, r2, r3 | r2 += r3;
0x08001678 str r2, [r8, 4] | *((r8 + 4)) = r2;
0x0800167c ldr r2, [r7] | r2 = *(r7);
0x08001680 uxth r0, r1 | r0 = (int16_t) r1;
0x08001684 ldrb sb, [r7, 7] | sb = *((r7 + 7));
0x08001688 ldr r6, [r2, r0, lsl 2] | offset_1 = r0 << 2;
| r6 = *((r2 + offset_1));
0x0800168c cmp r6, 0 |
| if (r6 == 0) {
0x08001690 movne ip, sb |
| }
| if (r6 != 0) {
0x08001694 orreq ip, sb, 1 |
| }
0x08001698 cmp ip, 0 |
| if (ip != 0) {
0x0800169c bne 0x80019bc | goto label_14;
| }
0x080016a0 ldr ip, [sp, 0xc] | ip = var_ch;
0x080016a4 cmp ip, 2 |
| if (ip != 2) {
0x080016a8 beq 0x80016c8 |
0x080016ac ldr r2, [r6, 0x28] | r2 = *((r6 + 0x28));
0x080016b0 subs ip, ip, 1 |
| if (ip == ip) {
0x080016b4 movne ip, 1 |
| }
0x080016b8 ldrh r2, [r2, 0x2e] | r2 = *((r2 + 0x2e));
0x080016bc ubfx r2, r2, 8, 1 | r2 = (r2 >> 8) & ((1 << 1) - 1);
0x080016c0 cmp ip, r2 |
| if (ip != r2) {
0x080016c4 bne 0x8001858 | goto label_15;
| }
| }
0x080016c8 ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x080016cc mov sb, r6 | sb = r6;
0x080016d0 str r0, [sp, 0x14] | var_14h = r0;
0x080016d4 mov r6, r1 | r6 = r1;
0x080016d8 cmp r3, 0 |
0x080016dc movw r1, 0x201 | r1 = 0x201;
0x080016e0 ldr r0, [pc, 0x450] | r0 = *(0x8001b34);
| if (r3 != 0) {
0x080016e4 ldreq r3, [sb, 0x24] | r3 = *((sb + 0x24));
| }
| if (r3 != 0) {
0x080016e8 addeq r3, r3, 1 | r3++;
| }
| if (r3 != 0) {
0x080016ec streq r3, [sb, 0x24] | *((sb + 0x24)) = r3;
| }
0x080016f0 stmdaeq r0, {r2, r5, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r2, r5, r7, r8, sb, fp, ip, pc}");
0x080016f4 ldr r3, [sp, 0x10] | r3 = var_10h;
0x080016f8 ldr r8, [r5, 0x58] | r8 = *((r5 + 0x58));
0x080016fc subs sl, r3, 0 | sl = r3 - 0;
0x08001700 ldr r3, [r4] | r3 = *(r4);
| if (sl == r3) {
0x08001704 movne sl, 1 | sl = 1;
| }
0x08001708 cmp r8, 0 |
0x0800170c ldr r1, [r3, 0x24] | r1 = *((r3 + 0x24));
0x08001710 lsl sl, sl, 1 | sl <<= 1;
0x08001714 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x08001718 ldr r2, [r3, 8] | r2 = *((r3 + 8));
| if (r8 != 0) {
0x0800171c bne 0x80019e0 | goto label_16;
| }
0x08001720 ldr r3, [r5, 0xa0] | r3 = *((r5 + 0xa0));
0x08001724 ldr r0, [r5, 0x9c] | r0 = *((r5 + 0x9c));
0x08001728 sub r3, r3, r0 | r3 -= r0;
0x0800172c cmp r3, 0x13 |
| if (r3 <= 0x13) {
0x08001730 ble 0x80019e0 | goto label_16;
| }
0x08001734 str sl, [sp, 4] | var_4h = sl;
0x08001738 mov r3, 4 | r3 = 4;
0x0800173c mov r0, r5 | r0 = r5;
0x08001740 str r3, [sp] | *(sp) = r3;
0x08001744 movw r3, 0x607 | r3 = 0x607;
0x08001748 stmdaeq r0, {r2, r3, r5, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r2, r3, r5, r7, r8, sb, fp, ip, pc}");
0x0800174c subs sl, r0, 0 | sl = r0 - 0;
| if (sl == r0) {
0x08001750 beq 0x80019e0 | goto label_16;
| }
0x08001754 strh r8, [sl, 0x12] | *((sl + 0x12)) = r8;
0x08001758 mov r8, 2 | r8 = 2;
0x0800175c strh r8, [sl, 0x10] | *((sl + 0x10)) = r8;
0x08001760 mov r2, 1 | r2 = 1;
0x08001764 add r3, sp, 0x1e | r3 += var_1eh;
0x08001768 mov r0, r5 | r0 = r5;
0x0800176c ldr r1, [r4, 0x34] | r1 = *((r4 + 0x34));
0x08001770 strb r1, [sp, 0x1e] | var_1eh = r1;
0x08001774 mov r1, r2 | r1 = r2;
0x08001778 stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc}");
0x0800177c cmp r0, 0 |
| if (r0 != 0) {
0x08001780 bne 0x8001908 | goto label_4;
| }
0x08001784 mov r0, sb | r0 = sb;
0x08001788 stmdaeq r0, {r2, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r2, r7, r8, sb, fp, ip, pc}");
0x0800178c mov r3, sb | r3 = sb;
0x08001790 add r2, r0, 1 | r2 = r0 + 1;
0x08001794 mov r1, r8 | r1 = r8;
0x08001798 mov r0, r5 | r0 = r5;
0x0800179c stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc}");
0x080017a0 cmp r0, 0 |
| if (r0 != 0) {
0x080017a4 bne 0x8001908 | goto label_4;
| }
0x080017a8 ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x080017ac tst fp, 0x20000 |
0x080017b0 lsr r8, fp, 0x10 | r8 = fp >> 0x10;
| if ((fp & 0x20000) != 0) {
0x080017b4 bne 0x8001af8 | goto label_17;
| }
0x080017b8 cmp r3, 0 |
| if (r3 == 0) {
0x080017bc beq 0x8001a30 | goto label_18;
| }
| label_9:
0x080017c0 ldr r3, [sb, 0x2c] | r3 = *((sb + 0x2c));
| label_8:
0x080017c4 ldr r3, [r3, 0x28] | r3 = *((r3 + 0x28));
0x080017c8 mov r0, sb | r0 = sb;
0x080017cc mov r2, r4 | r2 = r4;
0x080017d0 mov r1, r5 | r1 = r5;
0x080017d4 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x080017d8 ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x080017dc mov r6, r0 | r6 = r0;
0x080017e0 cmp r3, 0 |
| if (r3 != 0) {
0x080017e4 bne 0x8001b14 | goto label_19;
| }
| label_7:
0x080017e8 ldr r3, [sp, 0xc] | r3 = var_ch;
0x080017ec cmp r3, 2 |
0x080017f0 movweq r3, 0xffff | __asm ("movweq r3, 0xffff");
| if (r3 == 2) {
0x080017f4 ldrne r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
| }
| if (r3 == 2) {
0x080017f8 addne r3, r3, 1 | r3++;
| }
0x080017fc cmp r6, 0 |
0x08001800 str r3, [r4, 0x3c] | *((r4 + 0x3c)) = r3;
| if (r6 != 0) {
0x08001804 bne 0x8001924 | goto label_6;
| }
0x08001808 ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
| label_10:
0x0800180c subs r6, r3, 0 | r6 = r3 - 0;
| if (r6 == r3) {
0x08001810 beq 0x8001924 | goto label_6;
| }
| label_11:
0x08001814 ldr r3, [r5, 0x9c] | r3 = *((r5 + 0x9c));
0x08001818 sub r3, r3, sl | r3 -= sl;
0x0800181c str r3, [sl] | *(sl) = r3;
0x08001820 sub r3, r3, 0x14 | r3 -= 0x14;
0x08001824 cmp r3, 3 |
| if (r3 <= 3) {
0x08001828 addgt r1, sl, 0x14 | r1 = sl + 0x14;
| }
| if (r3 <= 3) {
0x0800182c movgt r6, 0 | r6 = 0;
| }
| if (r3 > 3) {
0x08001830 bgt 0x800197c | goto label_20;
| }
| label_0:
0x08001834 ldr r6, [r5, 0x54] | r6 = *((r5 + 0x54));
| label_3:
0x08001838 mov r0, r6 | r0 = r6;
0x0800183c add sp, sp, 0x24 |
0x08001840 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x08001844 add r1, r6, 1 | r1 = r6 + 1;
0x08001848 uxth sl, r1 | sl = (int16_t) r1;
0x0800184c cmp r6, sl |
0x08001850 blt 0x8001658 |
| }
0x08001854 b 0x8001834 | goto label_0;
| label_15:
0x08001858 ldr r0, [pc, 0x2dc] | r0 = .text;
0x0800185c movw r1, 0x201 | r1 = 0x201;
0x08001860 stmdaeq r0, {r2, r5, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r2, r5, r7, r8, sb, fp, ip, pc}");
| label_2:
0x08001864 ldr r1, [r4, 0x3c] | r1 = *((r4 + 0x3c));
0x08001868 movw r3, 0x201 | r3 = 0x201;
0x0800186c add r1, r1, 1 | r1++;
0x08001870 str r1, [r4, 0x3c] | *((r4 + 0x3c)) = r1;
0x08001874 cmp r1, sl |
| if (r1 < sl) {
0x08001878 blt 0x8001670 | goto label_1;
| }
0x0800187c ldr r2, [sp, 0xc] | r2 = var_ch;
0x08001880 cmp r2, 1 |
| if (r2 != 1) {
0x08001884 bne 0x8001834 | goto label_0;
| }
0x08001888 lsr r2, fp, 0x10 | r2 = fp >> 0x10;
0x0800188c cmp r6, 0 |
0x08001890 lsl r2, r2, 0x10 | r2 <<= 0x10;
0x08001894 orr r2, r2, 3 | r2 |= 3;
0x08001898 str r2, [r4, 0x38] | *((r4 + 0x38)) = r2;
0x0800189c mov r2, 0 | r2 = 0;
0x080018a0 str r2, [r4, 0x3c] | *((r4 + 0x3c)) = r2;
| if (r6 == 0) {
0x080018a4 beq 0x8001b30 | goto label_21;
| }
0x080018a8 ldr r1, [r6, 0x2c] | r1 = *((r6 + 0x2c));
0x080018ac ldr sb, [r1, 0x2c] | sb = *((r1 + 0x2c));
0x080018b0 cmp sb, r2 |
| if (sb != r2) {
0x080018b4 moveq r1, sb | r1 = sb;
| }
| if (sb != r2) {
0x080018b8 beq 0x80018d0 |
0x080018bc mov r1, r4 | r1 = r4;
0x080018c0 mov r0, r6 | r0 = r6;
0x080018c4 blx sb | sb (r0, r1);
0x080018c8 ldr r1, [r4, 0x3c] | r1 = *((r4 + 0x3c));
0x080018cc movw r3, 0x201 | r3 = 0x201;
| }
| label_12:
0x080018d0 mov r2, 3 | r2 = 3;
0x080018d4 cmp r1, sl |
0x080018d8 str r2, [sp, 0xc] | var_ch = r2;
| if (r1 < sl) {
0x080018dc blt 0x8001670 | goto label_1;
| }
0x080018e0 b 0x8001834 | goto label_0;
| label_5:
0x080018e4 add r3, sp, 0x1e | r3 += var_1eh;
0x080018e8 mov r0, r5 | r0 = r5;
0x080018ec mov r2, 2 | r2 = 2;
0x080018f0 movw r1, 0x400b | r1 = 0x400b;
0x080018f4 rev16 r6, r6 | __asm ("rev16 r6, r6");
0x080018f8 strh r6, [sp, 0x1e] | var_1eh = r6;
0x080018fc stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc}");
0x08001900 cmp r0, 0 |
| if (r0 == 0) {
0x08001904 beq 0x8001ab0 | goto label_22;
| }
| label_4:
0x08001908 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0800190c mvn r6, 0xd | r6 = ~0xd;
0x08001910 cmp r3, 2 |
0x08001914 movweq r3, 0xffff | __asm ("movweq r3, 0xffff");
| if (r3 == 2) {
0x08001918 ldrne r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
| }
| if (r3 == 2) {
0x0800191c addne r3, r3, 1 | r3++;
| }
0x08001920 str r3, [r4, 0x3c] | *((r4 + 0x3c)) = r3;
| label_6:
0x08001924 ldr r3, [r7] | r3 = *(r7);
0x08001928 ldr r2, [sp, 0x14] | r2 = var_14h;
0x0800192c ldr r7, [r3, r2, lsl 2] | offset_2 = r2 << 2;
| r7 = *((r3 + offset_2));
0x08001930 ldr r3, [r7, 0x2c] | r3 = *((r7 + 0x2c));
0x08001934 ldr r3, [r3, 0x2c] | r3 = *((r3 + 0x2c));
0x08001938 cmp r3, 0 |
| if (r3 != 0) {
0x0800193c beq 0x8001950 |
0x08001940 mov r1, r4 | r1 = r4;
0x08001944 mov r0, r7 | r0 = r7;
0x08001948 mov r2, 0 | r2 = 0;
0x0800194c blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
| }
0x08001950 mov r0, r7 | r0 = r7;
0x08001954 bl 0x8000cf0 | ip_set_put_netlink ();
0x08001958 mov r3, 0 | r3 = 0;
0x0800195c str r3, [r4, 0x44] | *((r4 + 0x44)) = r3;
0x08001960 ldr r3, [r5, 0x9c] | r3 = *((r5 + 0x9c));
0x08001964 sub r3, r3, sl | r3 -= sl;
0x08001968 str r3, [sl] | *(sl) = r3;
0x0800196c sub r3, r3, 0x14 | r3 -= 0x14;
0x08001970 cmp r3, 3 |
| if (r3 <= 3) {
0x08001974 ble 0x80019a8 | goto label_23;
| }
0x08001978 add r1, sl, 0x14 | r1 = sl + 0x14;
| do {
| label_20:
0x0800197c ldrh r2, [r1] | r2 = *(r1);
0x08001980 cmp r2, 3 |
| if (r2 < 3) {
0x08001984 bls 0x80019a8 | goto label_23;
| }
0x08001988 cmp r3, r2 |
| if (r3 < r2) {
0x0800198c blt 0x80019a8 | goto label_23;
| }
0x08001990 add r2, r2, 3 | r2 += 3;
0x08001994 bic r2, r2, 3 | r2 = BIT_MASK (r2, 3);
0x08001998 sub r3, r3, r2 | r3 -= r2;
0x0800199c add r1, r1, r2 | r1 += r2;
0x080019a0 cmp r3, 3 |
0x080019a4 bgt 0x800197c |
| } while (r3 > 3);
| label_23:
0x080019a8 cmp r6, 0 |
| if (r6 >= 0) {
0x080019ac bge 0x8001834 | goto label_0;
| }
0x080019b0 mov r0, r6 | r0 = r6;
0x080019b4 add sp, sp, 0x24 |
0x080019b8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_14:
0x080019bc ldr r0, [pc, 0x17c] | r0 = .text;
0x080019c0 movw r1, 0x201 | r1 = 0x201;
0x080019c4 stmdaeq r0, {r2, r5, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r2, r5, r7, r8, sb, fp, ip, pc}");
0x080019c8 ldr r3, [sp, 0xc] | r3 = var_ch;
0x080019cc cmp r3, 2 |
| if (r3 == 2) {
0x080019d0 beq 0x8001b28 | goto label_24;
| }
0x080019d4 cmp sb, 0 |
| if (sb != 0) {
0x080019d8 bne 0x8001834 | goto label_0;
| }
0x080019dc b 0x8001864 | goto label_2;
| label_16:
0x080019e0 ldr r3, [r7] | r3 = *(r7);
0x080019e4 ldr r2, [sp, 0x14] | r2 = var_14h;
0x080019e8 ldr r5, [r3, r2, lsl 2] | offset_3 = r2 << 2;
| r5 = *((r3 + offset_3));
0x080019ec ldr r3, [r5, 0x2c] | r3 = *((r5 + 0x2c));
0x080019f0 ldr r3, [r3, 0x2c] | r3 = *((r3 + 0x2c));
0x080019f4 cmp r3, 0 |
| if (r3 == 0) {
0x080019f8 beq 0x8001a24 | goto label_25;
| }
0x080019fc mov r0, r5 | r0 = r5;
0x08001a00 mov r1, r4 | r1 = r4;
0x08001a04 mov r2, 0 | r2 = 0;
0x08001a08 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x08001a0c mov r0, r5 | r0 = r5;
0x08001a10 bl 0x8000cf0 | ip_set_put_netlink ();
| do {
0x08001a14 mov r3, 0 | r3 = 0;
0x08001a18 mvn r6, 0x59 | r6 = ~0x59;
0x08001a1c str r3, [r4, 0x44] | *((r4 + 0x44)) = r3;
0x08001a20 b 0x8001838 | goto label_3;
| label_25:
0x08001a24 mov r0, r5 | r0 = r5;
0x08001a28 bl 0x8000cf0 | ip_set_put_netlink ();
0x08001a2c b 0x8001a14 |
| } while (1);
| label_18:
0x08001a30 ldr fp, [sb, 0x28] | fp = *((sb + 0x28));
0x08001a34 add fp, fp, 8 |
0x08001a38 mov r0, fp | r0 = fp;
0x08001a3c stmdaeq r0, {r2, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r2, r7, r8, sb, fp, ip, pc}");
0x08001a40 mov r3, fp | r3 = fp;
0x08001a44 add r2, r0, 1 | r2 = r0 + 1;
0x08001a48 mov r1, 3 | r1 = 3;
0x08001a4c mov r0, r5 | r0 = r5;
0x08001a50 stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc}");
0x08001a54 cmp r0, 0 |
| if (r0 != 0) {
0x08001a58 bne 0x8001908 | goto label_4;
| }
0x08001a5c ldrb r3, [sb, 0x30] | r3 = *((sb + 0x30));
0x08001a60 mov r0, r5 | r0 = r5;
0x08001a64 strb r3, [sp, 0x1e] | var_1eh = r3;
0x08001a68 mov r2, 1 | r2 = 1;
0x08001a6c add r3, sp, 0x1e | r3 += var_1eh;
0x08001a70 mov r1, 5 | r1 = 5;
0x08001a74 stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc}");
0x08001a78 cmp r0, 0 |
| if (r0 != 0) {
0x08001a7c bne 0x8001908 | goto label_4;
| }
0x08001a80 ldrb r3, [sb, 0x31] | r3 = *((sb + 0x31));
0x08001a84 mov r0, r5 | r0 = r5;
0x08001a88 strb r3, [sp, 0x1e] | var_1eh = r3;
0x08001a8c mov r1, 4 | r1 = 4;
0x08001a90 add r3, sp, 0x1e | r3 += var_1eh;
0x08001a94 mov r2, 1 | r2 = 1;
0x08001a98 stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r3, r4, r7, r8, sb, fp, ip, pc}");
0x08001a9c cmp r0, 0 |
| if (r0 != 0) {
0x08001aa0 bne 0x8001908 | goto label_4;
| }
0x08001aa4 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x08001aa8 cmp r3, 6 |
| if (r3 > 6) {
0x08001aac bgt 0x80018e4 | goto label_5;
| }
| label_22:
0x08001ab0 ldr r3, [sb, 0x2c] | r3 = *((sb + 0x2c));
0x08001ab4 mov r1, r5 | r1 = r5;
0x08001ab8 mov r0, sb | r0 = sb;
0x08001abc ldr r3, [r3, 0x24] | r3 = *((r3 + 0x24));
0x08001ac0 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x08001ac4 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 < r0) {
0x08001ac8 blt 0x8001924 | goto label_6;
| }
0x08001acc tst r8, 4 |
| if ((r8 & 4) != 0) {
0x08001ad0 bne 0x80017e8 | goto label_7;
| }
0x08001ad4 ldr r3, [sb, 0x2c] | r3 = *((sb + 0x2c));
0x08001ad8 ldr r6, [r3, 0x2c] | r6 = *((r3 + 0x2c));
0x08001adc cmp r6, 0 |
| if (r6 == 0) {
0x08001ae0 beq 0x80017c4 | goto label_8;
| }
0x08001ae4 mov r1, r4 | r1 = r4;
0x08001ae8 mov r0, sb | r0 = sb;
0x08001aec mov r2, 1 | r2 = 1;
0x08001af0 blx r6 | uint32_t (*r6)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x08001af4 b 0x80017c0 | goto label_9;
| label_17:
0x08001af8 ldr r2, [sp, 0xc] | r2 = var_ch;
0x08001afc cmp r2, 2 |
0x08001b00 movweq r2, 0xffff | __asm ("movweq r2, 0xffff");
| if (r2 == 2) {
0x08001b04 ldrne r2, [r4, 0x3c] | r2 = *((r4 + 0x3c));
| }
| if (r2 == 2) {
0x08001b08 addne r2, r2, 1 | r2++;
| }
0x08001b0c str r2, [r4, 0x3c] | *((r4 + 0x3c)) = r2;
0x08001b10 b 0x800180c | goto label_10;
| label_19:
0x08001b14 cmp r0, 0 |
| if (r0 == 0) {
0x08001b18 beq 0x8001814 | goto label_11;
| }
0x08001b1c b 0x8001924 | goto label_6;
| label_13:
0x08001b20 mvn r6, 0x15 | r6 = ~0x15;
0x08001b24 b 0x8001838 | goto label_3;
| label_24:
0x08001b28 mvn r6, 1 | r6 = ~1;
0x08001b2c b 0x8001838 | goto label_3;
| label_21:
0x08001b30 mov r1, r6 | r1 = r6;
0x08001b34 b 0x80018d0 | goto label_12;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/modules/5.10.52-axis9/kernel/net/netfilter/ipset/ip_set.ko @ 0x8000d8c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.ip_set_flush_set () | void ip_set_flush_set (int32_t arg1) {
| int32_t var_0h;
| r0 = arg1;
0x08000d8c push {r4, lr} |
0x08000d90 mov r4, r0 | r4 = r0;
0x08000d94 ldr r3, [r0, 0x2c] | r3 = *((r0 + 0x2c));
0x08000d98 ldrb r2, [r3, 0x34] | r2 = *((r3 + 0x34));
0x08000d9c cmp r2, 0 |
| if (r2 == 0) {
0x08000da0 bne 0x8000dc4 |
0x08000da4 mov r3, sp | r3 = sp;
0x08000da8 bic r2, r3, 0x1fc0 | r2 = BIT_MASK (r3, 0x1fc0);
0x08000dac bic r2, r2, 0x3f | r2 = BIT_MASK (r2, 0x3f);
0x08000db0 ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x08000db4 add r3, r3, 0x200 | r3 += 0x200;
0x08000db8 add r3, r3, 1 | r3++;
0x08000dbc str r3, [r2, 4] | *((r2 + 4)) = r3;
0x08000dc0 ldr r3, [r0, 0x2c] | r3 = *((r0 + 0x2c));
| }
0x08000dc4 ldr r3, [r3, 0x1c] | r3 = *((r3 + 0x1c));
0x08000dc8 mov r0, r4 | r0 = r4;
0x08000dcc blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r0, r3);
0x08000dd0 ldr r3, [r4, 0x2c] | r3 = *((r4 + 0x2c));
0x08000dd4 ldrb r3, [r3, 0x34] | r3 = *((r3 + 0x34));
0x08000dd8 cmp r3, 0 |
0x08000ddc popne {r4, pc} |
0x08000de0 pop {r4, lr} |
0x08000de4 movw r1, 0x201 | r1 = 0x201;
0x08000de8 ldr r0, [pc] | r0 = *(0x8000de8);
0x08000dec stmdaeq r0, {r2, r5, r7, r8, sb, fp, ip, pc} | __asm ("stmdaeq r0, {r2, r5, r7, r8, sb, fp, ip, pc}");
0x08000df0 stmdaeq r0, {r4, r5, r6} | __asm ("stmdaeq r0, {r4, r5, r6}");
| }
[*] Function sprintf used 1 times ip_set.ko