[*] Binary protection state of ntpq
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf tear down of ntpq
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1d4b8 */
| #include <stdint.h>
|
; (fcn) fcn.0001d4b8 () | void fcn_0001d4b8 (int32_t arg_10h, int32_t arg_34h, uint32_t arg1, int32_t arg2) {
| int32_t var_0h;
| char * format;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| char * var_1ch;
| char * s;
| int32_t var_34h;
| r0 = arg1;
| r1 = arg2;
0x0001d4b8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001d4bc ldr sl, [pc, 0x350] | sl = *(0x1d810);
0x0001d4c0 mov r5, r3 | r5 = r3;
0x0001d4c4 ldr r3, [pc, 0x34c] | r3 = *(0x1d814);
0x0001d4c8 add sl, pc, sl | sl = pc + sl;
0x0001d4cc cmp r0, 0xf |
0x0001d4d0 sub sp, sp, 0x34 |
0x0001d4d4 mov sb, r0 | sb = r0;
0x0001d4d8 mov fp, r1 |
0x0001d4dc mov r6, r2 | r6 = r2;
0x0001d4e0 ldr r4, [sl, r3] | r4 = *(0x1d810);
| if (r0 >= 0xf) {
0x0001d4e4 bls 0x1d50c |
0x0001d4e8 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x0001d4ec str r3, [sp] | *(sp) = r3;
0x0001d4f0 ldr r3, [r1, 0x18] | r3 = *((r1 + 0x18));
0x0001d4f4 ldr r1, [pc, 0x320] |
0x0001d4f8 ldr r2, [r0, 0x1c] | r2 = *((r0 + 0x1c));
0x0001d4fc add r1, pc, r1 | r1 = pc + r1;
0x0001d500 ldr r1, [r1] | r1 = *(0x1d818);
0x0001d504 ldr r0, [r4] | r0 = *(r4);
0x0001d508 bl 0x12910 | fprintf (r0, r1, r2, r3)
| }
0x0001d50c ldr r3, [pc, 0x30c] | r3 = "_s_mismatches__08x._08x";
0x0001d510 ldr r2, [fp, 0x34] | r2 = *(arg_34h);
0x0001d514 ldr r3, [sl, r3] | r3 = *((sl + r3));
0x0001d518 ldr r0, [r4] | r0 = *(r4);
0x0001d51c ldr r1, [r3, 0x1a8] | r1 = *(0x1d9c4);
0x0001d520 str r3, [sp, 0xc] | format = r3;
0x0001d524 bl 0x12910 | fprintf (r0, r1, r2, "_s_mismatches__08x._08x")
0x0001d528 ldr r3, [r6] | r3 = *(r6);
0x0001d52c ldrb r3, [r3] | r3 = *(r3);
0x0001d530 cmp r3, 0x7f |
| if (r3 != 0x7f) {
0x0001d534 addeq r6, r6, 4 | r6 += 4;
| }
| if (r3 != 0x7f) {
0x0001d538 subeq r5, r5, 1 | r5--;
| }
0x0001d53c mov r3, 0 | r3 = 0;
| if (r3 != 0x7f) {
0x0001d540 moveq r8, 1 | r8 = 1;
| }
| if (r3 == 0x7f) {
0x0001d544 movne r8, 0 | r8 = 0;
| }
0x0001d548 mov r1, r6 | r1 = r6;
0x0001d54c mov r2, r5 | r2 = r5;
0x0001d550 mov r7, r3 | r7 = r3;
| do {
0x0001d554 ldr r0, [r1], 4 | r0 = *(r1);
| r1 += 4;
0x0001d558 str r2, [sp, 0x18] | var_18h = r2;
0x0001d55c str r3, [sp, 0x14] | var_14h = r3;
0x0001d560 str r1, [sp, 0x10] | var_10h = r1;
0x0001d564 str r1, [sp, 0x1c] | var_1ch = r1;
0x0001d568 bl 0x1261c | strlen (r0);
0x0001d56c ldr r2, [sp, 0x18] | r2 = var_18h;
0x0001d570 ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001d574 sub r2, r2, 1 | r2--;
0x0001d578 ldr r1, [sp, 0x10] | r1 = var_10h;
0x0001d57c add r0, r0, 1 | r0++;
0x0001d580 cmp r7, r0 |
| if (r7 >= r0) {
0x0001d584 movlo r7, r0 | r7 = r0;
| }
0x0001d588 cmp r2, 0 |
0x0001d58c add r3, r3, r0 | r3 += r0;
0x0001d590 bgt 0x1d554 |
| } while (r2 > 0);
0x0001d594 cmp r7, 0x23 |
| if (r7 < 0x23) {
0x0001d598 bls 0x1d63c | goto label_5;
| }
0x0001d59c ldr r3, [pc, 0x280] | r3 = *(0x1d820);
0x0001d5a0 mov r7, r5 | r7 = r5;
0x0001d5a4 ldr sl, [sl, r3] | sl = *((sl + r3));
0x0001d5a8 add sl, sl, 0x130 | sl += 0x130;
| do {
0x0001d5ac ldr r2, [r6], 4 | r2 = *(r6);
| r6 += 4;
0x0001d5b0 mov r1, sl | r1 = sl;
0x0001d5b4 ldr r0, [r4] | r0 = *(r4);
0x0001d5b8 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d5bc sub r7, r7, 1 | r7--;
0x0001d5c0 cmp r7, 0 |
0x0001d5c4 bgt 0x1d5ac |
| } while (r7 > 0);
| label_0:
0x0001d5c8 cmp sb, 0xf |
| if (sb >= 0xf) {
0x0001d5cc bls 0x1d5fc |
0x0001d5d0 ldr r1, [sp, 0xc] | r1 = format;
0x0001d5d4 sub r3, r5, 1 | r3 = r5 - 1;
0x0001d5d8 add r3, r3, r8 | r3 += r8;
0x0001d5dc ldr r1, [r1, 0x84] | r1 = *((r1 + 0x84));
0x0001d5e0 mov r2, r8 | r2 = r8;
0x0001d5e4 ldr r0, [r4] | r0 = *(r4);
0x0001d5e8 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d5ec ldr r3, [sb, 0x54] | r3 = *((sb + 0x54));
0x0001d5f0 mov r1, 1 | r1 = 1;
0x0001d5f4 mov r0, sb | r0 = sb;
0x0001d5f8 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| }
0x0001d5fc ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x0001d600 ldr r0, [r4] | r0 = *(r4);
0x0001d604 lsr r3, r3, 0xc | r3 >>= 0xc;
0x0001d608 and r3, r3, 0xf | r3 &= 0xf;
0x0001d60c cmp r3, 4 |
| if (r3 != 4) {
0x0001d610 bne 0x1d7f8 | goto label_6;
| }
0x0001d614 ldr r3, [sp, 0xc] | r3 = format;
0x0001d618 mov r2, r5 | r2 = r5;
0x0001d61c ldr r1, [r3, 0x128] | r1 = *((r3 + 0x128));
0x0001d620 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d624 ldr r3, [sp, 0xc] | r3 = format;
0x0001d628 ldr r1, [r4] | r1 = *(r4);
0x0001d62c ldr r0, [r3, 0x1a0] | r0 = *((r3 + 0x1a0));
0x0001d630 bl 0x12874 | fputs (r0, r1);
| label_4:
0x0001d634 add sp, sp, 0x34 |
0x0001d638 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x0001d63c cmp r3, 0x4b |
| if (r3 > 0x4b) {
0x0001d640 bhi 0x1d738 | goto label_7;
| }
0x0001d644 ldr r1, [r4] | r1 = *(r4);
0x0001d648 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x0001d64c cmp r3, 0 |
| if (r3 == 0) {
0x0001d650 beq 0x1d708 | goto label_8;
| }
0x0001d654 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001d658 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0001d65c cmp r3, r2 |
| if (r3 >= r2) {
0x0001d660 bhs 0x1d6fc | goto label_9;
| }
0x0001d664 add r2, r3, 1 | r2 = r3 + 1;
0x0001d668 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x0001d66c mov r2, 0x20 | r2 = 0x20;
0x0001d670 strb r2, [r3] | *(r3) = r2;
| label_1:
0x0001d674 mov r7, r5 | r7 = r5;
0x0001d678 mov sl, 0x20 | sl = 0x20;
| do {
0x0001d67c ldr r1, [r4] | r1 = *(r4);
0x0001d680 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x0001d684 cmp r3, 0 |
| if (r3 == 0) {
0x0001d688 beq 0x1d714 | goto label_10;
| }
0x0001d68c ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001d690 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0001d694 cmp r3, r2 |
| if (r3 >= r2) {
0x0001d698 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x0001d69c strlo r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x0001d6a0 strblo sl, [r3] | *(r3) = sl;
| }
| if (r3 > r2) {
0x0001d6a4 blo 0x1d6b0 |
0x0001d6a8 mov r0, 0x20 | r0 = 0x20;
0x0001d6ac bl 0x126d0 | fputc_unlocked ();
| }
| label_2:
0x0001d6b0 ldr r1, [r4] | r1 = *(r4);
0x0001d6b4 ldr r0, [r6], 4 | r0 = *(r6);
| r6 += 4;
0x0001d6b8 bl 0x12874 | fputs (r0, r1);
0x0001d6bc sub r7, r7, 1 | r7--;
0x0001d6c0 cmp r7, 0 |
0x0001d6c4 bgt 0x1d67c |
| } while (r7 > 0);
0x0001d6c8 ldr r1, [r4] | r1 = *(r4);
0x0001d6cc ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x0001d6d0 cmp r3, 0 |
| if (r3 != 0) {
0x0001d6d4 beq 0x1d72c |
0x0001d6d8 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x0001d6dc ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0001d6e0 cmp r3, r2 |
| if (r3 < r2) {
0x0001d6e4 bhs 0x1d720 |
0x0001d6e8 add r2, r3, 1 | r2 = r3 + 1;
0x0001d6ec str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x0001d6f0 mov r2, 0xa | r2 = 0xa;
0x0001d6f4 strb r2, [r3] | *(r3) = r2;
0x0001d6f8 b 0x1d5c8 | goto label_0;
| label_9:
0x0001d6fc mov r0, 0x20 | r0 = 0x20;
0x0001d700 bl 0x126d0 | fputc_unlocked ();
0x0001d704 b 0x1d674 | goto label_1;
| label_8:
0x0001d708 mov r0, 0x20 | r0 = 0x20;
0x0001d70c bl 0x127fc | fputc (r0, r1);
0x0001d710 b 0x1d674 | goto label_1;
| label_10:
0x0001d714 mov r0, 0x20 | r0 = 0x20;
0x0001d718 bl 0x127fc | fputc (r0, r1);
0x0001d71c b 0x1d6b0 | goto label_2;
| }
0x0001d720 mov r0, 0xa | r0 = 0xa;
0x0001d724 bl 0x126d0 | fputc_unlocked ();
0x0001d728 b 0x1d5c8 | goto label_0;
| }
0x0001d72c mov r0, 0xa | r0 = 0xa;
0x0001d730 bl 0x127fc | fputc (r0, r1);
0x0001d734 b 0x1d5c8 | goto label_0;
| label_7:
0x0001d738 ldr r3, [pc, 0xe4] | r3 = *(0x1d820);
0x0001d73c mov r2, r7 | r2 = r7;
0x0001d740 ldr r3, [sl, r3] | r3 = *((sl + r3));
0x0001d744 add sl, sp, 0x20 | sl += s;
0x0001d748 add r1, r3, 0x134 | r1 = r3 + 0x134;
0x0001d74c add r1, r1, 2 | r1 += 2;
0x0001d750 mov r0, sl | r0 = sl;
0x0001d754 str r3, [sp, 0x10] | var_10h = r3;
0x0001d758 bl 0x12970 | sprintf (r0, r1, r2)
0x0001d75c mov r1, r7 | r1 = r7;
0x0001d760 mov r0, 0x4e | r0 = 0x4e;
0x0001d764 bl 0x3683c | fcn_0003683c (r0, r1);
0x0001d768 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001d76c ldr r1, [r4] | r1 = *(r4);
0x0001d770 mov r7, r5 | r7 = r5;
0x0001d774 str r0, [sp, 0x18] | var_18h = r0;
0x0001d778 add r0, r3, 0xfe | r0 = r3 + 0xfe;
0x0001d77c bl 0x12874 | fputs (r0, r1);
0x0001d780 sub r3, r6, 4 | r3 = r6 - 4;
0x0001d784 str r3, [sp, 0x14] | var_14h = r3;
0x0001d788 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001d78c str sl, [sp, 0x1c] | var_1ch = sl;
0x0001d790 add sl, r3, 0x1c4 | sl = r3 + 0x1c4;
0x0001d794 mov r6, 0 | r6 = 0;
0x0001d798 add sl, sl, 3 | sl += 3;
| do {
| label_3:
0x0001d79c ldr r3, [sp, 0x14] | r3 = var_14h;
0x0001d7a0 sub r7, r7, 1 | r7--;
0x0001d7a4 ldr r2, [r3, 4]! | r2 = *((r3 += 4));
0x0001d7a8 cmp r7, 0 |
0x0001d7ac ldr r0, [r4] | r0 = *(r4);
0x0001d7b0 str r3, [sp, 0x14] | var_14h = r3;
| if (r7 <= 0) {
0x0001d7b4 bgt 0x1d7cc |
0x0001d7b8 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001d7bc add r1, r3, 0x1c0 | r1 = r3 + 0x1c0;
0x0001d7c0 add r1, r1, 3 | r1 += 3;
0x0001d7c4 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d7c8 b 0x1d5c8 | goto label_0;
| }
0x0001d7cc ldr r3, [sp, 0x18] | r3 = var_18h;
0x0001d7d0 add r6, r6, 1 | r6++;
0x0001d7d4 cmp r3, r6 |
| if (r3 != r6) {
0x0001d7d8 bne 0x1d7ec | goto label_11;
| }
0x0001d7dc mov r1, sl | r1 = sl;
0x0001d7e0 bl 0x12910 | fprintf (r0, r1)
0x0001d7e4 mov r6, 0 | r6 = 0;
0x0001d7e8 b 0x1d79c |
| } while (1);
| label_11:
0x0001d7ec ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x0001d7f0 bl 0x12910 | fprintf (r0, r1)
0x0001d7f4 b 0x1d79c | goto label_3;
| label_6:
0x0001d7f8 ldr r1, [sp, 0xc] | r1 = format;
0x0001d7fc sub r3, r5, 1 | r3 = r5 - 1;
0x0001d800 add r3, r3, r8 | r3 += r8;
0x0001d804 mov r2, r8 | r2 = r8;
0x0001d808 ldr r1, [r1, 0x84] | r1 = *((r1 + 0x84));
0x0001d80c bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0001d810 b 0x1d634 | goto label_4;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x1fd14 */
| #include <stdint.h>
|
; (fcn) fcn.0001fd14 () | void fcn_0001fd14 (int32_t arg1, int32_t arg2) {
| void * errnum;
| int32_t var_58h;
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_2h;
| int32_t var_1040h;
| int32_t var_3ch;
| r0 = arg1;
| r1 = arg2;
0x0001fd14 ldrh ip, [r0, 0x5e] | ip = *((r0 + 0x5e));
0x0001fd18 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001fd1c ldr r8, [pc, 0x39c] | r8 = *(0x200bc);
0x0001fd20 lsl r2, ip, 0x11 | r2 = ip << 0x11;
0x0001fd24 lsr r2, r2, 0x11 | r2 >>= 0x11;
0x0001fd28 sub sp, sp, 0x1040 |
0x0001fd2c cmp r2, 0 |
0x0001fd30 add r8, pc, r8 | r8 = pc + r8;
0x0001fd34 sub sp, sp, 0x3c |
0x0001fd38 bne 0x1fd50 |
| while (r3 == 0) {
| label_1:
0x0001fd3c mov r4, 0 | r4 = 0;
| label_0:
0x0001fd40 mov r0, r4 | r0 = r4;
0x0001fd44 add sp, sp, 0x1040 |
0x0001fd48 add sp, sp, 0x3c |
0x0001fd4c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0001fd50 ldr r3, [r0, 0x44] | r3 = *((r0 + 0x44));
0x0001fd54 str r1, [sp, 8] | var_8h = r1;
0x0001fd58 add r3, r3, ip, lsl 6 | r3 += (ip << 6);
0x0001fd5c ldr r5, [r3, 0x18] | r5 = *((r3 + 0x18));
0x0001fd60 mov r7, r0 | r7 = r0;
0x0001fd64 cmp r5, 0 |
| if (r5 != 0) {
0x0001fd68 beq 0x1fd78 |
0x0001fd6c ldrb r3, [r5] | r3 = *(r5);
0x0001fd70 cmp r3, 0 |
| if (r3 != 0) {
0x0001fd74 bne 0x200b8 | goto label_7;
| }
| }
0x0001fd78 ldr r3, [r7, 0x34] | r3 = *((r7 + 0x34));
0x0001fd7c cmp r3, 0 |
0x0001fd80 beq 0x1fd3c |
| }
| do {
0x0001fd84 mov r2, r3 | r2 = r3;
0x0001fd88 ldr r4, [r3, 4]! | r4 = *((r3 += 4));
0x0001fd8c cmp r4, 0 |
0x0001fd90 bne 0x1fd84 |
| } while (r4 != 0);
0x0001fd94 ldr r5, [r2] | r5 = *(r2);
0x0001fd98 ldrb r3, [r5] | r3 = *(r5);
0x0001fd9c cmp r3, 0x24 |
| if (r3 == 0x24) {
0x0001fda0 movne r6, r4 | r6 = r4;
| }
| if (r3 != 0x24) {
0x0001fda4 bne 0x1fe34 | goto label_2;
| }
0x0001fda8 add sb, r5, 1 | sb = r5 + 1;
0x0001fdac mov r1, 0x2f | r1 = 0x2f;
0x0001fdb0 mov r0, sb | r0 = sb;
0x0001fdb4 bl 0x12a78 | r0 = strchr (r0, r1);
0x0001fdb8 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x0001fdbc beq 0x1fe24 | goto label_8;
| }
0x0001fdc0 sub r5, r6, sb | r5 = r6 - sb;
0x0001fdc4 cmp r5, 0x7f |
| if (r5 > 0x7f) {
0x0001fdc8 bgt 0x1fd40 | goto label_0;
| }
0x0001fdcc add r3, sp, 0x78 | r3 += errnum;
0x0001fdd0 mov r2, r5 | r2 = r5;
0x0001fdd4 mov r1, sb | r1 = sb;
0x0001fdd8 mov r0, r3 | r0 = r3;
0x0001fddc bl 0x124a8 | memcpy (r0, r1, r2);
0x0001fde0 strb r4, [r0, r5] | *((r0 + r5)) = r4;
0x0001fde4 bl 0x12460 | getenv (r0);
0x0001fde8 subs fp, r0, 0 |
| if (fp != errnum) {
0x0001fdec bne 0x1fec0 | goto label_9;
| }
| do {
0x0001fdf0 ldr r3, [pc, 0x2cc] | r3 = *(0x200c0);
0x0001fdf4 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0001fdf8 ldr r5, [r8, r3] | r5 = *((r8 + r3));
0x0001fdfc ldr r3, [pc, 0x2c4] | r3 = *(0x200c4);
0x0001fe00 ldr r1, [r5, 0xf0] | r1 = *((r5 + 0xf0));
0x0001fe04 ldr r4, [r8, r3] | r4 = *((r8 + r3));
0x0001fe08 ldr r0, [r4] | r0 = *(r4);
0x0001fe0c bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5)
0x0001fe10 mov r2, sb | r2 = sb;
0x0001fe14 ldr r1, [r5, 0xc0] | r1 = *((r5 + 0xc0));
0x0001fe18 ldr r0, [r4] | r0 = *(r4);
0x0001fe1c bl 0x12910 | fprintf (r0, r1, r2)
0x0001fe20 b 0x1fd3c | goto label_1;
| label_8:
0x0001fe24 mov r0, sb | r0 = sb;
0x0001fe28 bl 0x12460 | r0 = getenv (r0);
0x0001fe2c subs r5, r0, 0 | r5 = r0 - 0;
0x0001fe30 beq 0x1fdf0 |
| } while (r5 == r0);
| label_2:
0x0001fe34 add sb, sp, 0x10 | sb += var_10h;
0x0001fe38 mov r1, sb | r1 = sb;
0x0001fe3c mov r0, r5 | r0 = r5;
0x0001fe40 bl 0x1270c | r0 = stat64 ();
0x0001fe44 cmp r0, 0 |
| if (r0 == 0) {
0x0001fe48 beq 0x1ff1c | goto label_10;
| }
0x0001fe4c bl 0x12430 | r0 = errno_location ();
0x0001fe50 ldr r3, [r0] | r3 = *(r0);
0x0001fe54 mov fp, r0 |
0x0001fe58 cmp r3, 2 |
| if (r3 == 2) {
0x0001fe5c beq 0x1ff00 | goto label_11;
| }
| label_4:
0x0001fe60 ldr r3, [pc, 0x25c] | r3 = *(0x200c0);
0x0001fe64 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0001fe68 ldr r4, [r8, r3] | r4 = *((r8 + r3));
0x0001fe6c ldr r3, [pc, 0x254] | r3 = *(0x200c4);
0x0001fe70 ldr r1, [r4, 0xf0] | r1 = *((r4 + 0xf0));
0x0001fe74 ldr r8, [r8, r3] | r8 = *((r8 + r3));
0x0001fe78 ldr r0, [r8] | r0 = *(r8);
0x0001fe7c bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
0x0001fe80 ldr r7, [r8] | r7 = *(r8);
0x0001fe84 ldr r8, [r4, 0xb0] | r8 = *((r4 + 0xb0));
0x0001fe88 ldr r4, [fp] | r4 = *(fp);
0x0001fe8c mov r0, r4 | r0 = r4;
0x0001fe90 bl 0x12a9c | strerror (r0);
0x0001fe94 str r5, [sp] | *(sp) = r5;
0x0001fe98 mov r2, r4 | r2 = r4;
0x0001fe9c mov r1, r8 | r1 = r8;
0x0001fea0 mov r3, r0 | r3 = r0;
0x0001fea4 mov r0, r7 | r0 = r7;
0x0001fea8 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5)
0x0001feac cmp r6, 0 |
| if (r6 != 0) {
0x0001feb0 movne r0, r5 | r0 = r5;
| goto label_12;
| }
| if (r6 == 0) {
| label_12:
0x0001feb4 beq 0x1fd3c | goto label_1;
| }
| label_3:
0x0001feb8 bl 0x12a54 | free (r0);
0x0001febc b 0x1fd3c | goto label_1;
| label_9:
0x0001fec0 bl 0x1261c | r0 = strlen (r0);
0x0001fec4 mov r4, r0 | r4 = r0;
0x0001fec8 mov r0, r6 | r0 = r6;
0x0001fecc bl 0x1261c | r0 = strlen (r0);
0x0001fed0 add r0, r4, r0 | r0 = r4 + r0;
0x0001fed4 add r0, r0, 2 | r0 += var_2h;
0x0001fed8 bl 0x1e664 | fcn_0001e664 (r0);
0x0001fedc subs r5, r0, 0 | r5 -= var_2h;
| if (r5 == var_2h) {
0x0001fee0 beq 0x1fd3c | goto label_1;
| }
0x0001fee4 ldr r1, [pc, 0x1e0] | r1 = *(0x200c8);
0x0001fee8 mov r3, r6 | r3 = r6;
0x0001feec mov r2, fp | r2 = fp;
0x0001fef0 add r1, pc, r1 | r1 = pc + r1;
0x0001fef4 bl 0x12970 | sprintf (r0, r1, r2)
0x0001fef8 mov r6, 1 | r6 = 1;
0x0001fefc b 0x1fe34 | goto label_2;
| label_11:
0x0001ff00 mov r1, 0x2f | r1 = 0x2f;
0x0001ff04 mov r0, r5 | r0 = r5;
0x0001ff08 bl 0x125a4 | r0 = strrchr (r0, r1);
0x0001ff0c cmp r0, 0 |
| if (r0 == 0) {
0x0001ff10 bne 0x20010 |
| label_5:
0x0001ff14 mov r2, 0x8000 | r2 = 0x8000;
0x0001ff18 str r2, [sp, 0x20] | var_58h = r2;
| label_10:
0x0001ff1c add fp, sp, 0x78 |
0x0001ff20 ldr r3, [fp, -0x58] | r3 = var_58h;
0x0001ff24 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0001ff28 cmp r3, 0x4000 |
| if (r3 == 0x4000) {
0x0001ff2c movne r4, r5 | r4 = r5;
| }
| if (r3 != 0x4000) {
0x0001ff30 bne 0x20064 | goto label_13;
| }
0x0001ff34 mov r0, r5 | r0 = r5;
0x0001ff38 bl 0x1261c | r0 = strlen (r0);
0x0001ff3c mov r4, r0 | r4 = r0;
0x0001ff40 ldr r0, [r7, 0x24] | r0 = *((r7 + 0x24));
0x0001ff44 bl 0x1261c | r0 = strlen (r0);
0x0001ff48 add r1, r4, r0 | r1 = r4 + r0;
0x0001ff4c add r1, r1, 2 | r1 += 2;
0x0001ff50 mov r0, r1 | r0 = r1;
0x0001ff54 str r1, [sp, 0xc] | var_ch = r1;
0x0001ff58 bl 0x1e664 | fcn_0001e664 (r0);
0x0001ff5c ldr r3, [r7, 0x24] | r3 = *((r7 + 0x24));
0x0001ff60 ldr r2, [pc, 0x168] | r2 = *(0x200cc);
0x0001ff64 str r3, [sp] | *(sp) = r3;
0x0001ff68 add r2, pc, r2 | r2 = pc + r2;
0x0001ff6c mov r3, r5 | r3 = r5;
0x0001ff70 ldr r1, [sp, 0xc] | r1 = var_ch;
0x0001ff74 mov r4, r0 | r4 = r0;
0x0001ff78 bl 0x2e74c | fcn_0002e74c ();
0x0001ff7c cmp r6, 0 |
| if (r6 != 0) {
0x0001ff80 beq 0x1ff8c |
0x0001ff84 mov r0, r5 | r0 = r5;
0x0001ff88 bl 0x12a54 | free (r0);
| }
0x0001ff8c mov r1, sb | r1 = sb;
0x0001ff90 mov r0, r4 | r0 = r4;
0x0001ff94 bl 0x1270c | r0 = stat64 ();
0x0001ff98 cmp r0, 0 |
| if (r0 == 0) {
0x0001ff9c beq 0x20060 | goto label_14;
| }
0x0001ffa0 bl 0x12430 | r0 = errno_location ();
0x0001ffa4 ldr r3, [r0] | r3 = *(r0);
0x0001ffa8 mov r5, r0 | r5 = r0;
0x0001ffac cmp r3, 2 |
| if (r3 != 2) {
0x0001ffb0 moveq r3, 0x8000 | r3 = 0x8000;
| }
| if (r3 != 2) {
0x0001ffb4 streq r3, [fp, -0x58] | var_58h = r3;
| }
| if (r3 == 2) {
0x0001ffb8 beq 0x20060 | goto label_14;
| }
0x0001ffbc ldr r3, [pc, 0x100] | r3 = *(0x200c0);
0x0001ffc0 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0001ffc4 ldr r6, [r8, r3] | r6 = *((r8 + r3));
0x0001ffc8 ldr r3, [pc, 0xf8] | r3 = *(0x200c4);
0x0001ffcc ldr r1, [r6, 0xf0] | r1 = *((r6 + 0xf0));
0x0001ffd0 ldr r8, [r8, r3] | r8 = *((r8 + r3));
0x0001ffd4 ldr r0, [r8] | r0 = *(r8);
0x0001ffd8 bl 0x12910 | fprintf (r0, r1, r2, r3, r4, r5, r6)
0x0001ffdc ldr r5, [r5] | r5 = *(r5);
0x0001ffe0 ldr r7, [r8] | r7 = *(r8);
0x0001ffe4 mov r0, r5 | r0 = r5;
0x0001ffe8 ldr r6, [r6, 0xb0] | r6 = *((r6 + 0xb0));
0x0001ffec bl 0x12a9c | strerror (r0);
0x0001fff0 str r4, [sp] | *(sp) = r4;
0x0001fff4 mov r2, r5 | r2 = r5;
0x0001fff8 mov r1, r6 | r1 = r6;
0x0001fffc mov r3, r0 | r3 = r0;
0x00020000 mov r0, r7 | r0 = r7;
0x00020004 bl 0x12910 | fprintf (r0, r1, r2, r3, r4)
| label_6:
0x00020008 mov r0, r4 | r0 = r4;
0x0002000c b 0x1feb8 | goto label_3;
| }
0x00020010 sub r4, r0, r5 | r4 = r0 - r5;
0x00020014 cmp r4, 0x1000 |
| if (r4 >= 0x1000) {
0x00020018 bhs 0x1fe60 | goto label_4;
| }
0x0002001c add sl, sp, 0x78 | sl += errnum;
0x00020020 mov r2, r4 | r2 = r4;
0x00020024 mov r1, r5 | r1 = r5;
0x00020028 mov r0, sl | r0 = sl;
0x0002002c bl 0x124a8 | memcpy (r0, r1, r2);
0x00020030 mov r2, 0 | r2 = 0;
0x00020034 mov r1, sb | r1 = sb;
0x00020038 mov r0, sl | r0 = sl;
0x0002003c strb r2, [sl, r4] | *((sl + r4)) = r2;
0x00020040 bl 0x1270c | r0 = stat64 ();
0x00020044 cmp r0, 0 |
| if (r0 != 0) {
0x00020048 bne 0x1fe60 | goto label_4;
| }
0x0002004c ldr r3, [sl, -0x58] | r3 = var_58h;
0x00020050 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00020054 cmp r3, 0x4000 |
| if (r3 == 0x4000) {
0x00020058 beq 0x1ff14 | goto label_5;
| }
0x0002005c b 0x1fe60 | goto label_4;
| label_14:
0x00020060 mov r6, 1 | r6 = 1;
| label_13:
0x00020064 ldr r3, [fp, -0x58] | r3 = var_58h;
0x00020068 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0002006c cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x00020070 beq 0x200a4 | goto label_15;
| }
0x00020074 ldr r3, [pc, 0x48] | r3 = *(0x200c0);
0x00020078 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0002007c ldr r1, [r8, r3] | r1 = *((r8 + r3));
0x00020080 ldr r3, [pc, 0x40] | r3 = *(0x200c4);
0x00020084 ldr r1, [r1, 0xf0] | r1 = *((r1 + 0xf0));
0x00020088 ldr r0, [r8, r3] | r0 = *((r8 + r3));
0x0002008c mov r3, r4 | r3 = r4;
0x00020090 ldr r0, [r0] | r0 = *(r0);
0x00020094 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x00020098 cmp r6, 0 |
| if (r6 == 0) {
0x0002009c beq 0x1fd3c | goto label_1;
| }
0x000200a0 b 0x20008 | goto label_6;
| label_15:
0x000200a4 mov r0, r4 | r0 = r4;
0x000200a8 bl 0x1288c | unlink (r0);
0x000200ac ldr r3, [sp, 8] | r3 = var_8h;
0x000200b0 str r6, [r3] | *(r3) = r6;
0x000200b4 b 0x1fd40 | goto label_0;
| label_7:
0x000200b8 mov r6, 0 | r6 = 0;
0x000200bc b 0x1fe34 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x22be4 */
| #include <stdint.h>
|
; (fcn) fcn.00022be4 () | void fcn_00022be4 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x00022be4 push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00022be8 mov r5, r0 | r5 = r0;
0x00022bec mov r0, r2 | r0 = r2;
0x00022bf0 mov r6, r1 | r6 = r1;
0x00022bf4 mov r4, r2 | r4 = r2;
0x00022bf8 mov r8, r3 | r8 = r3;
0x00022bfc bl 0x1261c | r0 = strlen (r0);
0x00022c00 cmp r0, 0 |
0x00022c04 cmpne r6, r0 | __asm ("cmpne r6, r0");
| if (r0 > 0) {
0x00022c08 movls sb, 1 | sb = 1;
| }
| if (r0 <= 0) {
0x00022c0c movhi sb, 0 | sb = 0;
| }
| if (r0 <= 0) {
0x00022c10 bhi 0x22c24 |
| label_0:
0x00022c14 mov sb, 0 | sb = 0;
| label_1:
0x00022c18 mov r0, sb | r0 = sb;
0x00022c1c add sp, sp, 0xc |
0x00022c20 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00022c24 ldrb r3, [r4] | r3 = *(r4);
0x00022c28 cmp r3, 0x24 |
| if (r3 == 0x24) {
0x00022c2c beq 0x22c5c | goto label_3;
| }
0x00022c30 sub r1, r5, 1 | r1 = r5 - 1;
0x00022c34 mov r2, r4 | r2 = r4;
| do {
0x00022c38 ldrb r3, [r2], 1 | r3 = *(r2);
| r2++;
0x00022c3c cmp r3, 0 |
0x00022c40 strb r3, [r1, 1]! | *((r1 += 1)) = r3;
| if (r3 == 0) {
0x00022c44 beq 0x22d54 | goto label_2;
| }
0x00022c48 sub r3, r6, r2 | r3 = r6 - r2;
0x00022c4c add r3, r4, r3 | r3 = r4 + r3;
0x00022c50 cmp r3, 0 |
0x00022c54 bgt 0x22c38 |
| } while (r3 > 0);
0x00022c58 b 0x22c14 | goto label_0;
| label_3:
0x00022c5c ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x00022c60 cmp r3, 0x24 |
| if (r3 == 0x24) {
0x00022c64 beq 0x22ca0 | goto label_4;
| }
0x00022c68 cmp r3, 0x40 |
| if (r3 == 0x40) {
0x00022c6c beq 0x22d7c | goto label_5;
| }
0x00022c70 cmp r3, 0 |
| if (r3 == 0) {
0x00022c74 movne r2, r5 | r2 = r5;
| }
| if (r3 != 0) {
0x00022c78 ldrne r8, [pc, 0x1b4] | r8 = *(0x00022e34);
| goto label_6;
| }
| if (r3 == 0) {
| label_6:
0x00022c7c beq 0x22c18 | goto label_1;
| }
| do {
0x00022c80 ldrb r7, [r4, 1]! | r7 = *((r4 += 1));
0x00022c84 mov r1, r8 | r1 = r8;
0x00022c88 mov r0, r7 | r0 = r7;
0x00022c8c bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x00022c90 cmp r0, 0 |
| if (r0 == 0) {
0x00022c94 beq 0x22dbc | goto label_7;
| }
0x00022c98 strb r7, [r2], 1 | *(r2) = r7;
| r2++;
0x00022c9c b 0x22c80 |
| } while (1);
| label_4:
0x00022ca0 ldrb r3, [r4, 2] | r3 = *((r4 + 2));
0x00022ca4 cmp r3, 0 |
| if (r3 == 0) {
0x00022ca8 beq 0x22cbc | goto label_8;
| }
0x00022cac cmp r3, 0x2f |
| if (r3 != 0x2f) {
0x00022cb0 bne 0x22c18 | goto label_1;
| }
0x00022cb4 mov fp, 3 |
0x00022cb8 b 0x22cc0 | goto label_9;
| label_8:
0x00022cbc mov fp, 2 |
| label_9:
0x00022cc0 mov r1, 0x2f | r1 = 0x2f;
0x00022cc4 mov r0, r8 | r0 = r8;
0x00022cc8 bl 0x12a78 | r0 = strchr (r0, r1);
0x00022ccc cmp r0, 0 |
| if (r0 == 0) {
0x00022cd0 movne sl, r8 | sl = r8;
| }
| if (r0 != 0) {
0x00022cd4 bne 0x22cf4 | goto label_10;
| }
0x00022cd8 ldr r0, [pc, 0x158] | r0 = *(0x22e34);
0x00022cdc add r0, pc, r0 | r0 = pc + r0;
0x00022ce0 bl 0x12460 | getenv (r0);
0x00022ce4 mov r1, r8 | r1 = r8;
0x00022ce8 bl 0x200d4 | r0 = fcn_000200d4 (r0, r1);
0x00022cec subs sl, r0, 0 | sl = r0 - 0;
| if (sl == r0) {
0x00022cf0 beq 0x22c14 | goto label_0;
| }
| label_10:
0x00022cf4 mov r1, 0x2f | r1 = 0x2f;
0x00022cf8 mov r0, sl | r0 = sl;
0x00022cfc bl 0x125a4 | r0 = strrchr (r0, r1);
0x00022d00 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 == r0) {
0x00022d04 beq 0x22c14 | goto label_0;
| }
0x00022d08 add r4, r4, fp | r4 += fp;
0x00022d0c mov r0, r4 | r0 = r4;
0x00022d10 bl 0x1261c | strlen (r0);
0x00022d14 sub r7, r7, sl | r7 -= sl;
0x00022d18 add r7, r7, 1 | r7++;
0x00022d1c add r0, r0, r7 | r0 += r7;
0x00022d20 cmp r6, r0 |
| if (r6 < r0) {
0x00022d24 bls 0x22c14 | goto label_0;
| }
0x00022d28 mov r2, r7 | r2 = r7;
0x00022d2c mov r1, sl | r1 = sl;
0x00022d30 mov r0, r5 | r0 = r5;
0x00022d34 bl 0x124a8 | memcpy (r0, r1, r2);
0x00022d38 mov r1, r4 | r1 = r4;
0x00022d3c add r0, r5, r7 | r0 = r5 + r7;
0x00022d40 bl 0x12b20 | strcpy (r0, r1);
0x00022d44 cmp r8, sl |
| if (r8 != sl) {
0x00022d48 beq 0x22d54 |
0x00022d4c mov r0, sl | r0 = sl;
0x00022d50 bl 0x12a54 | free (r0);
| }
| label_2:
0x00022d54 mov r0, r5 | r0 = r5;
0x00022d58 bl 0x12424 | r0 = canonicalize_file_name ();
0x00022d5c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00022d60 beq 0x22c14 | goto label_0;
| }
0x00022d64 bl 0x1261c | r0 = strlen (r0);
0x00022d68 cmp r6, r0 |
| if (r6 > r0) {
0x00022d6c bhi 0x22e14 | goto label_11;
| }
0x00022d70 mov r0, r4 | r0 = r4;
0x00022d74 bl 0x12a54 | free (r0);
0x00022d78 b 0x22c18 | goto label_1;
| label_5:
0x00022d7c ldr r3, [pc, 0xb8] |
0x00022d80 add r3, pc, r3 | r3 = pc + r3;
0x00022d84 ldr r3, [r3] | r3 = *(0x22e38);
0x00022d88 ldrb r2, [r3] | r2 = *(r3);
0x00022d8c cmp r2, 0 |
| if (r2 == 0) {
0x00022d90 beq 0x22c14 | goto label_0;
| }
0x00022d94 ldr r2, [pc, 0xa4] | r2 = *(0x22e3c);
0x00022d98 add r4, r4, 2 | r4 += 2;
0x00022d9c str r4, [sp] | *(sp) = r4;
0x00022da0 add r2, pc, r2 | r2 = pc + r2;
0x00022da4 mov r1, r6 | r1 = r6;
0x00022da8 mov r0, r5 | r0 = r5;
0x00022dac bl 0x2e74c | r0 = fcn_0002e74c ();
0x00022db0 cmp r0, r6 |
| if (r0 < r6) {
0x00022db4 blt 0x22d54 | goto label_2;
| }
0x00022db8 b 0x22c14 | goto label_0;
| label_7:
0x00022dbc cmp r5, r2 |
| if (r5 == r2) {
0x00022dc0 beq 0x22c14 | goto label_0;
| }
0x00022dc4 strb r0, [r2] | *(r2) = r0;
0x00022dc8 mov r0, r5 | r0 = r5;
0x00022dcc bl 0x12460 | r0 = getenv (r0);
0x00022dd0 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 == r0) {
0x00022dd4 beq 0x22c14 | goto label_0;
| }
0x00022dd8 bl 0x1261c | r0 = strlen (r0);
0x00022ddc mov r7, r0 | r7 = r0;
0x00022de0 mov r0, r4 | r0 = r4;
0x00022de4 bl 0x1261c | r0 = strlen (r0);
0x00022de8 add r0, r7, r0 | r0 = r7 + r0;
0x00022dec add r0, r0, 1 | r0++;
0x00022df0 cmp r6, r0 |
| if (r6 < r0) {
0x00022df4 bls 0x22c14 | goto label_0;
| }
0x00022df8 ldr r1, [pc, 0x44] | r1 = *(0x22e40);
0x00022dfc mov r3, r4 | r3 = r4;
0x00022e00 mov r2, r8 | r2 = r8;
0x00022e04 add r1, pc, r1 | r1 = pc + r1;
0x00022e08 mov r0, r5 | r0 = r5;
0x00022e0c bl 0x12970 | sprintf (r0, r1, r2)
0x00022e10 b 0x22d54 | goto label_2;
| label_11:
0x00022e14 add r2, r0, 1 | r2 = r0 + 1;
0x00022e18 mov r1, r4 | r1 = r4;
0x00022e1c mov r0, r5 | r0 = r5;
0x00022e20 bl 0x124a8 | memcpy (r0, r1, r2);
0x00022e24 mov r0, r4 | r0 = r4;
0x00022e28 bl 0x12a54 | free (r0);
0x00022e2c mov sb, 1 | sb = 1;
0x00022e30 b 0x22c18 | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x23290 */
| #include <stdint.h>
|
; (fcn) fcn.00023290 () | void fcn_00023290 (int32_t arg1, char * s) {
| r0 = arg1;
| r1 = s;
0x00023290 push {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00023294 ldr sb, [pc, 0x20c] | sb = *(0x234a4);
0x00023298 mov r6, r0 | r6 = r0;
0x0002329c mov r0, r1 | r0 = r1;
0x000232a0 mov r8, r1 | r8 = r1;
0x000232a4 bl 0x1261c | strlen (r0);
0x000232a8 mov r2, r6 | r2 = r6;
0x000232ac mov ip, 1 |
0x000232b0 add sb, pc, sb | sb = pc + sb;
0x000232b4 mov r7, r0 | r7 = r0;
0x000232b8 mov r0, 3 | r0 = 3;
| do {
| label_0:
0x000232bc ldrb r3, [r2], 1 | r3 = *(r2);
| r2++;
0x000232c0 sub r1, r3, 0x20 | r1 = r3 - 0x20;
0x000232c4 cmp r1, 0x5e |
| if (r1 > 0x5e) {
0x000232c8 bhi 0x232e4 | goto label_5;
| }
0x000232cc cmp r3, 0x5c |
0x000232d0 cmpne r3, 0x22 | __asm ("cmpne r3, 0x22");
| if (r3 == 0x5c) {
0x000232d4 movne r3, 1 | r3 = 1;
| }
| if (r3 != 0x5c) {
0x000232d8 moveq r3, 2 | r3 = 2;
| }
0x000232dc add r0, r0, r3 | r0 += r3;
0x000232e0 b 0x232bc |
| } while (1);
| label_5:
0x000232e4 cmp r3, 0xd |
| if (r3 > 0xd) {
0x000232e8 bhi 0x23368 | goto label_6;
| }
0x000232ec lsl r1, ip, r3 | r1 = ip << r3;
0x000232f0 tst r1, 0x3b80 |
| if ((r1 & 0x3b80) != 0) {
0x000232f4 bne 0x23360 | goto label_7;
| }
0x000232f8 tst r1, 0x400 |
| if ((r1 & 0x400) != 0) {
0x000232fc bne 0x23358 | goto label_8;
| }
0x00023300 cmp r3, 0 |
| if (r3 != 0) {
0x00023304 bne 0x23368 | goto label_6;
| }
0x00023308 bl 0x1e664 | fcn_0001e664 (r0);
0x0002330c mov r5, 0x5c | r5 = 0x5c;
0x00023310 mov r3, 0x22 | r3 = 0x22;
0x00023314 mov sl, 0x72 | sl = 0x72;
0x00023318 mov fp, r0 |
0x0002331c add r4, r0, 1 | r4 = r0 + 1;
0x00023320 strb r3, [r0] | *(r0) = r3;
| do {
| label_1:
0x00023324 ldrb r2, [r6] | r2 = *(r6);
0x00023328 sub r3, r2, 0x20 | r3 = r2 - 0x20;
0x0002332c cmp r3, 0x5e |
| if (r3 > 0x5e) {
0x00023330 bhi 0x23370 | goto label_9;
| }
0x00023334 cmp r2, 0x5c |
0x00023338 cmpne r2, 0x22 | __asm ("cmpne r2, 0x22");
| if (r2 != 0x5c) {
0x0002333c strbeq r5, [r4] | *(r4) = r5;
| }
| if (r2 != 0x5c) {
0x00023340 addeq r4, r4, 1 | r4++;
| }
0x00023344 add r3, r4, 1 | r3 = r4 + 1;
0x00023348 strb r2, [r4] | *(r4) = r2;
| label_2:
0x0002334c add r6, r6, 1 | r6++;
0x00023350 mov r4, r3 | r4 = r3;
0x00023354 b 0x23324 |
| } while (1);
| label_8:
0x00023358 add r0, r0, r7 | r0 += r7;
0x0002335c b 0x232bc | goto label_0;
| label_7:
0x00023360 add r0, r0, 2 | r0 += 2;
0x00023364 b 0x232bc | goto label_0;
| label_6:
0x00023368 add r0, r0, 4 | r0 += 4;
0x0002336c b 0x232bc | goto label_0;
| label_9:
0x00023370 cmp r2, 0xd |
| if (r2 > 0xd) {
| /* switch table (14 cases) at 0x2337c */
0x00023374 addls pc, pc, r2, lsl 2 | pc += (r2 << 2);
| }
0x00023378 b 0x23488 | goto label_10;
0x0002337c b 0x23470 | goto label_11;
0x00023380 b 0x23488 | goto label_10;
0x00023384 b 0x23488 | goto label_10;
0x00023388 b 0x23488 | goto label_10;
0x0002338c b 0x23488 | goto label_10;
0x00023390 b 0x23488 | goto label_10;
0x00023394 b 0x23488 | goto label_10;
0x00023398 b 0x233ec | goto label_12;
0x0002339c b 0x23400 | goto label_13;
0x000233a0 b 0x23410 | goto label_14;
0x000233a4 b 0x233b4 | goto label_15;
0x000233a8 b 0x23420 | goto label_16;
0x000233ac b 0x23430 | goto label_17;
0x000233b0 b 0x23440 | goto label_18;
| label_15:
0x000233b4 mov r1, 0x6e | r1 = 0x6e;
| label_4:
0x000233b8 ldrb r2, [r6, 1]! | r2 = *((r6 += 1));
0x000233bc mov r3, r4 | r3 = r4;
0x000233c0 cmp r2, 0xa |
0x000233c4 add r4, r4, 2 | r4 += 2;
| if (r2 == 0xa) {
0x000233c8 beq 0x23450 | goto label_19;
| }
0x000233cc cmp r2, 0 |
| if (r2 == 0) {
0x000233d0 beq 0x2345c | goto label_20;
| }
0x000233d4 mov r2, r7 | r2 = r7;
0x000233d8 mov r1, r8 | r1 = r8;
0x000233dc mov r0, r3 | r0 = r3;
0x000233e0 bl 0x124a8 | r0 = memcpy (r0, r1, r2);
0x000233e4 add r4, r0, r7 | r4 = r0 + r7;
0x000233e8 b 0x23324 | goto label_1;
| label_12:
0x000233ec mov r3, r4 | r3 = r4;
0x000233f0 mov r2, 0x61 | r2 = 0x61;
0x000233f4 strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
| do {
| label_3:
0x000233f8 strb r2, [r4, 1] | *((r4 + 1)) = r2;
0x000233fc b 0x2334c | goto label_2;
| label_13:
0x00023400 mov r3, r4 | r3 = r4;
0x00023404 strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x00023408 mov r2, 0x62 | r2 = 0x62;
0x0002340c b 0x233f8 |
| } while (1);
| label_14:
0x00023410 mov r3, r4 | r3 = r4;
0x00023414 strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x00023418 mov r2, 0x74 | r2 = 0x74;
0x0002341c b 0x233f8 | goto label_3;
| label_16:
0x00023420 mov r3, r4 | r3 = r4;
0x00023424 strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x00023428 mov r2, 0x76 | r2 = 0x76;
0x0002342c b 0x233f8 | goto label_3;
| label_17:
0x00023430 mov r3, r4 | r3 = r4;
0x00023434 strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x00023438 mov r2, 0x66 | r2 = 0x66;
0x0002343c b 0x233f8 | goto label_3;
| label_18:
0x00023440 mov r3, r4 | r3 = r4;
0x00023444 strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x00023448 strb sl, [r4, 1] | *((r4 + 1)) = sl;
0x0002344c b 0x2334c | goto label_2;
| label_19:
0x00023450 strb r5, [r4, -2] | *((r4 - 2)) = r5;
0x00023454 strb r1, [r4, -1] | *((r4 - 1)) = r1;
0x00023458 b 0x233b8 | goto label_4;
| label_20:
0x0002345c mov r2, 0x5c | r2 = 0x5c;
0x00023460 mov r4, r3 | r4 = r3;
0x00023464 strb r2, [r4], 2 | *(r4) = r2;
| r4 += 2;
0x00023468 mov r2, 0x6e | r2 = 0x6e;
0x0002346c strb r2, [r3, 1] | *((r3 + 1)) = r2;
| label_11:
0x00023470 mov r3, 0x22 | r3 = 0x22;
0x00023474 strb r3, [r4] | *(r4) = r3;
0x00023478 mov r3, 0 | r3 = 0;
0x0002347c strb r3, [r4, 1] | *((r4 + 1)) = r3;
0x00023480 mov r0, fp | r0 = fp;
0x00023484 pop {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_10:
0x00023488 ldr r3, [pc, 0x1c] | r3 = *(0x234a8);
0x0002348c mov r0, r4 | r0 = r4;
0x00023490 ldr r1, [sb, r3] | r1 = *((sb + r3));
0x00023494 add r1, r1, 0x1a4 | r1 += 0x1a4;
0x00023498 add r1, r1, 2 | r1 += 2;
0x0002349c bl 0x12970 | sprintf (r0, r1, r2)
0x000234a0 add r3, r4, 4 | r3 = r4 + 4;
0x000234a4 b 0x2334c | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x25874 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00025874 () | void fcn_00025874 (int32_t arg_4h, int32_t arg_6h, int32_t arg1, char * arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| char * format;
| int32_t var_18h;
| char * * endptr;
| char * s2;
| int32_t var_24h;
| char * var_28h;
| int32_t var_2ch;
| int32_t var_34h;
| int32_t var_38h;
| int32_t var_39h;
| int32_t var_3ah;
| int32_t var_3ch;
| int32_t var_48h;
| int32_t var_4ch;
| int32_t var_50h;
| int32_t var_54h;
| int32_t var_58h;
| char * str;
| int32_t var_bch;
| r0 = arg1;
| r1 = arg2;
0x00025874 ldr r3, [pc, 0x6fc] | r3 = *(0x25f74);
0x00025878 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002587c add r3, pc, r3 | r3 = pc + r3;
0x00025880 sub sp, sp, 0xbc |
0x00025884 mov r6, r0 | r6 = r0;
0x00025888 str r3, [sp, 0x18] | var_18h = r3;
0x0002588c mov r3, 0 | r3 = 0;
0x00025890 str r3, [sp, 0x48] | var_48h = r3;
0x00025894 str r3, [sp, 0x4c] | var_4ch = r3;
0x00025898 str r3, [sp, 0x54] | var_54h = r3;
0x0002589c ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x000258a0 mov r5, 2 | r5 = 2;
0x000258a4 mov r0, r1 | r0 = r1;
0x000258a8 str r2, [sp, 0xc] | var_ch = r2;
0x000258ac str r3, [sp, 0x24] | var_24h = r3;
0x000258b0 mov r2, r5 | r2 = r5;
0x000258b4 add r3, sp, 0x58 | r3 += var_58h;
0x000258b8 mov r1, 3 | r1 = 3;
0x000258bc str r5, [sp, 0x50] | var_50h = r5;
0x000258c0 bl 0x25634 | r0 = fcn_00025634 (r0, r1);
0x000258c4 cmn r0, 1 |
| if (r0 == 1) {
0x000258c8 beq 0x25a4c | goto label_16;
| }
0x000258cc ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x000258d0 mov r4, r0 | r4 = r0;
0x000258d4 bic r2, r3, 4 | r2 = BIT_MASK (r3, 4);
0x000258d8 str r2, [r6, 0xc] | *((r6 + 0xc)) = r2;
0x000258dc ldr r2, [sp, 0xc] | r2 = var_ch;
0x000258e0 cmp r2, 0 |
| if (r2 != 0) {
0x000258e4 moveq r2, 4 | r2 = 4;
| }
| if (r2 != 0) {
0x000258e8 streq r2, [sp, 0x10] | var_10h = r2;
| }
| if (r2 != 0) {
0x000258ec moveq r2, 1 | r2 = 1;
| }
| if (r2 == 0) {
0x000258f0 strne r5, [sp, 0x10] | var_10h = r5;
| }
| if (r2 != 0) {
0x000258f4 streq r2, [sp, 0xc] | var_ch = r2;
| }
0x000258f8 tst r3, 0x80000 |
0x000258fc ldr r3, [sp, 0x10] | r3 = var_10h;
| if ((r3 & 0x80000) != 0) {
0x00025900 moveq r3, 1 | r3 = 1;
| }
0x00025904 str r3, [sp, 0x10] | var_10h = r3;
0x00025908 ldr r3, [pc, 0x66c] |
0x0002590c add r3, pc, r3 | r3 = pc + r3;
0x00025910 add r3, r3, 0x530 | r3 = 0x264a8;
0x00025914 add r3, r3, 3 | r3 += 3;
0x00025918 str r3, [sp, 0x14] | format = r3;
| do {
0x0002591c ldr r3, [sp, 0x10] | r3 = var_10h;
0x00025920 mov r1, 0xc | r1 = 0xc;
0x00025924 mov r0, r4 | r0 = r4;
0x00025928 str r3, [sp, 0x50] | var_50h = r3;
0x0002592c bl 0x1e4ac | fcn_0001e4ac (r0, r1);
0x00025930 ldr r1, [pc, 0x648] | r1 = *(0x25f7c);
0x00025934 ldrb r2, [r0] | r2 = *(r0);
0x00025938 mov r5, r0 | r5 = r0;
0x0002593c mov r0, r2 | r0 = r2;
0x00025940 bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x00025944 cmp r0, 0 |
| if (r0 == 0) {
0x00025948 beq 0x25a70 | goto label_17;
| }
0x0002594c add r4, r5, 1 | r4 = r5 + 1;
0x00025950 mov r1, 0xa | r1 = 0xa;
0x00025954 mov r0, r4 | r0 = r4;
0x00025958 bl 0x12a78 | r0 = strchr (r0, r1);
0x0002595c subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00025960 bne 0x2597c | goto label_18;
| }
0x00025964 mov r0, r4 | r0 = r4;
0x00025968 bl 0x1261c | r0 = strlen (r0);
0x0002596c add r4, r4, r0 | r4 += r0;
| label_1:
0x00025970 cmp r4, 0 |
0x00025974 bne 0x2591c |
| } while (r4 != 0);
0x00025978 b 0x25a3c | goto label_4;
| label_18:
0x0002597c mov r1, 0x1c | r1 = 0x1c;
0x00025980 mov r0, r4 | r0 = r4;
0x00025984 bl 0x1e4ac | fcn_0001e4ac (r0, r1);
0x00025988 mov r1, 0xc | r1 = 0xc;
0x0002598c bl 0x1e4ac | r0 = fcn_0001e4ac (r0, r1);
0x00025990 cmp r7, r0 |
0x00025994 bhs 0x259a8 |
| while (r7 <= r0) {
| label_0:
0x00025998 mov r3, 0 | r3 = 0;
0x0002599c add r4, r7, 1 | r4 = r7 + 1;
0x000259a0 strb r3, [r7] | *(r7) = r3;
0x000259a4 b 0x25a08 | goto label_19;
0x000259a8 ldrb r3, [r0] | r3 = *(r0);
0x000259ac cmp r3, 0x3a |
0x000259b0 cmpne r3, 0x3d | __asm ("cmpne r3, 0x3d");
| if (r3 != 0x3a) {
0x000259b4 bne 0x25a28 | goto label_20;
| }
0x000259b8 mov r1, 0xc | r1 = 0xc;
0x000259bc add r0, r0, 1 | r0++;
0x000259c0 bl 0x1e4ac | r0 = fcn_0001e4ac (r0, r1);
0x000259c4 cmp r7, r0 |
0x000259c8 blo 0x25998 |
| }
| label_2:
0x000259cc ldrb r3, [r7, -1] | r3 = *((r7 - 1));
0x000259d0 cmp r3, 0x5c |
| if (r3 != 0x5c) {
0x000259d4 bne 0x25998 | goto label_0;
| }
0x000259d8 sub r2, r7, 1 | r2 = r7 - 1;
| label_3:
0x000259dc ldrb r3, [r7] | r3 = *(r7);
0x000259e0 add r4, r7, 1 | r4 = r7 + 1;
0x000259e4 cmp r3, 0xa |
| if (r3 != 0xa) {
0x000259e8 beq 0x25a00 |
0x000259ec cmp r3, 0x5c |
| if (r3 == 0x5c) {
0x000259f0 beq 0x25a54 | goto label_21;
| }
0x000259f4 cmp r3, 0 |
| if (r3 != 0) {
0x000259f8 bne 0x25a64 | goto label_22;
| }
0x000259fc mov r4, r3 | r4 = r3;
| }
0x00025a00 mov r3, 0 | r3 = 0;
0x00025a04 strb r3, [r2] | *(r2) = r3;
| label_19:
0x00025a08 mov r3, 1 | r3 = 1;
| label_7:
0x00025a0c str r3, [sp] | *(sp) = r3;
0x00025a10 mov r2, r5 | r2 = r5;
0x00025a14 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00025a18 add r1, sp, 0x48 | r1 += var_48h;
0x00025a1c mov r0, r6 | r0 = r6;
0x00025a20 bl 0x245bc | fcn_000245bc (r0, r1, r2);
0x00025a24 b 0x25970 | goto label_1;
| label_20:
0x00025a28 ldr r1, [pc, 0x554] | r1 = *(0x25f80);
0x00025a2c ldrb r0, [r0, -1] | r0 = *((r0 - 1));
0x00025a30 bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x00025a34 cmp r0, 0 |
| if (r0 != 0) {
0x00025a38 bne 0x259cc | goto label_2;
| }
| do {
| label_4:
0x00025a3c add r0, sp, 0x58 | r0 += var_58h;
0x00025a40 bl 0x25828 | fcn_00025828 (r0);
0x00025a44 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00025a48 str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
| label_16:
0x00025a4c add sp, sp, 0xbc |
0x00025a50 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_21:
0x00025a54 ldrb r1, [r7, 1] | r1 = *((r7 + 1));
0x00025a58 cmp r1, 0xa |
| if (r1 != 0xa) {
0x00025a5c addeq r4, r7, 2 | r4 = r7 + 2;
| }
| if (r1 != 0xa) {
0x00025a60 moveq r3, r1 | r3 = r1;
| }
| label_22:
0x00025a64 strb r3, [r2], 1 | *(r2) = r3;
| r2++;
0x00025a68 mov r7, r4 | r7 = r4;
0x00025a6c b 0x259dc | goto label_3;
| label_17:
0x00025a70 cmp r2, 0x3c |
| if (r2 == 0x3c) {
0x00025a74 beq 0x25a94 | goto label_23;
| }
0x00025a78 cmp r2, 0x5b |
| if (r2 == 0x5b) {
0x00025a7c beq 0x25ef4 | goto label_24;
| }
0x00025a80 cmp r2, 0x23 |
0x00025a84 bne 0x25a3c |
| } while (r2 != 0x23);
0x00025a88 mov r1, 0xa | r1 = 0xa;
0x00025a8c add r0, r5, 1 | r0 = r5 + 1;
0x00025a90 b 0x25f70 | goto label_25;
| label_23:
0x00025a94 ldrb r2, [r5, 1] | r2 = *((r5 + 1));
0x00025a98 ldr r1, [pc, 0x4e0] | r1 = *(0x25f7c);
0x00025a9c mov r0, r2 | r0 = r2;
0x00025aa0 bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x00025aa4 subs fp, r0, 0 |
| if (fp == r0) {
0x00025aa8 beq 0x25ddc | goto label_26;
| }
0x00025aac ldr r3, [pc, 0x4d4] |
0x00025ab0 add r5, r5, 1 | r5++;
0x00025ab4 add r3, pc, r3 | r3 = pc + r3;
0x00025ab8 ldr r3, [r3, 4] | r3 = *(0x25f88);
0x00025abc mov r1, 0x1c | r1 = 0x1c;
0x00025ac0 mov r0, r5 | r0 = r5;
0x00025ac4 str r3, [sp, 0x34] | var_34h = r3;
0x00025ac8 bl 0x1e4ac | fcn_0001e4ac (r0, r1);
0x00025acc mov r3, 1 | r3 = 1;
0x00025ad0 str r3, [sp, 0x3c] | var_3ch = r3;
0x00025ad4 ldrb r3, [r0] | r3 = *(r0);
0x00025ad8 mov r8, r0 | r8 = r0;
0x00025adc cmp r3, 0x20 |
| if (r3 == 0x20) {
0x00025ae0 beq 0x25c40 | goto label_27;
| }
| if (r3 > 0x20) {
0x00025ae4 bhi 0x25b0c | goto label_28;
| }
0x00025ae8 cmp r3, 9 |
| if (r3 == 9) {
0x00025aec beq 0x25c40 | goto label_27;
| }
| label_5:
0x00025af0 mov r1, 0x3e | r1 = 0x3e;
0x00025af4 mov r0, r8 | r0 = r8;
0x00025af8 bl 0x12a78 | r0 = strchr (r0, r1);
0x00025afc cmp r0, 0 |
| if (r0 == 0) {
0x00025b00 beq 0x25a3c | goto label_4;
| }
0x00025b04 add r4, r0, 1 | r4 = r0 + 1;
0x00025b08 b 0x25970 | goto label_1;
| label_28:
0x00025b0c cmp r3, 0x2f |
| if (r3 == 0x2f) {
0x00025b10 beq 0x25c90 | goto label_29;
| }
0x00025b14 cmp r3, 0x3e |
| if (r3 == 0x3e) {
0x00025b18 moveq r4, r0 | r4 = r0;
| goto label_30;
| }
| if (r3 != 0x3e) {
| label_30:
0x00025b1c bne 0x25af0 | goto label_5;
| }
| label_6:
0x00025b20 mov r3, 0 | r3 = 0;
0x00025b24 strb r3, [r8] | *(r8) = r3;
0x00025b28 mov r0, r5 | r0 = r5;
0x00025b2c bl 0x1261c | strlen (r0);
0x00025b30 add r3, sp, 0x78 | r3 += str;
0x00025b34 str r3, [sp, 0x1c] | endptr = r3;
0x00025b38 add r7, r4, 1 | r7 = r4 + 1;
0x00025b3c ldr sb, [sp, 0x34] | sb = var_34h;
0x00025b40 add r0, r0, 4 | r0 += 4;
0x00025b44 cmp r0, 0x3f |
| if (r0 > 0x3f) {
0x00025b48 ldrls fp, [sp, 0x1c] | fp = endptr;
| }
| if (r0 >= 0x3f) {
0x00025b4c bls 0x25b58 |
0x00025b50 bl 0x1e664 | r0 = fcn_0001e664 (r0);
0x00025b54 mov fp, r0 |
| }
0x00025b58 mov r2, r5 | r2 = r5;
0x00025b5c ldr r1, [sp, 0x14] | r1 = format;
0x00025b60 mov r0, fp | r0 = fp;
0x00025b64 bl 0x12970 | sprintf (r0, r1, r2)
0x00025b68 mov r3, 0x20 | r3 = 0x20;
0x00025b6c strb r3, [r4, 1] | *((r4 + 1)) = r3;
0x00025b70 mov r1, fp | r1 = fp;
0x00025b74 mov sl, r0 | sl = r0;
0x00025b78 mov r0, r7 | r0 = r7;
0x00025b7c bl 0x12a0c | strstr (r0, r1);
0x00025b80 add r3, sp, 0x78 | r3 += str;
0x00025b84 cmp fp, r3 |
0x00025b88 mov r1, r0 | r1 = r0;
| if (fp != r3) {
0x00025b8c beq 0x25ba0 |
0x00025b90 str r0, [sp, 0x20] | s2 = r0;
0x00025b94 mov r0, fp | r0 = fp;
0x00025b98 bl 0x12a54 | free (r0);
0x00025b9c ldr r1, [sp, 0x20] | r1 = s2;
| }
0x00025ba0 cmp r1, 0 |
| if (r1 == 0) {
0x00025ba4 beq 0x25a3c | goto label_4;
| }
0x00025ba8 cmp sb, 1 |
0x00025bac add r4, r1, sl | r4 = r1 + sl;
| if (sb != 1) {
0x00025bb0 beq 0x25bc0 |
0x00025bb4 mov r0, r7 | r0 = r7;
0x00025bb8 bl 0x20730 | r0 = fcn_00020730 (r0, r1);
0x00025bbc mov r1, r0 | r1 = r0;
| }
0x00025bc0 mov r3, 0 | r3 = 0;
0x00025bc4 cmp r4, r3 |
0x00025bc8 strb r3, [r1] | *(r1) = r3;
| if (r4 == r3) {
0x00025bcc beq 0x25a3c | goto label_4;
| }
0x00025bd0 sub r2, r7, r8 | r2 = r7 - r8;
0x00025bd4 mov r1, 0x20 | r1 = 0x20;
0x00025bd8 mov r0, r8 | r0 = r8;
0x00025bdc bl 0x128b0 | memset (r0, r1, r2);
0x00025be0 ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x00025be4 cmp r3, 1 |
| if (r3 != 1) {
0x00025be8 bne 0x25c88 | goto label_12;
| }
0x00025bec ldr r3, [sp, 0x34] | r3 = var_34h;
0x00025bf0 cmp r3, 0 |
| if (r3 != 0) {
0x00025bf4 bne 0x25c88 | goto label_12;
| }
0x00025bf8 strb r3, [sp, 0x3a] | var_3ah = r3;
0x00025bfc add r3, sp, 0x38 | r3 += var_38h;
0x00025c00 str r3, [sp, 0x28] | var_28h = r3;
0x00025c04 ldr r3, [pc, 0x380] |
0x00025c08 mov sb, r7 | sb = r7;
0x00025c0c add r3, pc, r3 | r3 = pc + r3;
0x00025c10 add r3, r3, 0x11c | r3 = 0x260a4;
0x00025c14 str r3, [sp, 0x20] | s2 = r3;
| label_9:
0x00025c18 ldrb r0, [r7] | r0 = *(r7);
0x00025c1c add r8, r7, 1 | r8 = r7 + 1;
0x00025c20 cmp r0, 0x25 |
| if (r0 == 0x25) {
0x00025c24 beq 0x25d94 | goto label_31;
| }
0x00025c28 cmp r0, 0x26 |
| if (r0 == 0x26) {
0x00025c2c beq 0x25c98 | goto label_32;
| }
0x00025c30 cmp r0, 0 |
| if (r0 != 0) {
0x00025c34 bne 0x25dd4 | goto label_33;
| }
0x00025c38 strb r0, [sb] | *(sb) = r0;
0x00025c3c b 0x25c88 | goto label_12;
| label_27:
0x00025c40 mov r1, 0xc | r1 = 0xc;
0x00025c44 mov r0, r8 | r0 = r8;
0x00025c48 bl 0x1e4ac | fcn_0001e4ac (r0, r1);
0x00025c4c add r2, sp, 0x3c | r2 += var_3ch;
0x00025c50 add r1, sp, 0x34 | r1 += var_34h;
0x00025c54 bl 0x210b8 | r0 = fcn_000210b8 (r0, r1);
0x00025c58 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00025c5c beq 0x25a3c | goto label_4;
| }
0x00025c60 ldrb r3, [r4] | r3 = *(r4);
0x00025c64 cmp r3, 0x3e |
| if (r3 == 0x3e) {
0x00025c68 beq 0x25b20 | goto label_6;
| }
0x00025c6c cmp r3, 0x2f |
| if (r3 != 0x2f) {
0x00025c70 bne 0x25a3c | goto label_4;
| }
| label_8:
0x00025c74 ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x00025c78 cmp r3, 0x3e |
| if (r3 != 0x3e) {
0x00025c7c bne 0x25a3c | goto label_4;
| }
0x00025c80 mov r3, 0 | r3 = 0;
0x00025c84 strb r3, [r4], 2 | *(r4) = r3;
| r4 += 2;
| do {
| label_12:
0x00025c88 ldr r3, [sp, 0x34] | r3 = var_34h;
0x00025c8c b 0x25a0c | goto label_7;
| label_29:
0x00025c90 mov r4, r0 | r4 = r0;
0x00025c94 b 0x25c74 | goto label_8;
| label_32:
0x00025c98 str r8, [sp, 0x78] | str = r8;
0x00025c9c ldrb r0, [r7, 1] | r0 = *((r7 + 1));
0x00025ca0 cmp r0, 0x23 |
| if (r0 != 0x23) {
0x00025ca4 addeq r7, r7, 2 | r7 += 2;
| }
| if (r0 != 0x23) {
0x00025ca8 streq r7, [sp, 0x78] | str = r7;
| }
| if (r0 != 0x23) {
0x00025cac beq 0x25cc0 |
0x00025cb0 mov r1, 0x30000 | r1 = 0x30000;
0x00025cb4 bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x00025cb8 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 == r0) {
0x00025cbc beq 0x25d30 | goto label_34;
| }
| }
0x00025cc0 ldr r3, [sp, 0x78] | r3 = str;
0x00025cc4 ldrb r2, [r3] | r2 = *(r3);
0x00025cc8 cmp r2, 0x58 |
| if (r2 != 0x58) {
0x00025ccc beq 0x25cf8 |
0x00025cd0 cmp r2, 0x78 |
| if (r2 != 0x78) {
0x00025cd4 beq 0x25cf8 |
0x00025cd8 cmp r2, 0x30 |
| if (r2 == 0x30) {
0x00025cdc movne r2, 0xa | r2 = 0xa;
| }
| if (r2 != 0x30) {
0x00025ce0 bne 0x25d04 | goto label_35;
| }
0x00025ce4 ldrb r3, [r3, 1] | r3 = *((r3 + 1));
0x00025ce8 cmp r3, 0x30 |
| if (r3 != 0x30) {
0x00025cec moveq r2, 0x10 | r2 = 0x10;
| }
| if (r3 == 0x30) {
0x00025cf0 movne r2, 0xa | r2 = 0xa;
| }
0x00025cf4 b 0x25d04 |
| }
| } else {
0x00025cf8 add r3, r3, 1 | r3++;
0x00025cfc mov r2, 0x10 | r2 = 0x10;
0x00025d00 str r3, [sp, 0x78] | str = r3;
| }
| label_35:
0x00025d04 ldr r1, [sp, 0x1c] | r1 = endptr;
0x00025d08 ldr r0, [sp, 0x78] | r0 = str;
0x00025d0c bl 0x12574 | strtoul (r0, r1, r2);
0x00025d10 ldr r3, [sp, 0x78] | r3 = str;
0x00025d14 ldrb r2, [r3] | r2 = *(r3);
0x00025d18 cmp r0, 0x7f |
0x00025d1c cmpls r2, 0x3b | __asm ("cmpls r2, 0x3b");
| if (r0 != 0x7f) {
0x00025d20 addeq r8, r3, 1 | r8 = r3 + 1;
| }
| if (r0 != 0x7f) {
0x00025d24 moveq r7, r0 | r7 = r0;
| }
| if (r0 == 0x7f) {
0x00025d28 movne r7, 0 | r7 = 0;
| }
0x00025d2c b 0x25d6c | goto label_11;
| label_34:
0x00025d30 mov sl, r7 | sl = r7;
| label_10:
0x00025d34 ldr r3, [sp, 0x20] | r3 = s2;
0x00025d38 mov r0, r8 | r0 = r8;
0x00025d3c add fp, r3, sl, lsl 3 |
0x00025d40 ldrh r3, [fp, 4] | r3 = *(arg_4h);
0x00025d44 mov r2, r3 | r2 = r3;
0x00025d48 str r3, [sp, 0x2c] | var_2ch = r3;
0x00025d4c ldr r3, [sp, 0x20] | r3 = s2;
0x00025d50 ldr r1, [r3, sl, lsl 3] | offset_0 = sl << 3;
| r1 = *((r3 + offset_0));
0x00025d54 bl 0x125b0 | strncmp (r0, r1, r2);
0x00025d58 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00025d5c cmp r0, 0 |
| if (r0 != 0) {
0x00025d60 bne 0x25d84 | goto label_36;
| }
0x00025d64 ldrsh r7, [fp, 6] | r7 = *(arg_6h);
0x00025d68 add r8, r8, r3 | r8 += r3;
| label_11:
0x00025d6c cmp r7, 0 |
0x00025d70 strb r7, [sb] | *(sb) = r7;
0x00025d74 beq 0x25c88 |
| } while (r7 == 0);
| label_13:
0x00025d78 add sb, sb, 1 | sb++;
0x00025d7c mov r7, r8 | r7 = r8;
0x00025d80 b 0x25c18 | goto label_9;
| label_36:
0x00025d84 add sl, sl, 1 | sl++;
0x00025d88 cmp sl, 0xc |
| if (sl != 0xc) {
0x00025d8c bne 0x25d34 | goto label_10;
| }
0x00025d90 b 0x25d6c | goto label_11;
| label_31:
0x00025d94 ldrb r1, [r7, 1] | r1 = *((r7 + 1));
0x00025d98 add r8, r7, 3 | r8 = r7 + 3;
0x00025d9c strb r1, [sp, 0x38] | var_38h = r1;
0x00025da0 ldrb r3, [r7, 2] | r3 = *((r7 + 2));
0x00025da4 clz r1, r1 | r1 &= r1;
0x00025da8 lsr r1, r1, 5 | r1 >>= 5;
0x00025dac cmp r3, 0 |
| if (r3 != 0) {
0x00025db0 moveq r1, 1 | r1 = 1;
| }
0x00025db4 cmp r1, 0 |
0x00025db8 strb r3, [sp, 0x39] | var_39h = r3;
| if (r1 == 0) {
0x00025dbc movne r3, 0 | r3 = 0;
| }
| if (r1 != 0) {
0x00025dc0 strbne r3, [sb] | *(sb) = r3;
| goto label_37;
| }
| if (r1 != 0) {
| label_37:
0x00025dc4 bne 0x25c88 | goto label_12;
| }
0x00025dc8 mov r2, 0x10 | r2 = 0x10;
0x00025dcc ldr r0, [sp, 0x28] | r0 = var_28h;
0x00025dd0 bl 0x12574 | strtoul (r0, r1, r2);
| label_33:
0x00025dd4 strb r0, [sb] | *(sb) = r0;
0x00025dd8 b 0x25d78 | goto label_13;
| label_26:
0x00025ddc cmp r2, 0x2f |
| if (r2 == 0x2f) {
0x00025de0 beq 0x25ed8 | goto label_38;
| }
0x00025de4 cmp r2, 0x3f |
| if (r2 == 0x3f) {
0x00025de8 beq 0x25e14 | goto label_39;
| }
0x00025dec cmp r2, 0x21 |
| if (r2 != 0x21) {
0x00025df0 bne 0x25a3c | goto label_4;
| }
0x00025df4 ldr r1, [pc, 0x194] | r1 = *(0x25f8c);
0x00025df8 mov r0, r5 | r0 = r5;
0x00025dfc add r1, pc, r1 | r1 = pc + r1;
0x00025e00 bl 0x12a0c | r0 = strstr (r0, r1);
0x00025e04 cmp r0, 0 |
| if (r0 == 0) {
0x00025e08 beq 0x25a3c | goto label_4;
| }
0x00025e0c add r4, r0, 3 | r4 = r0 + 3;
0x00025e10 b 0x25970 | goto label_1;
| label_39:
0x00025e14 ldr r2, [pc, 0x178] | r2 = *(0x25f90);
0x00025e18 add r2, pc, r2 | r2 = pc + r2;
0x00025e1c ldr r3, [r2, 0x130] | r3 = *(0x260c0);
0x00025e20 cmp r3, 0 |
| if (r3 == 0) {
0x00025e24 bne 0x25e44 |
0x00025e28 ldr r1, [sp, 0x18] | r1 = var_18h;
0x00025e2c ldr r3, [pc, 0x164] |
0x00025e30 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x00025e34 add r1, r3, 0x19 | r1 = r3 + 0x19;
0x00025e38 add r3, r3, 0xc | r3 = 0x25fa0;
0x00025e3c str r1, [r2, 0x130] | *((r2 + 0x130)) = r1;
0x00025e40 str r3, [r2, 0x134] | *((r2 + 0x134)) = r3;
| }
0x00025e44 ldr r7, [pc, 0x150] |
0x00025e48 ldr sb, [pc, 0x150] | sb = *(0x00025fa0);
0x00025e4c add r7, pc, r7 | r7 = pc + r7;
0x00025e50 add r7, r7, 0x130 | r7 = 0x260c8;
0x00025e54 add r8, r5, 2 | r8 = r5 + 2;
| label_14:
0x00025e58 ldr r1, [r7, fp, lsl 2] | offset_1 = fp << 2;
| r1 = *((r7 + offset_1));
0x00025e5c lsl sl, fp, 2 | sl = fp << 2;
0x00025e60 mov r0, r1 | r0 = r1;
0x00025e64 str r1, [sp, 0x1c] | endptr = r1;
0x00025e68 bl 0x1261c | strlen (r0);
0x00025e6c ldr r1, [sp, 0x1c] | r1 = endptr;
0x00025e70 mov r2, r0 | r2 = r0;
0x00025e74 mov r4, r0 | r4 = r0;
0x00025e78 mov r0, r8 | r0 = r8;
0x00025e7c bl 0x125b0 | r0 = strncmp (r0, r1, r2);
0x00025e80 cmp r0, 0 |
| if (r0 == 0) {
0x00025e84 bne 0x25ec8 |
0x00025e88 add r4, r4, 2 | r4 += 2;
0x00025e8c mov r1, sb | r1 = sb;
0x00025e90 ldrb r0, [r5, r4] | r0 = *((r5 + r4));
0x00025e94 add r2, r5, r4 | r2 = r5 + r4;
0x00025e98 bl 0x1c9b0 | r0 = fcn_0001c9b0 (r0, r1);
0x00025e9c cmp r0, 0 |
| if (r0 != 0) {
0x00025ea0 bne 0x25ec8 | goto label_40;
| }
0x00025ea4 ldr r3, [pc, 0xf8] | r3 = *(0x25fa0);
0x00025ea8 mov r1, r2 | r1 = r2;
0x00025eac add r3, pc, r3 | r3 = pc + r3;
0x00025eb0 add sl, r3, sl | sl = r3 + sl;
0x00025eb4 ldr r3, [sl, 0x17c] | r3 = *((sl + 0x17c));
0x00025eb8 mov r0, r6 | r0 = r6;
0x00025ebc blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| label_15:
0x00025ec0 mov r4, r0 | r4 = r0;
0x00025ec4 b 0x25970 | goto label_1;
| }
| label_40:
0x00025ec8 cmp fp, 1 |
| if (fp == 1) {
0x00025ecc beq 0x25af0 | goto label_5;
| }
0x00025ed0 mov fp, 1 |
0x00025ed4 b 0x25e58 | goto label_14;
| label_38:
0x00025ed8 mov r1, 0x3e | r1 = 0x3e;
0x00025edc add r0, r5, 2 | r0 = r5 + 2;
0x00025ee0 bl 0x12a78 | r0 = strchr (r0, r1);
0x00025ee4 cmp r0, 0 |
0x00025ee8 add r4, r0, 1 | r4 = r0 + 1;
| if (r0 != 0) {
0x00025eec bne 0x25970 | goto label_1;
| }
0x00025ef0 b 0x25a3c | goto label_4;
| label_24:
0x00025ef4 ldr r7, [r6, 0x20] | r7 = *((r6 + 0x20));
0x00025ef8 mov r0, r7 | r0 = r7;
0x00025efc bl 0x1261c | strlen (r0);
0x00025f00 mov r1, r7 | r1 = r7;
0x00025f04 mov r2, r0 | r2 = r0;
0x00025f08 mov r4, r0 | r4 = r0;
0x00025f0c add r0, r5, 1 | r0 = r5 + 1;
0x00025f10 bl 0x125b0 | r0 = strncmp (r0, r1, r2);
0x00025f14 cmp r0, 0 |
| if (r0 == 0) {
0x00025f18 bne 0x25f38 |
0x00025f1c add r3, r5, r4 | r3 = r5 + r4;
0x00025f20 ldrb r3, [r3, 1] | r3 = *((r3 + 1));
0x00025f24 cmp r3, 0x5d |
| if (r3 != 0x5d) {
0x00025f28 addeq r0, r4, 2 | r0 = r4 + 2;
| }
| if (r3 != 0x5d) {
0x00025f2c moveq r1, 0xa | r1 = 0xa;
| }
| if (r3 != 0x5d) {
0x00025f30 addeq r0, r5, r0 | r0 = r5 + r0;
| }
| if (r3 == 0x5d) {
0x00025f34 beq 0x25f70 | goto label_25;
| }
| }
0x00025f38 cmp r4, 0x10 |
| if (r4 > 0x10) {
0x00025f3c bhi 0x25a3c | goto label_4;
| }
0x00025f40 ldr r1, [pc, 0x60] | r1 = *(0x25fa4);
0x00025f44 add r4, sp, 0x78 | r4 += str;
0x00025f48 mov r2, r7 | r2 = r7;
0x00025f4c add r1, pc, r1 | r1 = pc + r1;
0x00025f50 mov r0, r4 | r0 = r4;
0x00025f54 bl 0x12970 | sprintf (r0, r1, r2)
0x00025f58 mov r1, r4 | r1 = r4;
0x00025f5c mov r0, r5 | r0 = r5;
0x00025f60 bl 0x12a0c | r0 = strstr (r0, r1);
0x00025f64 cmp r0, 0 |
| if (r0 == 0) {
0x00025f68 beq 0x25a3c | goto label_4;
| }
0x00025f6c mov r1, 0xa | r1 = 0xa;
| label_25:
0x00025f70 bl 0x12a78 | strchr (r0, r1);
0x00025f74 b 0x25ec0 | goto label_15;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x270ec */
| #include <stdint.h>
|
; (fcn) fcn.000270ec () | void fcn_000270ec (int32_t arg1, uint32_t arg2) {
| char * s;
| int32_t var_1h;
| int32_t var_2h;
| int32_t var_18h;
| r0 = arg1;
| r1 = arg2;
0x000270ec push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000270f0 ldr r7, [pc, 0x5cc] | r7 = *(0x276c0);
0x000270f4 ldr r3, [pc, 0x5cc] | r3 = "P";
0x000270f8 cmp r1, r7 |
0x000270fc mov sb, 0 | sb = 0;
| if (r1 == r7) {
0x00027100 movne r7, r1 | r7 = r1;
| }
0x00027104 add r3, pc, r3 | r3 = pc + r3;
0x00027108 mov r4, r0 | r4 = r0;
0x0002710c sub sp, sp, 0x18 |
0x00027110 mov r8, r1 | r8 = r1;
0x00027114 ldr r6, [pc, 0x5b0] | r6 = *(0x276c8);
0x00027118 mov r1, sb | r1 = sb;
0x0002711c add r0, r0, 0xc | r0 += 0xc;
| if (r1 != r7) {
0x00027120 moveq r7, sb | r7 = sb;
| }
0x00027124 strb sb, [r3, 0x10c] | *((r3 + 0x10c)) = sb;
0x00027128 bl 0x25058 | fcn_00025058 (r0, r1);
0x0002712c ldr r1, [pc, 0x59c] | r1 = *(0x276cc);
0x00027130 add r6, pc, r6 | r6 = pc + r6;
0x00027134 cmp r7, sb |
0x00027138 ldr r3, [pc, 0x594] | r3 = *(0x276d0);
0x0002713c ldr r2, [r4] | r2 = *(r4);
0x00027140 ldr r5, [r6, r1] | r5 = *(0x276c8);
| if (r7 != sb) {
0x00027144 bne 0x27190 | goto label_8;
| }
0x00027148 cmp r2, r3 |
0x0002714c ldr r3, [r5] | r3 = *(r5);
| if (r2 <= r3) {
0x00027150 ldrgt r0, [r4, 0x6c] | r0 = *((r4 + 0x6c));
| }
| if (r2 > r3) {
0x00027154 movle r0, r7 | r0 = r7;
| }
0x00027158 cmp r3, 0 |
| if (r3 != 0) {
0x0002715c bne 0x271a8 | goto label_9;
| }
0x00027160 ldr r3, [pc, 0x570] | r3 = *(0x276d4);
0x00027164 add r3, pc, r3 | r3 = pc + r3;
0x00027168 ldrb r3, [r3, 4] | r3 = *((r3 + 4));
0x0002716c cmp r3, 0 |
0x00027170 beq 0x2717c |
| while (r3 == 0) {
0x00027174 ldr r3, [pc, 0x560] | r3 = *(0x276d8);
0x00027178 b 0x27180 | goto label_10;
0x0002717c ldr r3, [pc, 0x55c] | r3 = *(0x276dc);
| label_10:
0x00027180 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027184 ldr r3, [r3] | r3 = *(r3);
0x00027188 str r3, [r5] | *(r5) = r3;
0x0002718c b 0x271a8 | goto label_9;
| label_8:
0x00027190 cmp r2, r3 |
0x00027194 ldr r3, [r5] | r3 = *(r5);
| if (r2 <= r3) {
0x00027198 ldrgt r0, [r4, 0x70] | r0 = *((r4 + 0x70));
| }
| if (r2 > r3) {
0x0002719c movle r0, sb | r0 = sb;
| }
0x000271a0 cmp r3, 0 |
0x000271a4 beq 0x27174 |
| }
| label_9:
0x000271a8 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x000271ac ldr ip, [r5] | ip = *(r5);
0x000271b0 lsr r3, r2, 0x14 | r3 = r2 >> 0x14;
0x000271b4 eor r3, r3, 1 | r3 ^= 1;
0x000271b8 cmp r0, 0 |
| if (r0 != 0) {
0x000271bc moveq r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x000271c0 andne r3, r3, 1 | r3 &= 1;
| }
0x000271c4 cmp r3, 0 |
| if (r3 == 0) {
0x000271c8 beq 0x27234 | goto label_11;
| }
0x000271cc tst r2, 0x2000 |
| if ((r2 & 0x2000) == 0) {
0x000271d0 beq 0x27228 | goto label_12;
| }
0x000271d4 mov r2, ip | r2 = ip;
0x000271d8 mov r1, 1 | r1 = 1;
0x000271dc bl 0x26f9c | fcn_00026f9c (r0, r1, r2);
| do {
| label_0:
0x000271e0 ldr r0, [r5] | r0 = *(r5);
0x000271e4 bl 0x128a4 | fflush (r0);
0x000271e8 ldr r0, [r5] | r0 = *(r5);
0x000271ec bl 0x1282c | r0 = ferror (r0);
0x000271f0 cmp r0, 0 |
| if (r0 == 0) {
0x000271f4 beq 0x276bc | goto label_13;
| }
0x000271f8 ldr r2, [pc, 0x4e0] |
0x000271fc ldr r3, [pc, 0x4e0] | r3 = *(0x276e0);
0x00027200 ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x00027204 ldr ip, [r5] | ip = *(r5);
0x00027208 ldr r2, [r2] | r2 = *(0x276dc);
0x0002720c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027210 cmp ip, r2 |
0x00027214 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x00027218 ldr r1, [r3, 0xe4] | r1 = *(0x277c4);
| if (ip != r2) {
0x0002721c bne 0x274e0 | goto label_14;
| }
| label_1:
0x00027220 ldr r2, [r3, 0xdc] | r2 = *((r3 + 0xdc));
| label_2:
0x00027224 bl 0x1dddc | fcn_0001dddc (r0, r1);
| label_12:
0x00027228 mov r1, ip | r1 = ip;
0x0002722c bl 0x12874 | fputs (r0, r1);
0x00027230 b 0x271e0 |
| } while (1);
| label_11:
0x00027234 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00027238 ldr r1, [r4, 0x38] | r1 = *((r4 + 0x38));
0x0002723c mov r0, ip | r0 = ip;
0x00027240 bl 0x12910 | fprintf (r0, r1, r2)
0x00027244 cmp r7, 0 |
0x00027248 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
| if (r7 != 0) {
0x0002724c beq 0x27258 |
0x00027250 tst r0, 0x4000 |
| if ((r0 & 0x4000) != 0) {
0x00027254 bne 0x275b0 | goto label_15;
| }
| }
0x00027258 mov r3, 0 | r3 = 0;
0x0002725c add r1, sp, 0x18 | r1 += var_18h;
0x00027260 str r3, [r1, -0x18]! | *((r1 -= 0x18)) = r3;
0x00027264 ldr r3, [pc, 0x47c] | r3 = *(0x276e4);
0x00027268 tst r0, 0x1000 |
0x0002726c ldr sl, [r6, r3] | sl = *((r6 + r3));
| if ((r0 & 0x1000) == 0) {
0x00027270 beq 0x27500 | goto label_16;
| }
0x00027274 bl 0x1de48 | fcn_0001de48 (r0, r1);
0x00027278 add r1, sl, 0x21 | r1 = sl + 0x21;
0x0002727c mov r2, r0 | r2 = r0;
0x00027280 mov sb, r0 | sb = r0;
0x00027284 ldr r0, [pc, 0x460] |
0x00027288 add r0, pc, r0 | r0 = pc + r0;
0x0002728c add r0, r0, 0x10c | r0 = 0x277f4;
0x00027290 add r0, r0, 1 | r0++;
0x00027294 bl 0x12970 | sprintf (r0, r1, r2)
0x00027298 ldr r1, [r5] | r1 = *(r5);
0x0002729c ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x000272a0 cmp r3, 0 |
| if (r3 == 0) {
0x000272a4 beq 0x274f4 | goto label_17;
| }
0x000272a8 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x000272ac ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x000272b0 cmp r3, r2 |
| if (r3 >= r2) {
0x000272b4 bhs 0x274e8 | goto label_18;
| }
0x000272b8 add r2, r3, 1 | r2 = r3 + 1;
0x000272bc str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x000272c0 mov r2, 0xa | r2 = 0xa;
0x000272c4 strb r2, [r3] | *(r3) = r2;
| label_3:
0x000272c8 adds r0, sb, 0xf | r0 = sb + 0xf;
| if (r0 >= sb) {
0x000272cc addmi r0, sb, 0x16 | r0 = sb + 0x16;
| }
0x000272d0 asr r0, r0, 3 | r0 >>= 3;
0x000272d4 rsb r0, r0, 4 | r0 = 4 - r0;
0x000272d8 cmp r0, 0 |
| if (r0 <= 0) {
0x000272dc ldrgt r3, [pc, 0x40c] | r3 = *((pc + 0x40c));
| }
| if (r0 <= 0) {
0x000272e0 addgt r3, pc, r3 | r3 = pc + r3;
| }
| if (r0 <= 0) {
0x000272e4 strgt r0, [r3, 0x108] | *((r3 + 0x108)) = r0;
| }
0x000272e8 ldr r2, [sp] | r2 = *(sp);
0x000272ec mov r1, r8 | r1 = r8;
0x000272f0 mov r0, r4 | r0 = r4;
0x000272f4 bl 0x1f8cc | fcn_0001f8cc (r0, r1, r2);
0x000272f8 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000272fc and r3, r3, 3 | r3 &= 3;
0x00027300 cmp r3, 1 |
| if (r3 == 1) {
0x00027304 beq 0x2754c | goto label_19;
| }
| if (r3 <= 1) {
0x00027308 blo 0x27560 | goto label_20;
| }
0x0002730c cmp r3, 3 |
| if (r3 == 3) {
0x00027310 bne 0x27328 |
0x00027314 ldr r3, [pc, 0x3c8] | r3 = *(0x276e0);
0x00027318 ldr r1, [r5] | r1 = *(r5);
0x0002731c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027320 ldr r0, [r3, 0x120] | r0 = *(0x27800);
| label_4:
0x00027324 bl 0x12874 | fputs (r0, r1);
| }
0x00027328 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0002732c tst r3, 0x20 |
| if ((r3 & 0x20) != 0) {
0x00027330 beq 0x27348 |
0x00027334 ldr r3, [pc, 0x3a8] | r3 = *(0x276e0);
0x00027338 ldr r1, [r5] | r1 = *(r5);
0x0002733c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027340 ldr r0, [r3, 0x14c] | r0 = *(0x2782c);
0x00027344 bl 0x12874 | fputs (r0, r1);
| }
0x00027348 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0002734c tst r3, 0x800 |
| if ((r3 & 0x800) != 0) {
0x00027350 beq 0x27368 |
0x00027354 ldr r3, [pc, 0x388] | r3 = *(0x276e0);
0x00027358 ldr r1, [r5] | r1 = *(r5);
0x0002735c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027360 ldr r0, [r3, 0x18c] | r0 = *(0x2786c);
0x00027364 bl 0x12874 | fputs (r0, r1);
| }
0x00027368 ldr r0, [r4, 0x3c] | r0 = *((r4 + 0x3c));
0x0002736c cmp r0, 0 |
| if (r0 != 0) {
0x00027370 beq 0x2737c |
0x00027374 ldr r1, [r5] | r1 = *(r5);
0x00027378 bl 0x12874 | fputs (r0, r1);
| }
0x0002737c cmp r8, 0 |
| if (r8 != 0) {
0x00027380 bne 0x2747c | goto label_21;
| }
0x00027384 ldr r8, [r4, 0x34] | r8 = *((r4 + 0x34));
0x00027388 cmp r8, 0 |
| if (r8 != 0) {
0x0002738c beq 0x273a0 |
0x00027390 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00027394 ldr r1, [r4, 0x24] | r1 = *((r4 + 0x24));
0x00027398 mov r0, r8 | r0 = r8;
0x0002739c bl 0x22e48 | fcn_00022e48 (r0, r1);
| }
0x000273a0 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000273a4 tst r3, 0x100 |
| if ((r3 & 0x100) != 0) {
0x000273a8 beq 0x273d8 |
0x000273ac ldr r3, [pc, 0x330] | r3 = *(0x276e0);
0x000273b0 cmp r8, 0 |
0x000273b4 ldr r8, [r6, r3] | r8 = *((r6 + r3));
| if (r8 == 0) {
0x000273b8 bne 0x273c8 |
0x000273bc ldr r1, [r5] | r1 = *(r5);
0x000273c0 ldr r0, [r8, 0x160] | r0 = *((r8 + 0x160));
0x000273c4 bl 0x12874 | fputs (r0, r1);
| }
0x000273c8 ldr r2, [r4, 0x20] | r2 = *((r4 + 0x20));
0x000273cc ldr r1, [r8, 0x114] | r1 = *((r8 + 0x114));
0x000273d0 ldr r0, [r5] | r0 = *(r5);
0x000273d4 bl 0x12910 | fprintf (r0, r1, r2)
| }
0x000273d8 ldr r3, [pc, 0x314] | r3 = *(0x276f0);
0x000273dc add r3, pc, r3 | r3 = pc + r3;
0x000273e0 ldrb r3, [r3, 0x10c] | r3 = *((r3 + 0x10c));
0x000273e4 cmp r3, 0 |
| if (r3 == 0) {
0x000273e8 beq 0x27468 | goto label_22;
| }
0x000273ec ldr r1, [r5] | r1 = *(r5);
0x000273f0 ldr r8, [r4, 0x64] | r8 = *((r4 + 0x64));
0x000273f4 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x000273f8 ldr sb, [r4, 0x44] | sb = *((r4 + 0x44));
0x000273fc cmp r3, 0 |
| if (r3 == 0) {
0x00027400 beq 0x27580 | goto label_23;
| }
0x00027404 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00027408 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x0002740c cmp r3, r2 |
| if (r3 >= r2) {
0x00027410 bhs 0x27574 | goto label_24;
| }
0x00027414 add r2, r3, 1 | r2 = r3 + 1;
0x00027418 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x0002741c mov r2, 0xa | r2 = 0xa;
0x00027420 strb r2, [r3] | *(r3) = r2;
| label_5:
0x00027424 ldr r0, [r5] | r0 = *(r5);
0x00027428 bl 0x128a4 | fflush (r0);
| do {
0x0002742c ldr r3, [sb, 0x10] | r3 = *((sb + 0x10));
0x00027430 lsr r3, r3, 0xc | r3 >>= 0xc;
0x00027434 and r3, r3, 0xf | r3 &= 0xf;
0x00027438 cmp r3, 2 |
| if (r3 != 2) {
0x0002743c beq 0x27448 |
0x00027440 cmp r3, 4 |
| if (r3 != 4) {
0x00027444 bne 0x27458 | goto label_25;
| }
| }
0x00027448 ldr r3, [sb, 0x28] | r3 = *((sb + 0x28));
0x0002744c mov r1, sb | r1 = sb;
0x00027450 mov r0, 1 | r0 = 1;
0x00027454 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| label_25:
0x00027458 sub r8, r8, 1 | r8--;
0x0002745c cmp r8, 0 |
0x00027460 add sb, sb, 0x40 | sb += 0x40;
0x00027464 bgt 0x2742c |
| } while (r8 > 0);
| label_22:
0x00027468 ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x0002746c cmp r0, 0 |
| if (r0 != 0) {
0x00027470 beq 0x2747c |
0x00027474 ldr r1, [r5] | r1 = *(r5);
0x00027478 bl 0x12874 | fputs (r0, r1);
| }
| label_21:
0x0002747c ldr r2, [r4] | r2 = *(r4);
0x00027480 ldr r3, [r5] | r3 = *(r5);
0x00027484 cmp r2, 0x22000 |
| if (r2 < 0x22000) {
0x00027488 blt 0x2758c | goto label_26;
| }
0x0002748c ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x00027490 cmp r0, 0 |
| if (r0 == 0) {
0x00027494 beq 0x2758c | goto label_26;
| }
0x00027498 mov r1, r3 | r1 = r3;
0x0002749c bl 0x12874 | fputs (r0, r1);
| label_6:
0x000274a0 ldr r0, [r5] | r0 = *(r5);
0x000274a4 bl 0x128a4 | fflush (r0);
0x000274a8 ldr r0, [r5] | r0 = *(r5);
0x000274ac bl 0x1282c | r0 = ferror (r0);
0x000274b0 cmp r0, 0 |
| if (r0 == 0) {
0x000274b4 beq 0x271e0 | goto label_0;
| }
0x000274b8 ldr r2, [pc, 0x21c] |
0x000274bc ldr r3, [pc, 0x220] | r3 = *(0x276e0);
0x000274c0 ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x000274c4 ldr ip, [r5] | ip = *(r5);
0x000274c8 ldr r2, [r2] | r2 = *(0x276d8);
0x000274cc ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000274d0 cmp ip, r2 |
0x000274d4 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x000274d8 ldr r1, [r3, 0xe4] | r1 = *(0x277c4);
| if (ip != r2) {
0x000274dc bne 0x27220 | goto label_1;
| }
| label_14:
0x000274e0 ldr r2, [r3, 0xe0] | r2 = *((r3 + 0xe0));
0x000274e4 b 0x27224 | goto label_2;
| label_18:
0x000274e8 mov r0, 0xa | r0 = 0xa;
0x000274ec bl 0x126d0 | fputc_unlocked ();
0x000274f0 b 0x272c8 | goto label_3;
| label_17:
0x000274f4 mov r0, 0xa | r0 = 0xa;
0x000274f8 bl 0x127fc | fputc (r0, r1);
0x000274fc b 0x272c8 | goto label_3;
| label_16:
0x00027500 bl 0x1df78 | fcn_0001df78 (r0, r1);
0x00027504 add r1, sl, 0x21 | r1 = sl + 0x21;
0x00027508 mov r2, r0 | r2 = r0;
0x0002750c mov sb, r0 | sb = r0;
0x00027510 ldr r0, [pc, 0x1e0] |
0x00027514 add r0, pc, r0 | r0 = pc + r0;
0x00027518 add r0, r0, 0x10c | r0 = 0x27800;
0x0002751c add r0, r0, 1 | r0++;
0x00027520 bl 0x12970 | sprintf (r0, r1, r2)
0x00027524 cmp r8, 0 |
| if (r8 != 0) {
0x00027528 bne 0x2753c | goto label_27;
| }
0x0002752c ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x00027530 ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x00027534 tst r3, 0x200000 |
| if ((r3 & 0x200000) != 0) {
0x00027538 bne 0x272c8 | goto label_3;
| }
| label_27:
0x0002753c ldr r1, [r5] | r1 = *(r5);
0x00027540 ldr r0, [sp] | r0 = *(sp);
0x00027544 bl 0x12874 | fputs (r0, r1);
0x00027548 b 0x272c8 | goto label_3;
| label_19:
0x0002754c ldr r3, [pc, 0x190] | r3 = *(0x276e0);
0x00027550 ldr r1, [r5] | r1 = *(r5);
0x00027554 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00027558 ldr r0, [r3, 0x134] | r0 = *(0x27814);
0x0002755c b 0x27324 | goto label_4;
| label_20:
0x00027560 ldr r3, [pc, 0x17c] | r3 = *(0x276e0);
0x00027564 ldr r1, [r5] | r1 = *(r5);
0x00027568 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0002756c ldr r0, [r3, 0x150] | r0 = *(0x27830);
0x00027570 b 0x27324 | goto label_4;
| label_24:
0x00027574 mov r0, 0xa | r0 = 0xa;
0x00027578 bl 0x126d0 | fputc_unlocked ();
0x0002757c b 0x27424 | goto label_5;
| label_23:
0x00027580 mov r0, 0xa | r0 = 0xa;
0x00027584 bl 0x127fc | fputc (r0, r1);
0x00027588 b 0x27424 | goto label_5;
| label_26:
0x0002758c ldr r2, [r4, 0x48] | r2 = *((r4 + 0x48));
0x00027590 cmp r2, 0 |
| if (r2 == 0) {
0x00027594 beq 0x274a0 | goto label_6;
| }
0x00027598 ldr r1, [pc, 0x144] |
0x0002759c mov r0, r3 | r0 = r3;
0x000275a0 ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x000275a4 ldr r1, [r1, 0x158] | r1 = *(0x27838);
0x000275a8 bl 0x12910 | fprintf (r0, r1)
0x000275ac b 0x274a0 | goto label_6;
| label_15:
0x000275b0 ldr r3, [r4] | r3 = *(r4);
0x000275b4 cmp r3, 0x26000 |
| if (r3 < 0x26000) {
0x000275b8 ldrge r2, [r4, 0x68] | r2 = *((r4 + 0x68));
| }
| if (r3 < 0x26000) {
0x000275bc ldrge r3, [r4, 0x44] | r3 = *((r4 + 0x44));
| }
| if (r3 < 0x26000) {
0x000275c0 addge r3, r3, r2, lsl 6 | r3 += (r2 << 6);
| }
| if (r3 >= 0x26000) {
0x000275c4 bge 0x27618 | goto label_28;
| }
0x000275c8 and r3, r0, 3 | r3 = r0 & 3;
0x000275cc cmp r3, 2 |
0x000275d0 mov r0, sp | r0 = sp;
| if (r3 == 2) {
0x000275d4 beq 0x276a0 | goto label_29;
| }
0x000275d8 cmp r3, 3 |
| if (r3 != 3) {
0x000275dc beq 0x275e8 |
0x000275e0 cmp r3, 1 |
| if (r3 != 1) {
0x000275e4 bne 0x276b0 | goto label_30;
| }
| }
0x000275e8 ldr r1, [pc, 0x10c] | r1 = *(0x276f8);
0x000275ec add r1, pc, r1 | r1 = pc + r1;
0x000275f0 b 0x276a8 | goto label_7;
| do {
0x000275f4 ldr r1, [r4, 0x64] | r1 = *((r4 + 0x64));
0x000275f8 add r2, r2, 1 | r2++;
0x000275fc cmp r2, r1 |
| if (r2 >= r1) {
0x00027600 blt 0x27614 |
0x00027604 ldr r3, [pc, 0xd8] | r3 = *(0x276e0);
0x00027608 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0002760c ldr r0, [r3, 0x38] | r0 = *(0x27718);
0x00027610 bl 0x1da34 | fcn_0001da34 (r0);
| }
0x00027614 add r3, r3, 0x40 | r3 += 0x40;
| label_28:
0x00027618 ldr r1, [r3, 0x14] | r1 = *((r3 + 0x14));
0x0002761c cmp r1, 3 |
0x00027620 bne 0x275f4 |
| } while (r1 != 3);
0x00027624 and r0, r0, 3 | r0 &= 3;
0x00027628 cmp r0, 2 |
| if (r0 != 2) {
0x0002762c beq 0x27668 |
0x00027630 cmp r0, 3 |
| if (r0 != 3) {
0x00027634 beq 0x2764c |
0x00027638 cmp r0, 1 |
| if (r0 == 1) {
0x0002763c movne r2, 0x14 | r2 = 0x14;
| }
| if (r0 == 1) {
0x00027640 ldrne r1, [r3, 0x34] | r1 = *((r3 + 0x34));
| }
| if (r0 == 1) {
0x00027644 movne r0, sp | r0 = sp;
| }
| if (r0 != 1) {
0x00027648 bne 0x27660 | goto label_31;
| }
| }
0x0002764c ldr r2, [pc, 0xac] | r2 = *(0x276fc);
0x00027650 add r0, sp, 2 | r0 += var_2h;
0x00027654 strh r2, [sp] | *(sp) = r2;
0x00027658 ldr r1, [r3, 0x34] | r1 = *((r3 + 0x34));
0x0002765c mov r2, 0x14 | r2 = 0x14;
| label_31:
0x00027660 bl 0x12850 | strncpy (r0, r1, r2);
0x00027664 b 0x27680 |
| } else {
0x00027668 mov r2, 0x2d | r2 = 0x2d;
0x0002766c strb r2, [sp] | *(sp) = r2;
0x00027670 ldrh r3, [r3, 2] | r3 = *((r3 + 2));
0x00027674 strb r3, [sp, 1] | var_1h = r3;
0x00027678 mov r3, 0 | r3 = 0;
0x0002767c strb r3, [sp, 2] | var_2h = r3;
| }
| do {
0x00027680 ldr r3, [pc, 0x5c] | r3 = *(0x276e0);
0x00027684 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00027688 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x0002768c ldr r0, [r5] | r0 = *(r5);
0x00027690 mov r3, sp | r3 = sp;
0x00027694 ldr r1, [r1, 0xd4] | r1 = *((r1 + 0xd4));
0x00027698 bl 0x12910 | fprintf (r0, r1, r2, r3)
0x0002769c b 0x271e0 | goto label_0;
| label_29:
0x000276a0 ldr r1, [pc, 0x5c] | r1 = *(0x27700);
0x000276a4 add r1, pc, r1 | r1 = pc + r1;
| label_7:
0x000276a8 bl 0x12b20 | strcpy (r0, r1);
0x000276ac b 0x27680 |
| } while (1);
| label_30:
0x000276b0 ldr r1, [pc, 0x50] | r1 = "atch:";
0x000276b4 add r1, pc, r1 | r1 = pc + r1;
0x000276b8 b 0x276a8 | goto label_7;
| label_13:
0x000276bc mov r0, r7 | r0 = r7;
0x000276c0 bl 0x1d9f8 | r0 = fcn_0001d9f8 (r0);
| if (r0 != 1) {
0x000276c4 andeq r2, r0, r0, asr r7 | r2 = r0 & (r0 >> r7);
| }
0x000276c8 strheq pc, [r2], -r4 | __asm ("strheq pc, [r2], -r4");
| if (r0 != 1) {
0x000276cc andeq fp, r2, r8, asr 29 |
| }
| if (r0 != 1) {
0x000276d0 andeq r0, r0, r4, asr 5 | r0 &= (r4 >> 5);
| }
0x000276d4 strdeq sp, lr, [r1], -pc | __asm ("strdeq sp, lr, [r1], -pc");
| if (r0 != 1) {
0x000276d8 andeq pc, r2, r4, asr r8 | pc = r2 & (r4 >> r8);
| }
| if (r0 != 1) {
0x000276dc andeq r0, r0, r4, lsr 5 | r0 &= (r4 >> 5);
| }
| if (r0 != 1) {
0x000276e0 muleq r0, ip, r2 | r0 = ip * r2;
| }
| if (r0 != 1) {
0x000276e4 andeq r0, r0, ip, asr 5 | r0 &= (ip >> 5);
| }
| if (r0 != 1) {
0x000276e8 andeq r0, r0, ip, lsr 5 | r0 &= (ip >> 5);
| }
| if (r0 != 1) {
0x000276ec andeq pc, r2, r0, lsr r7 | pc = r2 & (r0 >> r7);
| }
0x000276f0 invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/bin/ntpq @ 0x12b70 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main (int32_t argc, char ** argv) {
| int32_t var_4h;
| void * var_ch;
| void * ptr;
| int32_t var_14h;
| int32_t var_1ch;
| r0 = argc;
| r1 = argv;
0x00012b70 b 0x16e28 |
0x00016e28 ldr r2, [pc, 0x674] | r2 = *(0x174a0);
0x00016e2c ldr r3, [pc, 0x674] | r3 = *(0x174a4);
0x00016e30 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00016e34 mov r4, 0 | r4 = 0;
0x00016e38 sub sp, sp, 0x1c |
0x00016e3c str r2, [r3, 4] | *((r3 + 4)) = r2;
0x00016e40 mov r7, r0 | r7 = r0;
0x00016e44 mov sl, r1 | sl = r1;
0x00016e48 str r4, [r3] | *(r3) = r4;
0x00016e4c bl 0x2acf0 | fcn_0002acf0 ();
0x00016e50 bl 0x29af8 | fcn_00029af8 ();
0x00016e54 ldr r3, [pc, 0x650] |
0x00016e58 mov r1, 4 | r1 = 4;
0x00016e5c ldr r3, [r3] | r3 = *(0x174a8);
0x00016e60 str r4, [sp, 0xc] | var_ch = r4;
0x00016e64 cmp r3, r4 |
| if (r3 != r4) {
0x00016e68 ldreq r3, [pc, 0x640] | r3 = *(0x000174b0);
| }
| if (r3 != r4) {
0x00016e6c moveq r2, 2 | r2 = 2;
| }
0x00016e70 str r4, [sp, 0x10] | ptr = r4;
| if (r3 != r4) {
0x00016e74 streq r2, [r3] | *(r3) = r2;
| }
0x00016e78 mov r3, 9 | r3 = 9;
0x00016e7c mov r2, 0 | r2 = 0;
0x00016e80 str r3, [sp, 0x14] | var_14h = r3;
0x00016e84 mov r0, r2 | r0 = r2;
0x00016e88 mov r3, 1 | r3 = 1;
0x00016e8c bl 0x2aa08 | fcn_0002aa08 (r0, r1);
0x00016e90 ldr r3, [pc, 0x61c] |
0x00016e94 ldr r3, [r3] | r3 = *(0x174b0);
0x00016e98 cmp r3, 0 |
0x00016e9c str r0, [sp, 0x10] | ptr = r0;
| if (r3 == 0) {
0x00016ea0 bne 0x16ea8 |
0x00016ea4 bl 0x2ed0c | fcn_0002ed0c ();
| }
0x00016ea8 add r1, sp, 0xc | r1 += var_ch;
0x00016eac ldr r0, [pc, 0x604] | r0 = *(0x174b4);
0x00016eb0 bl 0x1243c | EVP_MD_do_all_sorted ();
0x00016eb4 ldr r4, [sp, 0xc] | r4 = var_ch;
0x00016eb8 ldr r0, [sp, 0x10] | r0 = ptr;
0x00016ebc bl 0x12a54 | free (r0);
0x00016ec0 cmp r4, 0 |
| if (r4 == 0) {
0x00016ec4 beq 0x16f38 | goto label_12;
| }
0x00016ec8 ldrb r3, [r4] | r3 = *(r4);
0x00016ecc cmp r3, 0 |
| if (r3 == 0) {
0x00016ed0 beq 0x16f38 | goto label_12;
| }
0x00016ed4 ldr r0, [pc, 0x5e0] | r0 = *(0x174b8);
0x00016ed8 bl 0x12a48 | r0 = OBJ_nid2sn ();
0x00016edc subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00016ee0 bne 0x16f64 | goto label_13;
| }
| label_0:
0x00016ee4 ldr r5, [pc, 0x5d4] | r5 = *(0x174bc);
0x00016ee8 ldr r3, [pc, 0x5d4] | r3 = *(0x174c0);
0x00016eec mov r8, 0 | r8 = 0;
0x00016ef0 add fp, r5, 0x1c |
0x00016ef4 mov r6, r5 | r6 = r5;
| do {
0x00016ef8 ldr r1, [fp, r8, lsl 5] | offset_0 = r8 << 5;
| r1 = *((fp + offset_0));
0x00016efc mov r0, r3 | r0 = r3;
0x00016f00 str r3, [sp, 4] | var_4h = r3;
0x00016f04 bl 0x12a24 | strcmp (r0, r1);
0x00016f08 lsl sb, r8, 5 | sb = r8 << 5;
0x00016f0c cmp r0, 0 |
| if (r0 == 0) {
0x00016f10 beq 0x1734c | goto label_14;
| }
0x00016f14 add r8, r8, 1 | r8++;
0x00016f18 cmp r8, 0x14 |
0x00016f1c ldr r3, [sp, 4] | r3 = var_4h;
0x00016f20 bne 0x16ef8 |
| } while (r8 != 0x14);
0x00016f24 ldr r3, [pc, 0x59c] | r3 = "keytype";
0x00016f28 mov r2, 2 | r2 = 2;
0x00016f2c ldr r1, [pc, 0x598] | r1 = "icmd___sizeof_builtins__sizeof_builtins_";
0x00016f30 ldr r0, [pc, 0x598] | r0 = *(0x174cc);
0x00016f34 bl 0x2f7d0 | fcn_0002f7d0 ();
| label_12:
0x00016f38 mov r3, 0 | r3 = 0;
0x00016f3c mov r2, r3 | r2 = r3;
0x00016f40 mov r1, 0x10 | r1 = 0x10;
0x00016f44 mov r0, r4 | r0 = r4;
0x00016f48 bl 0x2aa08 | fcn_0002aa08 (r0, r1);
0x00016f4c ldr r3, [pc, 0x580] | r3 = "ntpq.c";
0x00016f50 ldr r2, [pc, 0x580] | r2 = "AES128CMAC";
0x00016f54 ldr r1, [pc, 0x580] | r1 = "\n ";
0x00016f58 mov r4, r0 | r4 = r0;
0x00016f5c bl 0x12970 | sprintf (r0, "\n ", "AES128CMAC")
0x00016f60 b 0x16ee4 | goto label_0;
| label_13:
0x00016f64 ldrb r3, [r8] | r3 = *(r8);
0x00016f68 cmp r3, 0 |
| if (r3 == 0) {
0x00016f6c beq 0x16ee4 | goto label_0;
| }
0x00016f70 mov r3, r4 | r3 = r4;
0x00016f74 b 0x16f94 | goto label_15;
| label_1:
0x00016f78 mov r0, r8 | r0 = r8;
0x00016f7c bl 0x1261c | strlen (r0);
0x00016f80 ldrb r2, [r6, r0] | r2 = *((r6 + r0));
0x00016f84 add r3, r6, r0 | r3 = r6 + r0;
0x00016f88 cmp r2, 0 |
0x00016f8c cmpne r2, 0x2c | __asm ("cmpne r2, 0x2c");
| if (r2 == 0) {
0x00016f90 beq 0x16ee4 | goto label_0;
| }
| label_15:
0x00016f94 mov r1, r8 | r1 = r8;
0x00016f98 mov r0, r3 | r0 = r3;
0x00016f9c bl 0x12a0c | r0 = strstr (r0, r1);
0x00016fa0 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 != r0) {
0x00016fa4 bne 0x16f78 | goto label_1;
| }
0x00016fa8 mov r0, r4 | r0 = r4;
0x00016fac bl 0x1261c | strlen (r0);
0x00016fb0 mov r8, r4 | r8 = r4;
0x00016fb4 ldr fp, [pc, 0x51c] | fp = "\n ";
0x00016fb8 str r0, [sp, 4] | var_4h = r0;
0x00016fbc add sb, r4, r0 | sb = r4 + r0;
0x00016fc0 b 0x16fdc |
| while (r0 == 0) {
0x00016fc4 add r5, r8, 5 | r5 = r8 + 5;
| label_3:
0x00016fc8 cmp r5, sb |
| if (r5 < sb) {
0x00016fcc bhs 0x16fdc |
0x00016fd0 ldrb r2, [r5] | r2 = *(r5);
0x00016fd4 cmp r2, 0 |
| if (r2 != 0) {
0x00016fd8 bne 0x17070 | goto label_16;
| }
| }
| label_2:
0x00016fdc cmp r8, sb |
| if (r8 >= sb) {
0x00016fe0 bhs 0x17008 | goto label_17;
| }
0x00016fe4 ldrb r2, [r8] | r2 = *(r8);
0x00016fe8 cmp r2, 0 |
| if (r2 == 0) {
0x00016fec beq 0x17008 | goto label_17;
| }
0x00016ff0 mov r2, 5 | r2 = 5;
0x00016ff4 mov r1, r8 | r1 = r8;
0x00016ff8 mov r0, fp | r0 = fp;
0x00016ffc bl 0x125b0 | r0 = strncmp (r0, r1, r2);
0x00017000 cmp r0, 0 |
0x00017004 beq 0x16fc4 |
| }
| label_17:
0x00017008 ldr r3, [sp, 4] | r3 = var_4h;
0x0001700c cmp r6, 0 |
0x00017010 add r1, r3, 0xd | r1 = r3 + 0xd;
| if (r6 == 0) {
0x00017014 beq 0x17110 | goto label_18;
| }
0x00017018 mov r3, 0 | r3 = 0;
0x0001701c mov r2, r3 | r2 = r3;
0x00017020 mov r0, r4 | r0 = r4;
0x00017024 bl 0x2aa08 | fcn_0002aa08 (r0, r1);
0x00017028 sub r5, r5, r4 | r5 -= r4;
0x0001702c add r5, r0, r5 | r5 = r0 + r5;
0x00017030 mov r4, r0 | r4 = r0;
0x00017034 mov r0, r5 | r0 = r5;
0x00017038 bl 0x1261c | strlen (r0);
0x0001703c mov r1, r5 | r1 = r5;
0x00017040 add r2, r0, 1 | r2 = r0 + 1;
0x00017044 add r0, r5, 0xc | r0 = r5 + 0xc;
0x00017048 bl 0x12760 | memmove (r0, r1, r2);
0x0001704c mov r2, 0xa | r2 = 0xa;
0x00017050 ldr r1, [pc, 0x47c] | r1 = "ntpq.c";
0x00017054 mov r0, r5 | r0 = r5;
0x00017058 bl 0x124a8 | memcpy (r0, "ntpq.c", r2);
0x0001705c mov r2, 2 | r2 = 2;
0x00017060 ldr r1, [pc, 0x478] | r1 = *(0x174dc);
0x00017064 add r0, r5, 0xa | r0 = r5 + 0xa;
0x00017068 bl 0x124a8 | memcpy (r0, r1, r2);
0x0001706c b 0x16ee4 | goto label_0;
| label_16:
0x00017070 ldr r1, [pc, 0x468] | r1 = *(0x174dc);
0x00017074 mov r0, r5 | r0 = r5;
0x00017078 bl 0x12a0c | strstr (r0, r1);
0x0001707c mov r1, fp | r1 = fp;
0x00017080 mov r8, r0 | r8 = r0;
0x00017084 mov r0, r5 | r0 = r5;
0x00017088 bl 0x12a0c | strstr (r0, r1);
0x0001708c clz r2, r8 | r2 &= r8;
0x00017090 lsr r2, r2, 5 | r2 >>= 5;
0x00017094 cmp r0, 0 |
0x00017098 cmpeq r8, 0 | __asm ("cmpeq r8, 0");
| if (r0 != 0) {
0x0001709c moveq r8, sb | r8 = sb;
| }
| if (r0 != 0) {
0x000170a0 beq 0x170bc |
0x000170a4 cmp r0, 0 |
| if (r0 == 0) {
0x000170a8 beq 0x170bc | goto label_19;
| }
0x000170ac cmp r8, r0 |
| if (r8 <= r0) {
0x000170b0 orrhi r2, r2, 1 | r2 |= 1;
| }
0x000170b4 cmp r2, 0 |
| if (r2 != 0) {
0x000170b8 movne r8, r0 | r8 = r0;
| goto label_19;
| }
| }
| label_19:
0x000170bc sub r2, r8, r5 | r2 = r8 - r5;
0x000170c0 mov r1, r5 | r1 = r5;
0x000170c4 ldr r0, [pc, 0x408] | r0 = "ntpq.c";
0x000170c8 bl 0x125b0 | r0 = strncmp ("ntpq.c", r1, r2);
0x000170cc cmp r0, 0 |
| if (r0 < 0) {
0x000170d0 blt 0x17108 | goto label_20;
| }
0x000170d4 cmp r8, sb |
| if (r8 >= sb) {
0x000170d8 bhs 0x16fdc | goto label_2;
| }
0x000170dc ldrb r2, [r8] | r2 = *(r8);
0x000170e0 cmp r2, 0 |
| if (r2 == 0) {
0x000170e4 beq 0x16fdc | goto label_2;
| }
0x000170e8 mov r2, 2 | r2 = 2;
0x000170ec mov r1, r8 | r1 = r8;
0x000170f0 ldr r0, [pc, 0x3e8] | r0 = *(0x174dc);
0x000170f4 bl 0x125b0 | r0 = strncmp (r0, r1, r2);
0x000170f8 cmp r0, 0 |
| if (r0 != 0) {
0x000170fc bne 0x16fdc | goto label_2;
| }
0x00017100 add r5, r5, 2 | r5 += 2;
0x00017104 b 0x16fc8 | goto label_3;
| label_20:
0x00017108 mov r6, 1 | r6 = 1;
0x0001710c b 0x16fdc | goto label_2;
| label_18:
0x00017110 mov r3, r6 | r3 = r6;
0x00017114 mov r2, r6 | r2 = r6;
0x00017118 mov r0, r4 | r0 = r4;
0x0001711c bl 0x2aa08 | r0 = fcn_0002aa08 (r0, r1);
0x00017120 mov r4, r0 | r4 = r0;
0x00017124 bl 0x1261c | strlen (r0);
0x00017128 ldr r1, [pc, 0x3b0] | r1 = *(0x174dc);
0x0001712c add r0, r4, r0 | r0 = r4 + r0;
0x00017130 bl 0x12b20 | strcpy (r0, r1);
0x00017134 mov r0, r4 | r0 = r4;
0x00017138 bl 0x1261c | strlen (r0);
0x0001713c ldr r1, [pc, 0x390] | r1 = "ntpq.c";
0x00017140 add r0, r4, r0 | r0 = r4 + r0;
0x00017144 bl 0x12b20 | strcpy (r0, "ntpq.c");
0x00017148 b 0x16ee4 | goto label_0;
| label_9:
0x0001714c ldr r0, [pc, 0x390] | r0 = *(0x174e0);
0x00017150 ldr r3, [r0] | r3 = *(0x174e0);
0x00017154 cmp r3, 0xc7 |
| if (r3 <= 0xc7) {
0x00017158 bhi 0x1717c |
0x0001715c ldr r1, [pc, 0x384] | r1 = *(0x174e4);
0x00017160 ldr ip, [pc, 0x384] | ip = "localhost";
0x00017164 ldr r2, [r2] | r2 = *(r2);
0x00017168 str ip, [r1, r3, lsl 3] | offset_1 = r3 << 3;
| *((r1 + offset_1)) = ip;
0x0001716c add r1, r1, r3, lsl 3 | r1 += (r3 << 3);
0x00017170 add r3, r3, 1 | r3++;
0x00017174 str r2, [r1, 4] | *((r1 + 4)) = r2;
0x00017178 str r3, [r0] | *(r0) = r3;
| }
| label_10:
0x0001717c ldr r4, [pc, 0x36c] | r4 = "localhost";
0x00017180 ldr r3, [r4, 0xc50] | r3 = *(0x1813c);
0x00017184 cmp r3, 0 |
| if (r3 == 0) {
0x00017188 bne 0x171cc |
0x0001718c ldr r3, [r4, 0x344] | r3 = *((r4 + 0x344));
0x00017190 cmp r3, 0 |
| if (r3 != 0) {
0x00017194 bne 0x171cc | goto label_21;
| }
0x00017198 ldr r3, [pc, 0x354] | r3 = *(0x174f0);
0x0001719c ldr r0, [r3] | r0 = *(0x174f0);
0x000171a0 bl 0x127b4 | r0 = fileno (r0);
0x000171a4 bl 0x127c0 | r0 = isatty (r0);
0x000171a8 cmp r0, 0 |
| if (r0 == 0) {
0x000171ac beq 0x171cc | goto label_21;
| }
0x000171b0 ldr r3, [pc, 0x340] | r3 = stdin;
0x000171b4 ldr r0, [r3] | r0 = stdin;
0x000171b8 bl 0x127b4 | r0 = fileno (r0);
0x000171bc bl 0x127c0 | r0 = isatty (r0);
0x000171c0 cmp r0, 0 |
| if (r0 == 0) {
0x000171c4 movne r3, 1 | r3 = 1;
| }
| if (r0 != 0) {
0x000171c8 strne r3, [r4, 0x344] | *((r4 + 0x344)) = r3;
| goto label_21;
| }
| }
| label_21:
0x000171cc ldr r0, [pc, 0x328] | r0 = stderr;
0x000171d0 bl 0x2f638 | fcn_0002f638 (r0);
0x000171d4 ldr r3, [r4, 0x344] | r3 = *((r4 + 0x344));
0x000171d8 cmp r3, 0 |
| if (r3 != 0) {
0x000171dc beq 0x171e8 |
0x000171e0 ldr r0, [pc, 0x318] | r0 = *(0x174fc);
0x000171e4 bl 0x16de8 | fcn_00016de8 (r0);
| }
0x000171e8 ldr r3, [r4, 0xc50] | r3 = *((r4 + 0xc50));
0x000171ec cmp r3, 0 |
| if (r3 != 0) {
0x000171f0 bne 0x1733c | goto label_22;
| }
0x000171f4 ldr r3, [pc, 0x2ec] | r3 = *(0x174e4);
0x000171f8 ldm r3, {r0, r1} | r0 = *(r3);
| r1 = *((r3 + 4));
0x000171fc bl 0x1319c | fcn_0001319c (r0, r1);
0x00017200 ldr r0, [r4, 0x344] | r0 = *((r4 + 0x344));
0x00017204 cmp r0, 0 |
| if (r0 == 0) {
0x00017208 ldrne r0, [r6, 0x2a8] | r0 = *((r6 + 0x2a8));
| }
0x0001720c bl 0x2c9cc | fcn_0002c9cc (r0);
| do {
0x00017210 add r0, sp, 0xc | r0 += var_ch;
0x00017214 bl 0x2ca38 | fcn_0002ca38 (r0);
0x00017218 subs r4, r0, 0 | r4 -= var_ch;
| if (r4 == var_ch) {
0x0001721c beq 0x17230 | goto label_23;
| }
0x00017220 bl 0x15614 | fcn_00015614 (r0);
0x00017224 mov r0, r4 | r0 = r4;
0x00017228 bl 0x12a54 | free (r0);
0x0001722c b 0x17210 |
| } while (1);
| label_23:
0x00017230 bl 0x2ca08 | fcn_0002ca08 ();
| label_4:
0x00017234 mov r0, 0 | r0 = 0;
0x00017238 add sp, sp, 0x1c |
0x0001723c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| do {
0x00017240 ldr r3, [pc, 0x2a0] | r3 = *(0x174e4);
0x00017244 add r2, r3, r5, lsl 3 | r2 = r3 + (r5 << 3);
0x00017248 ldr r1, [r2, 4] | r1 = *((r2 + 4));
0x0001724c ldr r0, [r3, r5, lsl 3] | r0 = *(0x174e4);
0x00017250 bl 0x1319c | r0 = fcn_0001319c (r0, r1);
0x00017254 cmp r0, 0 |
| if (r0 != 0) {
0x00017258 bne 0x17270 | goto label_24;
| }
| label_5:
0x0001725c add r5, r5, 1 | r5++;
| label_8:
0x00017260 ldr r3, [r7] | r3 = *(r7);
0x00017264 cmp r3, r5 |
0x00017268 bhi 0x17240 |
| } while (r3 > r5);
0x0001726c b 0x17234 | goto label_4;
| label_24:
0x00017270 cmp r5, 0 |
| if (r5 != 0) {
0x00017274 beq 0x172b0 |
0x00017278 ldr r1, [r4, 0x28] | r1 = *((r4 + 0x28));
0x0001727c cmp r1, 0 |
| if (r1 == 0) {
0x00017280 beq 0x172b0 | goto label_7;
| }
0x00017284 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00017288 cmp r3, 0 |
| if (r3 == 0) {
0x0001728c beq 0x17324 | goto label_25;
| }
0x00017290 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00017294 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x00017298 cmp r3, r2 |
| if (r3 >= r2) {
0x0001729c bhs 0x17318 | goto label_26;
| }
0x000172a0 add r2, r3, 1 | r2 = r3 + 1;
0x000172a4 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x000172a8 mov r2, 0xa | r2 = 0xa;
0x000172ac strb r2, [r3] | *(r3) = r2;
| }
| label_7:
0x000172b0 mov r6, 0 | r6 = 0;
0x000172b4 mov sb, 0xa | sb = 0xa;
| label_6:
0x000172b8 ldr r3, [r4, 0xc50] | r3 = *((r4 + 0xc50));
0x000172bc cmp r3, r6 |
| if (r3 < r6) {
0x000172c0 bls 0x1725c | goto label_5;
| }
0x000172c4 cmp r6, 0 |
| if (r6 == 0) {
0x000172c8 beq 0x17308 | goto label_27;
| }
0x000172cc ldr r1, [r4, 0x28] | r1 = *((r4 + 0x28));
0x000172d0 cmp r1, 0 |
| if (r1 == 0) {
0x000172d4 beq 0x17308 | goto label_27;
| }
0x000172d8 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x000172dc cmp r3, 0 |
| if (r3 == 0) {
0x000172e0 beq 0x17330 | goto label_28;
| }
0x000172e4 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x000172e8 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x000172ec cmp r3, r2 |
| if (r3 >= r2) {
0x000172f0 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x000172f4 strlo r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x000172f8 strblo sb, [r3] | *(r3) = sb;
| }
| if (r3 <= r2) {
0x000172fc blo 0x17308 | goto label_27;
| }
0x00017300 mov r0, 0xa | r0 = 0xa;
0x00017304 bl 0x126d0 | fputc_unlocked ();
| do {
| label_27:
0x00017308 ldr r0, [r8, r6, lsl 2] | offset_2 = r6 << 2;
| r0 = *((r8 + offset_2));
0x0001730c bl 0x15614 | fcn_00015614 (r0);
0x00017310 add r6, r6, 1 | r6++;
0x00017314 b 0x172b8 | goto label_6;
| label_26:
0x00017318 mov r0, 0xa | r0 = 0xa;
0x0001731c bl 0x126d0 | fputc_unlocked ();
0x00017320 b 0x172b0 | goto label_7;
| label_25:
0x00017324 mov r0, 0xa | r0 = 0xa;
0x00017328 bl 0x127fc | fputc (r0, r1);
0x0001732c b 0x172b0 | goto label_7;
| label_28:
0x00017330 mov r0, 0xa | r0 = 0xa;
0x00017334 bl 0x127fc | fputc (r0, r1);
0x00017338 b 0x17308 |
| } while (1);
| label_22:
0x0001733c mov r5, 0 | r5 = 0;
0x00017340 ldr r7, [pc, 0x19c] | r7 = *(0x174e0);
0x00017344 ldr r8, [pc, 0x1b8] | r8 = *(0x17500);
0x00017348 b 0x17260 | goto label_8;
| label_14:
0x0001734c ldr r3, [pc, 0x1b4] | r3 = *(0x17504);
0x00017350 add r5, r5, sb | r5 += sb;
0x00017354 mov r2, r4 | r2 = r4;
0x00017358 ldr r1, [pc, 0x1ac] | r1 = "digest_name";
0x0001735c str r3, [r5, 0x28] | *((r5 + 0x28)) = r3;
0x00017360 add r0, sp, 0xc | r0 += var_ch;
0x00017364 bl 0x14918 | fcn_00014918 (r0);
0x00017368 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0001736c mov r0, r4 | r0 = r4;
0x00017370 str r3, [r5, 0x38] | *((r5 + 0x38)) = r3;
0x00017374 bl 0x12a54 | free (r0);
0x00017378 ldr r4, [pc, 0x190] | r4 = "set_key_type_to_use_for_authenticated_requests__one_of:_s";
0x0001737c ldr r2, [sl] | r2 = *(sl);
0x00017380 ldr r3, [pc, 0x18c] | r3 = *(0x17510);
0x00017384 mov r1, r7 | r1 = r7;
0x00017388 str r2, [r3] | *(r3) = r2;
0x0001738c mov r0, r4 | r0 = r4;
0x00017390 mov r2, sl | r2 = sl;
0x00017394 bl 0x2c99c | fcn_0002c99c (r0, r1);
0x00017398 ldr r3, [r4, 0x44] | r3 = *(0x17550);
0x0001739c ldr r2, [pc, 0x174] | r2 = *(0x17514);
0x000173a0 ldr r1, [r3, 0x118] | r1 = *(0x17668);
0x000173a4 str r1, [r2] | *(r2) = r1;
0x000173a8 ldr r2, [r3, 0x10] | r2 = *(0x17560);
0x000173ac tst r2, 0xf |
| if ((r2 & 0xf) == 0) {
0x000173b0 movne r1, 2 | r1 = 2;
| }
0x000173b4 ldr r2, [pc, 0x160] | r2 = *(0x17518);
0x000173b8 sub r7, r7, r0 | r7 -= r0;
| if ((r2 & 0xf) == 0) {
0x000173bc bne 0x173d4 |
0x000173c0 ldr r1, [r3, 0x50] | r1 = *((r3 + 0x50));
0x000173c4 tst r1, 0xf |
| if ((r1 & 0xf) != 0) {
0x000173c8 ldreq r1, [pc, 0xe0] | r1 = *(0x000174b0);
| }
| if ((r1 & 0xf) == 0) {
0x000173cc movne r1, 0xa | r1 = 0xa;
| }
| if ((r1 & 0xf) == 0) {
0x000173d0 ldreq r1, [r1] | r1 = *(r1);
| goto label_29;
| }
| }
| label_29:
0x000173d4 str r1, [r2] | *(r2) = r1;
0x000173d8 ldr r1, [r3, 0x150] | r1 = *((r3 + 0x150));
0x000173dc tst r1, 0xf |
| if ((r1 & 0xf) == 0) {
0x000173e0 ldrne r1, [pc, 0x108] | r1 = *(0x000174f0);
| }
| if ((r1 & 0xf) == 0) {
0x000173e4 movne ip, 1 |
| }
| if ((r1 & 0xf) == 0) {
0x000173e8 strne ip, [r1, 0x344] | *((r1 + 0x344)) = ip;
| }
0x000173ec ldr r1, [r3, 0x190] | r1 = *((r3 + 0x190));
0x000173f0 tst r1, 0xf |
| if ((r1 & 0xf) == 0) {
0x000173f4 movne r1, 0 | r1 = 0;
| }
| if ((r1 & 0xf) == 0) {
0x000173f8 strne r1, [r6, 0x2a0] | *((r6 + 0x2a0)) = r1;
| }
0x000173fc ldr r1, [r3, 0x290] | r1 = *((r3 + 0x290));
0x00017400 tst r1, 0xf |
| if ((r1 & 0xf) == 0) {
0x00017404 ldrne r1, [pc, 0xe4] | r1 = *(0x000174f0);
| }
| if ((r1 & 0xf) == 0) {
0x00017408 movne ip, 1 |
| }
| if ((r1 & 0xf) == 0) {
0x0001740c strne ip, [r1, 0xc54] | *((r1 + 0xc54)) = ip;
| }
0x00017410 ldr r1, [r3, 0x1d0] | r1 = *((r3 + 0x1d0));
0x00017414 ldr r3, [r3, 0x258] | r3 = *((r3 + 0x258));
0x00017418 ands r1, r1, 0xf | r1 &= 0xf;
| if (r1 == r1) {
0x0001741c movne r1, 1 | r1 = 1;
| }
0x00017420 cmp r7, 0 |
0x00017424 str r1, [r6, 0x2a4] | *((r6 + 0x2a4)) = r1;
0x00017428 str r3, [r6, 0x29c] | *((r6 + 0x29c)) = r3;
| if (r7 == 0) {
0x0001742c beq 0x1714c | goto label_9;
| }
0x00017430 ldr lr, [pc, 0xac] |
0x00017434 ldr r4, [pc, 0xac] | r4 = *(0x174e4);
0x00017438 add r0, sl, r0, lsl 2 | r0 = sl + (r0 << 2);
0x0001743c mov r1, 0 | r1 = 0;
0x00017440 mov r5, 0xa | r5 = 0xa;
0x00017444 mov r8, 2 | r8 = 2;
| label_11:
0x00017448 cmp r1, r7 |
| if (r1 == r7) {
0x0001744c beq 0x1717c | goto label_10;
| }
0x00017450 ldr ip, [r0, r1, lsl 2] | offset_3 = r1 << 2;
| ip = *((r0 + offset_3));
0x00017454 ldrb r3, [ip] | r3 = *(ip);
0x00017458 cmp r3, 0x2d |
| if (r3 == 0x2d) {
0x0001745c bne 0x1747c |
0x00017460 ldrb r3, [ip, 1] | r3 = *((ip + 1));
0x00017464 cmp r3, 0x34 |
| if (r3 != 0x34) {
0x00017468 streq r8, [r2] | *(r2) = r8;
| }
| if (r3 == 0x34) {
0x0001746c beq 0x1749c | goto label_30;
| }
0x00017470 cmp r3, 0x36 |
| if (r3 != 0x36) {
0x00017474 streq r5, [r2] | *(r2) = r5;
| }
| if (r3 == 0x36) {
0x00017478 beq 0x1749c | goto label_30;
| }
| }
0x0001747c ldr r3, [lr] | r3 = *(lr);
0x00017480 cmp r3, 0xc7 |
| if (r3 > 0xc7) {
0x00017484 ldrls sb, [r2] | sb = *(r2);
| }
| if (r3 > 0xc7) {
0x00017488 strls ip, [r4, r3, lsl 3] | offset_4 = r3 << 3;
| *((r4 + offset_4)) = ip;
| }
| if (r3 > 0xc7) {
0x0001748c addls ip, r4, r3, lsl 3 |
| }
| if (r3 > 0xc7) {
0x00017490 addls r3, r3, 1 | r3++;
| }
| if (r3 > 0xc7) {
0x00017494 strls sb, [ip, 4] | *((ip + 4)) = sb;
| }
| if (r3 > 0xc7) {
0x00017498 strls r3, [lr] | *(lr) = r3;
| }
| label_30:
0x0001749c add r1, r1, 1 | r1++;
0x000174a0 b 0x17448 | goto label_11;
| }
[*] Function printf used 30 times ntpq