[*] Binary protection state of ip_set_hash_netport.ko
No RELRO No Canary found NX disabled REL No RPATH No RUNPATH Symbols
[*] Function strcpy tear down of ip_set_hash_netport.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_netport.ko @ 0x8001050 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.hash_netport4_flush () | void hash_netport4_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;
0x08001050 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x08001054 mov r5, r0 | r5 = r0;
0x08001058 mov r7, 0 | r7 = 0;
0x0800105c sub sp, sp, 0x14 |
0x08001060 mov r3, sp | r3 = sp;
0x08001064 bic r3, r3, 0x1fc0 | r3 = BIT_MASK (r3, 0x1fc0);
0x08001068 bic r3, r3, 0x3f | r3 = BIT_MASK (r3, 0x3f);
0x0800106c str r3, [sp, 8] | var_8h = r3;
0x08001070 ldr r3, [r0, 0x54] | r3 = *((r0 + 0x54));
0x08001074 str r3, [sp, 0xc] | var_ch = r3;
0x08001078 ldr fp, [r3] | fp = *(r3);
| label_1:
0x0800107c ldrb r3, [fp, 8] | r3 = *(arg_8h);
0x08001080 cmp r3, 9 |
| if (r3 <= 9) {
0x08001084 subhi r3, r3, 0xa | r3 -= 0xa;
| }
| if (r3 <= 9) {
0x08001088 movhi r1, 1 | r1 = 1;
| }
| if (r3 > 9) {
0x0800108c movls r3, 1 | r3 = 1;
| }
| if (r3 <= 9) {
0x08001090 lslhi r3, r1, r3 | r3 = r1 << r3;
| }
0x08001094 cmp r7, r3 |
| if (r7 >= r3) {
0x08001098 bhs 0x8001174 | goto label_2;
| }
0x0800109c ldr r2, [sp, 8] | r2 = var_8h;
0x080010a0 lsl r1, r7, 3 | r1 = r7 << 3;
0x080010a4 str r1, [sp] | *(sp) = r1;
0x080010a8 ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x080010ac add r3, r3, 0x200 | r3 += 0x200;
0x080010b0 add r3, r3, 1 | r3++;
0x080010b4 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x080010b8 ldrb r0, [fp, 7] | r0 = *((fp + 7));
0x080010bc mov sb, 1 | sb = 1;
0x080010c0 mov r6, 0 | r6 = 0;
0x080010c4 cmp r0, 8 |
| if (r0 <= 8) {
0x080010c8 lslhi r4, r7, 0xa | r4 = r7 << 0xa;
| }
0x080010cc add r7, r7, 1 | r7++;
| if (r0 > 8) {
0x080010d0 movls r4, 0 | r4 = 0;
| }
0x080010d4 str r7, [sp, 4] | var_4h = r7;
0x080010d8 add r3, fp, r4, lsl 2 | r3 = fp + (r4 << 2);
0x080010dc lsl r8, r7, 0xa | r8 = r7 << 0xa;
0x080010e0 add sl, r3, 0x10 | sl = r3 + 0x10;
0x080010e4 b 0x8001108 | goto label_3;
| label_0:
0x080010e8 add r3, r4, 4 | r3 = r4 + 4;
0x080010ec mov r0, r7 | r0 = r7;
0x080010f0 mov r1, 0 | r1 = 0;
0x080010f4 add r3, fp, r3, lsl 2 | r3 = fp + (r3 << 2);
0x080010f8 str r6, [r3, 4] | *((r3 + 4)) = r6;
0x080010fc stmdaeq r0, {r1, r3, r5, sb, sl, fp, pc} | __asm ("stmdaeq r0, {r1, r3, r5, sb, sl, fp, pc}");
0x08001100 ldrb r0, [fp, 8] | r0 = *(arg_8h);
| do {
0x08001104 add r4, r4, 1 | r4++;
| label_3:
0x08001108 cmp r0, 9 |
| if (r0 > 9) {
0x0800110c lslls r3, sb, r0 | r3 = sb << r0;
| }
| if (r0 <= 9) {
0x08001110 movhi r3, r8 | r3 = r8;
| }
0x08001114 cmp r4, r3 |
| if (r4 >= r3) {
0x08001118 bhs 0x8001144 | goto label_4;
| }
0x0800111c ldr r7, [sl, 4]! | r7 = *((sl += 4));
0x08001120 cmp r7, 0 |
0x08001124 beq 0x8001104 |
| } while (r7 == 0);
0x08001128 ldrsb r3, [r5, 0x32] | r3 = *((r5 + 0x32));
0x0800112c cmp r3, 0 |
| if (r3 >= 0) {
0x08001130 bge 0x80010e8 | goto label_0;
| }
0x08001134 mov r1, r7 | r1 = r7;
0x08001138 mov r0, r5 | r0 = r5;
0x0800113c bl 0x8000cfc | hash_netport4_ext_cleanup ();
0x08001140 b 0x80010e8 | goto label_0;
| label_4:
0x08001144 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08001148 mov ip, 0 |
0x0800114c ldr r2, [sp] | r2 = *(sp);
0x08001150 movw r1, 0x201 | r1 = 0x201;
0x08001154 ldr r0, [pc, 0x34] | r0 = *(0x800118c);
0x08001158 ldr r7, [sp, 4] | r7 = var_4h;
0x0800115c str ip, [r3, r2] | *((r3 + r2)) = ip;
0x08001160 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08001164 add r3, r3, r2 | r3 += r2;
0x08001168 str ip, [r3, 4] | *((r3 + 4)) = ip;
0x0800116c stmdaeq r0, {r1, r2, r3, sb, sl, fp, pc} | __asm ("stmdaeq r0, {r1, r2, r3, sb, sl, fp, pc}");
0x08001170 b 0x800107c | goto label_1;
| label_2:
0x08001174 ldr r3, [sp, 0xc] | r3 = var_ch;
0x08001178 mov r2, 0x100 | r2 = 0x100;
0x0800117c mov r1, 0 | r1 = 0;
0x08001180 add r0, r3, 0x50 | r0 = r3 + 0x50;
0x08001184 add sp, sp, 0x14 |
0x08001188 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0800118c stmdaeq r0, {r1, sb, sl, fp, pc} | __asm ("stmdaeq r0, {r1, sb, sl, fp, pc}");
0x08001190 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_netport.ko @ 0x8000d80 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.hash_netport6_flush () | void hash_netport6_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;
0x08000d80 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x08000d84 mov r5, r0 | r5 = r0;
0x08000d88 mov r7, 0 | r7 = 0;
0x08000d8c sub sp, sp, 0x14 |
0x08000d90 mov r3, sp | r3 = sp;
0x08000d94 bic r3, r3, 0x1fc0 | r3 = BIT_MASK (r3, 0x1fc0);
0x08000d98 bic r3, r3, 0x3f | r3 = BIT_MASK (r3, 0x3f);
0x08000d9c str r3, [sp, 8] | var_8h = r3;
0x08000da0 ldr r3, [r0, 0x54] | r3 = *((r0 + 0x54));
0x08000da4 str r3, [sp, 0xc] | var_ch = r3;
0x08000da8 ldr fp, [r3] | fp = *(r3);
| label_1:
0x08000dac ldrb r3, [fp, 8] | r3 = *(arg_8h);
0x08000db0 cmp r3, 9 |
| if (r3 <= 9) {
0x08000db4 subhi r3, r3, 0xa | r3 -= 0xa;
| }
| if (r3 <= 9) {
0x08000db8 movhi r1, 1 | r1 = 1;
| }
| if (r3 > 9) {
0x08000dbc movls r3, 1 | r3 = 1;
| }
| if (r3 <= 9) {
0x08000dc0 lslhi r3, r1, r3 | r3 = r1 << r3;
| }
0x08000dc4 cmp r7, r3 |
| if (r7 >= r3) {
0x08000dc8 bhs 0x8000ea4 | goto label_2;
| }
0x08000dcc ldr r2, [sp, 8] | r2 = var_8h;
0x08000dd0 lsl r1, r7, 3 | r1 = r7 << 3;
0x08000dd4 str r1, [sp] | *(sp) = r1;
0x08000dd8 ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x08000ddc add r3, r3, 0x200 | r3 += 0x200;
0x08000de0 add r3, r3, 1 | r3++;
0x08000de4 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x08000de8 ldrb r0, [fp, 8] | r0 = *(arg_8h);
0x08000dec mov sb, 1 | sb = 1;
0x08000df0 mov r6, 0 | r6 = 0;
0x08000df4 cmp r0, 9 |
| if (r0 <= 9) {
0x08000df8 lslhi r4, r7, 0xa | r4 = r7 << 0xa;
| }
0x08000dfc add r7, r7, 1 | r7++;
| if (r0 > 9) {
0x08000e00 movls r4, 0 | r4 = 0;
| }
0x08000e04 str r7, [sp, 4] | var_4h = r7;
0x08000e08 add r3, fp, r4, lsl 2 | r3 = fp + (r4 << 2);
0x08000e0c lsl r8, r7, 0xa | r8 = r7 << 0xa;
0x08000e10 add sl, r3, 0x10 | sl = r3 + 0x10;
0x08000e14 b 0x8000e38 | goto label_3;
| label_0:
0x08000e18 add r3, r4, 4 | r3 = r4 + 4;
0x08000e1c mov r0, r7 | r0 = r7;
0x08000e20 mov r1, 0 | r1 = 0;
0x08000e24 add r3, fp, r3, lsl 2 | r3 = fp + (r3 << 2);
0x08000e28 str r6, [r3, 4] | *((r3 + 4)) = r6;
0x08000e2c stmdaeq r0, {r1, r3, r5, sb, sl, fp, pc} | __asm ("stmdaeq r0, {r1, r3, r5, sb, sl, fp, pc}");
0x08000e30 ldrb r0, [fp, 8] | r0 = *(arg_8h);
| do {
0x08000e34 add r4, r4, 1 | r4++;
| label_3:
0x08000e38 cmp r0, 9 |
| if (r0 > 9) {
0x08000e3c lslls r3, sb, r0 | r3 = sb << r0;
| }
| if (r0 <= 9) {
0x08000e40 movhi r3, r8 | r3 = r8;
| }
0x08000e44 cmp r4, r3 |
| if (r4 >= r3) {
0x08000e48 bhs 0x8000e74 | goto label_4;
| }
0x08000e4c ldr r7, [sl, 4]! | r7 = *((sl += 4));
0x08000e50 cmp r7, 0 |
0x08000e54 beq 0x8000e34 |
| } while (r7 == 0);
0x08000e58 ldrsb r3, [r5, 0x32] | r3 = *((r5 + 0x32));
0x08000e5c cmp r3, 0 |
| if (r3 >= 0) {
0x08000e60 bge 0x8000e18 | goto label_0;
| }
0x08000e64 mov r1, r7 | r1 = r7;
0x08000e68 mov r0, r5 | r0 = r5;
0x08000e6c bl 0x8000cfc | hash_netport4_ext_cleanup ();
0x08000e70 b 0x8000e18 | goto label_0;
| label_4:
0x08000e74 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000e78 mov ip, 0 |
0x08000e7c ldr r2, [sp] | r2 = *(sp);
0x08000e80 movw r1, 0x201 | r1 = 0x201;
0x08000e84 ldr r0, [pc, 0x34] | r0 = *(0x8000ebc);
0x08000e88 ldr r7, [sp, 4] | r7 = var_4h;
0x08000e8c str ip, [r3, r2] | *((r3 + r2)) = ip;
0x08000e90 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x08000e94 add r3, r3, r2 | r3 += r2;
0x08000e98 str ip, [r3, 4] | *((r3 + 4)) = ip;
0x08000e9c stmdaeq r0, {r1, r2, r3, sb, sl, fp, pc} | __asm ("stmdaeq r0, {r1, r2, r3, sb, sl, fp, pc}");
0x08000ea0 b 0x8000dac | goto label_1;
| label_2:
0x08000ea4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x08000ea8 mov r2, 0x400 | r2 = 0x400;
0x08000eac mov r1, 0 | r1 = 0;
0x08000eb0 add r0, r3, 0x5c | r0 = r3 + 0x5c;
0x08000eb4 add sp, sp, 0x14 |
0x08000eb8 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x08000ebc stmdaeq r0, {r1, sb, sl, fp, pc} | __asm ("stmdaeq r0, {r1, sb, sl, fp, pc}");
0x08000ec0 stmdaeq r0, {r4, r5, r6} | __asm ("stmdaeq r0, {r4, r5, r6}");
| }
[*] Function strcpy used 1 times ip_set_hash_netport.ko