[*] Binary protection state of ntpd
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of ntpd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/ntpd @ 0x3900 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 82016 named .text */
0x00003900 lui gp, 3 |
0x00003904 addiu gp, gp, -0x1860 |
0x00003908 addu gp, gp, t9 | gp += t9;
0x0000390c addiu sp, sp, -0x150 |
0x00003910 lw v0, -0x7b04(gp) | v0 = *((gp - 7873));
0x00003914 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00003918 sw ra, 0x14c(sp) | *(var_14ch) = ra;
0x0000391c sw s3, 0x134(sp) | *(var_134h) = s3;
0x00003920 sw s0, 0x128(sp) | *(var_128h) = s0;
0x00003924 sw fp, 0x148(sp) | *(var_148h) = fp;
0x00003928 sw s7, 0x144(sp) | *(var_144h) = s7;
0x0000392c sw s6, 0x140(sp) | *(var_140h) = s6;
0x00003930 sw s5, 0x13c(sp) | *(var_13ch) = s5;
0x00003934 sw s4, 0x138(sp) | *(var_138h) = s4;
0x00003938 sw s2, 0x130(sp) | *(var_130h) = s2;
0x0000393c sw s1, 0x12c(sp) | *(var_12ch) = s1;
0x00003940 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00003944 lw v0, (v0) | v0 = *(v0);
0x00003948 lw t9, -0x7f0c(gp) | t9 = sym.get_progname;
0x0000394c move s0, a0 | s0 = a0;
0x00003950 lw a0, (a1) | a0 = *(a1);
0x00003954 sw a1, 0x34(sp) | *(var_34h) = a1;
0x00003958 sw v0, 0x124(sp) | *(var_124h) = v0;
0x0000395c sw s0, 0x30(sp) | *(var_30h) = s0;
0x00003960 move s3, a1 | s3 = a1;
0x00003964 bal 0x12480 | sym_get_progname ();
0x00003968 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000396c move a0, v0 | a0 = v0;
0x00003970 lw v1, -0x7ac0(gp) | v1 = *((gp - 7856));
0x00003974 lw a1, -0x7fcc(gp) | a1 = *((gp - 8179));
0x00003978 lw t9, -0x7ac4(gp) | t9 = sym.imp.strcmp;
| /* str.ntpctl */
0x0000397c addiu a1, a1, -0x7460 | a1 += -0x7460;
0x00003980 sw v0, (v1) | *(v1) = v0;
0x00003984 jalr t9 | t9 ();
0x00003988 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0000398c beqz v0, 0x4320 | goto label_12;
| }
0x00003990 lw t9, -0x7be4(gp) | t9 = sym.imp.memset;
0x00003994 addiu v0, sp, 0x40 | v0 = sp + 0x40;
0x00003998 addiu a2, zero, 0xe0 | a2 = 0xe0;
0x0000399c move a1, zero | a1 = 0;
0x000039a0 move a0, v0 | a0 = v0;
0x000039a4 sw v0, 0x20(sp) | *(var_20h) = v0;
0x000039a8 jalr t9 | t9 ();
0x000039ac lw gp, 0x10(sp) | gp = *(var_10h);
0x000039b0 addiu v0, zero, 1 | v0 = 1;
0x000039b4 sw v0, 0xf4(sp) | *(var_f4h) = v0;
0x000039b8 addiu v0, zero, 0xc | v0 = 0xc;
0x000039bc lw s5, -0x7fa8(gp) | s5 = *((gp - 8170));
0x000039c0 lw t9, -0x7ca8(gp) | t9 = sym.imp.calloc;
0x000039c4 sb v0, 0x116(sp) | *(var_116h) = v0;
0x000039c8 addiu v0, zero, 0x12c | v0 = aav.0x0000012c;
0x000039cc addiu a1, zero, 4 | a1 = 4;
0x000039d0 addiu a0, s0, 1 | a0 = s0 + 1;
0x000039d4 sw v0, 0x118(sp) | *(var_118h) = v0;
0x000039d8 jalr t9 | t9 ();
0x000039dc move s4, v0 | s4 = v0;
0x000039e0 lw gp, 0x10(sp) | gp = *(var_10h);
0x000039e4 sw v0, -0x3954(s5) | *((s5 - 3669)) = v0;
| if (s0 <= 0) {
0x000039e8 blez s0, 0x3a20 | goto label_13;
| }
0x000039ec sll s6, s0, 2 | s6 = s0 << 2;
0x000039f0 move s1, s3 | s1 = s3;
0x000039f4 move s7, v0 | s7 = v0;
0x000039f8 addu s2, s6, s3 | s2 = s6 + s3;
| do {
0x000039fc lw t9, -0x7af8(gp) | t9 = sym.imp.strdup;
0x00003a00 lw a0, (s1) | a0 = *(s1);
0x00003a04 addiu s1, s1, 4 | s1 += 4;
0x00003a08 jalr t9 | t9 ();
0x00003a0c addiu s7, s7, 4 | s7 += 4;
0x00003a10 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003a14 sw v0, -4(s7) | *((s7 - 1)) = v0;
0x00003a18 bne s2, s1, 0x39fc |
| } while (s2 != s1);
0x00003a1c addu s4, s4, s6 | s4 += s6;
| label_13:
0x00003a20 lw t9, -0x7f08(gp) | t9 = sym.ntp_dispatch_imsg;
0x00003a24 sw zero, (s4) | *(s4) = 0;
0x00003a28 move a1, s3 | a1 = s3;
0x00003a2c move a0, s0 | a0 = s0;
0x00003a30 bal 0x12740 | sym_compat_init_setproctitle ();
0x00003a34 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003a38 lw s2, -0x3954(s5) | s2 = *((s5 - 3669));
0x00003a3c move s7, zero | s7 = 0;
0x00003a40 lw s6, -0x7fcc(gp) | s6 = *((gp - 8179));
0x00003a44 lw s1, -0x7fcc(gp) | s1 = *((gp - 8179));
0x00003a48 lw s3, -0x7fcc(gp) | s3 = *((gp - 8179));
0x00003a4c lw s5, -0x7c88(gp) | s5 = *((gp - 7970));
0x00003a50 sw s2, 0x34(sp) | *(var_34h) = s2;
| /* str._etc_ntpd.conf */
0x00003a54 addiu s6, s6, -0x6d5c | s6 += -0x6d5c;
| /* str.df:np:P:q:rsSt:v */
0x00003a58 addiu s1, s1, -0x6ce8 | s1 += -0x6ce8;
0x00003a5c addiu s4, zero, -1 | s4 = -1;
0x00003a60 addiu s3, s3, -0x6ba4 | s3 += -0x6ba4;
| do {
| label_0:
0x00003a64 lw t9, -0x7bc8(gp) | t9 = sym.imp.getopt;
0x00003a68 move a2, s1 | a2 = s1;
0x00003a6c move a1, s2 | a1 = s2;
0x00003a70 move a0, s0 | a0 = s0;
0x00003a74 jalr t9 | t9 ();
0x00003a78 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != s4) {
0x00003a7c beq v0, s4, 0x3ac8 |
0x00003a80 addiu v0, v0, -0x50 | v0 += -0x50;
0x00003a84 sltiu v1, v0, 0x27 | v1 = (v0 < 0x27) ? 1 : 0;
0x00003a88 sll v0, v0, 2 | v0 <<= 2;
| if (v1 == 0) {
0x00003a8c beqz v1, 0x4230 | goto label_14;
| }
0x00003a90 lwx v0, v0(s3) | __asm ("lwx v0, v0(s3)");
0x00003a94 addu v0, v0, gp | v0 += gp;
0x00003a98 jr v0 | v0 ();
0x00003a9c nop |
| }
0x00003ac8 lw a0, 0xf0(sp) | a0 = *(var_f0h);
| if (a0 != 0) {
0x00003acc beql a0, zero, 0x3ad4 |
0x00003ad0 addiu a0, zero, 1 | a0 = 1;
| }
0x00003ad4 lw t9, -0x7f58(gp) | t9 = sym.log_init;
0x00003ad8 addiu a1, zero, 0x18 | a1 = 0x18;
0x00003adc bal 0x76b0 | sym_log_init ();
0x00003ae0 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003ae4 lw t9, -0x7f54(gp) | t9 = sym.log_setverbose;
0x00003ae8 lw a0, 0xf4(sp) | a0 = *(var_f4h);
0x00003aec bal 0x7748 | sym_log_setverbose ();
0x00003af0 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003af4 lw v0, -0x7b20(gp) | v0 = *((gp - 7880));
0x00003af8 lw v0, (v0) | v0 = *(v0);
0x00003afc subu s0, s0, v0 | __asm ("subu s0, s0, v0");
0x00003b00 invalid |
| if (s0 > 0) {
0x00003b04 bgtz s0, 0x4230 | goto label_14;
| }
0x00003b08 lw a1, 0x20(sp) | a1 = *(var_20h);
0x00003b0c move a0, s6 | a0 = s6;
0x00003b10 bal 0xeb3c | sym_parse_config ();
0x00003b14 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00003b18 bnez v0, 0x3c48 | goto label_15;
| }
0x00003b1c lbu v0, 0xfa(sp) | v0 = *(var_fah);
0x00003b20 lw v0, -0x7ae4(gp) | v0 = *((gp - 7865));
| if (v0 != 0) {
0x00003b24 bnez v0, 0x3cf8 | goto label_16;
| }
0x00003b28 lw t9, -0x7b3c(gp) | t9 = sym.imp.geteuid;
0x00003b2c jalr t9 | t9 ();
0x00003b30 nop |
0x00003b34 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00003b38 bnez v0, 0x4330 | goto label_17;
| }
0x00003b3c lw s1, -0x7fcc(gp) | s1 = *((gp - 8179));
0x00003b40 lw t9, -0x7aac(gp) | t9 = sym.imp.getpwnam;
| /* esilref: 'ntp' */
0x00003b44 addiu a0, s1, -0x78e8 | a0 = s1 + -0x78e8;
0x00003b48 jalr t9 | t9 ();
0x00003b4c move s0, v0 | s0 = v0;
0x00003b50 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00003b54 beqz v0, 0x438c | goto label_18;
| }
0x00003b58 lw t9, -0x7f00(gp) | t9 = sym.sanitize_argv;
| if (s7 == 0) {
0x00003b5c beqz s7, 0x3d40 | goto label_19;
| }
0x00003b60 addiu a1, sp, 0x34 | a1 = sp + 0x34;
0x00003b64 addiu a0, sp, 0x30 | a0 = sp + 0x30;
0x00003b68 bal 0xfdf4 | sym_sanitize_argv ();
0x00003b6c addiu v1, zero, -1 | v1 = -1;
0x00003b70 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == v1) {
0x00003b74 beq v0, v1, 0x4344 | goto label_20;
| }
0x00003b78 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00003b7c lw t9, -0x7ac4(gp) | t9 = sym.imp.strcmp;
0x00003b80 move a1, s7 | a1 = s7;
| /* str.ntp_main */
0x00003b84 addiu a0, a0, -0x6c88 | a0 += -0x6c88;
0x00003b88 jalr t9 | t9 ();
0x00003b8c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00003b90 beqz v0, 0x4354 | goto label_21;
| }
0x00003b94 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00003b98 lw t9, -0x7ac4(gp) | t9 = sym.imp.strcmp;
0x00003b9c move a1, s7 | a1 = s7;
| /* str.ntp_dns */
0x00003ba0 addiu a0, a0, -0x78f8 | a0 += -0x78f8;
0x00003ba4 jalr t9 | t9 ();
0x00003ba8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00003bac beqz v0, 0x4374 | goto label_22;
| }
0x00003bb0 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00003bb4 lw t9, -0x7ac4(gp) | t9 = sym.imp.strcmp;
0x00003bb8 move a1, s7 | a1 = s7;
| /* str.constraint */
0x00003bbc addiu a0, a0, -0x6c7c | a0 += -0x6c7c;
0x00003bc0 jalr t9 | t9 ();
0x00003bc4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00003bc8 bnez v0, 0x3d24 | goto label_23;
| }
0x00003bcc lw t9, -0x7efc(gp) | t9 = sym.priv_constraint_child;
0x00003bd0 lw a2, 0xc(s0) | a2 = *((s0 + 3));
0x00003bd4 lw a1, 8(s0) | a1 = *((s0 + 2));
0x00003bd8 lw a0, 0x14(s0) | a0 = *((s0 + 5));
0x00003bdc bal 0x61c0 | sym_priv_constraint_child ();
0x00003be0 lw gp, 0x10(sp) | gp = *(var_10h);
| label_11:
0x00003be4 lw a1, -0x7fcc(gp) | a1 = *((gp - 8179));
0x00003be8 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00003bec lw t9, -0x7f44(gp) | t9 = sym.fatalx;
0x00003bf0 move a2, s7 | a2 = s7;
| /* str.main */
0x00003bf4 addiu a1, a1, -0x6b08 | a1 += -0x6b08;
| /* str._s:_process__s_failed */
0x00003bf8 addiu a0, a0, -0x6c50 | a0 += -0x6c50;
0x00003bfc bal 0x7d80 | sym_fatalx ();
0x00003c00 lw t9, -0x7c8c(gp) | t9 = sym.imp.strtol;
0x00003c04 lw a0, (s5) | a0 = *(s5);
0x00003c08 addiu a2, zero, 0xa | a2 = 0xa;
0x00003c0c move a1, zero | a1 = 0;
0x00003c10 jalr t9 | t9 ();
0x00003c14 sltiu v1, v0, 0xe11 | v1 = (v0 < 0xe11) ? 1 : 0;
0x00003c18 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003c1c sw v0, 0x118(sp) | *(var_118h) = v0;
0x00003c20 bnez v1, 0x3a64 |
| } while (v1 != 0);
0x00003c24 lw v0, -0x7ae4(gp) | v0 = *((gp - 7865));
0x00003c28 lw a2, -0x7fcc(gp) | a2 = *((gp - 8179));
0x00003c2c lw t9, -0x7c68(gp) | t9 = sym.imp.__fprintf_chk
0x00003c30 lw a0, (v0) | a0 = *(v0);
0x00003c34 lbu a3, 0x116(sp) | a3 = *(var_116h);
| /* str.ntpd:_fallback_timeout_too_long:__d__max_3600__n */
0x00003c38 addiu a2, a2, -0x6d18 | a2 += -0x6d18;
0x00003c3c addiu a1, zero, 1 | a1 = 1;
0x00003c40 jalr t9 | t9 ();
0x00003c44 lw gp, 0x10(sp) | gp = *(var_10h);
| label_15:
0x00003c48 lw t9, -0x7b9c(gp) | t9 = sym.imp.exit;
0x00003c4c addiu a0, zero, 1 | a0 = 1;
0x00003c50 jalr t9 | t9 ();
0x00003c54 addiu v0, zero, 1 | v0 = 1;
0x00003c58 sb v0, 0xf9(sp) | *(var_f9h) = v0;
0x00003c5c b 0x3a64 | goto label_0;
| label_16:
0x00003cf8 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00003cfc lw t9, -0x7b60(gp) | t9 = sym.imp.fwrite;
0x00003d00 lw a3, (v0) | a3 = *(v0);
| /* str.configuration_OK_n */
0x00003d04 addiu a0, a0, -0x6cd4 | a0 += -0x6cd4;
0x00003d08 addiu a2, zero, 0x11 | a2 = 0x11;
0x00003d0c addiu a1, zero, 1 | a1 = 1;
0x00003d10 jalr t9 | t9 ();
0x00003d14 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003d18 lw t9, -0x7b9c(gp) | t9 = sym.imp.exit;
0x00003d1c move a0, zero | a0 = 0;
0x00003d20 jalr t9 | t9 ();
| label_23:
0x00003d24 lw a1, -0x7fcc(gp) | a1 = *((gp - 8179));
0x00003d28 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00003d2c lw t9, -0x7f44(gp) | t9 = sym.fatalx;
0x00003d30 move a2, s7 | a2 = s7;
| /* str.main */
0x00003d34 addiu a1, a1, -0x6b08 | a1 += -0x6b08;
| /* str._s:_invalid_process_name__s */
0x00003d38 addiu a0, a0, -0x6c70 | a0 += -0x6c70;
0x00003d3c bal 0x7d80 | sym_fatalx ();
| label_19:
0x00003d40 lw t9, -0x7b8c(gp) | t9 = sym.imp.setpriority;
0x00003d44 addiu a2, zero, -0x14 | a2 = -0x14;
0x00003d48 move a1, zero | a1 = 0;
0x00003d4c move a0, zero | a0 = 0;
0x00003d50 jalr t9 | t9 ();
0x00003d54 addiu v1, zero, -1 | v1 = -1;
0x00003d58 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == v1) {
0x00003d5c beq v0, v1, 0x4294 | goto label_24;
| }
| label_10:
0x00003d60 lw t9, -0x7ef8(gp) | t9 = sym.reset_adjtime;
0x00003d64 bal 0xae5c | sym_reset_adjtime ();
0x00003d68 nop |
0x00003d6c lbu v0, 0xf9(sp) | v0 = *(var_f9h);
0x00003d70 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00003d74 beqz v0, 0x423c | goto label_25;
| }
0x00003d78 lw v0, -0x7f4c(gp) | v0 = *(gp);
0x00003d7c addiu v1, zero, 0x3a98 | v1 = 0x3a98;
0x00003d80 sw v1, (v0) | *(v0) = v1;
| label_9:
0x00003d84 lw t9, -0x7b34(gp) | t9 = sym.imp.socketpair;
0x00003d88 lui a1, 8 | a1 = 0x80000;
0x00003d8c addiu a3, sp, 0x38 | a3 = sp + 0x38;
0x00003d90 move a2, zero | a2 = 0;
0x00003d94 addiu a1, a1, 2 | a1 += 2;
0x00003d98 addiu a0, zero, 1 | a0 = 1;
0x00003d9c jalr t9 | t9 ();
0x00003da0 addiu v1, zero, -1 | v1 = -1;
0x00003da4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == v1) {
0x00003da8 beq v0, v1, 0x42b8 | goto label_26;
| }
0x00003dac lw t9, -0x7b10(gp) | t9 = sym.imp.signal;
0x00003db0 lw a1, -0x7ef4(gp) | a1 = sym.sighdlr;
0x00003db4 addiu a0, zero, 0x12 | a0 = 0x12;
0x00003db8 jalr t9 | t9 ();
0x00003dbc lw gp, 0x10(sp) | gp = *(var_10h);
0x00003dc0 lw a3, 0x34(sp) | a3 = *(var_34h);
0x00003dc4 lw a2, 0x30(sp) | a2 = *(var_30h);
0x00003dc8 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00003dcc lw a1, 0x3c(sp) | a1 = *(var_3ch);
0x00003dd0 lw t9, -0x7ef0(gp) | t9 = sym.start_child;
| /* str.ntp_main */
0x00003dd4 addiu a0, a0, -0x6c88 | a0 += -0x6c88;
0x00003dd8 bal 0xfc2c | sym_start_child ();
0x00003ddc lw gp, 0x10(sp) | gp = *(var_10h);
0x00003de0 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00003de4 lw t9, -0x7eec(gp) | t9 = sym.log_procinit;
| /* str._priv_ */
0x00003de8 addiu a0, a0, -0x6c24 | a0 += -0x6c24;
0x00003dec bal 0x7728 | sym_log_procinit ();
0x00003df0 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003df4 lw t9, -0x7ee8(gp) | t9 = sym.readfreq;
0x00003df8 lw s2, -0x7f7c(gp) | s2 = *(gp);
0x00003dfc bal 0xbc14 | sym_readfreq ();
0x00003e00 nop |
0x00003e04 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003e08 lw t9, -0x7b10(gp) | t9 = sym.imp.signal;
0x00003e0c lw a1, -0x7ef4(gp) | a1 = sym.sighdlr;
0x00003e10 addiu a0, zero, 0xf | a0 = 0xf;
0x00003e14 jalr t9 | t9 ();
0x00003e18 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003e1c lw t9, -0x7b10(gp) | t9 = sym.imp.signal;
0x00003e20 lw a1, -0x7ef4(gp) | a1 = sym.sighdlr;
0x00003e24 addiu a0, zero, 2 | a0 = 2;
0x00003e28 jalr t9 | t9 ();
0x00003e2c lw gp, 0x10(sp) | gp = *(var_10h);
0x00003e30 lw a1, -0x7ef4(gp) | a1 = sym.sighdlr;
0x00003e34 lw t9, -0x7b10(gp) | t9 = sym.imp.signal;
0x00003e38 addiu a0, zero, 1 | a0 = 1;
0x00003e3c jalr t9 | t9 ();
0x00003e40 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003e44 lw t9, -0x7ee4(gp) | t9 = sym.constraint_purge;
0x00003e48 bal 0x61e0 | sym_constraint_purge ();
0x00003e4c nop |
0x00003e50 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003e54 lui a0, 1 | a0 = 0x10000;
0x00003e58 lw t9, -0x7b88(gp) | t9 = sym.imp.malloc;
0x00003e5c addiu a0, a0, 0x28 | a0 += 0x28;
0x00003e60 jalr t9 | t9 ();
0x00003e64 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003e68 sw v0, (s2) | *(s2) = v0;
| if (v0 == 0) {
0x00003e6c beqz v0, 0x42ac | goto label_27;
| }
0x00003e70 lw t9, -0x7f20(gp) | t9 = sym.imsg_init;
0x00003e74 lw a1, 0x38(sp) | a1 = *(var_38h);
0x00003e78 lw s4, -0x7ee0(gp) | s4 = *(gp);
0x00003e7c move a0, v0 | a0 = v0;
0x00003e80 bal 0x102c0 | sym_imsg_init ();
0x00003e84 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003e88 move s1, zero | s1 = 0;
0x00003e8c sw zero, (s4) | *(s4) = 0;
0x00003e90 lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00003e94 lw s7, -0x7fcc(gp) | s7 = *((gp - 8179));
0x00003e98 lw s6, -0x7fcc(gp) | s6 = *((gp - 8179));
0x00003e9c sw v0, 0x1c(sp) | *(var_1ch) = v0;
| /* str.pipe_write_error__to_child_ */
0x00003ea0 addiu v0, s7, -0x6c1c | v0 = s7 + -0x6c1c;
0x00003ea4 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x00003ea8 lw s5, -0x7edc(gp) | s5 = *(gp);
| /* str.poll_error */
0x00003eac addiu v0, s6, -0x76c4 | v0 = s6 + -0x76c4;
0x00003eb0 move s0, zero | s0 = 0;
0x00003eb4 sw v0, 0x28(sp) | *(var_28h) = v0;
0x00003eb8 lw v0, 0x1c(sp) | v0 = *(var_1ch);
| label_1:
0x00003ebc lw v0, (v0) | v0 = *(v0);
0x00003ec0 lw t9, -0x7b10(gp) | t9 = sym.imp.signal;
| if (v0 != 0) {
0x00003ec4 bnez v0, 0x4040 | goto label_28;
| }
0x00003ec8 lw v1, (s4) | v1 = *(s4);
| label_2:
0x00003ecc addiu s7, v1, 1 | s7 = v1 + 1;
0x00003ed0 sltu v0, s1, s7 | v0 = (s1 < s7) ? 1 : 0;
0x00003ed4 lw t9, -0x7be4(gp) | t9 = sym.imp.memset;
| if (v0 != 0) {
0x00003ed8 beqz v0, 0x3f04 |
0x00003edc lw t9, -0x7af0(gp) | t9 = sym.imp.reallocarray;
0x00003ee0 move a0, s0 | a0 = s0;
0x00003ee4 addiu a2, zero, 8 | a2 = 8;
0x00003ee8 move a1, s7 | a1 = s7;
0x00003eec jalr t9 | t9 ();
0x00003ef0 move s0, v0 | s0 = v0;
0x00003ef4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00003ef8 beqz v0, 0x42f4 | goto label_29;
| }
0x00003efc move s1, s7 | s1 = s7;
0x00003f00 lw t9, -0x7be4(gp) | t9 = sym.imp.memset;
| }
0x00003f04 move a0, s0 | a0 = s0;
0x00003f08 sll a2, s1, 3 | a2 = s1 << 3;
0x00003f0c move a1, zero | a1 = 0;
0x00003f10 jalr t9 | t9 ();
0x00003f14 lw v1, (s2) | v1 = *(s2);
0x00003f18 lui a0, 1 | a0 = 0x10000;
| /* aav.0x00010000 */
0x00003f1c addu v1, v1, a0 | v1 += a0;
0x00003f20 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003f24 lw v0, 0x20(v1) | v0 = *((v1 + 8));
0x00003f28 addiu v1, zero, 1 | v1 = 1;
0x00003f2c sw v0, (s0) | *(s0) = v0;
0x00003f30 lw v0, (s2) | v0 = *(s2);
0x00003f34 sh v1, 4(s0) | *((s0 + 2)) = v1;
| /* aav.0x00010000 */
0x00003f38 addu v0, v0, a0 | v0 += a0;
0x00003f3c lw v0, 0x18(v0) | v0 = *((v0 + 6));
| if (v0 != 0) {
0x00003f40 beql v0, zero, 0x3f54 |
0x00003f44 lw v0, (s5) | v0 = *(s5);
0x00003f48 addiu v0, zero, 5 | v0 = 5;
0x00003f4c sh v0, 4(s0) | *((s0 + 2)) = v0;
0x00003f50 lw v0, (s5) | v0 = *(s5);
| }
0x00003f54 lw v0, 0x20(v0) | v0 = *((v0 + 8));
0x00003f58 addiu v1, s0, 8 | v1 = s0 + 8;
| if (v0 == 0) {
0x00003f5c beqz v0, 0x4224 | goto label_30;
| }
0x00003f60 addiu s6, zero, 1 | s6 = 1;
0x00003f64 addiu a1, zero, 1 | a1 = 1;
| do {
0x00003f68 lw a0, 0x28(v0) | a0 = *((v0 + 10));
0x00003f6c sh a1, 4(v1) | *((v1 + 2)) = a1;
0x00003f70 sw a0, (v1) | *(v1) = a0;
0x00003f74 lw v0, (v0) | v0 = *(v0);
0x00003f78 addiu s6, s6, 1 | s6++;
0x00003f7c addiu v1, v1, 8 | v1 += 8;
0x00003f80 bnez v0, 0x3f68 |
| } while (v0 != 0);
0x00003f84 move a1, s6 | a1 = s6;
| label_8:
0x00003f88 lw v0, -0x7f4c(gp) | v0 = *(gp);
0x00003f8c lw t9, -0x7b58(gp) | t9 = sym.imp.poll;
0x00003f90 move a0, s0 | a0 = s0;
0x00003f94 lw a2, (v0) | a2 = *(v0);
0x00003f98 jalr t9 | t9 ();
0x00003f9c move s7, v0 | s7 = v0;
0x00003fa0 addiu v0, zero, -1 | v0 = -1;
0x00003fa4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (s7 == v0) {
0x00003fa8 beq s7, v0, 0x4144 | goto label_31;
| }
| if (s7 <= 0) {
0x00003fac blezl s7, 0x400c | goto label_5;
| }
0x00003fb0 lw s6, -0x7fdc(gp) | s6 = *(gp);
0x00003fb4 lhu v0, 6(s0) | v0 = *((s0 + 3));
0x00003fb8 andi a0, v0, 4 | a0 = v0 & 4;
0x00003fbc lw a0, (s2) | a0 = *(s2);
| if (a0 == 0) {
0x00003fc0 bnel a0, zero, 0x41c0 | goto label_32;
| }
| label_7:
0x00003fc4 andi v0, v0, 1 | v0 &= 1;
0x00003fc8 lw a0, 0x20(sp) | a0 = *(var_20h);
| if (v0 != 0) {
0x00003fcc bnez v0, 0x4184 | goto label_33;
| }
0x00003fd0 addiu v0, zero, 1 | v0 = 1;
| if (s6 == v0) {
| label_6:
0x00003fd4 beql s6, v0, 0x400c | goto label_5;
| }
0x00003fd8 lw s6, -0x7fdc(gp) | s6 = *(gp);
0x00003fdc addiu s3, s0, 8 | s3 = s0 + 8;
0x00003fe0 addiu fp, zero, 1 | fp = 1;
| do {
0x00003fe4 lw t9, -0x7ed8(gp) | t9 = sym.priv_constraint_dispatch;
0x00003fe8 move a0, s3 | a0 = s3;
0x00003fec bal 0x6218 | sym_priv_constraint_dispatch ();
0x00003ff0 subu s7, s7, v0 | __asm ("subu s7, s7, v0");
0x00003ff4 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003ff8 addiu fp, fp, 1 | fp++;
| if (s7 <= 0) {
0x00003ffc blez s7, 0x4008 | goto label_4;
| }
0x00004000 addiu s3, s3, 8 | s3 += 8;
0x00004004 bne s6, fp, 0x3fe4 |
| } while (s6 != fp);
| label_4:
0x00004008 lw s6, -0x7fdc(gp) | s6 = *(gp);
| label_5:
0x0000400c lw v1, (s6) | v1 = *(s6);
0x00004010 lw v0, 0x1c(sp) | v0 = *(var_1ch);
| if (v1 == 0) {
0x00004014 beqz v1, 0x3ebc | goto label_1;
| }
0x00004018 lw t9, -0x7ed4(gp) | t9 = sym.check_child;
0x0000401c bal 0xad88 | sym_check_child ();
0x00004020 nop |
0x00004024 lw v0, 0x1c(sp) | v0 = *(var_1ch);
0x00004028 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000402c sw zero, (s6) | *(s6) = 0;
0x00004030 lw v0, (v0) | v0 = *(v0);
| if (v0 == 0) {
0x00004034 beql v0, zero, 0x3ecc | goto label_2;
| }
0x00004038 lw v1, (s4) | v1 = *(s4);
0x0000403c lw t9, -0x7b10(gp) | t9 = sym.imp.signal;
| label_28:
0x00004040 move a1, zero | a1 = 0;
0x00004044 addiu a0, zero, 0x12 | a0 = 0x12;
0x00004048 jalr t9 | t9 ();
0x0000404c lw v0, (s2) | v0 = *(s2);
0x00004050 lw gp, 0x10(sp) | gp = *(var_10h);
0x00004054 lui v1, 1 | v1 = 0x10000;
| /* aav.0x00010000 */
0x00004058 addu v0, v0, v1 | v0 += v1;
0x0000405c lw t9, -0x7c98(gp) | t9 = sym.imp.close;
0x00004060 lw a0, 0x20(v0) | a0 = *((v0 + 8));
0x00004064 addiu s0, zero, -1 | s0 = -1;
0x00004068 jalr t9 | t9 ();
0x0000406c lw gp, 0x10(sp) | gp = *(var_10h);
0x00004070 lw t9, -0x7bfc(gp) | t9 = sym.imp.__errno_location;
0x00004074 addiu s3, zero, 4 | s3 = 4;
0x00004078 jalr t9 | t9 ();
0x0000407c lw gp, 0x10(sp) | gp = *(var_10h);
0x00004080 move s1, v0 | s1 = v0;
| do {
| label_3:
0x00004084 lw t9, -0x7b38(gp) | t9 = sym.imp.wait;
0x00004088 move a0, zero | a0 = 0;
0x0000408c jalr t9 | t9 ();
0x00004090 lw gp, 0x10(sp) | gp = *(var_10h);
0x00004094 bne v0, s0, 0x4084 |
| } while (v0 != s0);
0x00004098 lw v0, (s1) | v0 = *(s1);
0x0000409c addiu v1, zero, 0xa | v1 = 0xa;
| if (v0 == s3) {
0x000040a0 beq v0, s3, 0x4084 | goto label_3;
| }
0x000040a4 lui v0, 1 | v0 = 0x10000;
| if (v0 != v1) {
0x000040a8 bne v0, v1, 0x42e4 | goto label_34;
| }
0x000040ac lw a0, (s2) | a0 = *(s2);
0x000040b0 lw t9, -0x7ed0(gp) | t9 = sym.msgbuf_clear;
0x000040b4 addiu v0, v0, 0x10 | v0 += 0x10;
0x000040b8 addu a0, a0, v0 | a0 += v0;
0x000040bc bal 0x115e0 | sym_msgbuf_clear ();
0x000040c0 lw gp, 0x10(sp) | gp = *(var_10h);
0x000040c4 lw t9, -0x7af4(gp) | t9 = sym.imp.free;
0x000040c8 lw a0, (s2) | a0 = *(s2);
0x000040cc jalr t9 | t9 ();
0x000040d0 lw gp, 0x10(sp) | gp = *(var_10h);
0x000040d4 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x000040d8 lw t9, -0x7fb0(gp) | t9 = sym.log_info;
| /* str.Terminating */
0x000040dc addiu a0, a0, -0x6bf8 | a0 += -0x6bf8;
0x000040e0 bal 0x7c00 | sym_log_info ();
0x000040e4 lw a0, 0x110(sp) | a0 = *(var_110h);
0x000040e8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (a0 != 0) {
0x000040ec beqz a0, 0x4100 |
0x000040f0 lw t9, -0x7b44(gp) | t9 = sym.imp.unlink;
0x000040f4 jalr t9 | t9 ();
0x000040f8 nop |
0x000040fc lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x00004100 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00004104 lw a0, 0x124(sp) | a0 = *(var_124h);
0x00004108 lw v1, (v0) | v1 = *(v0);
0x0000410c move v0, zero | v0 = 0;
| if (a0 != v1) {
0x00004110 bne a0, v1, 0x42d8 | goto label_35;
| }
0x00004114 lw ra, 0x14c(sp) | ra = *(var_14ch);
0x00004118 lw fp, 0x148(sp) | fp = *(var_148h);
0x0000411c lw s7, 0x144(sp) | s7 = *(var_144h);
0x00004120 lw s6, 0x140(sp) | s6 = *(var_140h);
0x00004124 lw s5, 0x13c(sp) | s5 = *(var_13ch);
0x00004128 lw s4, 0x138(sp) | s4 = *(var_138h);
0x0000412c lw s3, 0x134(sp) | s3 = *(var_134h);
0x00004130 lw s2, 0x130(sp) | s2 = *(var_130h);
0x00004134 lw s1, 0x12c(sp) | s1 = *(var_12ch);
0x00004138 lw s0, 0x128(sp) | s0 = *(var_128h);
0x0000413c addiu sp, sp, 0x150 |
0x00004140 jr ra | return v0;
| label_31:
0x00004144 lw t9, -0x7bfc(gp) | t9 = sym.imp.__errno_location;
0x00004148 jalr t9 | t9 ();
0x0000414c nop |
0x00004150 lw v1, (v0) | v1 = *(v0);
0x00004154 addiu v0, zero, 4 | v0 = 4;
0x00004158 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v1 == v0) {
0x0000415c beq v1, v0, 0x4008 | goto label_4;
| }
0x00004160 lw t9, -0x7fd0(gp) | t9 = sym.log_warn;
0x00004164 lw a0, 0x28(sp) | a0 = *(var_28h);
0x00004168 bal 0x7a3c | sym_log_warn ();
0x0000416c lw v1, 0x1c(sp) | v1 = *(var_1ch);
0x00004170 addiu v0, zero, 1 | v0 = 1;
0x00004174 lw gp, 0x10(sp) | gp = *(var_10h);
0x00004178 sw v0, (v1) | *(v1) = v0;
0x0000417c lw s6, -0x7fdc(gp) | s6 = *(gp);
0x00004180 b 0x400c | goto label_5;
| label_33:
0x00004184 lw t9, -0x7ecc(gp) | t9 = sym.dispatch_imsg;
0x00004188 lw a2, 0x34(sp) | a2 = *(var_34h);
0x0000418c lw a1, 0x30(sp) | a1 = *(var_30h);
0x00004190 addiu s7, s7, -1 | s7 += -1;
0x00004194 bal 0xb8c4 | sym_dispatch_imsg ();
0x00004198 addiu a0, zero, -1 | a0 = -1;
0x0000419c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == a0) {
0x000041a0 bne v0, a0, 0x41b0 |
0x000041a4 lw v1, 0x1c(sp) | v1 = *(var_1ch);
0x000041a8 addiu v0, zero, 1 | v0 = 1;
0x000041ac sw v0, (v1) | *(v1) = v0;
| }
0x000041b0 addiu v0, zero, 1 | v0 = 1;
| if (s7 != 0) {
0x000041b4 bnez s7, 0x3fd4 | goto label_6;
| }
0x000041b8 lw s6, -0x7fdc(gp) | s6 = *(gp);
0x000041bc b 0x400c | goto label_5;
| label_32:
0x000041c0 lui v0, 1 | v0 = 0x10000;
0x000041c4 lw t9, -0x7f1c(gp) | t9 = sym.msgbuf_write;
0x000041c8 addiu v0, v0, 0x10 | v0 += 0x10;
0x000041cc addu a0, a0, v0 | a0 += v0;
0x000041d0 bal 0x11364 | sym_msgbuf_write ();
0x000041d4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000041d8 blez v0, 0x41e4 |
| while (a0 == v0) {
0x000041dc lhu v0, 6(s0) | v0 = *((s0 + 3));
0x000041e0 b 0x3fc4 | goto label_7;
0x000041e4 lw t9, -0x7bfc(gp) | t9 = sym.imp.__errno_location;
0x000041e8 jalr t9 | t9 ();
0x000041ec nop |
0x000041f0 lw a0, (v0) | a0 = *(v0);
0x000041f4 addiu v0, zero, 0xb | v0 = 0xb;
0x000041f8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000041fc beq a0, v0, 0x41dc |
| }
0x00004200 lw t9, -0x7fd0(gp) | t9 = sym.log_warn;
0x00004204 lw a0, 0x2c(sp) | a0 = *(var_2ch);
0x00004208 bal 0x7a3c | sym_log_warn ();
0x0000420c lw v1, 0x1c(sp) | v1 = *(var_1ch);
0x00004210 addiu v0, zero, 1 | v0 = 1;
0x00004214 lw gp, 0x10(sp) | gp = *(var_10h);
0x00004218 sw v0, (v1) | *(v1) = v0;
0x0000421c lhu v0, 6(s0) | v0 = *((s0 + 3));
0x00004220 b 0x3fc4 | goto label_7;
| label_30:
0x00004224 addiu a1, zero, 1 | a1 = 1;
0x00004228 addiu s6, zero, 1 | s6 = 1;
0x0000422c b 0x3f88 | goto label_8;
| label_14:
0x00004230 lw t9, -0x7f24(gp) | t9 = sym.usage;
0x00004234 bal 0xacf4 | sym_usage ();
0x00004238 nop |
| label_25:
0x0000423c lw t9, -0x7f58(gp) | t9 = sym.log_init;
0x00004240 lw a0, 0xf0(sp) | a0 = *(var_f0h);
0x00004244 addiu a1, zero, 0x18 | a1 = 0x18;
0x00004248 bal 0x76b0 | sym_log_init ();
0x0000424c lw gp, 0x10(sp) | gp = *(var_10h);
0x00004250 lw t9, -0x7f54(gp) | t9 = sym.log_setverbose;
0x00004254 lw a0, 0xf4(sp) | a0 = *(var_f4h);
0x00004258 bal 0x7748 | sym_log_setverbose ();
0x0000425c lw v0, 0xf0(sp) | v0 = *(var_f0h);
0x00004260 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00004264 bnez v0, 0x3d84 | goto label_9;
| }
0x00004268 lw t9, -0x7b80(gp) | t9 = sym.imp.daemon;
0x0000426c move a1, zero | a1 = 0;
0x00004270 addiu a0, zero, 1 | a0 = 1;
0x00004274 jalr t9 | t9 ();
0x00004278 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0000427c bnez v0, 0x42c8 |
0x00004280 lw t9, -0x7f50(gp) | t9 = sym.writepid;
0x00004284 lw a0, 0x20(sp) | a0 = *(var_20h);
0x00004288 bal 0xac50 | sym_writepid ();
0x0000428c lw gp, 0x10(sp) | gp = *(var_10h);
0x00004290 b 0x3d84 | goto label_9;
| label_24:
0x00004294 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00004298 lw t9, -0x7c24(gp) | t9 = sym.imp.warn;
| /* str.cant_set_priority */
0x0000429c addiu a0, a0, -0x6c38 | a0 += -0x6c38;
0x000042a0 jalr t9 | t9 ();
0x000042a4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000042a8 b 0x3d60 | goto label_10;
| label_27:
0x000042ac lw t9, -0x7fc8(gp) | t9 = sym.fatal;
0x000042b0 move a0, zero | a0 = 0;
0x000042b4 bal 0x7d08 | sym_fatal ();
| label_26:
0x000042b8 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x000042bc lw t9, -0x7fc8(gp) | t9 = sym.fatal;
| /* str.socketpair */
0x000042c0 addiu a0, a0, -0x7904 | a0 += -0x7904;
0x000042c4 bal 0x7d08 | sym_fatal ();
| }
0x000042c8 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x000042cc lw t9, -0x7fc8(gp) | t9 = sym.fatal;
| /* str.daemon */
0x000042d0 addiu a0, a0, -0x7158 | a0 += -0x7158;
0x000042d4 bal 0x7d08 | sym_fatal ();
| label_35:
0x000042d8 lw t9, -0x7b2c(gp) | t9 = sym.imp.__stack_chk_fail;
0x000042dc jalr t9 | t9 ();
0x000042e0 nop |
| label_34:
0x000042e4 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x000042e8 lw t9, -0x7fc8(gp) | t9 = sym.fatal;
| /* str.wait */
0x000042ec addiu a0, a0, -0x6c00 | a0 += -0x6c00;
0x000042f0 bal 0x7d08 | sym_fatal ();
| label_29:
0x000042f4 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x000042f8 lw t9, -0x7fd0(gp) | t9 = sym.log_warn;
| /* str.could_not_resize_pfd_from__u_____u_entries */
0x000042fc addiu a0, a0, -0x7764 | a0 += -0x7764;
0x00004300 move a2, s7 | a2 = s7;
0x00004304 move a1, s1 | a1 = s1;
0x00004308 bal 0x7a3c | sym_log_warn ();
0x0000430c lw gp, 0x10(sp) | gp = *(var_10h);
0x00004310 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00004314 lw t9, -0x7f44(gp) | t9 = sym.fatalx;
| /* str.exiting */
0x00004318 addiu a0, a0, -0x776c | a0 += -0x776c;
0x0000431c bal 0x7d80 | sym_fatalx ();
| label_12:
0x00004320 lw t9, -0x7ec8(gp) | t9 = sym.ctl_main;
0x00004324 move a1, s3 | a1 = s3;
0x00004328 move a0, s0 | a0 = s0;
0x0000432c bal 0xc5d0 | sym_ctl_main ();
| label_17:
0x00004330 lw a1, -0x7fcc(gp) | a1 = *((gp - 8179));
0x00004334 lw t9, -0x7c28(gp) | t9 = sym.imp.errx;
| /* str.need_root_privileges */
0x00004338 addiu a1, a1, -0x6cc0 | a1 += -0x6cc0;
0x0000433c addiu a0, zero, 1 | a0 = 1;
0x00004340 jalr t9 | t9 ();
| label_20:
0x00004344 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x00004348 lw t9, -0x7f44(gp) | t9 = sym.fatalx;
| /* str.sanitize_argv */
0x0000434c addiu a0, a0, -0x6c98 | a0 += -0x6c98;
0x00004350 bal 0x7d80 | sym_fatalx ();
| label_21:
0x00004354 lw t9, -0x7ec4(gp) | t9 = sym.ntp_main;
0x00004358 lw a3, 0x34(sp) | a3 = *(var_34h);
0x0000435c lw a2, 0x30(sp) | a2 = *(var_30h);
0x00004360 lw a0, 0x20(sp) | a0 = *(var_20h);
0x00004364 move a1, s0 | a1 = s0;
0x00004368 bal 0x8754 | sym_ntp_main ();
0x0000436c lw gp, 0x10(sp) | gp = *(var_10h);
0x00004370 b 0x3be4 | goto label_11;
| label_22:
0x00004374 lw t9, -0x7ec0(gp) | t9 = sym.ntp_dns;
0x00004378 lw a0, 0x20(sp) | a0 = *(var_20h);
0x0000437c move a1, s0 | a1 = s0;
0x00004380 bal 0xa588 | sym_ntp_dns ();
0x00004384 lw gp, 0x10(sp) | gp = *(var_10h);
0x00004388 b 0x3be4 | goto label_11;
| label_18:
0x0000438c lw a1, -0x7fcc(gp) | a1 = *((gp - 8179));
0x00004390 lw t9, -0x7c28(gp) | t9 = sym.imp.errx;
| /* esilref: 'ntp' */
0x00004394 addiu a2, s1, -0x78e8 | a2 = s1 + -0x78e8;
| /* str.unknown_user__s */
0x00004398 addiu a1, a1, -0x6ca8 | a1 += -0x6ca8;
0x0000439c addiu a0, zero, 1 | a0 = 1;
0x000043a0 jalr t9 | t9 ();
0x000043a4 nop |
0x000043a8 nop |
0x000043ac nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/ntpd @ 0xacf4 */
| #include <stdint.h>
|
; (fcn) sym.usage () | void usage () {
0x0000acf4 lui gp, 2 |
0x0000acf8 addiu gp, gp, 0x73ac |
0x0000acfc addu gp, gp, t9 | gp += t9;
0x0000ad00 addiu sp, sp, -0x20 |
0x0000ad04 lw v0, -0x7ac0(gp) | v0 = *((gp - 7856));
0x0000ad08 sw gp, 0x10(sp) | *(var_10h_2) = gp;
0x0000ad0c sw ra, 0x1c(sp) | *(var_1ch_2) = ra;
0x0000ad10 sw s0, 0x18(sp) | *(var_18h_2) = s0;
0x0000ad14 lw a1, -0x7fcc(gp) | a1 = *((gp - 8179));
0x0000ad18 lw s0, (v0) | s0 = *(v0);
0x0000ad1c lw t9, -0x7ac4(gp) | t9 = sym.imp.strcmp;
0x0000ad20 move a0, s0 | a0 = s0;
| /* str.ntpctl */
0x0000ad24 addiu a1, a1, -0x7460 | a1 += -0x7460;
0x0000ad28 jalr t9 | t9 ();
0x0000ad2c lw gp, 0x10(sp) | gp = *(var_10h_2);
0x0000ad30 lw v1, -0x7ae4(gp) | v1 = *((gp - 7865));
0x0000ad34 lw a0, (v1) | a0 = *(v1);
| if (v0 != 0) {
0x0000ad38 bnez v0, 0xad68 | goto label_0;
| }
0x0000ad3c move a3, a0 | a3 = a0;
0x0000ad40 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x0000ad44 lw t9, -0x7b60(gp) | t9 = sym.imp.fwrite;
0x0000ad48 addiu a2, zero, 0x30 | a2 = 0x30;
0x0000ad4c addiu a1, zero, 1 | a1 = 1;
| /* str.usage:_ntpctl__s_all__peers__Sensors__status_n */
0x0000ad50 addiu a0, a0, -0x7458 | a0 += -0x7458;
0x0000ad54 jalr t9 | t9 ();
0x0000ad58 lw gp, 0x10(sp) | gp = *(var_10h_2);
| do {
0x0000ad5c lw t9, -0x7b9c(gp) | t9 = sym.imp.exit;
0x0000ad60 addiu a0, zero, 1 | a0 = 1;
0x0000ad64 jalr t9 | t9 ();
| label_0:
0x0000ad68 lw a2, -0x7fcc(gp) | a2 = *((gp - 8179));
0x0000ad6c lw t9, -0x7c68(gp) | t9 = sym.imp.__fprintf_chk
0x0000ad70 move a3, s0 | a3 = s0;
| /* str.usage:__s___dnSsvr____f_file____p_file____t_fb_timeout____q_fb_stratum__n */
0x0000ad74 addiu a2, a2, -0x7424 | a2 += -0x7424;
0x0000ad78 addiu a1, zero, 1 | a1 = 1;
0x0000ad7c jalr t9 | t9 ();
0x0000ad80 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x0000ad84 b 0xad5c |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/ntpd @ 0xac50 */
| #include <stdint.h>
|
; (fcn) sym.writepid () | void writepid () {
0x0000ac50 lui gp, 2 |
0x0000ac54 addiu gp, gp, 0x7450 |
0x0000ac58 addu gp, gp, t9 | gp += t9;
0x0000ac5c lw a0, 0xd0(a0) | a0 = *((a0 + 52));
| if (a0 != 0) {
0x0000ac60 beqz a0, 0xacdc |
0x0000ac64 nop |
0x0000ac68 addiu sp, sp, -0x20 |
0x0000ac6c lw a1, -0x7fcc(gp) | a1 = *((gp - 8179));
0x0000ac70 lw t9, -0x7ae0(gp) | t9 = sym.imp.fopen;
0x0000ac74 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0000ac78 sw s0, 0x18(sp) | *(var_18h) = s0;
0x0000ac7c sw ra, 0x1c(sp) | *(var_1ch) = ra;
0x0000ac80 addiu a1, a1, -0x7484 | a1 += -0x7484;
0x0000ac84 jalr t9 | t9 ();
0x0000ac88 move s0, v0 | s0 = v0;
0x0000ac8c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0000ac90 beqz v0, 0xace4 | goto label_0;
| }
0x0000ac94 lw t9, -0x7b7c(gp) | t9 = sym.imp.getpid;
0x0000ac98 jalr t9 | t9 ();
0x0000ac9c nop |
0x0000aca0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000aca4 move a0, s0 | a0 = s0;
0x0000aca8 move a3, v0 | a3 = v0;
0x0000acac lw a2, -0x7fcc(gp) | a2 = *((gp - 8179));
0x0000acb0 lw t9, -0x7c68(gp) | t9 = sym.imp.__fprintf_chk
| /* str._ld_n */
0x0000acb4 addiu a2, a2, -0x7468 | a2 += -aav.0x00007468;
0x0000acb8 addiu a1, zero, 1 | a1 = 1;
0x0000acbc jalr t9 | t9 ();
0x0000acc0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000acc4 lw ra, 0x1c(sp) | ra = *(var_1ch);
0x0000acc8 move a0, s0 | a0 = s0;
0x0000accc lw t9, -0x7c50(gp) | t9 = sym.imp.fclose;
0x0000acd0 lw s0, 0x18(sp) | s0 = *(var_18h);
0x0000acd4 addiu sp, sp, 0x20 |
0x0000acd8 jr t9 | t9 ();
| }
0x0000acdc jr ra | return v0;
0x0000ace0 nop |
| label_0:
0x0000ace4 lw a0, -0x7fcc(gp) | a0 = *((gp - 8179));
0x0000ace8 lw t9, -0x7fc8(gp) | t9 = sym.fatal;
| /* str.couldnt_open_pid_file */
0x0000acec addiu a0, a0, -0x7480 | a0 += -0x7480;
0x0000acf0 bal 0x7d08 | return sym_fatal ();
| }
[*] Function printf used 4 times ntpd