[*] Binary protection state of libnetsnmpmibs.so.40.2.0
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of libnetsnmpmibs.so.40.2.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/libnetsnmpmibs.so.40.2.0 @ 0x2961c */
| #include <stdint.h>
|
; (fcn) sym.write_usmUserAuthKeyChange () | void write_usmUserAuthKeyChange (int16_t arg_23ch, int16_t arg_240h, int16_t arg1, int16_t arg2, uint32_t arg3, int16_t arg4) {
| int32_t var_0h;
| int32_t var_0h_2;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_21ch;
| int16_t var_220h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0002961c mvnsmi lr, sp, lsr 18 | __asm ("mvnsmi lr, sp, lsr 18");
0x00029620 mov r6, r1 | r6 = r1;
0x00029622 ldr r1, [pc, 0x178] |
0x00029624 mov r5, r3 | r5 = r3;
0x00029626 sub.w sp, sp, 0x220 |
0x0002962a ldr r3, [pc, 0x174] | r3 = *(0x297a2);
0x0002962c add.w r8, sp, 0x18 | r8 += var_18h;
0x00029630 add r1, pc | r1 = 0x52dd2;
0x00029632 ldr r7, [pc, 0x170] |
0x00029634 ldr.w ip, [sp, 0x23c] | ip = *(arg_23ch);
0x00029638 ldr r3, [r1, r3] |
0x0002963a add r7, pc | r7 = 0x52de4;
0x0002963c ldr r3, [r3] | r3 = imp.netsnmp_container_simple_free;
0x0002963e str r3, [sp, 0x21c] | var_21ch = r3;
0x00029640 mov.w r3, 0 | r3 = 0;
0x00029644 mov.w r3, 0x200 | r3 = 0x200;
0x00029648 str.w r3, [r8] | __asm ("str.w r3, [r8]");
| if (r0 != 0) {
0x0002964c cbnz r0, 0x29682 | goto label_2;
| }
0x0002964e ldr r3, [pc, 0x158] |
0x00029650 cmp r2, 4 |
0x00029652 add r3, pc | r3 = 0x52e00;
0x00029654 str r0, [r3, 0x24] | *((r3 + 0x24)) = r0;
0x00029656 it ne |
| if (r2 == 4) {
0x00029658 movne r0, 7 | r0 = 7;
| }
| if (r2 != 4) {
0x0002965a bne 0x29664 | goto label_1;
| }
0x0002965c clz r0, r5 | r0 &= r5;
0x00029660 lsrs r0, r0, 5 | r0 >>= 5;
0x00029662 lsls r0, r0, 3 | r0 <<= 3;
| do {
| label_1:
0x00029664 ldr r2, [pc, 0x144] |
0x00029666 ldr r3, [pc, 0x138] | r3 = *(0x297a2);
0x00029668 add r2, pc | r2 = 0x52e18;
0x0002966a ldr r3, [r2, r3] | r3 = imp.netsnmp_container_simple_free;
0x0002966c ldr r2, [r3] | r2 = imp.netsnmp_container_simple_free;
0x0002966e ldr r3, [sp, 0x21c] | r3 = var_21ch;
0x00029670 eors r2, r3 | r2 ^= r3;
0x00029672 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00029676 bne.w 0x29798 | goto label_3;
| }
0x0002967a add.w sp, sp, 0x220 |
0x0002967e pop.w {r4, r5, r6, r7, r8, pc} |
| label_2:
0x00029682 subs r4, r0, 1 | r4 = r0 - 1;
0x00029684 cmp r4, 4 |
| if (r4 <= 4) {
0x00029686 bhi 0x296cc |
| /* switch table (5 cases) at 0x2968c */
0x00029688 tbb [pc, r4] | __asm ("tbb [0x00029690]");
0x00029692 ldr r1, [sp, 0x240] | r1 = *(arg_240h);
0x00029694 mov r0, ip | r0 = ip;
0x00029696 blx 0x19464 | r0 = fprintf_chk ()
0x0002969a mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x0002969c cbz r0, 0x296cc | goto label_0;
| }
0x0002969e ldr r3, [pc, 0x110] |
0x000296a0 add r3, pc |
0x000296a2 ldr r3, [r3, 0x24] | r3 = imp.netsnmp_container_simple_free;
| if (r3 == 0) {
0x000296a4 cbz r3, 0x296cc | goto label_0;
| }
0x000296a6 ldr r0, [r0, 0x24] | r0 = *((r0 + 0x24));
| if (r0 != 0) {
0x000296a8 cbz r0, 0x296ae |
0x000296aa blx 0x18300 | fcn_00018300 ();
| }
0x000296ae ldr r3, [pc, 0x104] |
0x000296b0 add r3, pc | r3 = 0x52e6a;
0x000296b2 ldrd r2, r3, [r3, 0x28] | __asm ("ldrd r2, r3, [r3, 0x28]");
0x000296b6 strd r2, r3, [r4, 0x24] | __asm ("strd r2, r3, [r4, 0x24]");
0x000296ba b 0x296cc | goto label_0;
0x000296bc ldr r4, [pc, 0xf8] |
0x000296be add r4, pc | r4 = 0x52e7a;
0x000296c0 ldr r0, [r4, 0x28] | r0 = imp.netsnmp_container_simple_free;
| if (r0 == 0) {
0x000296c2 cbz r0, 0x296cc | goto label_0;
| }
0x000296c4 blx 0x18300 | fcn_00018300 ();
0x000296c8 movs r3, 0 | r3 = 0;
0x000296ca str r3, [r4, 0x28] | *((r4 + 0x28)) = r3;
| }
| label_0:
0x000296cc movs r0, 0 | r0 = 0;
0x000296ce b 0x29664 |
| } while (1);
0x000296d0 ldr r1, [sp, 0x240] | r1 = *(arg_240h);
0x000296d2 mov r0, ip | r0 = ip;
0x000296d4 blx 0x19464 | r0 = fprintf_chk ()
0x000296d8 mov r4, r0 | r4 = r0;
0x000296da cmp r0, 0 |
| if (r0 == 0) {
0x000296dc beq 0x29768 | goto label_4;
| }
0x000296de ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x000296e0 cmp r3, 0 |
| if (r3 == 0) {
0x000296e2 beq 0x29768 | goto label_4;
| }
0x000296e4 ldr r3, [pc, 0xd4] | r3 = *(0x297bc);
0x000296e6 ldrd r0, r1, [r0, 0x1c] | __asm ("ldrd r0, r1, [r0, 0x1c]");
0x000296e8 lsls r7, r0, 4 | r7 = r0 << 4;
0x000296ea ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x000296ec mov r2, r3 | r2 = r3;
0x000296ee str r3, [sp, 0x14] | var_14h = r3;
0x000296f0 movs r3, 0xa | r3 = 0xa;
0x000296f2 blx 0x16f5c | r0 = snmp_oid_compare ();
0x000296f6 cmp r0, 0 |
| if (r0 == 0) {
0x000296f8 beq 0x296cc | goto label_0;
| }
0x000296fa ldrd r2, r3, [r4, 0x24] | __asm ("ldrd r2, r3, [r4, 0x24]");
0x000296fe ldrd r0, r1, [r4, 0x1c] | __asm ("ldrd r0, r1, [r4, 0x1c]");
0x00029702 strd r6, r5, [sp] | __asm ("strd r6, r5, [sp]");
0x00029706 add r5, sp, 0x1c | r5 += var_1ch;
0x00029708 str.w r8, [sp, 0xc] | __asm ("str.w r8, [var_ch]");
0x0002970c str r5, [sp, 8] | var_8h = r5;
0x0002970e blx 0x19558 | r0 = fcn_00019558 ();
0x00029712 cmp r0, 0 |
| if (r0 != 0) {
0x00029714 bne 0x29790 | goto label_5;
| }
0x00029716 ldr r3, [pc, 0xa8] |
0x00029718 movs r2, 1 | r2 = 1;
0x0002971a ldr.w r1, [r8] | r1 = *(r8);
0x0002971e mov r0, r5 | r0 = r5;
0x00029720 add r3, pc | r3 = 0x52ee6;
0x00029722 str r2, [r3, 0x24] | *((r3 + 0x24)) = r2;
0x00029724 ldr r2, [r4, 0x24] | r2 = *((r4 + 0x24));
0x00029726 str r2, [r3, 0x28] | *((r3 + 0x28)) = r2;
0x00029728 ldr r2, [r4, 0x28] | r2 = *((r4 + 0x28));
0x0002972a str r2, [r3, 0x2c] | *((r3 + 0x2c)) = r2;
0x0002972c blx 0x19fb0 | fcn_00019fb0 ();
0x00029730 str r0, [r4, 0x24] | *((r4 + 0x24)) = r0;
| if (r0 == 0) {
0x00029732 cbz r0, 0x29794 | goto label_6;
| }
0x00029734 ldr.w r3, [r8] | r3 = *(r8);
0x00029738 str r3, [r4, 0x28] | *((r4 + 0x28)) = r3;
0x0002973a b 0x296cc | goto label_0;
0x0002973c ldr r1, [sp, 0x240] | r1 = *(arg_240h);
0x0002973e mov r0, ip | r0 = ip;
0x00029740 blx 0x19464 | r0 = fprintf_chk ()
0x00029744 mov r4, r0 | r4 = r0;
| if (r0 != 0) {
0x00029746 cbz r0, 0x29768 |
0x00029748 ldr r2, [pc, 0x78] | r2 = *(0x297c4);
0x0002974a movs r3, 0xa | r3 = 0xa;
0x0002974c ldrd r0, r1, [r0, 0x1c] | __asm ("ldrd r0, r1, [r0, 0x1c]");
0x00029750 ldr r2, [r7, r2] | r2 = *((r7 + r2));
0x00029752 str r2, [sp, 0x14] | var_14h = r2;
0x00029754 blx 0x16f5c | r0 = snmp_oid_compare ();
| if (r0 != 0) {
0x00029758 cbnz r0, 0x2976c | goto label_7;
| }
0x0002975a bics r3, r5, 0x20 | __asm ("bics r3, r5, 0x20");
0x0002975e ite ne |
| if (r0 == 0) {
0x00029760 movne r0, 1 | r0 = 1;
| }
| if (r0 != 0) {
0x00029762 moveq r0, 0 | r0 = 0;
| }
0x00029764 lsls r0, r0, 3 | r0 <<= 3;
0x00029766 b 0x29664 | goto label_1;
| }
| label_4:
0x00029768 movs r0, 0x12 | r0 = 0x12;
0x0002976a b 0x29664 | goto label_1;
| label_7:
0x0002976c ldr r2, [pc, 0x58] | r2 = *(0x297c8);
0x0002976e movs r3, 0xa | r3 = 0xa;
0x00029770 ldrd r0, r1, [r4, 0x1c] | __asm ("ldrd r0, r1, [r4, 0x1c]");
0x00029774 ldr r2, [r7, r2] | r2 = *((r7 + r2));
0x00029776 str r2, [sp, 0x14] | var_14h = r2;
0x00029778 blx 0x16f5c | r0 = snmp_oid_compare ();
0x0002977c cmp r0, 0 |
| if (r0 != 0) {
0x0002977e bne 0x296cc | goto label_0;
| }
0x00029780 cmp r5, 0 |
0x00029782 it ne |
| if (r5 != 0) {
0x00029784 cmpne r5, 0x28 | __asm ("cmpne r5, 0x28");
| }
0x00029786 ite ne |
| if (r5 == 0) {
0x00029788 movne r5, 1 | r5 = 1;
| }
| if (r5 != 0) {
0x0002978a moveq r5, 0 | r5 = 0;
| }
0x0002978c lsls r0, r5, 3 | r0 = r5 << 3;
0x0002978e b 0x29664 | goto label_1;
| label_5:
0x00029790 movs r0, 5 | r0 = 5;
0x00029792 b 0x29664 | goto label_1;
| label_6:
0x00029794 movs r0, 0xd | r0 = 0xd;
0x00029796 b 0x29664 | goto label_1;
| label_3:
0x00029798 blx 0x19504 | fcn_00019504 ();
0x0002979c str r4, [r1, 0x3c] | *((r1 + 0x3c)) = r4;
0x0002979e movs r2, r0 | r2 = r0;
0x000297a0 asrs r4, r2, 0x12 | r4 = r2 >> 0x12;
0x000297a2 movs r0, r0 |
0x000297a4 str r2, [r0, 0x3c] | *((r0 + 0x3c)) = r2;
0x000297a6 movs r2, r0 | r2 = r0;
0x000297a8 invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libnetsnmpmibs.so.40.2.0 @ 0x294a8 */
| #include <stdint.h>
|
; (fcn) sym.write_usmUserAuthProtocol () | void write_usmUserAuthProtocol (int16_t arg_24h, uint32_t arg1, int16_t arg2, uint32_t arg3, int16_t arg4) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000294a8 ssub8mi fp, ip, r0 | __asm ("ssub8mi fp, ip, r0");
0x000294ac ldr r5, [pc, 0x140] |
0x000294ae sub sp, 0xc |
0x000294b0 add r5, pc | r5 = 0x52aa4;
0x000294b2 cmp r0, 5 |
| if (r0 > 5) {
0x000294b4 bhi 0x294fa | goto label_1;
| }
| /* switch table (6 cases) at 0x294ba */
0x000294b6 tbb [pc, r0] | __asm ("tbb [0x000294bc]");
0x000294c0 ldrd r0, r1, [sp, 0x24] | __asm ("ldrd r0, r1, [arg_24h]");
0x000294c4 blx 0x19464 | r0 = fprintf_chk ()
0x000294c8 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x000294ca cbz r0, 0x294fa | goto label_1;
| }
0x000294cc ldr r3, [pc, 0x124] |
0x000294ce add r3, pc |
0x000294d0 ldr r3, [r3, 0x18] | r3 = imp.netsnmp_container_simple_free;
| if (r3 == 0) {
0x000294d2 cbz r3, 0x294fa | goto label_1;
| }
0x000294d4 ldr r0, [r0, 0x1c] | r0 = *((r0 + 0x1c));
| if (r0 != 0) {
0x000294d6 cbz r0, 0x294dc |
0x000294d8 blx 0x18300 | fcn_00018300 ();
| }
0x000294dc ldr r3, [pc, 0x118] |
0x000294de add r3, pc | r3 = 0x52ada;
0x000294e0 ldrd r2, r3, [r3, 0x1c] | __asm ("ldrd r2, r3, [r3, 0x1c]");
0x000294e4 strd r2, r3, [r4, 0x1c] | __asm ("strd r2, r3, [r4, 0x1c]");
0x000294e8 b 0x294fa | goto label_1;
0x000294ea ldr r4, [pc, 0x110] |
0x000294ec add r4, pc | r4 = 0x52aee;
0x000294ee ldr r0, [r4, 0x1c] | r0 = imp.netsnmp_container_simple_free;
| if (r0 == 0) {
0x000294f0 cbz r0, 0x294fa | goto label_1;
| }
0x000294f2 blx 0x18300 | fcn_00018300 ();
0x000294f6 movs r3, 0 | r3 = 0;
0x000294f8 str r3, [r4, 0x1c] | *((r4 + 0x1c)) = r3;
| do {
| label_1:
0x000294fa movs r0, 0 | r0 = 0;
| label_0:
0x000294fc add sp, 0xc |
0x000294fe pop {r4, r5, r6, r7, pc} |
0x00029500 mov r6, r1 | r6 = r1;
0x00029502 ldrd r0, r1, [sp, 0x24] | __asm ("ldrd r0, r1, [arg_24h]");
0x00029506 blx 0x19464 | r0 = fprintf_chk ()
0x0002950a mov r7, r0 | r7 = r0;
0x0002950c cmp r0, 0 |
| if (r0 == 0) {
0x0002950e beq 0x295b8 | goto label_4;
| }
0x00029510 ldr r3, [r0, 0x54] | r3 = *((r0 + 0x54));
0x00029512 lsrs r4, r4, 2 | r4 >>= 2;
0x00029514 mov r0, r6 | r0 = r6;
0x00029516 mov r1, r4 | r1 = r4;
0x00029518 subs r3, 1 | r3--;
0x0002951a cmp r3, 2 |
0x0002951c ldr r3, [pc, 0xe0] | r3 = *(0x29600);
0x0002951e ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00029520 mov r2, r3 | r2 = r3;
0x00029522 str r3, [sp, 4] | var_4h = r3;
0x00029524 mov.w r3, 0xa | r3 = 0xa;
| if (r3 > 2) {
0x00029528 bhi 0x295a6 | goto label_5;
| }
0x0002952a blx 0x16f5c | r0 = snmp_oid_compare ();
0x0002952e cmp r0, 0 |
| if (r0 != 0) {
0x00029530 bne 0x29592 | goto label_6;
| }
0x00029532 ldr r3, [pc, 0xd0] | r3 = *(0x29606);
0x00029534 ldrd r0, r1, [r7, 0x34] | __asm ("ldrd r0, r1, [r7, 0x34]");
0x00029538 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x0002953a str r3, [sp, 4] | var_4h = r3;
0x0002953c movs r3, 0xa | r3 = 0xa;
0x0002953e ldr r2, [sp, 4] | r2 = var_4h;
0x00029540 blx 0x16f5c | r0 = snmp_oid_compare ();
| if (r0 != 0) {
0x00029544 cbnz r0, 0x295a2 | goto label_7;
| }
0x00029546 ldr r3, [pc, 0xc0] |
0x00029548 add r3, pc | r3 = 0x52b56;
| label_2:
0x0002954a ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0002954c mov r0, r6 | r0 = r6;
0x0002954e mov r1, r4 | r1 = r4;
0x00029550 str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
0x00029552 ldr r2, [r7, 0x20] | r2 = *((r7 + 0x20));
0x00029554 str r2, [r3, 0x20] | *((r3 + 0x20)) = r2;
0x00029556 movs r2, 1 | r2 = 1;
0x00029558 str r2, [r3, 0x18] | *((r3 + 0x18)) = r2;
0x0002955a blx 0x186bc | fcn_000186bc ();
0x0002955e str r0, [r7, 0x1c] | *((r7 + 0x1c)) = r0;
0x00029560 cmp r0, 0 |
| if (r0 == 0) {
0x00029562 beq 0x295ec | goto label_8;
| }
0x00029564 str r4, [r7, 0x20] | *((r7 + 0x20)) = r4;
0x00029566 b 0x294fa |
| } while (1);
0x00029568 ldr r3, [pc, 0xa0] |
0x0002956a cmp r2, 6 |
0x0002956c mov.w r1, 0 | r1 = 0;
0x00029570 it ne |
| if (r2 == 6) {
0x00029572 movne r0, 7 | r0 = 7;
| }
0x00029574 add r3, pc | r3 = 0x52b84;
0x00029576 str r1, [r3, 0x18] | *((r3 + 0x18)) = r1;
| if (r2 != 6) {
0x00029578 bne 0x294fc | goto label_0;
| }
0x0002957a cmp.w r4, 0x108 |
0x0002957e it hi |
| if (r4 > 0x108) {
0x00029580 movhi r0, 8 | r0 = 8;
| goto label_9;
| }
| if (r4 > 0x108) {
| label_9:
0x00029582 bhi 0x294fc | goto label_0;
| }
0x00029584 ands r3, r4, 3 | r3 = r4 & 3;
0x00029588 it ne |
| if (r3 == r4) {
0x0002958a movne r3, 1 | r3 = 1;
| }
0x0002958c lsls r0, r3, 3 | r0 = r3 << 3;
0x0002958e add sp, 0xc |
0x00029590 pop {r4, r5, r6, r7, pc} |
| label_6:
0x00029592 ldrd r2, r3, [r7, 0x1c] | __asm ("ldrd r2, r3, [r7, 0x1c]");
0x00029596 mov r1, r4 | r1 = r4;
0x00029598 mov r0, r6 | r0 = r6;
0x0002959a blx 0x16f5c | r0 = snmp_oid_compare ();
0x0002959e cmp r0, 0 |
| if (r0 == 0) {
0x000295a0 beq 0x294fa | goto label_1;
| }
| label_7:
0x000295a2 movs r0, 0xc | r0 = 0xc;
0x000295a4 b 0x294fc | goto label_0;
| label_5:
0x000295a6 blx 0x16f5c | r0 = snmp_oid_compare ();
| if (r0 != 0) {
0x000295aa cbnz r0, 0x295bc | goto label_10;
| }
| label_3:
0x000295ac ldr r3, [r7, 0x14] | r3 = *((r7 + 0x14));
0x000295ae cmp r3, 0 |
| if (r3 == 0) {
0x000295b0 beq 0x294fa | goto label_1;
| }
0x000295b2 ldr r3, [pc, 0x5c] |
0x000295b4 add r3, pc | r3 = 0x52bca;
0x000295b6 b 0x2954a | goto label_2;
| label_4:
0x000295b8 movs r0, 0x12 | r0 = 0x12;
0x000295ba b 0x294fc | goto label_0;
| label_10:
0x000295bc ldr r3, [pc, 0x54] | r3 = *(0x29614);
0x000295be mov r1, r4 | r1 = r4;
0x000295c0 mov r0, r6 | r0 = r6;
0x000295c2 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x000295c4 mov r2, r3 | r2 = r3;
0x000295c6 str r3, [sp, 4] | var_4h = r3;
0x000295c8 movs r3, 0xa | r3 = 0xa;
0x000295ca blx 0x16f5c | r0 = snmp_oid_compare ();
0x000295ce cmp r0, 0 |
| if (r0 == 0) {
0x000295d0 beq 0x295ac | goto label_3;
| }
0x000295d2 ldr r3, [pc, 0x44] | r3 = *(0x2961a);
0x000295d4 mov r1, r4 | r1 = r4;
0x000295d6 mov r0, r6 | r0 = r6;
0x000295d8 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x000295da str r3, [sp, 4] | var_4h = r3;
0x000295dc movs r3, 0xa | r3 = 0xa;
0x000295de ldr r2, [sp, 4] | r2 = var_4h;
0x000295e0 blx 0x16f5c | r0 = snmp_oid_compare ();
0x000295e4 cmp r0, 0 |
| if (r0 == 0) {
0x000295e6 beq 0x295ac | goto label_3;
| }
0x000295e8 movs r0, 0xa | r0 = 0xa;
0x000295ea b 0x294fc | goto label_0;
| label_8:
0x000295ec movs r0, 0xd | r0 = 0xd;
0x000295ee b 0x294fc | goto label_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/libnetsnmpmibs.so.40.2.0 @ 0x29c74 */
| #include <stdint.h>
|
; (fcn) sym.write_usmUserCloneFrom () | uint32_t write_usmUserCloneFrom (int16_t arg_24h, uint32_t arg1, int16_t arg2, uint32_t arg3, int16_t arg4) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
| if (r0 == 0) {
0x00029c74 cbnz r0, 0x29c8c |
0x00029c76 cmp r2, 6 |
| if (r2 != 6) {
0x00029c78 bne 0x29c94 | goto label_2;
| }
0x00029c7a cmp.w r3, 0x108 |
| if (r3 > 0x108) {
0x00029c7e bhi 0x29cb8 | goto label_3;
| }
0x00029c80 ands r3, r3, 3 | r3 &= 3;
0x00029c84 it ne |
| if (r3 == r3) {
0x00029c86 movne r3, 1 | r3 = 1;
| }
0x00029c88 lsls r0, r3, 3 | r0 = r3 << 3;
0x00029c8a bx lr | return r0;
| }
0x00029c8c cmp r0, 1 |
| if (r0 != 1) {
0x00029c8e beq 0x29c98 |
0x00029c90 movs r0, 0 | r0 = 0;
0x00029c92 bx lr | return r0;
| label_2:
0x00029c94 movs r0, 7 | r0 = 7;
0x00029c96 bx lr | return r0;
| }
0x00029c98 push {r4, r5, r6, r7, lr} |
0x00029c9a sub sp, 0xc |
0x00029c9c mov r5, r1 | r5 = r1;
0x00029c9e ldrd r0, r1, [sp, 0x24] | __asm ("ldrd r0, r1, [arg_24h]");
0x00029ca2 str r3, [sp, 4] | var_4h = r3;
0x00029ca4 blx 0x19464 | fprintf_chk ()
0x00029ca8 ldr r3, [sp, 4] | r3 = var_4h;
0x00029caa mov r6, r0 | r6 = r0;
| if (r0 == 0) {
0x00029cac cbz r0, 0x29cfa | goto label_4;
| }
0x00029cae ldr r2, [r0, 0x14] | r2 = *((r0 + 0x14));
0x00029cb0 cbz r2, 0x29cbc |
| while (r0 == 0) {
| label_0:
0x00029cb2 movs r0, 0 | r0 = 0;
| label_1:
0x00029cb4 add sp, 0xc |
0x00029cb6 pop {r4, r5, r6, r7, pc} |
| label_3:
0x00029cb8 movs r0, 8 | r0 = 8;
0x00029cba bx lr | return r0;
0x00029cbc lsrs r4, r3, 2 | r4 = r3 >> 2;
0x00029cbe mov r0, r5 | r0 = r5;
0x00029cc0 mov r1, r4 | r1 = r4;
0x00029cc2 blx 0x19464 | r0 = fprintf_chk ()
0x00029cc6 mov r7, r0 | r7 = r0;
| if (r0 == 0) {
0x00029cc8 cbz r0, 0x29cfa | goto label_4;
| }
0x00029cca ldr r3, [r0, 0x54] | r3 = *((r0 + 0x54));
0x00029ccc cmp r3, 1 |
| if (r3 != 1) {
0x00029cce bne 0x29cfa | goto label_4;
| }
0x00029cd0 mov r1, r4 | r1 = r4;
0x00029cd2 mov r0, r5 | r0 = r5;
0x00029cd4 blx 0x186bc | r0 = fcn_000186bc ();
0x00029cd8 mov r3, r0 | r3 = r0;
0x00029cda mov r1, r6 | r1 = r6;
0x00029cdc mov r0, r7 | r0 = r7;
0x00029cde str r3, [r6, 0x14] | *((r6 + 0x14)) = r3;
0x00029ce0 blx 0x19b70 | fcn_00019b70 ();
0x00029ce4 mov r0, r6 | r0 = r6;
0x00029ce6 blx 0x19d30 | r0 = fcn_00019d30 ();
0x00029cea cmp r0, 0 |
0x00029cec beq 0x29cb2 |
| }
0x00029cee ldr r3, [r6, 0x54] | r3 = *((r6 + 0x54));
0x00029cf0 cmp r3, 3 |
0x00029cf2 itt eq |
| if (r3 != 3) {
0x00029cf4 moveq r3, 2 | r3 = 2;
| }
| if (r3 != 3) {
0x00029cf6 streq r3, [r6, 0x54] | *((r6 + 0x54)) = r3;
| }
0x00029cf8 b 0x29cb2 | goto label_0;
| label_4:
0x00029cfa movs r0, 0x12 | r0 = 0x12;
0x00029cfc b 0x29cb4 | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libnetsnmpmibs.so.40.2.0 @ 0x29958 */
| #include <stdint.h>
|
; (fcn) sym.write_usmUserPrivKeyChange () | void write_usmUserPrivKeyChange (int16_t arg_1ch, int16_t arg_20h, int16_t arg_24h, int16_t arg_28h, int16_t arg_3ch, int16_t arg_40h, int16_t arg_54h, int16_t arg_58h, int16_t arg_64h, int16_t arg_68h, int16_t arg_8ch, int16_t arg_28ch, int16_t arg_48ch, int16_t arg_4b4h, int16_t arg_4b8h, int16_t arg1, int16_t arg2, uint32_t arg3, int16_t arg4) {
| int32_t var_48ch;
| int16_t var_494h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_14h_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00029958 push.w {r4, r5, r6, r7, r8, sb, lr} |
0x0002995c mov r6, r1 | r6 = r1;
0x0002995e ldr r1, [pc, 0x1b8] |
0x00029960 mov r5, r3 | r5 = r3;
0x00029962 subw sp, sp, 0x494 | __asm ("subw sp, sp, 0x494");
0x00029966 ldr r3, [pc, 0x1b4] | r3 = *(0x29b1e);
0x00029968 add r7, sp, 0x1c | r7 += arg_1ch;
0x0002996a add r1, pc | r1 = 0x53488;
0x0002996c ldr.w r8, [pc, 0x1b0] | r8 = *(0x00029b20);
0x00029970 ldr.w ip, [sp, 0x4b4] | ip = *(arg_4b4h);
0x00029974 ldr r3, [r1, r3] |
0x00029976 add r8, pc | r8 += pc;
0x00029978 ldr r3, [r3] | r3 = imp.netsnmp_container_simple_free;
0x0002997a str.w r3, [sp, 0x48c] | __asm ("str.w r3, [arg_48ch]");
0x0002997e mov.w r3, 0 | r3 = 0;
0x00029982 mov.w r3, 0x200 | r3 = 0x200;
0x00029984 strb r0, [r0, 0xc] | *((r0 + 0xc)) = r0;
0x00029986 str r3, [r7] | *(r7) = r3;
| if (r0 != 0) {
0x00029988 cbnz r0, 0x299c0 | goto label_2;
| }
0x0002998a ldr r3, [pc, 0x198] |
0x0002998c cmp r2, 4 |
0x0002998e add r3, pc | r3 = 0x534b8;
0x00029990 str r0, [r3, 0x3c] | *((r3 + 0x3c)) = r0;
0x00029992 it ne |
| if (r2 == 4) {
0x00029994 movne r0, 7 | r0 = 7;
| }
| if (r2 != 4) {
0x00029996 bne 0x299a0 | goto label_1;
| }
0x00029998 clz r0, r5 | r0 &= r5;
0x0002999c lsrs r0, r0, 5 | r0 >>= 5;
0x0002999e lsls r0, r0, 3 | r0 <<= 3;
| do {
| label_1:
0x000299a0 ldr r2, [pc, 0x184] |
0x000299a2 ldr r3, [pc, 0x178] | r3 = *(0x29b1e);
0x000299a4 add r2, pc | r2 = 0x534d0;
0x000299a6 ldr r3, [r2, r3] | r3 = imp.netsnmp_container_simple_free;
0x000299a8 ldr r2, [r3] | r2 = imp.netsnmp_container_simple_free;
0x000299aa ldr.w r3, [sp, 0x48c] | r3 = *(arg_48ch);
0x000299ae eors r2, r3 | r2 ^= r3;
0x000299b0 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000299b4 bne.w 0x29b12 | goto label_3;
| }
0x000299b8 addw sp, sp, 0x494 | __asm ("addw sp, var_494h");
0x000299bc pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_2:
0x000299c0 subs r4, r0, 1 | r4 = r0 - 1;
0x000299c2 cmp r4, 4 |
| if (r4 <= 4) {
0x000299c4 bhi 0x29a0c |
| /* switch table (5 cases) at 0x299ca */
0x000299c6 tbb [pc, r4] | __asm ("tbb [0x000299cc]");
0x000299d0 ldr.w r1, [sp, 0x4b8] | r1 = *(arg_4b8h);
0x000299d4 mov r0, ip | r0 = ip;
0x000299d6 blx 0x19464 | r0 = fprintf_chk ()
0x000299da mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x000299dc cbz r0, 0x29a0c | goto label_0;
| }
0x000299de ldr r3, [pc, 0x14c] |
0x000299e0 add r3, pc |
0x000299e2 ldr r3, [r3, 0x3c] | r3 = imp.netsnmp_container_simple_free;
| if (r3 == 0) {
0x000299e4 cbz r3, 0x29a0c | goto label_0;
| }
0x000299e6 ldr r0, [r0, 0x44] | r0 = *((r0 + 0x44));
| if (r0 != 0) {
0x000299e8 cbz r0, 0x299ee |
0x000299ea blx 0x18300 | fcn_00018300 ();
| }
0x000299ee ldr r3, [pc, 0x140] |
0x000299f0 add r3, pc | r3 = 0x53526;
0x000299f2 ldrd r2, r3, [r3, 0x40] | __asm ("ldrd r2, r3, [r3, 0x40]");
0x000299f6 strd r2, r3, [r4, 0x44] | __asm ("strd r2, r3, [r4, 0x44]");
0x000299fa b 0x29a0c | goto label_0;
0x000299fc ldr r4, [pc, 0x134] |
0x000299fe add r4, pc | r4 = 0x53536;
0x00029a00 ldr r0, [r4, 0x40] | r0 = imp.netsnmp_container_simple_free;
| if (r0 == 0) {
0x00029a02 cbz r0, 0x29a0c | goto label_0;
| }
0x00029a04 blx 0x18300 | fcn_00018300 ();
0x00029a08 movs r3, 0 | r3 = 0;
0x00029a0a str r3, [r4, 0x40] | *((r4 + 0x40)) = r3;
| }
| label_0:
0x00029a0c movs r0, 0 | r0 = 0;
0x00029a0e b 0x299a0 |
| } while (1);
0x00029a10 ldr.w r1, [sp, 0x4b8] | r1 = *(arg_4b8h);
0x00029a14 mov r0, ip | r0 = ip;
0x00029a16 blx 0x19464 | r0 = fprintf_chk ()
0x00029a1a mov r4, r0 | r4 = r0;
0x00029a1c cmp r0, 0 |
| if (r0 == 0) {
0x00029a1e beq 0x29b06 | goto label_4;
| }
0x00029a20 ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x00029a22 cmp r3, 0 |
| if (r3 == 0) {
0x00029a24 beq 0x29b06 | goto label_4;
| }
0x00029a26 ldrd r0, r1, [r0, 0x34] | __asm ("ldrd r0, r1, [r0, 0x34]");
0x00029a2a blx 0x1897c | fcn_0001897c ();
0x00029a2e ldr r3, [pc, 0x108] | r3 = *(0x29b3a);
0x00029a30 mov sb, r0 | sb = r0;
0x00029a32 ldrd r0, r1, [r4, 0x34] | __asm ("ldrd r0, r1, [r4, 0x34]");
0x00029a36 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00029a3a mov r2, r3 | r2 = r3;
0x00029a3c str r3, [sp, 0x14] | var_14h_2 = r3;
0x00029a3e movs r3, 0xa | r3 = 0xa;
0x00029a40 blx 0x16f5c | r0 = snmp_oid_compare ();
0x00029a44 cmp r0, 0 |
| if (r0 == 0) {
0x00029a46 beq 0x29a0c | goto label_0;
| }
0x00029a48 cmp.w r5, sb, lsl 1 |
| if (r5 < sb) {
0x00029a4c bhs 0x29a9a |
0x00029a4e add.w r8, sp, 0x20 | r8 += arg_20h;
0x00029a52 movs r2, 0x6c | r2 = 0x6c;
0x00029a54 movs r1, 0 | r1 = 0;
0x00029a56 mov r0, r8 | r0 = r8;
0x00029a58 blx 0x17c80 | fcn_00017c80 ();
0x00029a5c ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00029a5e mov r1, r6 | r1 = r6;
0x00029a60 add r6, sp, 0x28c | r6 += arg_28ch;
0x00029a62 mov r2, r5 | r2 = r5;
0x00029a64 mov r0, r6 | r0 = r6;
0x00029a66 str r3, [sp, 0x24] | *(arg_24h) = r3;
0x00029a68 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00029a6a str r3, [sp, 0x28] | *(arg_28h) = r3;
0x00029a6c ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00029a6e str r3, [sp, 0x3c] | *(arg_3ch) = r3;
0x00029a70 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x00029a72 str r3, [sp, 0x40] | *(arg_40h) = r3;
0x00029a74 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00029a76 str r3, [sp, 0x54] | *(arg_54h) = r3;
0x00029a78 ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x00029a7a str r3, [sp, 0x58] | *(arg_58h) = r3;
0x00029a7c mov.w r3, 0x200 | r3 = 0x200;
0x00029a80 blx 0x18588 | fcn_00018588 ();
0x00029a84 mov.w r1, 0x200 | r1 = 0x200;
0x00029a88 mov r0, r8 | r0 = r8;
0x00029a8a str r6, [sp, 0x64] | *(arg_64h) = r6;
0x00029a8c str r5, [sp, 0x68] | *(arg_68h) = r5;
0x00029a8e blx 0x19b28 | r0 = fcn_00019b28 ();
0x00029a92 cmp r0, 0 |
| if (r0 != 0) {
0x00029a94 bne 0x29b0a | goto label_5;
| }
0x00029a96 ldrd r6, r5, [sp, 0x64] | __asm ("ldrd r6, r5, [arg_64h]");
| }
0x00029a9a ldrd r2, r3, [r4, 0x44] | __asm ("ldrd r2, r3, [r4, 0x44]");
0x00029a9e ldrd r0, r1, [r4, 0x1c] | __asm ("ldrd r0, r1, [r4, 0x1c]");
0x00029aa2 strd r6, r5, [sp] | __asm ("strd r6, r5, [sp]");
0x00029aa6 add r5, sp, 0x8c | r5 += arg_8ch;
0x00029aa8 str r7, [sp, 0xc] | var_ch = r7;
0x00029aaa str r5, [sp, 8] | var_8h = r5;
0x00029aac blx 0x19558 | r0 = fcn_00019558 ();
| if (r0 != 0) {
0x00029ab0 cbnz r0, 0x29b0a | goto label_5;
| }
0x00029ab2 ldr r3, [pc, 0x88] |
0x00029ab4 movs r2, 1 | r2 = 1;
0x00029ab6 ldr r1, [r7] | r1 = *(r7);
0x00029ab8 mov r0, r5 | r0 = r5;
0x00029aba add r3, pc | r3 = 0x535fc;
0x00029abc str r2, [r3, 0x3c] | *((r3 + 0x3c)) = r2;
0x00029abe ldr r2, [r4, 0x44] | r2 = *((r4 + 0x44));
0x00029ac0 str r2, [r3, 0x40] | *((r3 + 0x40)) = r2;
0x00029ac2 ldr r2, [r4, 0x48] | r2 = *((r4 + 0x48));
0x00029ac4 str r2, [r3, 0x44] | *((r3 + 0x44)) = r2;
0x00029ac6 blx 0x19fb0 | fcn_00019fb0 ();
0x00029aca str r0, [r4, 0x44] | *((r4 + 0x44)) = r0;
| if (r0 == 0) {
0x00029acc cbz r0, 0x29b0e | goto label_6;
| }
0x00029ace ldr r3, [r7] | r3 = *(r7);
0x00029ad0 str r3, [r4, 0x48] | *((r4 + 0x48)) = r3;
0x00029ad2 b 0x29a0c | goto label_0;
0x00029ad4 ldr.w r1, [sp, 0x4b8] | r1 = *(arg_4b8h);
0x00029ad8 mov r0, ip | r0 = ip;
0x00029ada blx 0x19464 | r0 = fprintf_chk ()
| if (r0 == 0) {
0x00029ade cbz r0, 0x29b06 | goto label_4;
| }
0x00029ae0 ldrd r0, r1, [r0, 0x34] | __asm ("ldrd r0, r1, [r0, 0x34]");
0x00029ae4 blx 0x18e20 | r0 = fcn_00018e20 ();
| if (r0 == 0) {
0x00029ae8 cbz r0, 0x29b0a | goto label_5;
| }
0x00029aea ldr r2, [r0] | r2 = *(r0);
0x00029aec ldr r3, [r0, 0x10] | r3 = *((r0 + 0x10));
0x00029aee cmp r2, 1 |
0x00029af0 it eq |
| if (r2 != 1) {
0x00029af2 lsleq r3, r3, 1 | r3 <<= 1;
| }
0x00029af4 cmp r5, 0 |
| if (r5 == 0) {
0x00029af6 beq 0x29a0c | goto label_0;
| }
0x00029af8 cmp.w r5, r3, lsl 1 |
0x00029afc ite ne |
| if (r5 == r3) {
0x00029afe movne r0, 1 | r0 = 1;
| }
| if (r5 != r3) {
0x00029b00 moveq r0, 0 | r0 = 0;
| }
0x00029b02 lsls r0, r0, 3 | r0 <<= 3;
0x00029b04 b 0x299a0 | goto label_1;
| label_4:
0x00029b06 movs r0, 0x12 | r0 = 0x12;
0x00029b08 b 0x299a0 | goto label_1;
| label_5:
0x00029b0a movs r0, 5 | r0 = 5;
0x00029b0c b 0x299a0 | goto label_1;
| label_6:
0x00029b0e movs r0, 0xd | r0 = 0xd;
0x00029b10 b 0x299a0 | goto label_1;
| label_3:
0x00029b12 blx 0x19504 | fcn_00019504 ();
0x00029b16 nop |
0x00029b18 str r2, [r2, 8] | *((r2 + 8)) = r2;
0x00029b1a movs r2, r0 | r2 = r0;
0x00029b1c asrs r4, r2, 0x12 | r4 = r2 >> 0x12;
0x00029b1e movs r0, r0 |
0x00029b20 str r6, [r0, 8] | *((r0 + 8)) = r6;
0x00029b22 movs r2, r0 | r2 = r0;
| if (r6 == 0) {
0x00029b24 cbz r6, 0x29ba6 | void (*0x29ba6)() ();
| }
0x00029b26 movs r2, r0 | r2 = r0;
0x00029b28 str r0, [r3, 4] | *((r3 + 4)) = r0;
0x00029b2a movs r2, r0 | r2 = r0;
| if (r4 == 0) {
0x00029b2c cbz r4, 0x29b9a | void (*0x29b9a)() ();
| }
0x00029b2e movs r2, r0 | r2 = r0;
| if (r4 == 0) {
0x00029b30 cbz r4, 0x29b9a | void (*0x29b9a)() ();
| }
0x00029b32 movs r2, r0 | r2 = r0;
| if (r6 == 0) {
0x00029b34 cbz r6, 0x29b9a | void (*0x29b9a)() ();
| }
0x00029b36 movs r2, r0 | r2 = r0;
0x00029b38 asrs r4, r1, 0xc | r4 = r1 >> 0xc;
0x00029b3a movs r0, r0 |
0x00029b3c uxtb r2, r2 | r2 = (int8_t) r2;
0x00029b3e movs r2, r0 | r2 = 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/libnetsnmpmibs.so.40.2.0 @ 0x297cc */
| #include <stdint.h>
|
; (fcn) sym.write_usmUserPrivProtocol () | void write_usmUserPrivProtocol (int16_t arg_24h, uint32_t arg1, int16_t arg2, uint32_t arg3, int16_t arg4) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000297cc push {r4, r5, r6, r7, lr} |
0x000297ce mov r4, r3 | r4 = r3;
0x000297d0 ldr r5, [pc, 0x158] |
0x000297d2 sub sp, 0xc |
0x000297d4 add r5, pc | r5 = 0x53104;
0x000297d6 cmp r0, 5 |
| if (r0 <= 5) {
0x000297d8 bhi 0x29872 |
| /* switch table (6 cases) at 0x297de */
0x000297da tbb [pc, r0] | __asm ("tbb [0x000297e0]");
0x000297e4 ldrd r0, r1, [sp, 0x24] | __asm ("ldrd r0, r1, [arg_24h]");
0x000297e8 blx 0x19464 | r0 = fprintf_chk ()
0x000297ec mov r4, r0 | r4 = r0;
0x000297ee cmp r0, 0 |
| if (r0 == 0) {
0x000297f0 beq 0x29872 | goto label_1;
| }
0x000297f2 ldr r3, [pc, 0x13c] |
0x000297f4 add r3, pc |
0x000297f6 ldr r3, [r3, 0x30] | r3 = imp.netsnmp_container_simple_free;
0x000297f8 cmp r3, 0 |
| if (r3 == 0) {
0x000297fa beq 0x29872 | goto label_1;
| }
0x000297fc ldr r0, [r0, 0x34] | r0 = *((r0 + 0x34));
| if (r0 != 0) {
0x000297fe cbz r0, 0x29804 |
0x00029800 blx 0x18300 | fcn_00018300 ();
| }
0x00029804 ldr r3, [pc, 0x12c] |
0x00029806 add r3, pc | r3 = 0x5313e;
0x00029808 ldrd r2, r3, [r3, 0x34] | __asm ("ldrd r2, r3, [r3, 0x34]");
0x0002980c strd r2, r3, [r4, 0x34] | __asm ("strd r2, r3, [r4, 0x34]");
0x00029810 b 0x29872 | goto label_1;
0x00029812 ldr r4, [pc, 0x124] |
0x00029814 add r4, pc | r4 = 0x53152;
0x00029816 ldr r0, [r4, 0x34] | r0 = imp.netsnmp_container_simple_free;
| if (r0 == 0) {
0x00029818 cbz r0, 0x29872 | goto label_1;
| }
0x0002981a blx 0x18300 | fcn_00018300 ();
0x0002981e movs r3, 0 | r3 = 0;
0x00029820 str r3, [r4, 0x34] | *((r4 + 0x34)) = r3;
0x00029822 b 0x29872 | goto label_1;
0x00029824 mov r6, r1 | r6 = r1;
0x00029826 ldrd r0, r1, [sp, 0x24] | __asm ("ldrd r0, r1, [arg_24h]");
0x0002982a blx 0x19464 | r0 = fprintf_chk ()
0x0002982e mov r7, r0 | r7 = r0;
0x00029830 cmp r0, 0 |
| if (r0 == 0) {
0x00029832 beq 0x298f4 | goto label_4;
| }
0x00029834 ldr r3, [r0, 0x54] | r3 = *((r0 + 0x54));
0x00029836 lsrs r4, r4, 2 | r4 >>= 2;
0x00029838 subs r3, 1 | r3--;
0x0002983a cmp r3, 2 |
| if (r3 > 2) {
0x0002983c bhi 0x298b4 | goto label_5;
| }
0x0002983e ldr r3, [pc, 0xfc] | r3 = *(0x2993e);
0x00029840 mov r1, r4 | r1 = r4;
0x00029842 mov r0, r6 | r0 = r6;
0x00029844 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00029846 str r3, [sp, 4] | var_4h = r3;
0x00029848 movs r3, 0xa | r3 = 0xa;
0x0002984a ldr r2, [sp, 4] | r2 = var_4h;
0x0002984c blx 0x16f5c | r0 = snmp_oid_compare ();
| if (r0 != 0) {
0x00029850 cbnz r0, 0x298a2 | goto label_6;
| }
0x00029852 ldr r3, [pc, 0xec] |
0x00029854 add r3, pc | r3 = 0x5319a;
| label_2:
0x00029856 movs r2, 1 | r2 = 1;
0x00029858 mov r0, r6 | r0 = r6;
0x0002985a str r2, [r3, 0x30] | *((r3 + 0x30)) = r2;
0x0002985c mov r1, r4 | r1 = r4;
0x0002985e ldr r2, [r7, 0x34] | r2 = *((r7 + 0x34));
0x00029860 str r2, [r3, 0x34] | *((r3 + 0x34)) = r2;
0x00029862 ldr r2, [r7, 0x38] | r2 = *((r7 + 0x38));
0x00029864 str r2, [r3, 0x38] | *((r3 + 0x38)) = r2;
0x00029866 blx 0x186bc | fcn_000186bc ();
0x0002986a str r0, [r7, 0x34] | *((r7 + 0x34)) = r0;
0x0002986c cmp r0, 0 |
| if (r0 == 0) {
0x0002986e beq 0x298f8 | goto label_7;
| }
0x00029870 str r4, [r7, 0x38] | *((r7 + 0x38)) = r4;
| }
| label_1:
0x00029872 movs r0, 0 | r0 = 0;
| do {
| label_0:
0x00029874 add sp, 0xc |
0x00029876 pop {r4, r5, r6, r7, pc} |
0x00029878 ldr r3, [pc, 0xc8] |
0x0002987a cmp r2, 6 |
0x0002987c mov.w r1, 0 | r1 = 0;
0x00029880 it ne |
| if (r2 == 6) {
0x00029882 movne r0, 7 | r0 = 7;
| }
0x00029884 add r3, pc | r3 = 0x531cc;
0x00029886 str r1, [r3, 0x30] | *((r3 + 0x30)) = r1;
0x00029888 bne 0x29874 |
| } while (r2 != 6);
0x0002988a cmp.w r4, 0x108 |
0x0002988e it hi |
| if (r4 > 0x108) {
0x00029890 movhi r0, 8 | r0 = 8;
| goto label_8;
| }
| if (r4 > 0x108) {
| label_8:
0x00029892 bhi 0x29874 | goto label_0;
| }
0x00029894 ands r3, r4, 3 | r3 = r4 & 3;
0x00029898 it ne |
| if (r3 == r4) {
0x0002989a movne r3, 1 | r3 = 1;
| }
0x0002989c lsls r0, r3, 3 | r0 = r3 << 3;
0x0002989e add sp, 0xc |
0x000298a0 pop {r4, r5, r6, r7, pc} |
| label_6:
0x000298a2 ldrd r2, r3, [r7, 0x34] | __asm ("ldrd r2, r3, [r7, 0x34]");
0x000298a6 mov r1, r4 | r1 = r4;
0x000298a8 mov r0, r6 | r0 = r6;
0x000298aa blx 0x16f5c | r0 = snmp_oid_compare ();
0x000298ae cmp r0, 0 |
| if (r0 == 0) {
0x000298b0 beq 0x29872 | goto label_1;
| }
0x000298b2 b 0x298dc | goto label_9;
| label_5:
0x000298b4 ldr r3, [pc, 0x90] | r3 = *(0x29948);
0x000298b6 ldrd r0, r1, [r0, 0x1c] | __asm ("ldrd r0, r1, [r0, 0x1c]");
0x000298ba ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x000298bc mov r2, r3 | r2 = r3;
0x000298be str r3, [sp, 4] | var_4h = r3;
0x000298c0 movs r3, 0xa | r3 = 0xa;
0x000298c2 blx 0x16f5c | snmp_oid_compare ();
0x000298c6 ldr r3, [pc, 0x74] | r3 = *(0x2993e);
0x000298c8 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x000298ca str r3, [sp, 4] | var_4h = r3;
| if (r0 == 0) {
0x000298cc cbnz r0, 0x298e0 |
0x000298ce ldr r2, [sp, 4] | r2 = var_4h;
0x000298d0 movs r3, 0xa | r3 = 0xa;
0x000298d2 mov r1, r4 | r1 = r4;
0x000298d4 mov r0, r6 | r0 = r6;
0x000298d6 blx 0x16f5c | r0 = snmp_oid_compare ();
| if (r0 == 0) {
0x000298da cbz r0, 0x298ee | goto label_3;
| }
| label_9:
0x000298dc movs r0, 0xc | r0 = 0xc;
0x000298de b 0x29874 | goto label_0;
| }
0x000298e0 mov r2, r3 | r2 = r3;
0x000298e2 mov r1, r4 | r1 = r4;
0x000298e4 movs r3, 0xa | r3 = 0xa;
0x000298e6 mov r0, r6 | r0 = r6;
0x000298e8 blx 0x16f5c | r0 = snmp_oid_compare ();
0x000298ec cbnz r0, 0x298fc |
| while (r0 == 0) {
| label_3:
0x000298ee ldr r3, [pc, 0x5c] |
0x000298f0 add r3, pc | r3 = 0x53242;
0x000298f2 b 0x29856 | goto label_2;
| label_4:
0x000298f4 movs r0, 0x12 | r0 = 0x12;
0x000298f6 b 0x29874 | goto label_0;
| label_7:
0x000298f8 movs r0, 0xd | r0 = 0xd;
0x000298fa b 0x29874 | goto label_0;
0x000298fc ldr r3, [pc, 0x50] | r3 = *(0x29950);
0x000298fe mov r1, r4 | r1 = r4;
0x00029900 mov r0, r6 | r0 = r6;
0x00029902 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00029904 mov r2, r3 | r2 = r3;
0x00029906 str r3, [sp, 4] | var_4h = r3;
0x00029908 movs r3, 0xa | r3 = 0xa;
0x0002990a blx 0x16f5c | r0 = snmp_oid_compare ();
0x0002990e cmp r0, 0 |
0x00029910 beq 0x298ee |
| }
0x00029912 ldr r3, [pc, 0x40] | r3 = *(0x29956);
0x00029914 mov r1, r4 | r1 = r4;
0x00029916 mov r0, r6 | r0 = r6;
0x00029918 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x0002991a str r3, [sp, 4] | var_4h = r3;
0x0002991c movs r3, 0xa | r3 = 0xa;
0x0002991e ldr r2, [sp, 4] | r2 = var_4h;
0x00029920 blx 0x16f5c | r0 = snmp_oid_compare ();
0x00029924 cmp r0, 0 |
| if (r0 == 0) {
0x00029926 beq 0x298ee | goto label_3;
| }
0x00029928 movs r0, 0xa | r0 = 0xa;
0x0002992a b 0x29874 | goto label_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/libnetsnmpmibs.so.40.2.0 @ 0x29b40 */
| #include <stdint.h>
|
; (fcn) sym.write_usmUserPublic () | uint32_t write_usmUserPublic (int16_t arg2, uint32_t arg3, uint32_t arg4) {
| int16_t var_14h;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00029b40 cmp r2, 4 |
| if (r2 != 4) {
0x00029b42 bne 0x29b58 | goto label_0;
| }
0x00029b44 cmp r3, 0x20 |
0x00029b46 push {r4, r5, r6, lr} |
0x00029b48 it hi |
| if (r3 <= 0x20) {
0x00029b4a movhi r0, 8 | r0 = 8;
| }
0x00029b4c mov r4, r3 | r4 = r3;
| if (r3 > 0x20) {
0x00029b4e bhi 0x29b56 | goto label_1;
| }
0x00029b50 cmp r0, 3 |
0x00029b52 beq 0x29b5c |
| while (1) {
0x00029b54 movs r0, 0 | r0 = 0;
| label_1:
0x00029b56 pop {r4, r5, r6, pc} |
| label_0:
0x00029b58 movs r0, 7 | r0 = 7;
0x00029b5a bx lr | return r0;
0x00029b5c mov r5, r1 | r5 = r1;
0x00029b5e ldrd r0, r1, [sp, 0x14] | __asm ("ldrd r0, r1, [var_14h]");
0x00029b62 blx 0x19464 | r0 = fprintf_chk ()
0x00029b66 mov r6, r0 | r6 = r0;
| if (r0 == 0) {
0x00029b68 cbz r0, 0x29b88 | goto label_2;
| }
0x00029b6a ldr r0, [r0, 0x4c] | r0 = *((r0 + 0x4c));
| if (r0 != 0) {
0x00029b6c cbz r0, 0x29b72 |
0x00029b6e blx 0x18300 | fcn_00018300 ();
| }
0x00029b72 mov r0, r4 | r0 = r4;
0x00029b74 blx 0x194ac | fcn_000194ac ();
0x00029b78 str r0, [r6, 0x4c] | *((r6 + 0x4c)) = r0;
| if (r0 == 0) {
0x00029b7a cbz r0, 0x29b8c | goto label_3;
| }
0x00029b7c mov r2, r4 | r2 = r4;
0x00029b7e mov r1, r5 | r1 = r5;
0x00029b80 blx 0x18a4c | fcn_00018a4c ();
0x00029b84 str r4, [r6, 0x50] | *((r6 + 0x50)) = r4;
0x00029b86 b 0x29b54 |
| }
| label_2:
0x00029b88 movs r0, 2 | r0 = 2;
0x00029b8a pop {r4, r5, r6, pc} |
| label_3:
0x00029b8c movs r0, 5 | r0 = 5;
0x00029b8e pop {r4, r5, r6, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libnetsnmpmibs.so.40.2.0 @ 0x29b90 */
| #include <stdint.h>
|
; (fcn) sym.write_usmUserStorageType () | void write_usmUserStorageType (int16_t arg_24h, uint32_t arg1, int16_t arg2, uint32_t arg3, uint32_t arg4) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00029b90 push {r4, r5, r6, r7, lr} |
0x00029b92 mov r4, r0 | r4 = r0;
0x00029b94 ldr r5, [pc, 0xb8] | r5 = *(0x29c50);
0x00029b96 sub sp, 0xc |
0x00029b98 ldr r6, [r1] | r6 = *(r1);
0x00029b9a add r5, pc | r5 += pc;
| if (r0 != 0) {
0x00029b9c cbnz r0, 0x29bc0 | goto label_3;
| }
0x00029b9e ldr r1, [pc, 0xb4] |
0x00029ba0 cmp r2, 2 |
0x00029ba2 add r1, pc | r1 = 0x537fc;
0x00029ba4 str r0, [r1, 0x48] | *((r1 + 0x48)) = r0;
0x00029ba6 it ne |
| if (r2 == 2) {
0x00029ba8 movne r0, 7 | r0 = 7;
| }
| if (r2 != 2) {
0x00029baa bne 0x29bbc | goto label_2;
| }
0x00029bac cmp r3, 4 |
0x00029bae it ne |
| if (r3 == 4) {
0x00029bb0 movne r0, 8 | r0 = 8;
| }
| if (r3 != 4) {
0x00029bb2 bne 0x29bbc | goto label_2;
| }
0x00029bb4 subs r6, 1 | r6--;
0x00029bb6 cmp r6, 4 |
| if (r6 < 4) {
0x00029bb8 bls 0x29bca | goto label_0;
| }
| label_1:
0x00029bba movs r0, 0xa | r0 = 0xa;
| do {
| label_2:
0x00029bbc add sp, 0xc |
0x00029bbe pop {r4, r5, r6, r7, pc} |
| label_3:
0x00029bc0 cmp r0, 1 |
| if (r0 == 1) {
0x00029bc2 beq 0x29bea | goto label_4;
| }
0x00029bc4 subs r4, r0, 4 | r4 = r0 - 4;
0x00029bc6 cmp r4, 1 |
| if (r4 < 1) {
0x00029bc8 bls 0x29bce | goto label_5;
| }
| label_0:
0x00029bca movs r0, 0 | r0 = 0;
0x00029bcc b 0x29bbc |
| } while (1);
| label_5:
0x00029bce ldrd r0, r1, [sp, 0x24] | __asm ("ldrd r0, r1, [arg_24h]");
0x00029bd2 blx 0x19464 | r0 = fprintf_chk ()
0x00029bd6 cmp r0, 0 |
| if (r0 == 0) {
0x00029bd8 beq 0x29bca | goto label_0;
| }
0x00029bda ldr r3, [pc, 0x7c] |
0x00029bdc add r3, pc | r3 = 0x5383a;
0x00029bde ldr r2, [r3, 0x48] | r2 = imp.netsnmp_container_simple_free;
0x00029be0 cmp r2, 0 |
| if (r2 == 0) {
0x00029be2 beq 0x29bca | goto label_0;
| }
0x00029be4 ldr r3, [r3, 0x4c] | r3 = *((r3 + 0x4c));
0x00029be6 str r3, [r0, 0x58] | *((r0 + 0x58)) = r3;
0x00029be8 b 0x29bca | goto label_0;
| label_4:
0x00029bea ldrd r0, r1, [sp, 0x24] | __asm ("ldrd r0, r1, [arg_24h]");
0x00029bee blx 0x19464 | r0 = fprintf_chk ()
0x00029bf2 mov r7, r0 | r7 = r0;
| if (r0 == 0) {
0x00029bf4 cbz r0, 0x29c4c | goto label_6;
| }
0x00029bf6 subs r3, r6, 2 | r3 = r6 - 2;
0x00029bf8 cmp r3, 1 |
| if (r3 < 1) {
0x00029bfa bls 0x29c38 | goto label_7;
| }
0x00029bfc cmp r6, 5 |
0x00029bfe ldrd r3, r2, [r0, 0x54] | __asm ("ldrd r3, r2, [r0, 0x54]");
| if (r6 != 5) {
0x00029c02 bne 0x29bba | goto label_1;
| }
0x00029c04 cmp r2, 5 |
| if (r2 == 5) {
0x00029c06 beq 0x29c0e | goto label_8;
| }
0x00029c08 subs r3, 1 | r3--;
0x00029c0a cmp r3, 1 |
| if (r3 < 1) {
0x00029c0c bls 0x29bba | goto label_1;
| }
| label_8:
0x00029c0e ldr r2, [pc, 0x4c] | r2 = *(0x29c5e);
0x00029c10 movs r3, 0xa | r3 = 0xa;
0x00029c12 ldrd r0, r1, [r7, 0x34] | __asm ("ldrd r0, r1, [r7, 0x34]");
0x00029c16 ldr r2, [r5, r2] | r2 = *((r5 + r2));
0x00029c18 str r2, [sp, 4] | var_4h = r2;
0x00029c1a blx 0x16f5c | r0 = snmp_oid_compare ();
| if (r0 != 0) {
0x00029c1e cbnz r0, 0x29c34 | goto label_9;
| }
0x00029c20 ldr r2, [pc, 0x3c] | r2 = *(0x29c60);
0x00029c22 movs r3, 0xa | r3 = 0xa;
0x00029c24 ldrd r0, r1, [r7, 0x1c] | __asm ("ldrd r0, r1, [r7, 0x1c]");
0x00029c28 ldr r2, [r5, r2] | r2 = *((r5 + r2));
0x00029c2a str r2, [sp, 4] | var_4h = r2;
0x00029c2c blx 0x16f5c | r0 = snmp_oid_compare ();
0x00029c30 cmp r0, 0 |
| if (r0 == 0) {
0x00029c32 beq 0x29bba | goto label_1;
| }
| label_9:
0x00029c34 movs r0, 0xc | r0 = 0xc;
0x00029c36 b 0x29bbc | goto label_2;
| label_7:
0x00029c38 ldr r3, [r0, 0x58] | r3 = *((r0 + 0x58));
0x00029c3a subs r2, r3, 2 | r2 = r3 - 2;
0x00029c3c cmp r2, 1 |
| if (r2 > 1) {
0x00029c3e bhi 0x29bba | goto label_1;
| }
0x00029c40 ldr r2, [pc, 0x20] |
0x00029c42 str r6, [r0, 0x58] | *((r0 + 0x58)) = r6;
0x00029c44 add r2, pc | r2 = 0x538ac;
0x00029c46 strd r4, r3, [r2, 0x48] | __asm ("strd r4, r3, [r2, 0x48]");
0x00029c4a b 0x29bca | goto label_0;
| label_6:
0x00029c4c movs r0, 0x12 | r0 = 0x12;
0x00029c4e b 0x29bbc | goto label_2;
| }
[*] Function fprintf used 16 times libnetsnmpmibs.so.40.2.0