[*] Binary protection state of libnetsnmp.so.40.1.0
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function mmap tear down of libnetsnmp.so.40.1.0
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libnetsnmp.so.40.1.0 @ 0x19be0).
Please report the bug at https://github.com/radareorg/r2dec-js/issues
Use the option '--issue' or the command 'pddi' to generate
the needed data for the issue.
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libnetsnmp.so.40.1.0 @ 0x30394 */
| #include <stdint.h>
|
; (fcn) sym.netsnmp_udp6_transport_bind () | void netsnmp_udp6_transport_bind (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00030394 ssub16mi fp, r4, r0 | __asm ("ssub16mi fp, r4, r0");
0x00030398 ldr r2, [pc, 0x8c] |
0x0003039a sub sp, 0x10 |
0x0003039c mov r5, r0 | r5 = r0;
0x0003039e mov r6, r1 | r6 = r1;
0x000303a0 ldr r3, [pc, 0x88] | r3 = *(0x3042c);
0x000303a2 add r2, pc | r2 = 0x607ce;
0x000303a4 ldr r3, [r2, r3] |
0x000303a6 lsls r2, r4, 0x1f | r2 = r4 << 0x1f;
0x000303a8 ldr r3, [r3] | r3 = *(0x607ce);
0x000303aa str r3, [sp, 0xc] | var_ch = r3;
0x000303ac mov.w r3, 0 | r3 = 0;
| if (r2 < r4) {
0x000303b0 bmi 0x30400 | goto label_2;
| }
| label_1:
0x000303b2 lsls r3, r4, 0x1e | r3 = r4 << 0x1e;
0x000303b4 bpl 0x303d0 |
| while (r0 == 0) {
0x000303b6 movs r0, 0 | r0 = 0;
| label_0:
0x000303b8 ldr r2, [pc, 0x74] |
0x000303ba ldr r3, [pc, 0x70] | r3 = *(0x3042e);
0x000303bc add r2, pc | r2 = 0x607f0;
0x000303be ldr r3, [r2, r3] | r3 = *(0x607f0);
0x000303c0 ldr r2, [r3] | r2 = *(0x607f0);
0x000303c2 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000303c4 eors r2, r3 | r2 ^= r3;
0x000303c6 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000303ca bne 0x30424 | goto label_3;
| }
0x000303cc add sp, 0x10 |
0x000303ce pop {r4, r5, r6, pc} |
0x000303d0 ldr r0, [r5, 0x18] | r0 = *((r5 + 0x18));
0x000303d2 add.w r1, r6, 0x1c | r1 = r6 + 0x1c;
0x000303d6 blx 0xf8dc | r0 = fcn_0000f8dc ();
| if (r0 != 0) {
0x000303da cbnz r0, 0x303ea | goto label_4;
| }
0x000303dc ldr r0, [r5, 0x18] | r0 = *((r5 + 0x18));
0x000303de movs r2, 0x1c | r2 = 0x1c;
0x000303e0 mov r1, r6 | r1 = r6;
0x000303e2 blx 0x10a78 | r0 = fcn_00010a78 ();
0x000303e6 cmp r0, 0 |
0x000303e8 beq 0x303b6 |
| }
| label_4:
0x000303ea blx 0x117cc | r0 = fcn_000117cc ();
0x000303ee ldr r0, [r0] | r0 = *(r0);
0x000303f0 blx 0xf5f8 | fcn_0000f5f8 ();
0x000303f4 mov r0, r5 | r0 = r5;
0x000303f6 blx 0xfab8 | fcn_0000fab8 ();
0x000303fa mov.w r0, -1 | r0 = -1;
0x000303fe b 0x303b8 | goto label_0;
| label_2:
0x00030400 movs r3, 4 | r3 = 4;
0x00030402 movs r2, 1 | r2 = 1;
0x00030404 str r3, [sp] | *(sp) = r3;
0x00030406 movs r1, 0x29 | r1 = 0x29;
0x00030408 str r2, [sp, 8] | var_8h = r2;
0x0003040a add r3, sp, 8 | r3 += var_8h;
0x0003040c ldr r0, [r0, 0x18] | r0 = *((r0 + 0x18));
0x0003040e movs r2, 0x1a | r2 = 0x1a;
0x00030410 blx 0x11664 | r0 = fcn_00011664 ();
0x00030414 cmp r0, 0 |
| if (r0 == 0) {
0x00030416 beq 0x303b2 | goto label_1;
| }
0x00030418 blx 0x117cc | r0 = fcn_000117cc ();
0x0003041c ldr r0, [r0] | r0 = *(r0);
0x0003041e blx 0xf5f8 | fcn_0000f5f8 ();
0x00030422 b 0x303b2 | goto label_1;
| label_3:
0x00030424 blx 0x10d58 | fcn_00010d58 ();
0x00030428 vhadd.u8 d0, d10, d1 | __asm ("vhadd.u8 d0, d10, d1");
0x0003042c lsrs r4, r7, 0x11 | r4 = r7 >> 0x11;
0x0003042e movs r0, r0 |
0x00030430 cdp2 p0, 0xf, c0, c0, c1, 0 | __asm ("cdp2 p0, 0xf, c0, c0, c1, 0");
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libnetsnmp.so.40.1.0 @ 0x2ef80 */
| #include <stdint.h>
|
; (fcn) sym.netsnmp_udpbase_sendto_unix () | void netsnmp_udpbase_sendto_unix (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h_2;
| int16_t var_ch_2;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_24h_2;
| int16_t var_30h;
| int16_t var_34h;
| int16_t var_38h;
| int16_t var_3ch_2;
| int16_t var_40h;
| int16_t var_44h;
| int16_t var_48h;
| int16_t var_4ch;
| int16_t var_5ch;
| int16_t var_60h;
| int16_t var_64h;
| int16_t var_68h;
| int16_t var_70h;
| int16_t var_74h;
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
| if (? >= ?) {
0x0002ef80 ldrbmi lr, [r0, sp, lsr 18]! |
| }
0x0002ef84 mov sl, r2 | sl = r2;
0x0002ef86 ldr r2, [pc, 0x13c] |
0x0002ef88 mov r6, r3 | r6 = r3;
0x0002ef8a sub sp, 0x78 |
0x0002ef8c mov.w sb, 0x10 | sb = 0x10;
0x0002ef90 ldr r3, [pc, 0x134] | r3 = *(0x2f0c8);
0x0002ef92 movs r4, 0 | r4 = 0;
0x0002ef94 add r2, pc | r2 = 0x5e05e;
0x0002ef96 ldr r7, [sp, 0x98] | r7 = var_0h;
0x0002ef98 mov r8, r0 | r8 = r0;
0x0002ef9a ldr r3, [r2, r3] |
0x0002ef9c ldr r3, [r3] | r3 = *(0x5e05e);
0x0002ef9e str r3, [sp, 0x74] | var_74h = r3;
0x0002efa0 mov.w r3, 0 | r3 = 0;
0x0002efa4 ldr r3, [sp, 0x9c] | r3 = var_4h;
0x0002efa6 str r6, [sp, 0x30] | var_30h = r6;
0x0002efa8 str r7, [sp, 0x10] | var_10h = r7;
0x0002efaa str r3, [sp, 0x14] | var_14h = r3;
0x0002efac add.w r3, sp, sb | r3 = sp + sb;
0x0002efb0 str r3, [sp, 0x38] | var_38h = r3;
0x0002efb2 movs r3, 1 | r3 = 1;
0x0002efb4 strd r4, r4, [sp, 0x40] | __asm ("strd r4, r4, [sp, 0x40]");
0x0002efb8 str r4, [sp, 0x48] | var_48h = r4;
0x0002efba str.w sb, [sp, 0xc] | __asm ("str.w sb, [var_ch_2]");
0x0002efbe str.w sb, [sp, 0x34] | __asm ("str.w sb, [var_34h]");
0x0002efc2 str r3, [sp, 0x3c] | var_3ch_2 = r3;
| if (r1 != 0) {
0x0002efc4 cbz r1, 0x2efcc |
0x0002efc6 ldr r2, [r1] | r2 = *(r1);
0x0002efc8 mov r5, r1 | r5 = r1;
| if (r2 != 0) {
0x0002efca cbnz r2, 0x2eff6 | goto label_4;
| }
| }
0x0002efcc add r5, sp, 0x30 | r5 += var_30h;
| label_1:
0x0002efce movs r2, 0x40 | r2 = 0x40;
0x0002efd0 mov r1, r5 | r1 = r5;
0x0002efd2 mov r0, r8 | r0 = r8;
0x0002efd4 blx 0x10174 | r0 = fcn_00010174 ();
0x0002efd8 mov r4, r0 | r4 = r0;
| do {
| label_0:
0x0002efda ldr r2, [pc, 0xf0] |
0x0002efdc ldr r3, [pc, 0xe8] | r3 = *(0x2f0c8);
0x0002efde add r2, pc | r2 = 0x5e0b0;
0x0002efe0 ldr r3, [r2, r3] | r3 = *(0x5e0b0);
0x0002efe2 ldr r2, [r3] | r2 = *(0x5e0b0);
0x0002efe4 ldr r3, [sp, 0x74] | r3 = var_74h;
0x0002efe6 eors r2, r3 | r2 ^= r3;
0x0002efe8 mov.w r3, 0 | r3 = 0;
0x0002efea lsls r0, r0, 0xc | r0 <<= 0xc;
| if (r0 != r0) {
0x0002efec bne 0x2f0c0 | goto label_5;
| }
0x0002efee mov r0, r4 | r0 = r4;
0x0002eff0 add sp, 0x78 |
0x0002eff2 pop.w {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_4:
0x0002eff6 mov r1, r3 | r1 = r3;
0x0002eff8 add r3, sp, 0xc | r3 += var_ch_2;
0x0002effa str r3, [sp] | *(sp) = r3;
0x0002effc movs r3, 0x18 | r3 = 0x18;
0x0002effe str r3, [sp, 0x44] | var_44h = r3;
0x0002f000 movs r2, 0x19 | r2 = 0x19;
0x0002f002 str r3, [sp, 0x5c] | var_5ch = r3;
0x0002f004 add r3, sp, 0x5c | r3 += var_5ch;
0x0002f006 str r3, [sp, 0x40] | var_40h = r3;
0x0002f008 movs r3, 8 | r3 = 8;
0x0002f00a str r3, [sp, 0x64] | var_64h = r3;
0x0002f00c add r3, sp, 0x4c | r3 += var_4ch;
0x0002f00e str r4, [sp, 0x60] | var_60h = r4;
0x0002f010 str r4, [sp, 0x18] | var_18h = r4;
0x0002f012 strd r4, r4, [sp, 0x68] | __asm ("strd r4, r4, [sp, 0x68]");
0x0002f016 str r4, [sp, 0x70] | var_70h = r4;
0x0002f018 strd r4, r4, [sp, 0x1c] | __asm ("strd r4, r4, [sp, 0x1c]");
0x0002f01c add r4, sp, 0x18 | r4 += var_18h;
0x0002f01e blx 0x11610 | r0 = ceil (r0);
| if (r0 != 0) {
0x0002f022 cbnz r0, 0x2f08c | goto label_6;
| }
0x0002f024 ldr r3, [sp, 0xc] | r3 = var_ch_2;
0x0002f026 cmp r3, 0 |
| if (r3 != 0) {
0x0002f028 bne 0x2f098 | goto label_7;
| }
| label_2:
0x0002f02a ldr r0, [r5] | r0 = *(r5);
0x0002f02c add r6, sp, 0x68 | r6 += var_68h;
0x0002f02e blx 0xf8e8 | fcn_0000f8e8 ();
0x0002f032 ldr r3, [r5] | r3 = *(r5);
0x0002f034 str r3, [sp, 0x1c] | var_1ch = r3;
0x0002f036 ldm.w r4, {r0, r1, r2} | r0 = *(r4);
| r1 = *((r4 + 4));
| r2 = *((r4 + 8));
0x0002f03a stm.w r6, {r0, r1, r2} | *(r6) = r0;
| *((r6 + 4)) = r1;
| *((r6 + 8)) = r2;
0x0002f03e movs r2, 0x40 | r2 = 0x40;
0x0002f040 add r1, sp, 0x30 | r1 += var_30h;
0x0002f042 mov r0, r8 | r0 = r8;
0x0002f044 blx 0x10174 | r0 = fcn_00010174 ();
0x0002f048 mov r4, r0 | r4 = r0;
| label_3:
0x0002f04a cmp r4, 0 |
0x0002f04c bge 0x2efda |
| } while (r4 >= 0);
0x0002f04e blx 0x117cc | r0 = fcn_000117cc ();
0x0002f052 ldr r3, [r0] | r3 = *(r0);
0x0002f054 mov r7, r0 | r7 = r0;
0x0002f056 cmp r3, 0x16 |
| if (r3 != 0x16) {
0x0002f058 bne 0x2efda | goto label_0;
| }
0x0002f05a add r3, sp, 0x24 | r3 += var_24h_2;
0x0002f05c mov.w sb, 0 | sb = 0;
0x0002f060 str.w sl, [sp, 0x24] | __asm ("str.w sl, [var_24h_2]");
0x0002f064 add r5, sp, 0x30 | r5 += var_30h;
0x0002f066 strd sb, sb, [sp, 0x28] | __asm ("strd sb, sb, [sp, 0x28]");
0x0002f06a ldm.w r3, {r0, r1, r2} | r0 = *(r3);
| r1 = *((r3 + 4));
| r2 = *((r3 + 8));
0x0002f06e stm.w r6, {r0, r1, r2} | *(r6) = r0;
| *((r6 + 4)) = r1;
| *((r6 + 8)) = r2;
0x0002f070 movs r7, r0 | r7 = r0;
0x0002f072 movs r2, 0x40 | r2 = 0x40;
0x0002f074 mov r1, r5 | r1 = r5;
0x0002f076 mov r0, r8 | r0 = r8;
0x0002f078 blx 0x10174 | r0 = fcn_00010174 ();
0x0002f07c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 >= r0) {
0x0002f07e bge 0x2efda | goto label_0;
| }
0x0002f080 ldr r3, [r7] | r3 = *(r7);
0x0002f082 cmp r3, 0x16 |
| if (r3 != 0x16) {
0x0002f084 bne 0x2efda | goto label_0;
| }
0x0002f086 strd sb, sb, [sp, 0x40] | __asm ("strd sb, sb, [sp, 0x40]");
0x0002f08a b 0x2efce | goto label_1;
| label_6:
0x0002f08c blx 0x117cc | r0 = fcn_000117cc ();
0x0002f090 ldr r0, [r0] | r0 = *(r0);
0x0002f092 blx 0xf5f8 | fcn_0000f5f8 ();
0x0002f096 b 0x2f02a | goto label_2;
| label_7:
0x0002f098 ldr r0, [r5] | r0 = *(r5);
0x0002f09a blx 0xf8e8 | fcn_0000f8e8 ();
0x0002f09e strd r6, sb, [sp] | __asm ("strd r6, sb, [sp]");
0x0002f0a2 add r6, sp, 0x68 | r6 += var_68h;
0x0002f0a4 ldr r3, [r5] | r3 = *(r5);
0x0002f0a6 str r3, [sp, 0x1c] | var_1ch = r3;
0x0002f0a8 movs r3, 0x40 | r3 = 0x40;
0x0002f0aa ldm.w r4, {r0, r1, r2} | r0 = *(r4);
| r1 = *((r4 + 4));
| r2 = *((r4 + 8));
0x0002f0ae stm.w r6, {r0, r1, r2} | *(r6) = r0;
| *((r6 + 4)) = r1;
| *((r6 + 8)) = r2;
0x0002f0b2 mov r1, r7 | r1 = r7;
0x0002f0b4 ldr r2, [sp, 0x9c] | r2 = var_4h;
0x0002f0b6 mov r0, r8 | r0 = r8;
0x0002f0b8 blx 0xfcfc | r0 = fcn_0000fcfc ();
0x0002f0bc mov r4, r0 | r4 = r0;
0x0002f0be b 0x2f04a | goto label_3;
| label_5:
0x0002f0c0 blx 0x10d58 | fcn_00010d58 ();
0x0002f0c4 asrs r0, r3, 0xc | r0 = r3 >> 0xc;
0x0002f0c6 movs r2, r0 | r2 = r0;
0x0002f0c8 lsrs r4, r7, 0x11 | r4 = r7 >> 0x11;
0x0002f0ca movs r0, r0 |
0x0002f0cc asrs r6, r1, 0xb | r6 = r1 >> 0xb;
0x0002f0ce movs r2, r0 | r2 = r0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libnetsnmp.so.40.1.0 @ 0x2f0d0 */
| #include <stdint.h>
|
; (fcn) sym.netsnmp_udpbase_sendto () | void netsnmp_udpbase_sendto () {
| /* Beware that this jump is a conditional jump.
| * r2dec transformed it as a return, due being the
| * last instruction. Please, check 'pdda' output
| * for more hints. */
0x0002f0d0 blt 0x186d058 | return void (*0xf594)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libnetsnmp.so.40.1.0 @ 0x2f1b0 */
| #include <stdint.h>
|
; (fcn) sym.netsnmp_udpbase_send () | void netsnmp_udpbase_send (int16_t arg_28h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int32_t var_0h;
| int32_t var_0h_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0002f1b0 push.w {r4, r5, r6, r7, r8, sb, lr} |
0x0002f1b4 sub sp, 0xc |
0x0002f1b6 ldr r4, [sp, 0x28] | r4 = *(arg_28h);
0x0002f1b8 mov sb, r0 | sb = r0;
0x0002f1ba mov r6, r1 | r6 = r1;
0x0002f1bc mov r7, r2 | r7 = r2;
| if (r3 == 0) {
0x0002f1be cbz r3, 0x2f22a | goto label_5;
| }
0x0002f1c0 ldr r2, [r3] | r2 = *(r3);
0x0002f1c2 cmp r4, 0 |
0x0002f1c4 it ne |
| if (r4 != 0) {
0x0002f1c6 cmpne r2, 0 | __asm ("cmpne r2, 0");
| }
0x0002f1c8 mov r5, r2 | r5 = r2;
| if (r4 != 0) {
0x0002f1ca bne 0x2f206 | goto label_6;
| }
0x0002f1cc cmp r0, 0 |
| if (r0 == 0) {
0x0002f1ce beq 0x2f262 | goto label_7;
| }
| label_3:
0x0002f1d0 ldr.w r5, [sb, 0x20] | r5 = *((sb + 0x20));
0x0002f1d4 cmp r5, 0 |
| if (r5 == 0) {
0x0002f1d6 beq 0x2f25a | goto label_8;
| }
0x0002f1d8 ldr.w r3, [sb, 0x24] | r3 = *((sb + 0x24));
0x0002f1dc cmp r3, 0x3c |
| if (r3 != 0x3c) {
0x0002f1de bne 0x2f24e | goto label_9;
| }
| do {
| label_2:
0x0002f1e0 ldr.w r0, [sb, 0x18] | r0 = *((sb + 0x18));
0x0002f1e4 cmp r0, 0 |
| if (r0 < 0) {
0x0002f1e6 blt 0x2f214 | goto label_10;
| }
0x0002f1e8 add.w r8, r5, 0x20 | r8 = r5 + 0x20;
| label_1:
0x0002f1ec ldr r2, [r5, 0x38] | r2 = *((r5 + 0x38));
0x0002f1ee mov r3, r5 | r3 = r5;
0x0002f1f0 mov r1, r8 | r1 = r8;
0x0002f1f2 strd r6, r7, [sp] | __asm ("strd r6, r7, [sp]");
0x0002f1f6 blx 0x1183c | r0 = fcn_0001183c ();
0x0002f1fa subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x0002f1fc blt 0x2f21a | goto label_11;
| }
| label_0:
0x0002f1fe mov r0, r4 | r0 = r4;
0x0002f200 add sp, 0xc |
0x0002f202 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_6:
0x0002f206 ldr r3, [r4] | r3 = *(r4);
0x0002f208 cmp r3, 0x10 |
0x0002f20a it ne |
| if (r3 != 0x10) {
0x0002f20c cmpne r3, 0x3c | __asm ("cmpne r3, 0x3c");
| }
| if (r3 != 0x10) {
0x0002f20e bne 0x2f248 | goto label_12;
| }
0x0002f210 cmp r0, 0 |
0x0002f212 bne 0x2f1e0 |
| } while (r0 != 0);
| label_10:
0x0002f214 mov.w r4, -1 | r4 = -1;
0x0002f218 b 0x2f1fe | goto label_0;
| label_11:
0x0002f21a blx 0x117cc | r0 = fcn_000117cc ();
0x0002f21e ldr r3, [r0] | r3 = *(r0);
0x0002f220 cmp r3, 4 |
| if (r3 != 4) {
0x0002f222 bne 0x2f1fe | goto label_0;
| }
0x0002f224 ldr.w r0, [sb, 0x18] | r0 = *((sb + 0x18));
0x0002f228 b 0x2f1ec | goto label_1;
| if (r0 == 0) {
| label_5:
0x0002f22a cbz r0, 0x2f262 | goto label_7;
| }
0x0002f22c ldr r5, [r0, 0x20] | r5 = *(arg_28hx20);
| if (r5 == 0) {
0x0002f22e cbz r5, 0x2f262 | goto label_7;
| }
0x0002f230 ldr r3, [r0, 0x24] | r3 = *(arg_28hx24);
0x0002f232 cmp r3, 0x3c |
| if (r3 == 0x3c) {
0x0002f234 beq 0x2f1e0 | goto label_2;
| }
| label_4:
0x0002f236 ldr r1, [pc, 0x30] |
0x0002f238 mov r2, r3 | r2 = r3;
0x0002f23a movs r0, 3 | r0 = 3;
0x0002f23c mov.w r4, -1 | r4 = -1;
0x0002f240 add r1, pc | r1 = 0x5e4ae;
0x0002f242 blx 0x11494 | fcn_00011494 ();
0x0002f246 b 0x2f1fe | goto label_0;
| label_12:
0x0002f248 cmp r0, 0 |
| if (r0 != 0) {
0x0002f24a bne 0x2f1d0 | goto label_3;
| }
0x0002f24c b 0x2f236 | goto label_4;
| label_9:
0x0002f24e cmp r2, 0 |
0x0002f250 it ne |
| if (r2 == 0) {
0x0002f252 cmpne r4, 0 | __asm ("cmpne r4, 0");
| goto label_13;
| }
| if (r2 == 0) {
| label_13:
0x0002f254 beq 0x2f236 | goto label_4;
| }
| do {
0x0002f256 ldr r3, [r4] | r3 = *(r4);
0x0002f258 b 0x2f236 | goto label_4;
| label_8:
0x0002f25a cmp r2, 0 |
0x0002f25c it ne |
| if (r2 != 0) {
0x0002f25e cmpne r4, 0 | __asm ("cmpne r4, 0");
| }
0x0002f260 bne 0x2f256 |
| } while (r2 != 0);
| label_7:
0x0002f262 mov.w r3, -1 | r3 = -1;
0x0002f266 b 0x2f236 | goto label_4;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libnetsnmp.so.40.1.0 @ 0x2f31c */
| #include <stdint.h>
|
; (fcn) sym.netsnmp_udpipv4base_transport_bind () | void netsnmp_udpipv4base_transport_bind (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h_2;
| int16_t var_4h;
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0002f31c push {r4, r5, r6, r7, lr} |
0x0002f31e mov r4, r2 | r4 = r2;
0x0002f320 ldr r5, [pc, 0x90] |
0x0002f322 movs r3, 1 | r3 = 1;
0x0002f324 ands.w r7, r4, r3 | r7 = r4 & r3;
0x0002f328 sub sp, 0x14 |
0x0002f32a ldr r2, [pc, 0x8c] | r2 = *(0x2f3ba);
0x0002f32c mov r6, r1 | r6 = r1;
0x0002f32e add r5, pc | r5 = 0x5e6e6;
0x0002f330 ldr r2, [r5, r2] |
0x0002f332 mov r5, r0 | r5 = r0;
0x0002f334 ldr r2, [r2] | r2 = *(0x5e6e6);
0x0002f336 str r2, [sp, 0xc] | var_ch = r2;
0x0002f338 mov.w r2, 0 | r2 = 0;
0x0002f33a lsls r0, r0, 8 | r0 <<= 8;
0x0002f33c str r3, [sp, 8] | var_8h = r3;
| if (r0 != r0) {
0x0002f33e bne 0x2f38e | goto label_2;
| }
| label_1:
0x0002f340 lsls r3, r4, 0x1e | r3 = r4 << 0x1e;
0x0002f342 bpl 0x2f360 |
| while (r0 == 0) {
0x0002f344 movs r7, 0 | r7 = 0;
| label_0:
0x0002f346 ldr r2, [pc, 0x74] |
0x0002f348 ldr r3, [pc, 0x6c] | r3 = *(0x2f3b8);
0x0002f34a add r2, pc | r2 = 0x5e70c;
0x0002f34c ldr r3, [r2, r3] | r3 = *(0x5e70c);
0x0002f34e ldr r2, [r3] | r2 = *(0x5e70c);
0x0002f350 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0002f352 eors r2, r3 | r2 ^= r3;
0x0002f354 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0002f358 bne 0x2f3ae | goto label_3;
| }
0x0002f35a mov r0, r7 | r0 = r7;
0x0002f35c add sp, 0x14 |
0x0002f35e pop {r4, r5, r6, r7, pc} |
0x0002f360 ldr r0, [r5, 0x18] | r0 = *((r5 + 0x18));
0x0002f362 add.w r1, r6, 0x1c | r1 = r6 + 0x1c;
0x0002f366 blx 0xf8dc | r0 = fcn_0000f8dc ();
| if (r0 != 0) {
0x0002f36a cbnz r0, 0x2f37a | goto label_4;
| }
0x0002f36c ldr r0, [r5, 0x18] | r0 = *((r5 + 0x18));
0x0002f36e movs r2, 0x10 | r2 = 0x10;
0x0002f370 mov r1, r6 | r1 = r6;
0x0002f372 blx 0x10a78 | r0 = fcn_00010a78 ();
0x0002f376 cmp r0, 0 |
0x0002f378 beq 0x2f344 |
| }
| label_4:
0x0002f37a blx 0x117cc | r0 = fcn_000117cc ();
0x0002f37e ldr r0, [r0] | r0 = *(r0);
0x0002f380 movs r7, 1 | r7 = 1;
0x0002f382 blx 0xf5f8 | fcn_0000f5f8 ();
0x0002f386 mov r0, r5 | r0 = r5;
0x0002f388 blx 0xfab8 | fcn_0000fab8 ();
0x0002f38c b 0x2f346 | goto label_0;
| label_2:
0x0002f38e movs r3, 4 | r3 = 4;
0x0002f390 movs r2, 8 | r2 = 8;
0x0002f392 str r3, [sp] | *(sp) = r3;
0x0002f394 movs r1, 0 | r1 = 0;
0x0002f396 ldr r0, [r0, 0x18] | r0 = *((r0 + 0x18));
0x0002f398 add r3, sp, 8 | r3 += var_8h;
0x0002f39a blx 0x11664 | fcn_00011664 ();
0x0002f39e adds r0, 1 | r0++;
| if (r0 != 1) {
0x0002f3a0 bne 0x2f340 | goto label_1;
| }
0x0002f3a2 blx 0x117cc | r0 = fcn_000117cc ();
0x0002f3a6 ldr r0, [r0] | r0 = *(r0);
0x0002f3a8 blx 0xf5f8 | fcn_0000f5f8 ();
0x0002f3ac b 0x2f346 | goto label_0;
| label_3:
0x0002f3ae blx 0x10d58 | fcn_00010d58 ();
0x0002f3b2 nop |
0x0002f3b4 lsrs r6, r7, 0x1d | r6 = r7 >> 0x1d;
0x0002f3b6 movs r2, r0 | r2 = r0;
0x0002f3b8 lsrs r4, r7, 0x11 | r4 = r7 >> 0x11;
0x0002f3ba movs r0, r0 |
0x0002f3bc lsrs r2, r4, 0x1d | r2 = r4 >> 0x1d;
0x0002f3be movs r2, r0 | r2 = r0;
| }
[*] Function mmap used 1 times libnetsnmp.so.40.1.0