[*] Binary protection state of ntpd
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of ntpd
; 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/sbin/ntpd @ 0x69c50 */
| #include <stdint.h>
|
; (fcn) fcn.00069c50 () | void fcn_00069c50 (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;
0x00069c50 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00069c54 ldr sl, [pc, 0x350] | sl = *(0x69fa8);
0x00069c58 mov r5, r3 | r5 = r3;
0x00069c5c ldr r3, [pc, 0x34c] | r3 = *(0x69fac);
0x00069c60 add sl, pc, sl | sl = pc + sl;
0x00069c64 cmp r0, 0xf |
0x00069c68 sub sp, sp, 0x34 |
0x00069c6c mov sb, r0 | sb = r0;
0x00069c70 mov fp, r1 |
0x00069c74 mov r6, r2 | r6 = r2;
0x00069c78 ldr r4, [sl, r3] | r4 = *(0x69fa8);
| if (r0 >= 0xf) {
0x00069c7c bls 0x69ca4 |
0x00069c80 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00069c84 str r3, [sp] | *(sp) = r3;
0x00069c88 ldr r3, [r1, 0x18] | r3 = *((r1 + 0x18));
0x00069c8c ldr r1, [pc, 0x320] |
0x00069c90 ldr r2, [r0, 0x1c] | r2 = *((r0 + 0x1c));
0x00069c94 add r1, pc, r1 | r1 = pc + r1;
0x00069c98 ldr r1, [r1] | r1 = *(0x69fb0);
0x00069c9c ldr r0, [r4] | r0 = *(r4);
0x00069ca0 bl 0x150dc | fprintf (r0, r1, r2, r3);
| }
0x00069ca4 ldr r3, [pc, 0x30c] | r3 = *(0x69fb4);
0x00069ca8 ldr r2, [fp, 0x34] | r2 = *(arg_34h);
0x00069cac ldr r3, [sl, r3] | r3 = *((sl + r3));
0x00069cb0 ldr r0, [r4] | r0 = *(r4);
0x00069cb4 ldr r1, [r3, 0x1a8] | r1 = *(0x6a15c);
0x00069cb8 str r3, [sp, 0xc] | format = r3;
0x00069cbc bl 0x150dc | fprintf (r0, r1, r2, r3);
0x00069cc0 ldr r3, [r6] | r3 = *(r6);
0x00069cc4 ldrb r3, [r3] | r3 = *(r3);
0x00069cc8 cmp r3, 0x7f |
| if (r3 != 0x7f) {
0x00069ccc addeq r6, r6, 4 | r6 += 4;
| }
| if (r3 != 0x7f) {
0x00069cd0 subeq r5, r5, 1 | r5--;
| }
0x00069cd4 mov r3, 0 | r3 = 0;
| if (r3 != 0x7f) {
0x00069cd8 moveq r8, 1 | r8 = 1;
| }
| if (r3 == 0x7f) {
0x00069cdc movne r8, 0 | r8 = 0;
| }
0x00069ce0 mov r1, r6 | r1 = r6;
0x00069ce4 mov r2, r5 | r2 = r5;
0x00069ce8 mov r7, r3 | r7 = r3;
| do {
0x00069cec ldr r0, [r1], 4 | r0 = *(r1);
| r1 += 4;
0x00069cf0 str r2, [sp, 0x18] | var_18h = r2;
0x00069cf4 str r3, [sp, 0x14] | var_14h = r3;
0x00069cf8 str r1, [sp, 0x10] | var_10h = r1;
0x00069cfc str r1, [sp, 0x1c] | var_1ch = r1;
0x00069d00 bl 0x14a88 | strlen (r0);
0x00069d04 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00069d08 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00069d0c sub r2, r2, 1 | r2--;
0x00069d10 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00069d14 add r0, r0, 1 | r0++;
0x00069d18 cmp r7, r0 |
| if (r7 >= r0) {
0x00069d1c movlo r7, r0 | r7 = r0;
| }
0x00069d20 cmp r2, 0 |
0x00069d24 add r3, r3, r0 | r3 += r0;
0x00069d28 bgt 0x69cec |
| } while (r2 > 0);
0x00069d2c cmp r7, 0x23 |
| if (r7 < 0x23) {
0x00069d30 bls 0x69dd4 | goto label_5;
| }
0x00069d34 ldr r3, [pc, 0x280] | r3 = *(0x69fb8);
0x00069d38 mov r7, r5 | r7 = r5;
0x00069d3c ldr sl, [sl, r3] | sl = *((sl + r3));
0x00069d40 add sl, sl, 0x130 | sl += 0x130;
| do {
0x00069d44 ldr r2, [r6], 4 | r2 = *(r6);
| r6 += 4;
0x00069d48 mov r1, sl | r1 = sl;
0x00069d4c ldr r0, [r4] | r0 = *(r4);
0x00069d50 bl 0x150dc | fprintf (r0, r1, r2, r3);
0x00069d54 sub r7, r7, 1 | r7--;
0x00069d58 cmp r7, 0 |
0x00069d5c bgt 0x69d44 |
| } while (r7 > 0);
| label_0:
0x00069d60 cmp sb, 0xf |
| if (sb >= 0xf) {
0x00069d64 bls 0x69d94 |
0x00069d68 ldr r1, [sp, 0xc] | r1 = format;
0x00069d6c sub r3, r5, 1 | r3 = r5 - 1;
0x00069d70 add r3, r3, r8 | r3 += r8;
0x00069d74 ldr r1, [r1, 0x84] | r1 = *((r1 + 0x84));
0x00069d78 mov r2, r8 | r2 = r8;
0x00069d7c ldr r0, [r4] | r0 = *(r4);
0x00069d80 bl 0x150dc | fprintf (r0, r1, r2, r3);
0x00069d84 ldr r3, [sb, 0x54] | r3 = *((sb + 0x54));
0x00069d88 mov r1, 1 | r1 = 1;
0x00069d8c mov r0, sb | r0 = sb;
0x00069d90 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| }
0x00069d94 ldr r3, [fp, 0x10] | r3 = *(arg_10h);
0x00069d98 ldr r0, [r4] | r0 = *(r4);
0x00069d9c lsr r3, r3, 0xc | r3 >>= 0xc;
0x00069da0 and r3, r3, 0xf | r3 &= 0xf;
0x00069da4 cmp r3, 4 |
| if (r3 != 4) {
0x00069da8 bne 0x69f90 | goto label_6;
| }
0x00069dac ldr r3, [sp, 0xc] | r3 = format;
0x00069db0 mov r2, r5 | r2 = r5;
0x00069db4 ldr r1, [r3, 0x128] | r1 = *((r3 + 0x128));
0x00069db8 bl 0x150dc | fprintf (r0, r1, r2, r3);
0x00069dbc ldr r3, [sp, 0xc] | r3 = format;
0x00069dc0 ldr r1, [r4] | r1 = *(r4);
0x00069dc4 ldr r0, [r3, 0x1a0] | r0 = *((r3 + 0x1a0));
0x00069dc8 bl 0x14fa4 | fputs (r0, r1);
| label_4:
0x00069dcc add sp, sp, 0x34 |
0x00069dd0 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x00069dd4 cmp r3, 0x4b |
| if (r3 > 0x4b) {
0x00069dd8 bhi 0x69ed0 | goto label_7;
| }
0x00069ddc ldr r1, [r4] | r1 = *(r4);
0x00069de0 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00069de4 cmp r3, 0 |
| if (r3 == 0) {
0x00069de8 beq 0x69ea0 | goto label_8;
| }
0x00069dec ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00069df0 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x00069df4 cmp r3, r2 |
| if (r3 >= r2) {
0x00069df8 bhs 0x69e94 | goto label_9;
| }
0x00069dfc add r2, r3, 1 | r2 = r3 + 1;
0x00069e00 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x00069e04 mov r2, 0x20 | r2 = 0x20;
0x00069e08 strb r2, [r3] | *(r3) = r2;
| label_1:
0x00069e0c mov r7, r5 | r7 = r5;
0x00069e10 mov sl, 0x20 | sl = 0x20;
| do {
0x00069e14 ldr r1, [r4] | r1 = *(r4);
0x00069e18 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00069e1c cmp r3, 0 |
| if (r3 == 0) {
0x00069e20 beq 0x69eac | goto label_10;
| }
0x00069e24 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00069e28 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x00069e2c cmp r3, r2 |
| if (r3 >= r2) {
0x00069e30 addlo r2, r3, 1 | r2 = r3 + 1;
| }
| if (r3 >= r2) {
0x00069e34 strlo r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
| }
| if (r3 >= r2) {
0x00069e38 strblo sl, [r3] | *(r3) = sl;
| }
| if (r3 > r2) {
0x00069e3c blo 0x69e48 |
0x00069e40 mov r0, 0x20 | r0 = 0x20;
0x00069e44 bl 0x14c2c | fputc_unlocked ();
| }
| label_2:
0x00069e48 ldr r1, [r4] | r1 = *(r4);
0x00069e4c ldr r0, [r6], 4 | r0 = *(r6);
| r6 += 4;
0x00069e50 bl 0x14fa4 | fputs (r0, r1);
0x00069e54 sub r7, r7, 1 | r7--;
0x00069e58 cmp r7, 0 |
0x00069e5c bgt 0x69e14 |
| } while (r7 > 0);
0x00069e60 ldr r1, [r4] | r1 = *(r4);
0x00069e64 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00069e68 cmp r3, 0 |
| if (r3 != 0) {
0x00069e6c beq 0x69ec4 |
0x00069e70 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00069e74 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x00069e78 cmp r3, r2 |
| if (r3 < r2) {
0x00069e7c bhs 0x69eb8 |
0x00069e80 add r2, r3, 1 | r2 = r3 + 1;
0x00069e84 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x00069e88 mov r2, 0xa | r2 = 0xa;
0x00069e8c strb r2, [r3] | *(r3) = r2;
0x00069e90 b 0x69d60 | goto label_0;
| label_9:
0x00069e94 mov r0, 0x20 | r0 = 0x20;
0x00069e98 bl 0x14c2c | fputc_unlocked ();
0x00069e9c b 0x69e0c | goto label_1;
| label_8:
0x00069ea0 mov r0, 0x20 | r0 = 0x20;
0x00069ea4 bl 0x14e54 | fputc (r0, r1);
0x00069ea8 b 0x69e0c | goto label_1;
| label_10:
0x00069eac mov r0, 0x20 | r0 = 0x20;
0x00069eb0 bl 0x14e54 | fputc (r0, r1);
0x00069eb4 b 0x69e48 | goto label_2;
| }
0x00069eb8 mov r0, 0xa | r0 = 0xa;
0x00069ebc bl 0x14c2c | fputc_unlocked ();
0x00069ec0 b 0x69d60 | goto label_0;
| }
0x00069ec4 mov r0, 0xa | r0 = 0xa;
0x00069ec8 bl 0x14e54 | fputc (r0, r1);
0x00069ecc b 0x69d60 | goto label_0;
| label_7:
0x00069ed0 ldr r3, [pc, 0xe4] | r3 = *(0x69fb8);
0x00069ed4 mov r2, r7 | r2 = r7;
0x00069ed8 ldr r3, [sl, r3] | r3 = *((sl + r3));
0x00069edc add sl, sp, 0x20 | sl += s;
0x00069ee0 add r1, r3, 0x134 | r1 = r3 + 0x134;
0x00069ee4 add r1, r1, 2 | r1 += 2;
0x00069ee8 mov r0, sl | r0 = sl;
0x00069eec str r3, [sp, 0x10] | var_10h = r3;
0x00069ef0 bl 0x15178 | sprintf (r0, r1, r2)
0x00069ef4 mov r1, r7 | r1 = r7;
0x00069ef8 mov r0, 0x4e | r0 = 0x4e;
0x00069efc bl 0x74fb0 | fcn_00074fb0 (r0, r1);
0x00069f00 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00069f04 ldr r1, [r4] | r1 = *(r4);
0x00069f08 mov r7, r5 | r7 = r5;
0x00069f0c str r0, [sp, 0x18] | var_18h = r0;
0x00069f10 add r0, r3, 0xfe | r0 = r3 + 0xfe;
0x00069f14 bl 0x14fa4 | fputs (r0, r1);
0x00069f18 sub r3, r6, 4 | r3 = r6 - 4;
0x00069f1c str r3, [sp, 0x14] | var_14h = r3;
0x00069f20 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00069f24 str sl, [sp, 0x1c] | var_1ch = sl;
0x00069f28 add sl, r3, 0x1c4 | sl = r3 + 0x1c4;
0x00069f2c mov r6, 0 | r6 = 0;
0x00069f30 add sl, sl, 3 | sl += 3;
| do {
| label_3:
0x00069f34 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00069f38 sub r7, r7, 1 | r7--;
0x00069f3c ldr r2, [r3, 4]! | r2 = *((r3 += 4));
0x00069f40 cmp r7, 0 |
0x00069f44 ldr r0, [r4] | r0 = *(r4);
0x00069f48 str r3, [sp, 0x14] | var_14h = r3;
| if (r7 <= 0) {
0x00069f4c bgt 0x69f64 |
0x00069f50 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00069f54 add r1, r3, 0x1c0 | r1 = r3 + 0x1c0;
0x00069f58 add r1, r1, 3 | r1 += 3;
0x00069f5c bl 0x150dc | fprintf (r0, r1, r2, r3);
0x00069f60 b 0x69d60 | goto label_0;
| }
0x00069f64 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00069f68 add r6, r6, 1 | r6++;
0x00069f6c cmp r3, r6 |
| if (r3 != r6) {
0x00069f70 bne 0x69f84 | goto label_11;
| }
0x00069f74 mov r1, sl | r1 = sl;
0x00069f78 bl 0x150dc | fprintf (r0, r1);
0x00069f7c mov r6, 0 | r6 = 0;
0x00069f80 b 0x69f34 |
| } while (1);
| label_11:
0x00069f84 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00069f88 bl 0x150dc | fprintf (r0, r1);
0x00069f8c b 0x69f34 | goto label_3;
| label_6:
0x00069f90 ldr r1, [sp, 0xc] | r1 = format;
0x00069f94 sub r3, r5, 1 | r3 = r5 - 1;
0x00069f98 add r3, r3, r8 | r3 += r8;
0x00069f9c mov r2, r8 | r2 = r8;
0x00069fa0 ldr r1, [r1, 0x84] | r1 = *((r1 + 0x84));
0x00069fa4 bl 0x150dc | fprintf (r0, r1, r2, r3);
0x00069fa8 b 0x69dcc | 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/sbin/ntpd @ 0x6c4ac */
| #include <stdint.h>
|
; (fcn) fcn.0006c4ac () | void fcn_0006c4ac (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;
0x0006c4ac ldrh ip, [r0, 0x5e] | ip = *((r0 + 0x5e));
0x0006c4b0 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0006c4b4 ldr r8, [pc, 0x39c] | r8 = *(0x6c854);
0x0006c4b8 lsl r2, ip, 0x11 | r2 = ip << 0x11;
0x0006c4bc lsr r2, r2, 0x11 | r2 >>= 0x11;
0x0006c4c0 sub sp, sp, 0x1040 |
0x0006c4c4 cmp r2, 0 |
0x0006c4c8 add r8, pc, r8 | r8 = pc + r8;
0x0006c4cc sub sp, sp, 0x3c |
0x0006c4d0 bne 0x6c4e8 |
| while (r3 == 0) {
| label_1:
0x0006c4d4 mov r4, 0 | r4 = 0;
| label_0:
0x0006c4d8 mov r0, r4 | r0 = r4;
0x0006c4dc add sp, sp, 0x1040 |
0x0006c4e0 add sp, sp, 0x3c |
0x0006c4e4 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0006c4e8 ldr r3, [r0, 0x44] | r3 = *((r0 + 0x44));
0x0006c4ec str r1, [sp, 8] | var_8h = r1;
0x0006c4f0 add r3, r3, ip, lsl 6 | r3 += (ip << 6);
0x0006c4f4 ldr r5, [r3, 0x18] | r5 = *((r3 + 0x18));
0x0006c4f8 mov r7, r0 | r7 = r0;
0x0006c4fc cmp r5, 0 |
| if (r5 != 0) {
0x0006c500 beq 0x6c510 |
0x0006c504 ldrb r3, [r5] | r3 = *(r5);
0x0006c508 cmp r3, 0 |
| if (r3 != 0) {
0x0006c50c bne 0x6c850 | goto label_7;
| }
| }
0x0006c510 ldr r3, [r7, 0x34] | r3 = *((r7 + 0x34));
0x0006c514 cmp r3, 0 |
0x0006c518 beq 0x6c4d4 |
| }
| do {
0x0006c51c mov r2, r3 | r2 = r3;
0x0006c520 ldr r4, [r3, 4]! | r4 = *((r3 += 4));
0x0006c524 cmp r4, 0 |
0x0006c528 bne 0x6c51c |
| } while (r4 != 0);
0x0006c52c ldr r5, [r2] | r5 = *(r2);
0x0006c530 ldrb r3, [r5] | r3 = *(r5);
0x0006c534 cmp r3, 0x24 |
| if (r3 == 0x24) {
0x0006c538 movne r6, r4 | r6 = r4;
| }
| if (r3 != 0x24) {
0x0006c53c bne 0x6c5cc | goto label_2;
| }
0x0006c540 add sb, r5, 1 | sb = r5 + 1;
0x0006c544 mov r1, 0x2f | r1 = 0x2f;
0x0006c548 mov r0, sb | r0 = sb;
0x0006c54c bl 0x153ac | r0 = strchr (r0, r1);
0x0006c550 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x0006c554 beq 0x6c5bc | goto label_8;
| }
0x0006c558 sub r5, r6, sb | r5 = r6 - sb;
0x0006c55c cmp r5, 0x7f |
| if (r5 > 0x7f) {
0x0006c560 bgt 0x6c4d8 | goto label_0;
| }
0x0006c564 add r3, sp, 0x78 | r3 += errnum;
0x0006c568 mov r2, r5 | r2 = r5;
0x0006c56c mov r1, sb | r1 = sb;
0x0006c570 mov r0, r3 | r0 = r3;
0x0006c574 bl 0x147dc | memcpy (r0, r1, r2);
0x0006c578 strb r4, [r0, r5] | *((r0 + r5)) = r4;
0x0006c57c bl 0x14770 | getenv (r0);
0x0006c580 subs fp, r0, 0 |
| if (fp != errnum) {
0x0006c584 bne 0x6c658 | goto label_9;
| }
| do {
0x0006c588 ldr r3, [pc, 0x2cc] | r3 = *(0x6c858);
0x0006c58c ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0006c590 ldr r5, [r8, r3] | r5 = *((r8 + r3));
0x0006c594 ldr r3, [pc, 0x2c4] | r3 = *(0x6c85c);
0x0006c598 ldr r1, [r5, 0xf0] | r1 = *((r5 + 0xf0));
0x0006c59c ldr r4, [r8, r3] | r4 = *((r8 + r3));
0x0006c5a0 ldr r0, [r4] | r0 = *(r4);
0x0006c5a4 bl 0x150dc | fprintf (r0, r1, r2, r3, r4, r5);
0x0006c5a8 mov r2, sb | r2 = sb;
0x0006c5ac ldr r1, [r5, 0xc0] | r1 = *((r5 + 0xc0));
0x0006c5b0 ldr r0, [r4] | r0 = *(r4);
0x0006c5b4 bl 0x150dc | fprintf (r0, r1, r2);
0x0006c5b8 b 0x6c4d4 | goto label_1;
| label_8:
0x0006c5bc mov r0, sb | r0 = sb;
0x0006c5c0 bl 0x14770 | r0 = getenv (r0);
0x0006c5c4 subs r5, r0, 0 | r5 = r0 - 0;
0x0006c5c8 beq 0x6c588 |
| } while (r5 == r0);
| label_2:
0x0006c5cc add sb, sp, 0x10 | sb += var_10h;
0x0006c5d0 mov r1, sb | r1 = sb;
0x0006c5d4 mov r0, r5 | r0 = r5;
0x0006c5d8 bl 0x14c5c | r0 = stat64 ();
0x0006c5dc cmp r0, 0 |
| if (r0 == 0) {
0x0006c5e0 beq 0x6c6b4 | goto label_10;
| }
0x0006c5e4 bl 0x1471c | r0 = errno_location ();
0x0006c5e8 ldr r3, [r0] | r3 = *(r0);
0x0006c5ec mov fp, r0 |
0x0006c5f0 cmp r3, 2 |
| if (r3 == 2) {
0x0006c5f4 beq 0x6c698 | goto label_11;
| }
| label_4:
0x0006c5f8 ldr r3, [pc, 0x25c] | r3 = *(0x6c858);
0x0006c5fc ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0006c600 ldr r4, [r8, r3] | r4 = *((r8 + r3));
0x0006c604 ldr r3, [pc, 0x254] | r3 = *(0x6c85c);
0x0006c608 ldr r1, [r4, 0xf0] | r1 = *((r4 + 0xf0));
0x0006c60c ldr r8, [r8, r3] | r8 = *((r8 + r3));
0x0006c610 ldr r0, [r8] | r0 = *(r8);
0x0006c614 bl 0x150dc | fprintf (r0, r1, r2, r3, r4);
0x0006c618 ldr r7, [r8] | r7 = *(r8);
0x0006c61c ldr r8, [r4, 0xb0] | r8 = *((r4 + 0xb0));
0x0006c620 ldr r4, [fp] | r4 = *(fp);
0x0006c624 mov r0, r4 | r0 = r4;
0x0006c628 bl 0x153e8 | strerror (r0);
0x0006c62c str r5, [sp] | *(sp) = r5;
0x0006c630 mov r2, r4 | r2 = r4;
0x0006c634 mov r1, r8 | r1 = r8;
0x0006c638 mov r3, r0 | r3 = r0;
0x0006c63c mov r0, r7 | r0 = r7;
0x0006c640 bl 0x150dc | fprintf (r0, r1, r2, r3, r4, r5);
0x0006c644 cmp r6, 0 |
| if (r6 != 0) {
0x0006c648 movne r0, r5 | r0 = r5;
| goto label_12;
| }
| if (r6 == 0) {
| label_12:
0x0006c64c beq 0x6c4d4 | goto label_1;
| }
| label_3:
0x0006c650 bl 0x15370 | free (r0);
0x0006c654 b 0x6c4d4 | goto label_1;
| label_9:
0x0006c658 bl 0x14a88 | r0 = strlen (r0);
0x0006c65c mov r4, r0 | r4 = r0;
0x0006c660 mov r0, r6 | r0 = r6;
0x0006c664 bl 0x14a88 | r0 = strlen (r0);
0x0006c668 add r0, r4, r0 | r0 = r4 + r0;
0x0006c66c add r0, r0, 2 | r0 += var_2h;
0x0006c670 bl 0x6adfc | fcn_0006adfc (r0);
0x0006c674 subs r5, r0, 0 | r5 -= var_2h;
| if (r5 == var_2h) {
0x0006c678 beq 0x6c4d4 | goto label_1;
| }
0x0006c67c ldr r1, [pc, 0x1e0] | r1 = *(0x6c860);
0x0006c680 mov r3, r6 | r3 = r6;
0x0006c684 mov r2, fp | r2 = fp;
0x0006c688 add r1, pc, r1 | r1 = pc + r1;
0x0006c68c bl 0x15178 | sprintf (r0, r1, r2)
0x0006c690 mov r6, 1 | r6 = 1;
0x0006c694 b 0x6c5cc | goto label_2;
| label_11:
0x0006c698 mov r1, 0x2f | r1 = 0x2f;
0x0006c69c mov r0, r5 | r0 = r5;
0x0006c6a0 bl 0x149c8 | r0 = strrchr (r0, r1);
0x0006c6a4 cmp r0, 0 |
| if (r0 == 0) {
0x0006c6a8 bne 0x6c7a8 |
| label_5:
0x0006c6ac mov r2, 0x8000 | r2 = 0x8000;
0x0006c6b0 str r2, [sp, 0x20] | var_58h = r2;
| label_10:
0x0006c6b4 add fp, sp, 0x78 |
0x0006c6b8 ldr r3, [fp, -0x58] | r3 = var_58h;
0x0006c6bc and r3, r3, 0xf000 | r3 &= 0xf000;
0x0006c6c0 cmp r3, 0x4000 |
| if (r3 == 0x4000) {
0x0006c6c4 movne r4, r5 | r4 = r5;
| }
| if (r3 != 0x4000) {
0x0006c6c8 bne 0x6c7fc | goto label_13;
| }
0x0006c6cc mov r0, r5 | r0 = r5;
0x0006c6d0 bl 0x14a88 | r0 = strlen (r0);
0x0006c6d4 mov r4, r0 | r4 = r0;
0x0006c6d8 ldr r0, [r7, 0x24] | r0 = *((r7 + 0x24));
0x0006c6dc bl 0x14a88 | r0 = strlen (r0);
0x0006c6e0 add r1, r4, r0 | r1 = r4 + r0;
0x0006c6e4 add r1, r1, 2 | r1 += 2;
0x0006c6e8 mov r0, r1 | r0 = r1;
0x0006c6ec str r1, [sp, 0xc] | var_ch = r1;
0x0006c6f0 bl 0x6adfc | fcn_0006adfc (r0);
0x0006c6f4 ldr r3, [r7, 0x24] | r3 = *((r7 + 0x24));
0x0006c6f8 ldr r2, [pc, 0x168] | r2 = *(0x6c864);
0x0006c6fc str r3, [sp] | *(sp) = r3;
0x0006c700 add r2, pc, r2 | r2 = pc + r2;
0x0006c704 mov r3, r5 | r3 = r5;
0x0006c708 ldr r1, [sp, 0xc] | r1 = var_ch;
0x0006c70c mov r4, r0 | r4 = r0;
0x0006c710 bl 0x5e950 | fcn_0005e950 ();
0x0006c714 cmp r6, 0 |
| if (r6 != 0) {
0x0006c718 beq 0x6c724 |
0x0006c71c mov r0, r5 | r0 = r5;
0x0006c720 bl 0x15370 | free (r0);
| }
0x0006c724 mov r1, sb | r1 = sb;
0x0006c728 mov r0, r4 | r0 = r4;
0x0006c72c bl 0x14c5c | r0 = stat64 ();
0x0006c730 cmp r0, 0 |
| if (r0 == 0) {
0x0006c734 beq 0x6c7f8 | goto label_14;
| }
0x0006c738 bl 0x1471c | r0 = errno_location ();
0x0006c73c ldr r3, [r0] | r3 = *(r0);
0x0006c740 mov r5, r0 | r5 = r0;
0x0006c744 cmp r3, 2 |
| if (r3 != 2) {
0x0006c748 moveq r3, 0x8000 | r3 = 0x8000;
| }
| if (r3 != 2) {
0x0006c74c streq r3, [fp, -0x58] | var_58h = r3;
| }
| if (r3 == 2) {
0x0006c750 beq 0x6c7f8 | goto label_14;
| }
0x0006c754 ldr r3, [pc, 0x100] | r3 = *(0x6c858);
0x0006c758 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0006c75c ldr r6, [r8, r3] | r6 = *((r8 + r3));
0x0006c760 ldr r3, [pc, 0xf8] | r3 = *(0x6c85c);
0x0006c764 ldr r1, [r6, 0xf0] | r1 = *((r6 + 0xf0));
0x0006c768 ldr r8, [r8, r3] | r8 = *((r8 + r3));
0x0006c76c ldr r0, [r8] | r0 = *(r8);
0x0006c770 bl 0x150dc | fprintf (r0, r1, r2, r3, r4, r5, r6);
0x0006c774 ldr r5, [r5] | r5 = *(r5);
0x0006c778 ldr r7, [r8] | r7 = *(r8);
0x0006c77c mov r0, r5 | r0 = r5;
0x0006c780 ldr r6, [r6, 0xb0] | r6 = *((r6 + 0xb0));
0x0006c784 bl 0x153e8 | strerror (r0);
0x0006c788 str r4, [sp] | *(sp) = r4;
0x0006c78c mov r2, r5 | r2 = r5;
0x0006c790 mov r1, r6 | r1 = r6;
0x0006c794 mov r3, r0 | r3 = r0;
0x0006c798 mov r0, r7 | r0 = r7;
0x0006c79c bl 0x150dc | fprintf (r0, r1, r2, r3, r4);
| label_6:
0x0006c7a0 mov r0, r4 | r0 = r4;
0x0006c7a4 b 0x6c650 | goto label_3;
| }
0x0006c7a8 sub r4, r0, r5 | r4 = r0 - r5;
0x0006c7ac cmp r4, 0x1000 |
| if (r4 >= 0x1000) {
0x0006c7b0 bhs 0x6c5f8 | goto label_4;
| }
0x0006c7b4 add sl, sp, 0x78 | sl += errnum;
0x0006c7b8 mov r2, r4 | r2 = r4;
0x0006c7bc mov r1, r5 | r1 = r5;
0x0006c7c0 mov r0, sl | r0 = sl;
0x0006c7c4 bl 0x147dc | memcpy (r0, r1, r2);
0x0006c7c8 mov r2, 0 | r2 = 0;
0x0006c7cc mov r1, sb | r1 = sb;
0x0006c7d0 mov r0, sl | r0 = sl;
0x0006c7d4 strb r2, [sl, r4] | *((sl + r4)) = r2;
0x0006c7d8 bl 0x14c5c | r0 = stat64 ();
0x0006c7dc cmp r0, 0 |
| if (r0 != 0) {
0x0006c7e0 bne 0x6c5f8 | goto label_4;
| }
0x0006c7e4 ldr r3, [sl, -0x58] | r3 = var_58h;
0x0006c7e8 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0006c7ec cmp r3, 0x4000 |
| if (r3 == 0x4000) {
0x0006c7f0 beq 0x6c6ac | goto label_5;
| }
0x0006c7f4 b 0x6c5f8 | goto label_4;
| label_14:
0x0006c7f8 mov r6, 1 | r6 = 1;
| label_13:
0x0006c7fc ldr r3, [fp, -0x58] | r3 = var_58h;
0x0006c800 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0006c804 cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x0006c808 beq 0x6c83c | goto label_15;
| }
0x0006c80c ldr r3, [pc, 0x48] | r3 = *(0x6c858);
0x0006c810 ldr r2, [r7, 0x1c] | r2 = *((r7 + 0x1c));
0x0006c814 ldr r1, [r8, r3] | r1 = *((r8 + r3));
0x0006c818 ldr r3, [pc, 0x40] | r3 = *(0x6c85c);
0x0006c81c ldr r1, [r1, 0xf0] | r1 = *((r1 + 0xf0));
0x0006c820 ldr r0, [r8, r3] | r0 = *((r8 + r3));
0x0006c824 mov r3, r4 | r3 = r4;
0x0006c828 ldr r0, [r0] | r0 = *(r0);
0x0006c82c bl 0x150dc | fprintf (r0, r1, r2, r3);
0x0006c830 cmp r6, 0 |
| if (r6 == 0) {
0x0006c834 beq 0x6c4d4 | goto label_1;
| }
0x0006c838 b 0x6c7a0 | goto label_6;
| label_15:
0x0006c83c mov r0, r4 | r0 = r4;
0x0006c840 bl 0x14ff8 | unlink (r0);
0x0006c844 ldr r3, [sp, 8] | r3 = var_8h;
0x0006c848 str r6, [r3] | *(r3) = r6;
0x0006c84c b 0x6c4d8 | goto label_0;
| label_7:
0x0006c850 mov r6, 0 | r6 = 0;
0x0006c854 b 0x6c5cc | 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/sbin/ntpd @ 0x6f37c */
| #include <stdint.h>
|
; (fcn) fcn.0006f37c () | void fcn_0006f37c (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x0006f37c push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0006f380 mov r5, r0 | r5 = r0;
0x0006f384 mov r0, r2 | r0 = r2;
0x0006f388 mov r6, r1 | r6 = r1;
0x0006f38c mov r4, r2 | r4 = r2;
0x0006f390 mov r8, r3 | r8 = r3;
0x0006f394 bl 0x14a88 | r0 = strlen (r0);
0x0006f398 cmp r0, 0 |
0x0006f39c cmpne r6, r0 | __asm ("cmpne r6, r0");
| if (r0 > 0) {
0x0006f3a0 movls sb, 1 | sb = 1;
| }
| if (r0 <= 0) {
0x0006f3a4 movhi sb, 0 | sb = 0;
| }
| if (r0 <= 0) {
0x0006f3a8 bhi 0x6f3bc |
| label_0:
0x0006f3ac mov sb, 0 | sb = 0;
| label_1:
0x0006f3b0 mov r0, sb | r0 = sb;
0x0006f3b4 add sp, sp, 0xc |
0x0006f3b8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x0006f3bc ldrb r3, [r4] | r3 = *(r4);
0x0006f3c0 cmp r3, 0x24 |
| if (r3 == 0x24) {
0x0006f3c4 beq 0x6f3f4 | goto label_3;
| }
0x0006f3c8 sub r1, r5, 1 | r1 = r5 - 1;
0x0006f3cc mov r2, r4 | r2 = r4;
| do {
0x0006f3d0 ldrb r3, [r2], 1 | r3 = *(r2);
| r2++;
0x0006f3d4 cmp r3, 0 |
0x0006f3d8 strb r3, [r1, 1]! | *((r1 += 1)) = r3;
| if (r3 == 0) {
0x0006f3dc beq 0x6f4ec | goto label_2;
| }
0x0006f3e0 sub r3, r6, r2 | r3 = r6 - r2;
0x0006f3e4 add r3, r4, r3 | r3 = r4 + r3;
0x0006f3e8 cmp r3, 0 |
0x0006f3ec bgt 0x6f3d0 |
| } while (r3 > 0);
0x0006f3f0 b 0x6f3ac | goto label_0;
| label_3:
0x0006f3f4 ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x0006f3f8 cmp r3, 0x24 |
| if (r3 == 0x24) {
0x0006f3fc beq 0x6f438 | goto label_4;
| }
0x0006f400 cmp r3, 0x40 |
| if (r3 == 0x40) {
0x0006f404 beq 0x6f514 | goto label_5;
| }
0x0006f408 cmp r3, 0 |
| if (r3 == 0) {
0x0006f40c movne r2, r5 | r2 = r5;
| }
| if (r3 != 0) {
0x0006f410 ldrne r8, [pc, 0x1b4] | r8 = *(0x0006f5cc);
| goto label_6;
| }
| if (r3 == 0) {
| label_6:
0x0006f414 beq 0x6f3b0 | goto label_1;
| }
| do {
0x0006f418 ldrb r7, [r4, 1]! | r7 = *((r4 += 1));
0x0006f41c mov r1, r8 | r1 = r8;
0x0006f420 mov r0, r7 | r0 = r7;
0x0006f424 bl 0x69148 | r0 = fcn_00069148 (r0, r1);
0x0006f428 cmp r0, 0 |
| if (r0 == 0) {
0x0006f42c beq 0x6f554 | goto label_7;
| }
0x0006f430 strb r7, [r2], 1 | *(r2) = r7;
| r2++;
0x0006f434 b 0x6f418 |
| } while (1);
| label_4:
0x0006f438 ldrb r3, [r4, 2] | r3 = *((r4 + 2));
0x0006f43c cmp r3, 0 |
| if (r3 == 0) {
0x0006f440 beq 0x6f454 | goto label_8;
| }
0x0006f444 cmp r3, 0x2f |
| if (r3 != 0x2f) {
0x0006f448 bne 0x6f3b0 | goto label_1;
| }
0x0006f44c mov fp, 3 |
0x0006f450 b 0x6f458 | goto label_9;
| label_8:
0x0006f454 mov fp, 2 |
| label_9:
0x0006f458 mov r1, 0x2f | r1 = 0x2f;
0x0006f45c mov r0, r8 | r0 = r8;
0x0006f460 bl 0x153ac | r0 = strchr (r0, r1);
0x0006f464 cmp r0, 0 |
| if (r0 == 0) {
0x0006f468 movne sl, r8 | sl = r8;
| }
| if (r0 != 0) {
0x0006f46c bne 0x6f48c | goto label_10;
| }
0x0006f470 ldr r0, [pc, 0x158] | r0 = *(0x6f5cc);
0x0006f474 add r0, pc, r0 | r0 = pc + r0;
0x0006f478 bl 0x14770 | getenv (r0);
0x0006f47c mov r1, r8 | r1 = r8;
0x0006f480 bl 0x6c86c | r0 = fcn_0006c86c (r0, r1);
0x0006f484 subs sl, r0, 0 | sl = r0 - 0;
| if (sl == r0) {
0x0006f488 beq 0x6f3ac | goto label_0;
| }
| label_10:
0x0006f48c mov r1, 0x2f | r1 = 0x2f;
0x0006f490 mov r0, sl | r0 = sl;
0x0006f494 bl 0x149c8 | r0 = strrchr (r0, r1);
0x0006f498 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 == r0) {
0x0006f49c beq 0x6f3ac | goto label_0;
| }
0x0006f4a0 add r4, r4, fp | r4 += fp;
0x0006f4a4 mov r0, r4 | r0 = r4;
0x0006f4a8 bl 0x14a88 | strlen (r0);
0x0006f4ac sub r7, r7, sl | r7 -= sl;
0x0006f4b0 add r7, r7, 1 | r7++;
0x0006f4b4 add r0, r0, r7 | r0 += r7;
0x0006f4b8 cmp r6, r0 |
| if (r6 < r0) {
0x0006f4bc bls 0x6f3ac | goto label_0;
| }
0x0006f4c0 mov r2, r7 | r2 = r7;
0x0006f4c4 mov r1, sl | r1 = sl;
0x0006f4c8 mov r0, r5 | r0 = r5;
0x0006f4cc bl 0x147dc | memcpy (r0, r1, r2);
0x0006f4d0 mov r1, r4 | r1 = r4;
0x0006f4d4 add r0, r5, r7 | r0 = r5 + r7;
0x0006f4d8 bl 0x15514 | strcpy (r0, r1);
0x0006f4dc cmp r8, sl |
| if (r8 != sl) {
0x0006f4e0 beq 0x6f4ec |
0x0006f4e4 mov r0, sl | r0 = sl;
0x0006f4e8 bl 0x15370 | free (r0);
| }
| label_2:
0x0006f4ec mov r0, r5 | r0 = r5;
0x0006f4f0 bl 0x14710 | r0 = canonicalize_file_name ();
0x0006f4f4 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x0006f4f8 beq 0x6f3ac | goto label_0;
| }
0x0006f4fc bl 0x14a88 | r0 = strlen (r0);
0x0006f500 cmp r6, r0 |
| if (r6 > r0) {
0x0006f504 bhi 0x6f5ac | goto label_11;
| }
0x0006f508 mov r0, r4 | r0 = r4;
0x0006f50c bl 0x15370 | free (r0);
0x0006f510 b 0x6f3b0 | goto label_1;
| label_5:
0x0006f514 ldr r3, [pc, 0xb8] |
0x0006f518 add r3, pc, r3 | r3 = pc + r3;
0x0006f51c ldr r3, [r3] | r3 = *(0x6f5d0);
0x0006f520 ldrb r2, [r3] | r2 = *(r3);
0x0006f524 cmp r2, 0 |
| if (r2 == 0) {
0x0006f528 beq 0x6f3ac | goto label_0;
| }
0x0006f52c ldr r2, [pc, 0xa4] | r2 = *(0x6f5d4);
0x0006f530 add r4, r4, 2 | r4 += 2;
0x0006f534 str r4, [sp] | *(sp) = r4;
0x0006f538 add r2, pc, r2 | r2 = pc + r2;
0x0006f53c mov r1, r6 | r1 = r6;
0x0006f540 mov r0, r5 | r0 = r5;
0x0006f544 bl 0x5e950 | r0 = fcn_0005e950 ();
0x0006f548 cmp r0, r6 |
| if (r0 < r6) {
0x0006f54c blt 0x6f4ec | goto label_2;
| }
0x0006f550 b 0x6f3ac | goto label_0;
| label_7:
0x0006f554 cmp r5, r2 |
| if (r5 == r2) {
0x0006f558 beq 0x6f3ac | goto label_0;
| }
0x0006f55c strb r0, [r2] | *(r2) = r0;
0x0006f560 mov r0, r5 | r0 = r5;
0x0006f564 bl 0x14770 | r0 = getenv (r0);
0x0006f568 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 == r0) {
0x0006f56c beq 0x6f3ac | goto label_0;
| }
0x0006f570 bl 0x14a88 | r0 = strlen (r0);
0x0006f574 mov r7, r0 | r7 = r0;
0x0006f578 mov r0, r4 | r0 = r4;
0x0006f57c bl 0x14a88 | r0 = strlen (r0);
0x0006f580 add r0, r7, r0 | r0 = r7 + r0;
0x0006f584 add r0, r0, 1 | r0++;
0x0006f588 cmp r6, r0 |
| if (r6 < r0) {
0x0006f58c bls 0x6f3ac | goto label_0;
| }
0x0006f590 ldr r1, [pc, 0x44] | r1 = *(0x6f5d8);
0x0006f594 mov r3, r4 | r3 = r4;
0x0006f598 mov r2, r8 | r2 = r8;
0x0006f59c add r1, pc, r1 | r1 = pc + r1;
0x0006f5a0 mov r0, r5 | r0 = r5;
0x0006f5a4 bl 0x15178 | sprintf (r0, r1, r2)
0x0006f5a8 b 0x6f4ec | goto label_2;
| label_11:
0x0006f5ac add r2, r0, 1 | r2 = r0 + 1;
0x0006f5b0 mov r1, r4 | r1 = r4;
0x0006f5b4 mov r0, r5 | r0 = r5;
0x0006f5b8 bl 0x147dc | memcpy (r0, r1, r2);
0x0006f5bc mov r0, r4 | r0 = r4;
0x0006f5c0 bl 0x15370 | free (r0);
0x0006f5c4 mov sb, 1 | sb = 1;
0x0006f5c8 b 0x6f3b0 | 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/sbin/ntpd @ 0x6fa28 */
| #include <stdint.h>
|
; (fcn) fcn.0006fa28 () | void fcn_0006fa28 (int32_t arg1, char * s) {
| r0 = arg1;
| r1 = s;
0x0006fa28 push {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0006fa2c ldr sb, [pc, 0x20c] | sb = *(0x6fc3c);
0x0006fa30 mov r6, r0 | r6 = r0;
0x0006fa34 mov r0, r1 | r0 = r1;
0x0006fa38 mov r8, r1 | r8 = r1;
0x0006fa3c bl 0x14a88 | strlen (r0);
0x0006fa40 mov r2, r6 | r2 = r6;
0x0006fa44 mov ip, 1 |
0x0006fa48 add sb, pc, sb | sb = pc + sb;
0x0006fa4c mov r7, r0 | r7 = r0;
0x0006fa50 mov r0, 3 | r0 = 3;
| do {
| label_0:
0x0006fa54 ldrb r3, [r2], 1 | r3 = *(r2);
| r2++;
0x0006fa58 sub r1, r3, 0x20 | r1 = r3 - 0x20;
0x0006fa5c cmp r1, 0x5e |
| if (r1 > 0x5e) {
0x0006fa60 bhi 0x6fa7c | goto label_5;
| }
0x0006fa64 cmp r3, 0x5c |
0x0006fa68 cmpne r3, 0x22 | __asm ("cmpne r3, 0x22");
| if (r3 == 0x5c) {
0x0006fa6c movne r3, 1 | r3 = 1;
| }
| if (r3 != 0x5c) {
0x0006fa70 moveq r3, 2 | r3 = 2;
| }
0x0006fa74 add r0, r0, r3 | r0 += r3;
0x0006fa78 b 0x6fa54 |
| } while (1);
| label_5:
0x0006fa7c cmp r3, 0xd |
| if (r3 > 0xd) {
0x0006fa80 bhi 0x6fb00 | goto label_6;
| }
0x0006fa84 lsl r1, ip, r3 | r1 = ip << r3;
0x0006fa88 tst r1, 0x3b80 |
| if ((r1 & 0x3b80) != 0) {
0x0006fa8c bne 0x6faf8 | goto label_7;
| }
0x0006fa90 tst r1, 0x400 |
| if ((r1 & 0x400) != 0) {
0x0006fa94 bne 0x6faf0 | goto label_8;
| }
0x0006fa98 cmp r3, 0 |
| if (r3 != 0) {
0x0006fa9c bne 0x6fb00 | goto label_6;
| }
0x0006faa0 bl 0x6adfc | fcn_0006adfc (r0);
0x0006faa4 mov r5, 0x5c | r5 = 0x5c;
0x0006faa8 mov r3, 0x22 | r3 = 0x22;
0x0006faac mov sl, 0x72 | sl = 0x72;
0x0006fab0 mov fp, r0 |
0x0006fab4 add r4, r0, 1 | r4 = r0 + 1;
0x0006fab8 strb r3, [r0] | *(r0) = r3;
| do {
| label_1:
0x0006fabc ldrb r2, [r6] | r2 = *(r6);
0x0006fac0 sub r3, r2, 0x20 | r3 = r2 - 0x20;
0x0006fac4 cmp r3, 0x5e |
| if (r3 > 0x5e) {
0x0006fac8 bhi 0x6fb08 | goto label_9;
| }
0x0006facc cmp r2, 0x5c |
0x0006fad0 cmpne r2, 0x22 | __asm ("cmpne r2, 0x22");
| if (r2 != 0x5c) {
0x0006fad4 strbeq r5, [r4] | *(r4) = r5;
| }
| if (r2 != 0x5c) {
0x0006fad8 addeq r4, r4, 1 | r4++;
| }
0x0006fadc add r3, r4, 1 | r3 = r4 + 1;
0x0006fae0 strb r2, [r4] | *(r4) = r2;
| label_2:
0x0006fae4 add r6, r6, 1 | r6++;
0x0006fae8 mov r4, r3 | r4 = r3;
0x0006faec b 0x6fabc |
| } while (1);
| label_8:
0x0006faf0 add r0, r0, r7 | r0 += r7;
0x0006faf4 b 0x6fa54 | goto label_0;
| label_7:
0x0006faf8 add r0, r0, 2 | r0 += 2;
0x0006fafc b 0x6fa54 | goto label_0;
| label_6:
0x0006fb00 add r0, r0, 4 | r0 += 4;
0x0006fb04 b 0x6fa54 | goto label_0;
| label_9:
0x0006fb08 cmp r2, 0xd |
| if (r2 > 0xd) {
| /* switch table (14 cases) at 0x6fb14 */
0x0006fb0c addls pc, pc, r2, lsl 2 | pc += (r2 << 2);
| }
0x0006fb10 b 0x6fc20 | goto label_10;
0x0006fb14 b 0x6fc08 | goto label_11;
0x0006fb18 b 0x6fc20 | goto label_10;
0x0006fb1c b 0x6fc20 | goto label_10;
0x0006fb20 b 0x6fc20 | goto label_10;
0x0006fb24 b 0x6fc20 | goto label_10;
0x0006fb28 b 0x6fc20 | goto label_10;
0x0006fb2c b 0x6fc20 | goto label_10;
0x0006fb30 b 0x6fb84 | goto label_12;
0x0006fb34 b 0x6fb98 | goto label_13;
0x0006fb38 b 0x6fba8 | goto label_14;
0x0006fb3c b 0x6fb4c | goto label_15;
0x0006fb40 b 0x6fbb8 | goto label_16;
0x0006fb44 b 0x6fbc8 | goto label_17;
0x0006fb48 b 0x6fbd8 | goto label_18;
| label_15:
0x0006fb4c mov r1, 0x6e | r1 = 0x6e;
| label_4:
0x0006fb50 ldrb r2, [r6, 1]! | r2 = *((r6 += 1));
0x0006fb54 mov r3, r4 | r3 = r4;
0x0006fb58 cmp r2, 0xa |
0x0006fb5c add r4, r4, 2 | r4 += 2;
| if (r2 == 0xa) {
0x0006fb60 beq 0x6fbe8 | goto label_19;
| }
0x0006fb64 cmp r2, 0 |
| if (r2 == 0) {
0x0006fb68 beq 0x6fbf4 | goto label_20;
| }
0x0006fb6c mov r2, r7 | r2 = r7;
0x0006fb70 mov r1, r8 | r1 = r8;
0x0006fb74 mov r0, r3 | r0 = r3;
0x0006fb78 bl 0x147dc | r0 = memcpy (r0, r1, r2);
0x0006fb7c add r4, r0, r7 | r4 = r0 + r7;
0x0006fb80 b 0x6fabc | goto label_1;
| label_12:
0x0006fb84 mov r3, r4 | r3 = r4;
0x0006fb88 mov r2, 0x61 | r2 = 0x61;
0x0006fb8c strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
| do {
| label_3:
0x0006fb90 strb r2, [r4, 1] | *((r4 + 1)) = r2;
0x0006fb94 b 0x6fae4 | goto label_2;
| label_13:
0x0006fb98 mov r3, r4 | r3 = r4;
0x0006fb9c strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x0006fba0 mov r2, 0x62 | r2 = 0x62;
0x0006fba4 b 0x6fb90 |
| } while (1);
| label_14:
0x0006fba8 mov r3, r4 | r3 = r4;
0x0006fbac strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x0006fbb0 mov r2, 0x74 | r2 = 0x74;
0x0006fbb4 b 0x6fb90 | goto label_3;
| label_16:
0x0006fbb8 mov r3, r4 | r3 = r4;
0x0006fbbc strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x0006fbc0 mov r2, 0x76 | r2 = 0x76;
0x0006fbc4 b 0x6fb90 | goto label_3;
| label_17:
0x0006fbc8 mov r3, r4 | r3 = r4;
0x0006fbcc strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x0006fbd0 mov r2, 0x66 | r2 = 0x66;
0x0006fbd4 b 0x6fb90 | goto label_3;
| label_18:
0x0006fbd8 mov r3, r4 | r3 = r4;
0x0006fbdc strb r5, [r3], 2 | *(r3) = r5;
| r3 += 2;
0x0006fbe0 strb sl, [r4, 1] | *((r4 + 1)) = sl;
0x0006fbe4 b 0x6fae4 | goto label_2;
| label_19:
0x0006fbe8 strb r5, [r4, -2] | *((r4 - 2)) = r5;
0x0006fbec strb r1, [r4, -1] | *((r4 - 1)) = r1;
0x0006fbf0 b 0x6fb50 | goto label_4;
| label_20:
0x0006fbf4 mov r2, 0x5c | r2 = 0x5c;
0x0006fbf8 mov r4, r3 | r4 = r3;
0x0006fbfc strb r2, [r4], 2 | *(r4) = r2;
| r4 += 2;
0x0006fc00 mov r2, 0x6e | r2 = 0x6e;
0x0006fc04 strb r2, [r3, 1] | *((r3 + 1)) = r2;
| label_11:
0x0006fc08 mov r3, 0x22 | r3 = 0x22;
0x0006fc0c strb r3, [r4] | *(r4) = r3;
0x0006fc10 mov r3, 0 | r3 = 0;
0x0006fc14 strb r3, [r4, 1] | *((r4 + 1)) = r3;
0x0006fc18 mov r0, fp | r0 = fp;
0x0006fc1c pop {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_10:
0x0006fc20 ldr r3, [pc, 0x1c] | r3 = *(0x6fc40);
0x0006fc24 mov r0, r4 | r0 = r4;
0x0006fc28 ldr r1, [sb, r3] | r1 = *((sb + r3));
0x0006fc2c add r1, r1, 0x1a4 | r1 += 0x1a4;
0x0006fc30 add r1, r1, 2 | r1 += 2;
0x0006fc34 bl 0x15178 | sprintf (r0, r1, r2)
0x0006fc38 add r3, r4, 4 | r3 = r4 + 4;
0x0006fc3c b 0x6fae4 | 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/sbin/ntpd @ 0x7200c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0007200c () | void fcn_0007200c (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;
0x0007200c ldr r3, [pc, 0x6fc] | r3 = *(0x7270c);
0x00072010 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00072014 add r3, pc, r3 | r3 = pc + r3;
0x00072018 sub sp, sp, 0xbc |
0x0007201c mov r6, r0 | r6 = r0;
0x00072020 str r3, [sp, 0x18] | var_18h = r3;
0x00072024 mov r3, 0 | r3 = 0;
0x00072028 str r3, [sp, 0x48] | var_48h = r3;
0x0007202c str r3, [sp, 0x4c] | var_4ch = r3;
0x00072030 str r3, [sp, 0x54] | var_54h = r3;
0x00072034 ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00072038 mov r5, 2 | r5 = 2;
0x0007203c mov r0, r1 | r0 = r1;
0x00072040 str r2, [sp, 0xc] | var_ch = r2;
0x00072044 str r3, [sp, 0x24] | var_24h = r3;
0x00072048 mov r2, r5 | r2 = r5;
0x0007204c add r3, sp, 0x58 | r3 += var_58h;
0x00072050 mov r1, 3 | r1 = 3;
0x00072054 str r5, [sp, 0x50] | var_50h = r5;
0x00072058 bl 0x71dcc | r0 = fcn_00071dcc (r0, r1);
0x0007205c cmn r0, 1 |
| if (r0 == 1) {
0x00072060 beq 0x721e4 | goto label_16;
| }
0x00072064 ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00072068 mov r4, r0 | r4 = r0;
0x0007206c bic r2, r3, 4 | r2 = BIT_MASK (r3, 4);
0x00072070 str r2, [r6, 0xc] | *((r6 + 0xc)) = r2;
0x00072074 ldr r2, [sp, 0xc] | r2 = var_ch;
0x00072078 cmp r2, 0 |
| if (r2 != 0) {
0x0007207c moveq r2, 4 | r2 = 4;
| }
| if (r2 != 0) {
0x00072080 streq r2, [sp, 0x10] | var_10h = r2;
| }
| if (r2 != 0) {
0x00072084 moveq r2, 1 | r2 = 1;
| }
| if (r2 == 0) {
0x00072088 strne r5, [sp, 0x10] | var_10h = r5;
| }
| if (r2 != 0) {
0x0007208c streq r2, [sp, 0xc] | var_ch = r2;
| }
0x00072090 tst r3, 0x80000 |
0x00072094 ldr r3, [sp, 0x10] | r3 = var_10h;
| if ((r3 & 0x80000) != 0) {
0x00072098 moveq r3, 1 | r3 = 1;
| }
0x0007209c str r3, [sp, 0x10] | var_10h = r3;
0x000720a0 ldr r3, [pc, 0x66c] |
0x000720a4 add r3, pc, r3 | r3 = pc + r3;
0x000720a8 add r3, r3, 0x530 | r3 = 0x72c40;
0x000720ac add r3, r3, 3 | r3 += 3;
0x000720b0 str r3, [sp, 0x14] | format = r3;
| do {
0x000720b4 ldr r3, [sp, 0x10] | r3 = var_10h;
0x000720b8 mov r1, 0xc | r1 = 0xc;
0x000720bc mov r0, r4 | r0 = r4;
0x000720c0 str r3, [sp, 0x50] | var_50h = r3;
0x000720c4 bl 0x6ac44 | fcn_0006ac44 (r0, r1);
0x000720c8 ldr r1, [pc, 0x648] | r1 = *(0x72714);
0x000720cc ldrb r2, [r0] | r2 = *(r0);
0x000720d0 mov r5, r0 | r5 = r0;
0x000720d4 mov r0, r2 | r0 = r2;
0x000720d8 bl 0x69148 | r0 = fcn_00069148 (r0, r1);
0x000720dc cmp r0, 0 |
| if (r0 == 0) {
0x000720e0 beq 0x72208 | goto label_17;
| }
0x000720e4 add r4, r5, 1 | r4 = r5 + 1;
0x000720e8 mov r1, 0xa | r1 = 0xa;
0x000720ec mov r0, r4 | r0 = r4;
0x000720f0 bl 0x153ac | r0 = strchr (r0, r1);
0x000720f4 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x000720f8 bne 0x72114 | goto label_18;
| }
0x000720fc mov r0, r4 | r0 = r4;
0x00072100 bl 0x14a88 | r0 = strlen (r0);
0x00072104 add r4, r4, r0 | r4 += r0;
| label_1:
0x00072108 cmp r4, 0 |
0x0007210c bne 0x720b4 |
| } while (r4 != 0);
0x00072110 b 0x721d4 | goto label_4;
| label_18:
0x00072114 mov r1, 0x1c | r1 = 0x1c;
0x00072118 mov r0, r4 | r0 = r4;
0x0007211c bl 0x6ac44 | fcn_0006ac44 (r0, r1);
0x00072120 mov r1, 0xc | r1 = 0xc;
0x00072124 bl 0x6ac44 | r0 = fcn_0006ac44 (r0, r1);
0x00072128 cmp r7, r0 |
0x0007212c bhs 0x72140 |
| while (r7 <= r0) {
| label_0:
0x00072130 mov r3, 0 | r3 = 0;
0x00072134 add r4, r7, 1 | r4 = r7 + 1;
0x00072138 strb r3, [r7] | *(r7) = r3;
0x0007213c b 0x721a0 | goto label_19;
0x00072140 ldrb r3, [r0] | r3 = *(r0);
0x00072144 cmp r3, 0x3a |
0x00072148 cmpne r3, 0x3d | __asm ("cmpne r3, 0x3d");
| if (r3 != 0x3a) {
0x0007214c bne 0x721c0 | goto label_20;
| }
0x00072150 mov r1, 0xc | r1 = 0xc;
0x00072154 add r0, r0, 1 | r0++;
0x00072158 bl 0x6ac44 | r0 = fcn_0006ac44 (r0, r1);
0x0007215c cmp r7, r0 |
0x00072160 blo 0x72130 |
| }
| label_2:
0x00072164 ldrb r3, [r7, -1] | r3 = *((r7 - 1));
0x00072168 cmp r3, 0x5c |
| if (r3 != 0x5c) {
0x0007216c bne 0x72130 | goto label_0;
| }
0x00072170 sub r2, r7, 1 | r2 = r7 - 1;
| label_3:
0x00072174 ldrb r3, [r7] | r3 = *(r7);
0x00072178 add r4, r7, 1 | r4 = r7 + 1;
0x0007217c cmp r3, 0xa |
| if (r3 != 0xa) {
0x00072180 beq 0x72198 |
0x00072184 cmp r3, 0x5c |
| if (r3 == 0x5c) {
0x00072188 beq 0x721ec | goto label_21;
| }
0x0007218c cmp r3, 0 |
| if (r3 != 0) {
0x00072190 bne 0x721fc | goto label_22;
| }
0x00072194 mov r4, r3 | r4 = r3;
| }
0x00072198 mov r3, 0 | r3 = 0;
0x0007219c strb r3, [r2] | *(r2) = r3;
| label_19:
0x000721a0 mov r3, 1 | r3 = 1;
| label_7:
0x000721a4 str r3, [sp] | *(sp) = r3;
0x000721a8 mov r2, r5 | r2 = r5;
0x000721ac ldr r3, [sp, 0xc] | r3 = var_ch;
0x000721b0 add r1, sp, 0x48 | r1 += var_48h;
0x000721b4 mov r0, r6 | r0 = r6;
0x000721b8 bl 0x70d54 | fcn_00070d54 (r0, r1, r2);
0x000721bc b 0x72108 | goto label_1;
| label_20:
0x000721c0 ldr r1, [pc, 0x554] | r1 = *(0x72718);
0x000721c4 ldrb r0, [r0, -1] | r0 = *((r0 - 1));
0x000721c8 bl 0x69148 | r0 = fcn_00069148 (r0, r1);
0x000721cc cmp r0, 0 |
| if (r0 != 0) {
0x000721d0 bne 0x72164 | goto label_2;
| }
| do {
| label_4:
0x000721d4 add r0, sp, 0x58 | r0 += var_58h;
0x000721d8 bl 0x71fc0 | fcn_00071fc0 (r0);
0x000721dc ldr r3, [sp, 0x24] | r3 = var_24h;
0x000721e0 str r3, [r6, 0xc] | *((r6 + 0xc)) = r3;
| label_16:
0x000721e4 add sp, sp, 0xbc |
0x000721e8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_21:
0x000721ec ldrb r1, [r7, 1] | r1 = *((r7 + 1));
0x000721f0 cmp r1, 0xa |
| if (r1 != 0xa) {
0x000721f4 addeq r4, r7, 2 | r4 = r7 + 2;
| }
| if (r1 != 0xa) {
0x000721f8 moveq r3, r1 | r3 = r1;
| }
| label_22:
0x000721fc strb r3, [r2], 1 | *(r2) = r3;
| r2++;
0x00072200 mov r7, r4 | r7 = r4;
0x00072204 b 0x72174 | goto label_3;
| label_17:
0x00072208 cmp r2, 0x3c |
| if (r2 == 0x3c) {
0x0007220c beq 0x7222c | goto label_23;
| }
0x00072210 cmp r2, 0x5b |
| if (r2 == 0x5b) {
0x00072214 beq 0x7268c | goto label_24;
| }
0x00072218 cmp r2, 0x23 |
0x0007221c bne 0x721d4 |
| } while (r2 != 0x23);
0x00072220 mov r1, 0xa | r1 = 0xa;
0x00072224 add r0, r5, 1 | r0 = r5 + 1;
0x00072228 b 0x72708 | goto label_25;
| label_23:
0x0007222c ldrb r2, [r5, 1] | r2 = *((r5 + 1));
0x00072230 ldr r1, [pc, 0x4e0] | r1 = *(0x72714);
0x00072234 mov r0, r2 | r0 = r2;
0x00072238 bl 0x69148 | r0 = fcn_00069148 (r0, r1);
0x0007223c subs fp, r0, 0 |
| if (fp == r0) {
0x00072240 beq 0x72574 | goto label_26;
| }
0x00072244 ldr r3, [pc, 0x4d4] |
0x00072248 add r5, r5, 1 | r5++;
0x0007224c add r3, pc, r3 | r3 = pc + r3;
0x00072250 ldr r3, [r3, 4] | r3 = *(0x72720);
0x00072254 mov r1, 0x1c | r1 = 0x1c;
0x00072258 mov r0, r5 | r0 = r5;
0x0007225c str r3, [sp, 0x34] | var_34h = r3;
0x00072260 bl 0x6ac44 | fcn_0006ac44 (r0, r1);
0x00072264 mov r3, 1 | r3 = 1;
0x00072268 str r3, [sp, 0x3c] | var_3ch = r3;
0x0007226c ldrb r3, [r0] | r3 = *(r0);
0x00072270 mov r8, r0 | r8 = r0;
0x00072274 cmp r3, 0x20 |
| if (r3 == 0x20) {
0x00072278 beq 0x723d8 | goto label_27;
| }
| if (r3 > 0x20) {
0x0007227c bhi 0x722a4 | goto label_28;
| }
0x00072280 cmp r3, 9 |
| if (r3 == 9) {
0x00072284 beq 0x723d8 | goto label_27;
| }
| label_5:
0x00072288 mov r1, 0x3e | r1 = 0x3e;
0x0007228c mov r0, r8 | r0 = r8;
0x00072290 bl 0x153ac | r0 = strchr (r0, r1);
0x00072294 cmp r0, 0 |
| if (r0 == 0) {
0x00072298 beq 0x721d4 | goto label_4;
| }
0x0007229c add r4, r0, 1 | r4 = r0 + 1;
0x000722a0 b 0x72108 | goto label_1;
| label_28:
0x000722a4 cmp r3, 0x2f |
| if (r3 == 0x2f) {
0x000722a8 beq 0x72428 | goto label_29;
| }
0x000722ac cmp r3, 0x3e |
| if (r3 == 0x3e) {
0x000722b0 moveq r4, r0 | r4 = r0;
| goto label_30;
| }
| if (r3 != 0x3e) {
| label_30:
0x000722b4 bne 0x72288 | goto label_5;
| }
| label_6:
0x000722b8 mov r3, 0 | r3 = 0;
0x000722bc strb r3, [r8] | *(r8) = r3;
0x000722c0 mov r0, r5 | r0 = r5;
0x000722c4 bl 0x14a88 | strlen (r0);
0x000722c8 add r3, sp, 0x78 | r3 += str;
0x000722cc str r3, [sp, 0x1c] | endptr = r3;
0x000722d0 add r7, r4, 1 | r7 = r4 + 1;
0x000722d4 ldr sb, [sp, 0x34] | sb = var_34h;
0x000722d8 add r0, r0, 4 | r0 += 4;
0x000722dc cmp r0, 0x3f |
| if (r0 > 0x3f) {
0x000722e0 ldrls fp, [sp, 0x1c] | fp = endptr;
| }
| if (r0 >= 0x3f) {
0x000722e4 bls 0x722f0 |
0x000722e8 bl 0x6adfc | r0 = fcn_0006adfc (r0);
0x000722ec mov fp, r0 |
| }
0x000722f0 mov r2, r5 | r2 = r5;
0x000722f4 ldr r1, [sp, 0x14] | r1 = format;
0x000722f8 mov r0, fp | r0 = fp;
0x000722fc bl 0x15178 | sprintf (r0, r1, r2)
0x00072300 mov r3, 0x20 | r3 = 0x20;
0x00072304 strb r3, [r4, 1] | *((r4 + 1)) = r3;
0x00072308 mov r1, fp | r1 = fp;
0x0007230c mov sl, r0 | sl = r0;
0x00072310 mov r0, r7 | r0 = r7;
0x00072314 bl 0x152d4 | strstr (r0, r1);
0x00072318 add r3, sp, 0x78 | r3 += str;
0x0007231c cmp fp, r3 |
0x00072320 mov r1, r0 | r1 = r0;
| if (fp != r3) {
0x00072324 beq 0x72338 |
0x00072328 str r0, [sp, 0x20] | s2 = r0;
0x0007232c mov r0, fp | r0 = fp;
0x00072330 bl 0x15370 | free (r0);
0x00072334 ldr r1, [sp, 0x20] | r1 = s2;
| }
0x00072338 cmp r1, 0 |
| if (r1 == 0) {
0x0007233c beq 0x721d4 | goto label_4;
| }
0x00072340 cmp sb, 1 |
0x00072344 add r4, r1, sl | r4 = r1 + sl;
| if (sb != 1) {
0x00072348 beq 0x72358 |
0x0007234c mov r0, r7 | r0 = r7;
0x00072350 bl 0x6cec8 | r0 = fcn_0006cec8 (r0, r1);
0x00072354 mov r1, r0 | r1 = r0;
| }
0x00072358 mov r3, 0 | r3 = 0;
0x0007235c cmp r4, r3 |
0x00072360 strb r3, [r1] | *(r1) = r3;
| if (r4 == r3) {
0x00072364 beq 0x721d4 | goto label_4;
| }
0x00072368 sub r2, r7, r8 | r2 = r7 - r8;
0x0007236c mov r1, 0x20 | r1 = 0x20;
0x00072370 mov r0, r8 | r0 = r8;
0x00072374 bl 0x15034 | memset (r0, r1, r2);
0x00072378 ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x0007237c cmp r3, 1 |
| if (r3 != 1) {
0x00072380 bne 0x72420 | goto label_12;
| }
0x00072384 ldr r3, [sp, 0x34] | r3 = var_34h;
0x00072388 cmp r3, 0 |
| if (r3 != 0) {
0x0007238c bne 0x72420 | goto label_12;
| }
0x00072390 strb r3, [sp, 0x3a] | var_3ah = r3;
0x00072394 add r3, sp, 0x38 | r3 += var_38h;
0x00072398 str r3, [sp, 0x28] | var_28h = r3;
0x0007239c ldr r3, [pc, 0x380] |
0x000723a0 mov sb, r7 | sb = r7;
0x000723a4 add r3, pc, r3 | r3 = pc + r3;
0x000723a8 add r3, r3, 0x11c | r3 = 0x7283c;
0x000723ac str r3, [sp, 0x20] | s2 = r3;
| label_9:
0x000723b0 ldrb r0, [r7] | r0 = *(r7);
0x000723b4 add r8, r7, 1 | r8 = r7 + 1;
0x000723b8 cmp r0, 0x25 |
| if (r0 == 0x25) {
0x000723bc beq 0x7252c | goto label_31;
| }
0x000723c0 cmp r0, 0x26 |
| if (r0 == 0x26) {
0x000723c4 beq 0x72430 | goto label_32;
| }
0x000723c8 cmp r0, 0 |
| if (r0 != 0) {
0x000723cc bne 0x7256c | goto label_33;
| }
0x000723d0 strb r0, [sb] | *(sb) = r0;
0x000723d4 b 0x72420 | goto label_12;
| label_27:
0x000723d8 mov r1, 0xc | r1 = 0xc;
0x000723dc mov r0, r8 | r0 = r8;
0x000723e0 bl 0x6ac44 | fcn_0006ac44 (r0, r1);
0x000723e4 add r2, sp, 0x3c | r2 += var_3ch;
0x000723e8 add r1, sp, 0x34 | r1 += var_34h;
0x000723ec bl 0x6d850 | r0 = fcn_0006d850 (r0, r1);
0x000723f0 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x000723f4 beq 0x721d4 | goto label_4;
| }
0x000723f8 ldrb r3, [r4] | r3 = *(r4);
0x000723fc cmp r3, 0x3e |
| if (r3 == 0x3e) {
0x00072400 beq 0x722b8 | goto label_6;
| }
0x00072404 cmp r3, 0x2f |
| if (r3 != 0x2f) {
0x00072408 bne 0x721d4 | goto label_4;
| }
| label_8:
0x0007240c ldrb r3, [r4, 1] | r3 = *((r4 + 1));
0x00072410 cmp r3, 0x3e |
| if (r3 != 0x3e) {
0x00072414 bne 0x721d4 | goto label_4;
| }
0x00072418 mov r3, 0 | r3 = 0;
0x0007241c strb r3, [r4], 2 | *(r4) = r3;
| r4 += 2;
| do {
| label_12:
0x00072420 ldr r3, [sp, 0x34] | r3 = var_34h;
0x00072424 b 0x721a4 | goto label_7;
| label_29:
0x00072428 mov r4, r0 | r4 = r0;
0x0007242c b 0x7240c | goto label_8;
| label_32:
0x00072430 str r8, [sp, 0x78] | str = r8;
0x00072434 ldrb r0, [r7, 1] | r0 = *((r7 + 1));
0x00072438 cmp r0, 0x23 |
| if (r0 != 0x23) {
0x0007243c addeq r7, r7, 2 | r7 += 2;
| }
| if (r0 != 0x23) {
0x00072440 streq r7, [sp, 0x78] | str = r7;
| }
| if (r0 != 0x23) {
0x00072444 beq 0x72458 |
0x00072448 mov r1, 0x30000 | r1 = 0x30000;
0x0007244c bl 0x69148 | r0 = fcn_00069148 (r0, r1);
0x00072450 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 == r0) {
0x00072454 beq 0x724c8 | goto label_34;
| }
| }
0x00072458 ldr r3, [sp, 0x78] | r3 = str;
0x0007245c ldrb r2, [r3] | r2 = *(r3);
0x00072460 cmp r2, 0x58 |
| if (r2 != 0x58) {
0x00072464 beq 0x72490 |
0x00072468 cmp r2, 0x78 |
| if (r2 != 0x78) {
0x0007246c beq 0x72490 |
0x00072470 cmp r2, 0x30 |
| if (r2 == 0x30) {
0x00072474 movne r2, 0xa | r2 = 0xa;
| }
| if (r2 != 0x30) {
0x00072478 bne 0x7249c | goto label_35;
| }
0x0007247c ldrb r3, [r3, 1] | r3 = *((r3 + 1));
0x00072480 cmp r3, 0x30 |
| if (r3 != 0x30) {
0x00072484 moveq r2, 0x10 | r2 = 0x10;
| }
| if (r3 == 0x30) {
0x00072488 movne r2, 0xa | r2 = 0xa;
| }
0x0007248c b 0x7249c |
| }
| } else {
0x00072490 add r3, r3, 1 | r3++;
0x00072494 mov r2, 0x10 | r2 = 0x10;
0x00072498 str r3, [sp, 0x78] | str = r3;
| }
| label_35:
0x0007249c ldr r1, [sp, 0x1c] | r1 = endptr;
0x000724a0 ldr r0, [sp, 0x78] | r0 = str;
0x000724a4 bl 0x1495c | strtoul (r0, r1, r2);
0x000724a8 ldr r3, [sp, 0x78] | r3 = str;
0x000724ac ldrb r2, [r3] | r2 = *(r3);
0x000724b0 cmp r0, 0x7f |
0x000724b4 cmpls r2, 0x3b | __asm ("cmpls r2, 0x3b");
| if (r0 != 0x7f) {
0x000724b8 addeq r8, r3, 1 | r8 = r3 + 1;
| }
| if (r0 != 0x7f) {
0x000724bc moveq r7, r0 | r7 = r0;
| }
| if (r0 == 0x7f) {
0x000724c0 movne r7, 0 | r7 = 0;
| }
0x000724c4 b 0x72504 | goto label_11;
| label_34:
0x000724c8 mov sl, r7 | sl = r7;
| label_10:
0x000724cc ldr r3, [sp, 0x20] | r3 = s2;
0x000724d0 mov r0, r8 | r0 = r8;
0x000724d4 add fp, r3, sl, lsl 3 |
0x000724d8 ldrh r3, [fp, 4] | r3 = *(arg_4h);
0x000724dc mov r2, r3 | r2 = r3;
0x000724e0 str r3, [sp, 0x2c] | var_2ch = r3;
0x000724e4 ldr r3, [sp, 0x20] | r3 = s2;
0x000724e8 ldr r1, [r3, sl, lsl 3] | offset_0 = sl << 3;
| r1 = *((r3 + offset_0));
0x000724ec bl 0x149e0 | strncmp (r0, r1, r2);
0x000724f0 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x000724f4 cmp r0, 0 |
| if (r0 != 0) {
0x000724f8 bne 0x7251c | goto label_36;
| }
0x000724fc ldrsh r7, [fp, 6] | r7 = *(arg_6h);
0x00072500 add r8, r8, r3 | r8 += r3;
| label_11:
0x00072504 cmp r7, 0 |
0x00072508 strb r7, [sb] | *(sb) = r7;
0x0007250c beq 0x72420 |
| } while (r7 == 0);
| label_13:
0x00072510 add sb, sb, 1 | sb++;
0x00072514 mov r7, r8 | r7 = r8;
0x00072518 b 0x723b0 | goto label_9;
| label_36:
0x0007251c add sl, sl, 1 | sl++;
0x00072520 cmp sl, 0xc |
| if (sl != 0xc) {
0x00072524 bne 0x724cc | goto label_10;
| }
0x00072528 b 0x72504 | goto label_11;
| label_31:
0x0007252c ldrb r1, [r7, 1] | r1 = *((r7 + 1));
0x00072530 add r8, r7, 3 | r8 = r7 + 3;
0x00072534 strb r1, [sp, 0x38] | var_38h = r1;
0x00072538 ldrb r3, [r7, 2] | r3 = *((r7 + 2));
0x0007253c clz r1, r1 | r1 &= r1;
0x00072540 lsr r1, r1, 5 | r1 >>= 5;
0x00072544 cmp r3, 0 |
| if (r3 != 0) {
0x00072548 moveq r1, 1 | r1 = 1;
| }
0x0007254c cmp r1, 0 |
0x00072550 strb r3, [sp, 0x39] | var_39h = r3;
| if (r1 == 0) {
0x00072554 movne r3, 0 | r3 = 0;
| }
| if (r1 != 0) {
0x00072558 strbne r3, [sb] | *(sb) = r3;
| goto label_37;
| }
| if (r1 != 0) {
| label_37:
0x0007255c bne 0x72420 | goto label_12;
| }
0x00072560 mov r2, 0x10 | r2 = 0x10;
0x00072564 ldr r0, [sp, 0x28] | r0 = var_28h;
0x00072568 bl 0x1495c | strtoul (r0, r1, r2);
| label_33:
0x0007256c strb r0, [sb] | *(sb) = r0;
0x00072570 b 0x72510 | goto label_13;
| label_26:
0x00072574 cmp r2, 0x2f |
| if (r2 == 0x2f) {
0x00072578 beq 0x72670 | goto label_38;
| }
0x0007257c cmp r2, 0x3f |
| if (r2 == 0x3f) {
0x00072580 beq 0x725ac | goto label_39;
| }
0x00072584 cmp r2, 0x21 |
| if (r2 != 0x21) {
0x00072588 bne 0x721d4 | goto label_4;
| }
0x0007258c ldr r1, [pc, 0x194] | r1 = *(0x72724);
0x00072590 mov r0, r5 | r0 = r5;
0x00072594 add r1, pc, r1 | r1 = pc + r1;
0x00072598 bl 0x152d4 | r0 = strstr (r0, r1);
0x0007259c cmp r0, 0 |
| if (r0 == 0) {
0x000725a0 beq 0x721d4 | goto label_4;
| }
0x000725a4 add r4, r0, 3 | r4 = r0 + 3;
0x000725a8 b 0x72108 | goto label_1;
| label_39:
0x000725ac ldr r2, [pc, 0x178] | r2 = *(0x72728);
0x000725b0 add r2, pc, r2 | r2 = pc + r2;
0x000725b4 ldr r3, [r2, 0x130] | r3 = *(0x72858);
0x000725b8 cmp r3, 0 |
| if (r3 == 0) {
0x000725bc bne 0x725dc |
0x000725c0 ldr r1, [sp, 0x18] | r1 = var_18h;
0x000725c4 ldr r3, [pc, 0x164] |
0x000725c8 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x000725cc add r1, r3, 0x19 | r1 = r3 + 0x19;
0x000725d0 add r3, r3, 0xc | r3 = 0x72738;
0x000725d4 str r1, [r2, 0x130] | *((r2 + 0x130)) = r1;
0x000725d8 str r3, [r2, 0x134] | *((r2 + 0x134)) = r3;
| }
0x000725dc ldr r7, [pc, 0x150] |
0x000725e0 ldr sb, [pc, 0x150] | sb = *(0x00072738);
0x000725e4 add r7, pc, r7 | r7 = pc + r7;
0x000725e8 add r7, r7, 0x130 | r7 = 0x72860;
0x000725ec add r8, r5, 2 | r8 = r5 + 2;
| label_14:
0x000725f0 ldr r1, [r7, fp, lsl 2] | offset_1 = fp << 2;
| r1 = *((r7 + offset_1));
0x000725f4 lsl sl, fp, 2 | sl = fp << 2;
0x000725f8 mov r0, r1 | r0 = r1;
0x000725fc str r1, [sp, 0x1c] | endptr = r1;
0x00072600 bl 0x14a88 | strlen (r0);
0x00072604 ldr r1, [sp, 0x1c] | r1 = endptr;
0x00072608 mov r2, r0 | r2 = r0;
0x0007260c mov r4, r0 | r4 = r0;
0x00072610 mov r0, r8 | r0 = r8;
0x00072614 bl 0x149e0 | r0 = strncmp (r0, r1, r2);
0x00072618 cmp r0, 0 |
| if (r0 == 0) {
0x0007261c bne 0x72660 |
0x00072620 add r4, r4, 2 | r4 += 2;
0x00072624 mov r1, sb | r1 = sb;
0x00072628 ldrb r0, [r5, r4] | r0 = *((r5 + r4));
0x0007262c add r2, r5, r4 | r2 = r5 + r4;
0x00072630 bl 0x69148 | r0 = fcn_00069148 (r0, r1);
0x00072634 cmp r0, 0 |
| if (r0 != 0) {
0x00072638 bne 0x72660 | goto label_40;
| }
0x0007263c ldr r3, [pc, 0xf8] | r3 = *(0x72738);
0x00072640 mov r1, r2 | r1 = r2;
0x00072644 add r3, pc, r3 | r3 = pc + r3;
0x00072648 add sl, r3, sl | sl = r3 + sl;
0x0007264c ldr r3, [sl, 0x17c] | r3 = *((sl + 0x17c));
0x00072650 mov r0, r6 | r0 = r6;
0x00072654 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| label_15:
0x00072658 mov r4, r0 | r4 = r0;
0x0007265c b 0x72108 | goto label_1;
| }
| label_40:
0x00072660 cmp fp, 1 |
| if (fp == 1) {
0x00072664 beq 0x72288 | goto label_5;
| }
0x00072668 mov fp, 1 |
0x0007266c b 0x725f0 | goto label_14;
| label_38:
0x00072670 mov r1, 0x3e | r1 = 0x3e;
0x00072674 add r0, r5, 2 | r0 = r5 + 2;
0x00072678 bl 0x153ac | r0 = strchr (r0, r1);
0x0007267c cmp r0, 0 |
0x00072680 add r4, r0, 1 | r4 = r0 + 1;
| if (r0 != 0) {
0x00072684 bne 0x72108 | goto label_1;
| }
0x00072688 b 0x721d4 | goto label_4;
| label_24:
0x0007268c ldr r7, [r6, 0x20] | r7 = *((r6 + 0x20));
0x00072690 mov r0, r7 | r0 = r7;
0x00072694 bl 0x14a88 | strlen (r0);
0x00072698 mov r1, r7 | r1 = r7;
0x0007269c mov r2, r0 | r2 = r0;
0x000726a0 mov r4, r0 | r4 = r0;
0x000726a4 add r0, r5, 1 | r0 = r5 + 1;
0x000726a8 bl 0x149e0 | r0 = strncmp (r0, r1, r2);
0x000726ac cmp r0, 0 |
| if (r0 == 0) {
0x000726b0 bne 0x726d0 |
0x000726b4 add r3, r5, r4 | r3 = r5 + r4;
0x000726b8 ldrb r3, [r3, 1] | r3 = *((r3 + 1));
0x000726bc cmp r3, 0x5d |
| if (r3 != 0x5d) {
0x000726c0 addeq r0, r4, 2 | r0 = r4 + 2;
| }
| if (r3 != 0x5d) {
0x000726c4 moveq r1, 0xa | r1 = 0xa;
| }
| if (r3 != 0x5d) {
0x000726c8 addeq r0, r5, r0 | r0 = r5 + r0;
| }
| if (r3 == 0x5d) {
0x000726cc beq 0x72708 | goto label_25;
| }
| }
0x000726d0 cmp r4, 0x10 |
| if (r4 > 0x10) {
0x000726d4 bhi 0x721d4 | goto label_4;
| }
0x000726d8 ldr r1, [pc, 0x60] | r1 = *(0x7273c);
0x000726dc add r4, sp, 0x78 | r4 += str;
0x000726e0 mov r2, r7 | r2 = r7;
0x000726e4 add r1, pc, r1 | r1 = pc + r1;
0x000726e8 mov r0, r4 | r0 = r4;
0x000726ec bl 0x15178 | sprintf (r0, r1, r2)
0x000726f0 mov r1, r4 | r1 = r4;
0x000726f4 mov r0, r5 | r0 = r5;
0x000726f8 bl 0x152d4 | r0 = strstr (r0, r1);
0x000726fc cmp r0, 0 |
| if (r0 == 0) {
0x00072700 beq 0x721d4 | goto label_4;
| }
0x00072704 mov r1, 0xa | r1 = 0xa;
| label_25:
0x00072708 bl 0x153ac | strchr (r0, r1);
0x0007270c b 0x72658 | 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/sbin/ntpd @ 0x73884 */
| #include <stdint.h>
|
; (fcn) fcn.00073884 () | void fcn_00073884 (int32_t arg1, uint32_t arg2) {
| char * s;
| int32_t var_1h;
| int32_t var_2h;
| int32_t var_18h;
| r0 = arg1;
| r1 = arg2;
0x00073884 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00073888 ldr r7, [pc, 0x5cc] | r7 = *(0x73e58);
0x0007388c ldr r3, [pc, 0x5cc] | r3 = "P";
0x00073890 cmp r1, r7 |
0x00073894 mov sb, 0 | sb = 0;
| if (r1 == r7) {
0x00073898 movne r7, r1 | r7 = r1;
| }
0x0007389c add r3, pc, r3 | r3 = pc + r3;
0x000738a0 mov r4, r0 | r4 = r0;
0x000738a4 sub sp, sp, 0x18 |
0x000738a8 mov r8, r1 | r8 = r1;
0x000738ac ldr r6, [pc, 0x5b0] | r6 = "ion_command";
0x000738b0 mov r1, sb | r1 = sb;
0x000738b4 add r0, r0, 0xc | r0 += 0xc;
| if (r1 != r7) {
0x000738b8 moveq r7, sb | r7 = sb;
| }
0x000738bc strb sb, [r3, 0x10c] | *((r3 + 0x10c)) = sb;
0x000738c0 bl 0x717f0 | fcn_000717f0 (r0, r1);
0x000738c4 ldr r1, [pc, 0x59c] | r1 = *(0x73e64);
0x000738c8 add r6, pc, r6 | r6 = pc + r6;
0x000738cc cmp r7, sb |
0x000738d0 ldr r3, [pc, 0x594] | r3 = *(0x73e68);
0x000738d4 ldr r2, [r4] | r2 = *(r4);
0x000738d8 ldr r5, [r6, r1] | r5 = "ion_command";
| if (r7 != sb) {
0x000738dc bne 0x73928 | goto label_8;
| }
0x000738e0 cmp r2, r3 |
0x000738e4 ldr r3, [r5] | r3 = *(r5);
| if (r2 <= r3) {
0x000738e8 ldrgt r0, [r4, 0x6c] | r0 = *((r4 + 0x6c));
| }
| if (r2 > r3) {
0x000738ec movle r0, r7 | r0 = r7;
| }
0x000738f0 cmp r3, 0 |
| if (r3 != 0) {
0x000738f4 bne 0x73940 | goto label_9;
| }
0x000738f8 ldr r3, [pc, 0x570] | r3 = *(0x73e6c);
0x000738fc add r3, pc, r3 | r3 = pc + r3;
0x00073900 ldrb r3, [r3, 4] | r3 = *((r3 + 4));
0x00073904 cmp r3, 0 |
0x00073908 beq 0x73914 |
| while (r3 == 0) {
0x0007390c ldr r3, [pc, 0x560] | r3 = "n_int";
0x00073910 b 0x73918 | goto label_10;
0x00073914 ldr r3, [pc, 0x55c] | r3 = *(0x73e74);
| label_10:
0x00073918 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0007391c ldr r3, [r3] | r3 = *(r3);
0x00073920 str r3, [r5] | *(r5) = r3;
0x00073924 b 0x73940 | goto label_9;
| label_8:
0x00073928 cmp r2, r3 |
0x0007392c ldr r3, [r5] | r3 = *(r5);
| if (r2 <= r3) {
0x00073930 ldrgt r0, [r4, 0x70] | r0 = *((r4 + 0x70));
| }
| if (r2 > r3) {
0x00073934 movle r0, sb | r0 = sb;
| }
0x00073938 cmp r3, 0 |
0x0007393c beq 0x7390c |
| }
| label_9:
0x00073940 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x00073944 ldr ip, [r5] | ip = *(r5);
0x00073948 lsr r3, r2, 0x14 | r3 = r2 >> 0x14;
0x0007394c eor r3, r3, 1 | r3 ^= 1;
0x00073950 cmp r0, 0 |
| if (r0 != 0) {
0x00073954 moveq r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x00073958 andne r3, r3, 1 | r3 &= 1;
| }
0x0007395c cmp r3, 0 |
| if (r3 == 0) {
0x00073960 beq 0x739cc | goto label_11;
| }
0x00073964 tst r2, 0x2000 |
| if ((r2 & 0x2000) == 0) {
0x00073968 beq 0x739c0 | goto label_12;
| }
0x0007396c mov r2, ip | r2 = ip;
0x00073970 mov r1, 1 | r1 = 1;
0x00073974 bl 0x73734 | fcn_00073734 (r0, r1, r2);
| do {
| label_0:
0x00073978 ldr r0, [r5] | r0 = *(r5);
0x0007397c bl 0x15028 | fflush (r0);
0x00073980 ldr r0, [r5] | r0 = *(r5);
0x00073984 bl 0x14ec0 | r0 = ferror (r0);
0x00073988 cmp r0, 0 |
| if (r0 == 0) {
0x0007398c beq 0x73e54 | goto label_13;
| }
0x00073990 ldr r2, [pc, 0x4e0] |
0x00073994 ldr r3, [pc, 0x4e0] | r3 = *(0x73e78);
0x00073998 ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x0007399c ldr ip, [r5] | ip = *(r5);
0x000739a0 ldr r2, [r2] | r2 = *(0x73e74);
0x000739a4 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000739a8 cmp ip, r2 |
0x000739ac ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x000739b0 ldr r1, [r3, 0xe4] | r1 = *(0x73f5c);
| if (ip != r2) {
0x000739b4 bne 0x73c78 | goto label_14;
| }
| label_1:
0x000739b8 ldr r2, [r3, 0xdc] | r2 = *((r3 + 0xdc));
| label_2:
0x000739bc bl 0x6a574 | fcn_0006a574 (r0, r1);
| label_12:
0x000739c0 mov r1, ip | r1 = ip;
0x000739c4 bl 0x14fa4 | fputs (r0, r1);
0x000739c8 b 0x73978 |
| } while (1);
| label_11:
0x000739cc ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x000739d0 ldr r1, [r4, 0x38] | r1 = *((r4 + 0x38));
0x000739d4 mov r0, ip | r0 = ip;
0x000739d8 bl 0x150dc | fprintf (r0, r1, r2);
0x000739dc cmp r7, 0 |
0x000739e0 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
| if (r7 != 0) {
0x000739e4 beq 0x739f0 |
0x000739e8 tst r0, 0x4000 |
| if ((r0 & 0x4000) != 0) {
0x000739ec bne 0x73d48 | goto label_15;
| }
| }
0x000739f0 mov r3, 0 | r3 = 0;
0x000739f4 add r1, sp, 0x18 | r1 += var_18h;
0x000739f8 str r3, [r1, -0x18]! | *((r1 -= 0x18)) = r3;
0x000739fc ldr r3, [pc, 0x47c] | r3 = *(0x73e7c);
0x00073a00 tst r0, 0x1000 |
0x00073a04 ldr sl, [r6, r3] | sl = *((r6 + r3));
| if ((r0 & 0x1000) == 0) {
0x00073a08 beq 0x73c98 | goto label_16;
| }
0x00073a0c bl 0x6a5e0 | fcn_0006a5e0 (r0, r1);
0x00073a10 add r1, sl, 0x21 | r1 = sl + 0x21;
0x00073a14 mov r2, r0 | r2 = r0;
0x00073a18 mov sb, r0 | sb = r0;
0x00073a1c ldr r0, [pc, 0x460] |
0x00073a20 add r0, pc, r0 | r0 = pc + r0;
0x00073a24 add r0, r0, 0x10c | r0 = 0x73f8c;
0x00073a28 add r0, r0, 1 | r0++;
0x00073a2c bl 0x15178 | sprintf (r0, r1, r2)
0x00073a30 ldr r1, [r5] | r1 = *(r5);
0x00073a34 ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00073a38 cmp r3, 0 |
| if (r3 == 0) {
0x00073a3c beq 0x73c8c | goto label_17;
| }
0x00073a40 ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00073a44 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x00073a48 cmp r3, r2 |
| if (r3 >= r2) {
0x00073a4c bhs 0x73c80 | goto label_18;
| }
0x00073a50 add r2, r3, 1 | r2 = r3 + 1;
0x00073a54 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x00073a58 mov r2, 0xa | r2 = 0xa;
0x00073a5c strb r2, [r3] | *(r3) = r2;
| label_3:
0x00073a60 adds r0, sb, 0xf | r0 = sb + 0xf;
| if (r0 >= sb) {
0x00073a64 addmi r0, sb, 0x16 | r0 = sb + 0x16;
| }
0x00073a68 asr r0, r0, 3 | r0 >>= 3;
0x00073a6c rsb r0, r0, 4 | r0 = 4 - r0;
0x00073a70 cmp r0, 0 |
| if (r0 <= 0) {
0x00073a74 ldrgt r3, [pc, 0x40c] | r3 = *((pc + 0x40c));
| }
| if (r0 <= 0) {
0x00073a78 addgt r3, pc, r3 | r3 = pc + r3;
| }
| if (r0 <= 0) {
0x00073a7c strgt r0, [r3, 0x108] | *((r3 + 0x108)) = r0;
| }
0x00073a80 ldr r2, [sp] | r2 = *(sp);
0x00073a84 mov r1, r8 | r1 = r8;
0x00073a88 mov r0, r4 | r0 = r4;
0x00073a8c bl 0x6c064 | fcn_0006c064 (r0, r1, r2);
0x00073a90 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00073a94 and r3, r3, 3 | r3 &= 3;
0x00073a98 cmp r3, 1 |
| if (r3 == 1) {
0x00073a9c beq 0x73ce4 | goto label_19;
| }
| if (r3 <= 1) {
0x00073aa0 blo 0x73cf8 | goto label_20;
| }
0x00073aa4 cmp r3, 3 |
| if (r3 == 3) {
0x00073aa8 bne 0x73ac0 |
0x00073aac ldr r3, [pc, 0x3c8] | r3 = *(0x73e78);
0x00073ab0 ldr r1, [r5] | r1 = *(r5);
0x00073ab4 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00073ab8 ldr r0, [r3, 0x120] | r0 = *(0x73f98);
| label_4:
0x00073abc bl 0x14fa4 | fputs (r0, r1);
| }
0x00073ac0 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00073ac4 tst r3, 0x20 |
| if ((r3 & 0x20) != 0) {
0x00073ac8 beq 0x73ae0 |
0x00073acc ldr r3, [pc, 0x3a8] | r3 = *(0x73e78);
0x00073ad0 ldr r1, [r5] | r1 = *(r5);
0x00073ad4 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00073ad8 ldr r0, [r3, 0x14c] | r0 = *(0x73fc4);
0x00073adc bl 0x14fa4 | fputs (r0, r1);
| }
0x00073ae0 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00073ae4 tst r3, 0x800 |
| if ((r3 & 0x800) != 0) {
0x00073ae8 beq 0x73b00 |
0x00073aec ldr r3, [pc, 0x388] | r3 = *(0x73e78);
0x00073af0 ldr r1, [r5] | r1 = *(r5);
0x00073af4 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00073af8 ldr r0, [r3, 0x18c] | r0 = *(0x74004);
0x00073afc bl 0x14fa4 | fputs (r0, r1);
| }
0x00073b00 ldr r0, [r4, 0x3c] | r0 = *((r4 + 0x3c));
0x00073b04 cmp r0, 0 |
| if (r0 != 0) {
0x00073b08 beq 0x73b14 |
0x00073b0c ldr r1, [r5] | r1 = *(r5);
0x00073b10 bl 0x14fa4 | fputs (r0, r1);
| }
0x00073b14 cmp r8, 0 |
| if (r8 != 0) {
0x00073b18 bne 0x73c14 | goto label_21;
| }
0x00073b1c ldr r8, [r4, 0x34] | r8 = *((r4 + 0x34));
0x00073b20 cmp r8, 0 |
| if (r8 != 0) {
0x00073b24 beq 0x73b38 |
0x00073b28 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00073b2c ldr r1, [r4, 0x24] | r1 = *((r4 + 0x24));
0x00073b30 mov r0, r8 | r0 = r8;
0x00073b34 bl 0x6f5e0 | fcn_0006f5e0 (r0, r1);
| }
0x00073b38 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00073b3c tst r3, 0x100 |
| if ((r3 & 0x100) != 0) {
0x00073b40 beq 0x73b70 |
0x00073b44 ldr r3, [pc, 0x330] | r3 = *(0x73e78);
0x00073b48 cmp r8, 0 |
0x00073b4c ldr r8, [r6, r3] | r8 = *((r6 + r3));
| if (r8 == 0) {
0x00073b50 bne 0x73b60 |
0x00073b54 ldr r1, [r5] | r1 = *(r5);
0x00073b58 ldr r0, [r8, 0x160] | r0 = *((r8 + 0x160));
0x00073b5c bl 0x14fa4 | fputs (r0, r1);
| }
0x00073b60 ldr r2, [r4, 0x20] | r2 = *((r4 + 0x20));
0x00073b64 ldr r1, [r8, 0x114] | r1 = *((r8 + 0x114));
0x00073b68 ldr r0, [r5] | r0 = *(r5);
0x00073b6c bl 0x150dc | fprintf (r0, r1, r2);
| }
0x00073b70 ldr r3, [pc, 0x314] | r3 = *(0x73e88);
0x00073b74 add r3, pc, r3 | r3 = pc + r3;
0x00073b78 ldrb r3, [r3, 0x10c] | r3 = *((r3 + 0x10c));
0x00073b7c cmp r3, 0 |
| if (r3 == 0) {
0x00073b80 beq 0x73c00 | goto label_22;
| }
0x00073b84 ldr r1, [r5] | r1 = *(r5);
0x00073b88 ldr r8, [r4, 0x64] | r8 = *((r4 + 0x64));
0x00073b8c ldr r3, [r1, 0x34] | r3 = *((r1 + 0x34));
0x00073b90 ldr sb, [r4, 0x44] | sb = *((r4 + 0x44));
0x00073b94 cmp r3, 0 |
| if (r3 == 0) {
0x00073b98 beq 0x73d18 | goto label_23;
| }
0x00073b9c ldr r3, [r1, 0x10] | r3 = *((r1 + 0x10));
0x00073ba0 ldr r2, [r1, 0x1c] | r2 = *((r1 + 0x1c));
0x00073ba4 cmp r3, r2 |
| if (r3 >= r2) {
0x00073ba8 bhs 0x73d0c | goto label_24;
| }
0x00073bac add r2, r3, 1 | r2 = r3 + 1;
0x00073bb0 str r2, [r1, 0x10] | *((r1 + 0x10)) = r2;
0x00073bb4 mov r2, 0xa | r2 = 0xa;
0x00073bb8 strb r2, [r3] | *(r3) = r2;
| label_5:
0x00073bbc ldr r0, [r5] | r0 = *(r5);
0x00073bc0 bl 0x15028 | fflush (r0);
| do {
0x00073bc4 ldr r3, [sb, 0x10] | r3 = *((sb + 0x10));
0x00073bc8 lsr r3, r3, 0xc | r3 >>= 0xc;
0x00073bcc and r3, r3, 0xf | r3 &= 0xf;
0x00073bd0 cmp r3, 2 |
| if (r3 != 2) {
0x00073bd4 beq 0x73be0 |
0x00073bd8 cmp r3, 4 |
| if (r3 != 4) {
0x00073bdc bne 0x73bf0 | goto label_25;
| }
| }
0x00073be0 ldr r3, [sb, 0x28] | r3 = *((sb + 0x28));
0x00073be4 mov r1, sb | r1 = sb;
0x00073be8 mov r0, 1 | r0 = 1;
0x00073bec blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| label_25:
0x00073bf0 sub r8, r8, 1 | r8--;
0x00073bf4 cmp r8, 0 |
0x00073bf8 add sb, sb, 0x40 | sb += 0x40;
0x00073bfc bgt 0x73bc4 |
| } while (r8 > 0);
| label_22:
0x00073c00 ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x00073c04 cmp r0, 0 |
| if (r0 != 0) {
0x00073c08 beq 0x73c14 |
0x00073c0c ldr r1, [r5] | r1 = *(r5);
0x00073c10 bl 0x14fa4 | fputs (r0, r1);
| }
| label_21:
0x00073c14 ldr r2, [r4] | r2 = *(r4);
0x00073c18 ldr r3, [r5] | r3 = *(r5);
0x00073c1c cmp r2, 0x22000 |
| if (r2 < 0x22000) {
0x00073c20 blt 0x73d24 | goto label_26;
| }
0x00073c24 ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x00073c28 cmp r0, 0 |
| if (r0 == 0) {
0x00073c2c beq 0x73d24 | goto label_26;
| }
0x00073c30 mov r1, r3 | r1 = r3;
0x00073c34 bl 0x14fa4 | fputs (r0, r1);
| label_6:
0x00073c38 ldr r0, [r5] | r0 = *(r5);
0x00073c3c bl 0x15028 | fflush (r0);
0x00073c40 ldr r0, [r5] | r0 = *(r5);
0x00073c44 bl 0x14ec0 | r0 = ferror (r0);
0x00073c48 cmp r0, 0 |
| if (r0 == 0) {
0x00073c4c beq 0x73978 | goto label_0;
| }
0x00073c50 ldr r2, [pc, 0x21c] |
0x00073c54 ldr r3, [pc, 0x220] | r3 = *(0x73e78);
0x00073c58 ldr r2, [r6, r2] | r2 = *((r6 + r2));
0x00073c5c ldr ip, [r5] | ip = *(r5);
0x00073c60 ldr r2, [r2] | r2 = "n_int";
0x00073c64 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00073c68 cmp ip, r2 |
0x00073c6c ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x00073c70 ldr r1, [r3, 0xe4] | r1 = *(0x73f5c);
| if (ip != r2) {
0x00073c74 bne 0x739b8 | goto label_1;
| }
| label_14:
0x00073c78 ldr r2, [r3, 0xe0] | r2 = *((r3 + 0xe0));
0x00073c7c b 0x739bc | goto label_2;
| label_18:
0x00073c80 mov r0, 0xa | r0 = 0xa;
0x00073c84 bl 0x14c2c | fputc_unlocked ();
0x00073c88 b 0x73a60 | goto label_3;
| label_17:
0x00073c8c mov r0, 0xa | r0 = 0xa;
0x00073c90 bl 0x14e54 | fputc (r0, r1);
0x00073c94 b 0x73a60 | goto label_3;
| label_16:
0x00073c98 bl 0x6a710 | fcn_0006a710 (r0, r1);
0x00073c9c add r1, sl, 0x21 | r1 = sl + 0x21;
0x00073ca0 mov r2, r0 | r2 = r0;
0x00073ca4 mov sb, r0 | sb = r0;
0x00073ca8 ldr r0, [pc, 0x1e0] |
0x00073cac add r0, pc, r0 | r0 = pc + r0;
0x00073cb0 add r0, r0, 0x10c | r0 = 0x73f98;
0x00073cb4 add r0, r0, 1 | r0++;
0x00073cb8 bl 0x15178 | sprintf (r0, r1, r2)
0x00073cbc cmp r8, 0 |
| if (r8 != 0) {
0x00073cc0 bne 0x73cd4 | goto label_27;
| }
0x00073cc4 ldr r3, [r4, 0x44] | r3 = *((r4 + 0x44));
0x00073cc8 ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x00073ccc tst r3, 0x200000 |
| if ((r3 & 0x200000) != 0) {
0x00073cd0 bne 0x73a60 | goto label_3;
| }
| label_27:
0x00073cd4 ldr r1, [r5] | r1 = *(r5);
0x00073cd8 ldr r0, [sp] | r0 = *(sp);
0x00073cdc bl 0x14fa4 | fputs (r0, r1);
0x00073ce0 b 0x73a60 | goto label_3;
| label_19:
0x00073ce4 ldr r3, [pc, 0x190] | r3 = *(0x73e78);
0x00073ce8 ldr r1, [r5] | r1 = *(r5);
0x00073cec ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00073cf0 ldr r0, [r3, 0x134] | r0 = *(0x73fac);
0x00073cf4 b 0x73abc | goto label_4;
| label_20:
0x00073cf8 ldr r3, [pc, 0x17c] | r3 = *(0x73e78);
0x00073cfc ldr r1, [r5] | r1 = *(r5);
0x00073d00 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00073d04 ldr r0, [r3, 0x150] | r0 = *(0x73fc8);
0x00073d08 b 0x73abc | goto label_4;
| label_24:
0x00073d0c mov r0, 0xa | r0 = 0xa;
0x00073d10 bl 0x14c2c | fputc_unlocked ();
0x00073d14 b 0x73bbc | goto label_5;
| label_23:
0x00073d18 mov r0, 0xa | r0 = 0xa;
0x00073d1c bl 0x14e54 | fputc (r0, r1);
0x00073d20 b 0x73bbc | goto label_5;
| label_26:
0x00073d24 ldr r2, [r4, 0x48] | r2 = *((r4 + 0x48));
0x00073d28 cmp r2, 0 |
| if (r2 == 0) {
0x00073d2c beq 0x73c38 | goto label_6;
| }
0x00073d30 ldr r1, [pc, 0x144] |
0x00073d34 mov r0, r3 | r0 = r3;
0x00073d38 ldr r1, [r6, r1] | r1 = *((r6 + r1));
0x00073d3c ldr r1, [r1, 0x158] | r1 = *(0x73fd0);
0x00073d40 bl 0x150dc | fprintf (r0, r1);
0x00073d44 b 0x73c38 | goto label_6;
| label_15:
0x00073d48 ldr r3, [r4] | r3 = *(r4);
0x00073d4c cmp r3, 0x26000 |
| if (r3 < 0x26000) {
0x00073d50 ldrge r2, [r4, 0x68] | r2 = *((r4 + 0x68));
| }
| if (r3 < 0x26000) {
0x00073d54 ldrge r3, [r4, 0x44] | r3 = *((r4 + 0x44));
| }
| if (r3 < 0x26000) {
0x00073d58 addge r3, r3, r2, lsl 6 | r3 += (r2 << 6);
| }
| if (r3 >= 0x26000) {
0x00073d5c bge 0x73db0 | goto label_28;
| }
0x00073d60 and r3, r0, 3 | r3 = r0 & 3;
0x00073d64 cmp r3, 2 |
0x00073d68 mov r0, sp | r0 = sp;
| if (r3 == 2) {
0x00073d6c beq 0x73e38 | goto label_29;
| }
0x00073d70 cmp r3, 3 |
| if (r3 != 3) {
0x00073d74 beq 0x73d80 |
0x00073d78 cmp r3, 1 |
| if (r3 != 1) {
0x00073d7c bne 0x73e48 | goto label_30;
| }
| }
0x00073d80 ldr r1, [pc, 0x10c] | r1 = "er";
0x00073d84 add r1, pc, r1 | r1 = pc + r1;
0x00073d88 b 0x73e40 | goto label_7;
| do {
0x00073d8c ldr r1, [r4, 0x64] | r1 = *((r4 + 0x64));
0x00073d90 add r2, r2, 1 | r2++;
0x00073d94 cmp r2, r1 |
| if (r2 >= r1) {
0x00073d98 blt 0x73dac |
0x00073d9c ldr r3, [pc, 0xd8] | r3 = *(0x73e78);
0x00073da0 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00073da4 ldr r0, [r3, 0x38] | r0 = *(0x73eb0);
0x00073da8 bl 0x6a1cc | fcn_0006a1cc (r0);
| }
0x00073dac add r3, r3, 0x40 | r3 += 0x40;
| label_28:
0x00073db0 ldr r1, [r3, 0x14] | r1 = *((r3 + 0x14));
0x00073db4 cmp r1, 3 |
0x00073db8 bne 0x73d8c |
| } while (r1 != 3);
0x00073dbc and r0, r0, 3 | r0 &= 3;
0x00073dc0 cmp r0, 2 |
| if (r0 != 2) {
0x00073dc4 beq 0x73e00 |
0x00073dc8 cmp r0, 3 |
| if (r0 != 3) {
0x00073dcc beq 0x73de4 |
0x00073dd0 cmp r0, 1 |
| if (r0 == 1) {
0x00073dd4 movne r2, 0x14 | r2 = 0x14;
| }
| if (r0 == 1) {
0x00073dd8 ldrne r1, [r3, 0x34] | r1 = *((r3 + 0x34));
| }
| if (r0 == 1) {
0x00073ddc movne r0, sp | r0 = sp;
| }
| if (r0 != 1) {
0x00073de0 bne 0x73df8 | goto label_31;
| }
| }
0x00073de4 ldr r2, [pc, 0xac] | r2 = *(0x73e94);
0x00073de8 add r0, sp, 2 | r0 += var_2h;
0x00073dec strh r2, [sp] | *(sp) = r2;
0x00073df0 ldr r1, [r3, 0x34] | r1 = *((r3 + 0x34));
0x00073df4 mov r2, 0x14 | r2 = 0x14;
| label_31:
0x00073df8 bl 0x14f20 | strncpy (r0, r1, r2);
0x00073dfc b 0x73e18 |
| } else {
0x00073e00 mov r2, 0x2d | r2 = 0x2d;
0x00073e04 strb r2, [sp] | *(sp) = r2;
0x00073e08 ldrh r3, [r3, 2] | r3 = *((r3 + 2));
0x00073e0c strb r3, [sp, 1] | var_1h = r3;
0x00073e10 mov r3, 0 | r3 = 0;
0x00073e14 strb r3, [sp, 2] | var_2h = r3;
| }
| do {
0x00073e18 ldr r3, [pc, 0x5c] | r3 = *(0x73e78);
0x00073e1c ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00073e20 ldr r1, [r6, r3] | r1 = *((r6 + r3));
0x00073e24 ldr r0, [r5] | r0 = *(r5);
0x00073e28 mov r3, sp | r3 = sp;
0x00073e2c ldr r1, [r1, 0xd4] | r1 = *((r1 + 0xd4));
0x00073e30 bl 0x150dc | fprintf (r0, r1, r2, r3);
0x00073e34 b 0x73978 | goto label_0;
| label_29:
0x00073e38 ldr r1, [pc, 0x5c] | r1 = *(0x73e98);
0x00073e3c add r1, pc, r1 | r1 = pc + r1;
| label_7:
0x00073e40 bl 0x15514 | strcpy (r0, r1);
0x00073e44 b 0x73e18 |
| } while (1);
| label_30:
0x00073e48 ldr r1, [pc, 0x50] | r1 = *(0x73e9c);
0x00073e4c add r1, pc, r1 | r1 = pc + r1;
0x00073e50 b 0x73e40 | goto label_7;
| label_13:
0x00073e54 mov r0, r7 | r0 = r7;
0x00073e58 bl 0x6a190 | r0 = fcn_0006a190 (r0);
| if (r0 != 1) {
0x00073e5c andeq r2, r0, r0, asr r7 | r2 = r0 & (r0 >> r7);
| }
| if (r0 != 1) {
0x00073e60 andeq sl, r7, r8, asr 27 | sl = r7 & (r8 >> 27);
| }
| if (r0 != 1) {
0x00073e64 andeq sl, r2, r0, lsr r7 | sl = r2 & (r0 >> r7);
| }
| if (r0 != 1) {
0x00073e68 andeq r0, r0, r8, asr r5 | r0 &= (r8 >> r5);
| }
0x00073e6c strdeq sp, lr, [r1], -pc | __asm ("strdeq sp, lr, [r1], -pc");
| if (r0 != 1) {
0x00073e70 andeq sl, r7, r8, ror 26 | sl = r7 & (r8 >>> 26);
| }
| if (r0 != 1) {
0x00073e74 andeq r0, r0, r8, lsr r5 | r0 &= (r8 >> r5);
| }
| if (r0 != 1) {
0x00073e78 andeq r0, r0, r0, lsr r5 | r0 &= (r0 >> r5);
| }
| if (r0 != 1) {
0x00073e7c andeq r0, r0, r0, ror 10 | r0 &= (r0 >>> 10);
| }
| if (r0 != 1) {
0x00073e80 andeq r0, r0, r0, asr 10 | r0 &= (r0 >> 10);
| }
| if (r0 != 1) {
0x00073e84 andeq sl, r7, r4, asr 24 | sl = r7 & (r4 >> 24);
| }
| if (r0 != 1) {
0x00073e88 andeq sl, r7, ip, ror 23 | sl = r7 & (ip >>> 23);
| }
0x00073e8c strdeq sl, fp, [r7], -r0 | __asm ("strdeq sl, fp, [r7], -r0");
0x00073e90 strheq sl, [r7], -r8 | __asm ("strheq sl, [r7], -r8");
0x00073e94 strdeq sb, sl, [r1], -r3 | __asm ("strdeq sb, sl, [r1], -r3");
| if (r0 != 1) {
0x00073e98 andeq r2, r0, sp, lsr 26 | r2 = r0 & (sp >> 26);
| }
| if (r0 != 1) {
0x00073e9c andeq sb, r1, r8, lsr r1 | sb = r1 & (r8 >> r1);
| }
| /* 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. */
0x00073ea0 andeq sb, r1, sp, lsr 2 | return sb = r1 & (sp >> 2);
| }
[*] Function sprintf used 9 times ntpd