[*] Binary protection state of htpasswd
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of htpasswd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/htpasswd @ 0x1f70 */
| #include <stdint.h>
|
; (fcn) fcn.00001f70 () | void fcn_00001f70 () {
0x00001f70 lui gp, 2 |
0x00001f74 addiu gp, gp, -0x5f60 |
0x00001f78 addu gp, gp, t9 | gp += t9;
0x00001f7c addiu sp, sp, -0x58 |
0x00001f80 lw t9, -0x7f7c(gp) | t9 = sym.imp.apr_generate_random_bytes;
0x00001f84 sw s1, 0x48(sp) | *(var_48h) = s1;
0x00001f88 lw s1, -0x7f04(gp) | s1 = *((gp - 8129));
0x00001f8c sw gp, 0x10(sp) | *(var_10h) = gp;
0x00001f90 sw s3, 0x50(sp) | *(var_50h) = s3;
0x00001f94 lw v0, (s1) | v0 = *(s1);
0x00001f98 sw s2, 0x4c(sp) | *(var_4ch) = s2;
0x00001f9c sw s0, 0x44(sp) | *(var_44h) = s0;
0x00001fa0 sw ra, 0x54(sp) | *(var_54h) = ra;
0x00001fa4 move s0, a0 | s0 = a0;
0x00001fa8 move s2, a1 | s2 = a1;
0x00001fac addiu a0, sp, 0x1c | a0 = sp + 0x1c;
0x00001fb0 addiu a1, zero, 6 | a1 = 6;
0x00001fb4 sw v0, 0x3c(sp) | *(var_3ch) = v0;
0x00001fb8 move s3, a2 | s3 = a2;
0x00001fbc jalr t9 | t9 ();
0x00001fc0 sw v0, 0x18(sp) | *(var_18h) = v0;
0x00001fc4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00001fc8 bnez v0, 0x2060 | goto label_0;
| }
0x00001fcc lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00001fd0 addiu t0, s0, 8 | t0 = s0 + 8;
0x00001fd4 move a0, s0 | a0 = s0;
0x00001fd8 move v1, zero | v1 = 0;
0x00001fdc move a2, zero | a2 = 0;
0x00001fe0 move v0, zero | v0 = 0;
0x00001fe4 addiu a3, a3, 0x396c | a3 += str.._0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz;
| do {
0x00001fe8 sltiu a1, v0, 6 | a1 = (v0 < 6) ? 1 : 0;
0x00001fec andi a1, v1, 0x3f | a1 = v1 & 0x3f;
| if (a1 != 0) {
0x00001ff0 beqz a1, 0x2014 |
0x00001ff4 addiu a1, sp, 0x40 | a1 = sp + 0x40;
0x00001ff8 addu a1, a1, a2 | a1 += a2;
0x00001ffc addiu a2, a2, 1 | a2++;
0x00002000 lbu a1, -0x24(a1) | a1 = *((a1 - 36));
0x00002004 sllv a1, a1, v0 | a1 <<= v0;
0x00002008 or v1, v1, a1 | v1 |= a1;
0x0000200c addiu v0, v0, 8 | v0 += 8;
0x00002010 andi a1, v1, 0x3f | a1 = v1 & 0x3f;
| }
0x00002014 addu a1, a3, a1 | a1 = a3 + a1;
0x00002018 addiu a0, a0, 1 | a0++;
0x0000201c lbu a1, (a1) | a1 = *(a1);
0x00002020 srl v1, v1, 6 | v1 >>= 6;
0x00002024 sb a1, -1(a0) | *((a0 - 1)) = a1;
0x00002028 addiu v0, v0, -6 | v0 += -6;
0x0000202c bne a0, t0, 0x1fe8 |
| } while (a0 != t0);
0x00002030 sb zero, 8(s0) | *((s0 + 8)) = 0;
0x00002034 move v0, zero | v0 = 0;
| do {
0x00002038 lw a0, 0x3c(sp) | a0 = *(var_3ch);
0x0000203c lw v1, (s1) | v1 = *(s1);
0x00002040 lw ra, 0x54(sp) | ra = *(var_54h);
| if (a0 != v1) {
0x00002044 bne a0, v1, 0x2088 | goto label_1;
| }
0x00002048 lw s3, 0x50(sp) | s3 = *(var_50h);
0x0000204c lw s2, 0x4c(sp) | s2 = *(var_4ch);
0x00002050 lw s1, 0x48(sp) | s1 = *(var_48h);
0x00002054 lw s0, 0x44(sp) | s0 = *(var_44h);
0x00002058 addiu sp, sp, 0x58 |
0x0000205c jr ra | return v0;
| label_0:
0x00002060 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00002064 lw t9, -0x7f44(gp) | t9 = sym.imp.apr_psprintf
0x00002068 addiu a2, sp, 0x18 | a2 = sp + 0x18;
0x0000206c addiu a1, a1, 0x3604 | a1 += str.Unable_to_generate_random_bytes:__pm;
0x00002070 move a0, s3 | a0 = s3;
0x00002074 jalr t9 | t9 ();
0x00002078 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000207c sw v0, (s2) | *(s2) = v0;
0x00002080 addiu v0, zero, 8 | v0 = 8;
0x00002084 b 0x2038 |
| } while (1);
| label_1:
0x00002088 lw t9, -0x7f14(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000208c jalr t9 | t9 ();
0x00002090 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/htpasswd @ 0x10d0 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 6800 named .text */
0x000010d0 lui gp, 2 |
0x000010d4 addiu gp, gp, -0x50c0 |
0x000010d8 addu gp, gp, t9 | gp += t9;
0x000010dc lw v1, -0x7fd8(gp) | v1 = *((gp - 8182));
0x000010e0 lw a2, -0x7f04(gp) | a2 = *((gp - 8129));
0x000010e4 addiu v0, v1, 0x35f0 | v0 = v1 + str.htpasswd.tmp.XXXXXX;
0x000010e8 addiu sp, sp, -0x310 |
0x000010ec lw t1, 0x35f0(v1) | t1 = *(v1);
0x000010f0 lw t2, (a2) | t2 = *(a2);
0x000010f4 lw t0, 4(v0) | t0 = *((v0 + 1));
0x000010f8 lw v1, 0xc(v0) | v1 = *((v0 + 3));
0x000010fc lw a3, 8(v0) | a3 = *((v0 + 2));
0x00001100 lw v0, 0x10(v0) | v0 = *((v0 + 4));
0x00001104 lw t9, -0x7ef0(gp) | t9 = sym.imp.apr_app_initialize;
0x00001108 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0000110c sw ra, 0x30c(sp) | *(var_30ch) = ra;
0x00001110 sw t2, 0x2e4(sp) | *(var_2e4h) = t2;
0x00001114 sw t1, 0xd0(sp) | *(var_d0h) = t1;
0x00001118 sw t0, 0xd4(sp) | *(var_d4h) = t0;
0x0000111c sw v1, 0xdc(sp) | *(var_dch) = v1;
0x00001120 sw a3, 0xd8(sp) | *(var_d8h) = a3;
0x00001124 sw s0, 0x2e8(sp) | *(var_2e8h) = s0;
0x00001128 sw a2, 0x30(sp) | *(var_30h) = a2;
0x0000112c sw a0, 0x310(sp) | *(arg_310h) = a0;
0x00001130 move a2, zero | a2 = 0;
0x00001134 sw a1, 0x34(sp) | *(var_34h) = a1;
0x00001138 addiu a0, sp, 0x310 | a0 = sp + 0x310;
0x0000113c addiu a1, sp, 0x34 | a1 = sp + 0x34;
0x00001140 sw v0, 0xe0(sp) | *(var_e0h) = v0;
0x00001144 sw fp, 0x308(sp) | *(var_308h) = fp;
0x00001148 sw s7, 0x304(sp) | *(var_304h) = s7;
0x0000114c sw s6, 0x300(sp) | *(var_300h) = s6;
0x00001150 sw s5, 0x2fc(sp) | *(var_2fch) = s5;
0x00001154 sw s4, 0x2f8(sp) | *(var_2f8h) = s4;
0x00001158 sw s3, 0x2f4(sp) | *(var_2f4h) = s3;
0x0000115c sw s2, 0x2f0(sp) | *(var_2f0h) = s2;
0x00001160 sw s1, 0x2ec(sp) | *(var_2ech) = s1;
0x00001164 sw zero, 0x3c(sp) | *(var_3ch) = 0;
0x00001168 sw zero, 0x48(sp) | *(var_48h) = 0;
0x0000116c sw zero, 0x4c(sp) | *(var_4ch) = 0;
0x00001170 sw zero, 0x50(sp) | *(var_50h) = 0;
0x00001174 sw zero, 0x54(sp) | *(var_54h) = 0;
0x00001178 sw zero, 0x58(sp) | *(var_58h) = 0;
0x0000117c sw zero, 0x5c(sp) | *(var_5ch) = 0;
0x00001180 sw zero, 0x60(sp) | *(var_60h) = 0;
0x00001184 sw zero, 0x64(sp) | *(var_64h) = 0;
0x00001188 jalr t9 | t9 ();
0x0000118c lw gp, 0x18(sp) | gp = *(var_18h);
0x00001190 addiu s0, sp, 0x44 | s0 = sp + 0x44;
0x00001194 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00001198 lw t9, -0x7fd4(gp) | t9 = *(gp);
0x0000119c addiu a0, a0, 0x1f54 | a0 += 0x1f54;
0x000011a0 bal 0x2b40 | fcn_00002b40 ();
0x000011a4 lw gp, 0x18(sp) | gp = *(var_18h);
0x000011a8 move a3, zero | a3 = 0;
0x000011ac move a2, zero | a2 = 0;
0x000011b0 lw t9, -0x7efc(gp) | t9 = sym.imp.apr_pool_create_ex;
0x000011b4 move a1, zero | a1 = 0;
0x000011b8 addiu a0, sp, 0x40 | a0 = sp + 0x40;
0x000011bc jalr t9 | t9 ();
0x000011c0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000011c4 lw a1, 0x40(sp) | a1 = *(var_40h);
0x000011c8 lw t9, -0x7f00(gp) | t9 = sym.imp.apr_pool_abort_set;
0x000011cc lw a0, -0x7fd0(gp) | a0 = sym.abort_on_oom;
0x000011d0 sw s0, 0x2c(sp) | *(var_2ch) = s0;
0x000011d4 jalr t9 | t9 ();
0x000011d8 lw gp, 0x18(sp) | gp = *(var_18h);
0x000011dc lw t9, -0x7f0c(gp) | t9 = sym.imp.apr_file_open_stderr;
0x000011e0 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x000011e4 lw a1, 0x40(sp) | a1 = *(var_40h);
0x000011e8 jalr t9 | t9 ();
0x000011ec lw gp, 0x18(sp) | gp = *(var_18h);
0x000011f0 lw v0, 0x40(sp) | v0 = *(var_40h);
0x000011f4 lw v1, 0x34(sp) | v1 = *(var_34h);
0x000011f8 lw a2, 0x310(sp) | a2 = *(arg_310h);
0x000011fc sw v0, 0x20(sp) | *(var_20h) = v0;
0x00001200 lw t9, -0x7ed0(gp) | t9 = sym.imp.apr_getopt_init;
0x00001204 move a1, v0 | a1 = v0;
0x00001208 sw v0, 0x48(sp) | *(var_48h) = v0;
0x0000120c addiu v0, zero, 2 | v0 = 2;
0x00001210 sw a2, 0x28(sp) | *(var_28h) = a2;
0x00001214 sw v1, 0x24(sp) | *(var_24h) = v1;
0x00001218 move a3, v1 | a3 = v1;
0x0000121c move a0, s0 | a0 = s0;
0x00001220 sw v0, 0x5c(sp) | *(var_5ch) = v0;
0x00001224 jalr t9 | t9 ();
0x00001228 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0000122c bnez v0, 0x1a84 | goto label_18;
| }
0x00001230 lw s1, -0x7fd8(gp) | s1 = *((gp - 8182));
0x00001234 move s0, zero | s0 = 0;
0x00001238 addiu s6, zero, 2 | s6 = 2;
0x0000123c addiu s2, sp, 0x68 | s2 = sp + 0x68;
0x00001240 addiu s7, sp, 0x3b | s7 = sp + 0x3b;
0x00001244 addiu s1, s1, 0x32c4 | s1 += str.cnmspdBbDiC:v;
0x00001248 addiu s5, zero, 0x63 | s5 = 0x63;
0x0000124c addiu fp, sp, 0x48 | fp = sp + 0x48;
0x00001250 addiu s4, zero, 0x6e | s4 = 0x6e;
0x00001254 addiu s3, zero, 0x76 | s3 = 0x76;
| do {
| label_0:
0x00001258 lw t9, -0x7f88(gp) | t9 = sym.imp.apr_getopt;
0x0000125c lw a0, 0x44(sp) | a0 = *(var_44h);
0x00001260 move a3, s2 | a3 = s2;
0x00001264 move a2, s7 | a2 = s7;
0x00001268 move a1, s1 | a1 = s1;
0x0000126c jalr t9 | t9 ();
0x00001270 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00001274 bnez v0, 0x1314 | goto label_19;
| }
0x00001278 lb a1, 0x3b(sp) | a1 = *(var_3bh);
0x0000127c slti v0, a1, 0x64 | v0 = (a1 < 0x64) ? 1 : 0;
| if (a1 == s5) {
0x00001280 beq a1, s5, 0x12b4 | goto label_20;
| }
0x00001284 addiu v0, zero, 0x44 | v0 = 0x44;
| if (v0 == 0) {
0x00001288 bnel v0, zero, 0x12a4 | goto label_21;
| }
| if (a1 == s4) {
0x0000128c beql a1, s4, 0x130c | goto label_22;
| }
0x00001290 addiu s6, s6, -1 | s6 += -1;
0x00001294 lw t9, -0x7fcc(gp) | t9 = sym.parse_common_options;
| if (a1 != s3) {
0x00001298 bne a1, s3, 0x12bc | goto label_23;
| }
0x0000129c ori s0, s0, 8 | s0 |= 8;
0x000012a0 b 0x1258 |
| } while (1);
| label_21:
0x000012a4 lw t9, -0x7fcc(gp) | t9 = sym.parse_common_options;
| if (a1 == v0) {
0x000012a8 bne a1, v0, 0x12bc |
0x000012ac ori s0, s0, 4 | s0 |= 4;
0x000012b0 b 0x1258 | goto label_0;
| label_20:
0x000012b4 ori s0, s0, 1 | s0 |= 1;
0x000012b8 b 0x1258 | goto label_0;
| }
| label_23:
0x000012bc lw a2, 0x68(sp) | a2 = *(var_68h);
0x000012c0 move a0, fp | a0 = fp;
0x000012c4 bal 0x290c | sym_parse_common_options ();
0x000012c8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000012cc beqz v0, 0x1258 | goto label_0;
| }
0x000012d0 sw v0, 0x20(sp) | *(var_20h) = v0;
0x000012d4 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x000012d8 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x000012dc lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x000012e0 lw a0, (v0) | a0 = *(v0);
0x000012e4 lw v0, 0x24(sp) | v0 = *(var_24h);
0x000012e8 lw a3, 0x4c(sp) | a3 = *(var_4ch);
0x000012ec addiu a1, a1, 0x32bc | a1 += str._s:__s_n;
0x000012f0 lw a2, (v0) | a2 = *(v0);
0x000012f4 jalr t9 | t9 ();
0x000012f8 lw gp, 0x18(sp) | gp = *(var_18h);
0x000012fc lw t0, 0x20(sp) | t0 = *(var_20h);
0x00001300 lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001304 move a0, t0 | a0 = t0;
0x00001308 jalr t9 | t9 ();
| label_22:
0x0000130c ori s0, s0, 2 | s0 |= 2;
0x00001310 b 0x1258 | goto label_0;
| label_19:
0x00001314 lw a0, 0x64(sp) | a0 = *(var_64h);
0x00001318 addiu v1, zero, 1 | v1 = 1;
| if (a0 != v1) {
0x0000131c beql a0, v1, 0x1324 |
0x00001320 addiu s6, s6, 1 | s6++;
| }
0x00001324 lui v1, 1 | v1 = 0x1117e;
0x00001328 addiu v1, v1, 0x117e |
0x0000132c addiu v0, s0, -1 | v0 = s0 + -1;
| if (v0 != v1) {
0x00001330 bne v0, v1, 0x1bb4 | goto label_24;
| }
0x00001334 and v0, v0, s0 | v0 &= s0;
0x00001338 andi s4, s0, 8 | s4 = s0 & 8;
| if (v0 != 0) {
0x0000133c bnez v0, 0x1a60 | goto label_25;
| }
0x00001340 lw v0, 0x44(sp) | v0 = *(var_44h);
| if (s4 != 0) {
0x00001344 beqz s4, 0x135c |
0x00001348 lw s1, 0xc(v0) | s1 = *((v0 + 3));
| if (a0 == 0) {
0x0000134c bnel a0, zero, 0x1360 | goto label_26;
| }
0x00001350 addiu v0, zero, 3 | v0 = 3;
0x00001354 sw v0, 0x64(sp) | *(var_64h) = v0;
0x00001358 lw v0, 0x44(sp) | v0 = *(var_44h);
| }
0x0000135c lw s1, 0xc(v0) | s1 = *((v0 + 3));
| label_26:
0x00001360 lw v0, 0x28(sp) | v0 = *(var_28h);
0x00001364 subu v0, v0, s1 | __asm ("subu v0, v0, s1");
0x00001368 andi s5, s0, 2 | s5 = s0 & 2;
| if (v0 != s6) {
0x0000136c bne v0, s6, 0x1bb4 | goto label_24;
| }
0x00001370 lw v0, 0x24(sp) | v0 = *(var_24h);
| if (s5 == 0) {
0x00001374 beqz s5, 0x1434 | goto label_27;
| }
0x00001378 sw zero, 0x28(sp) | *(var_28h) = 0;
| do {
0x0000137c lw v0, 0x24(sp) | v0 = *(var_24h);
0x00001380 sll s1, s1, 2 | s1 <<= 2;
0x00001384 addu s1, v0, s1 | s1 = v0 + s1;
0x00001388 lw t9, -0x7f38(gp) | t9 = sym.imp.strlen;
0x0000138c lw s3, (s1) | s3 = *(s1);
0x00001390 move a0, s3 | a0 = s3;
0x00001394 jalr t9 | t9 ();
0x00001398 sltiu v0, v0, 0x100 | v0 = (v0 < 0x100) ? 1 : 0;
0x0000139c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000013a0 beqz v0, 0x1a90 | goto label_28;
| }
0x000013a4 lw t9, -0x7f30(gp) | t9 = sym.imp.apr_pstrdup;
0x000013a8 lw a0, 0x20(sp) | a0 = *(var_20h);
0x000013ac move a1, s3 | a1 = s3;
0x000013b0 jalr t9 | t9 ();
0x000013b4 lw gp, 0x18(sp) | gp = *(var_18h);
0x000013b8 addiu a1, zero, 0x3a | a1 = 0x3a;
0x000013bc move a0, v0 | a0 = v0;
0x000013c0 lw t9, -0x7f34(gp) | t9 = sym.imp.strchr;
0x000013c4 move s3, v0 | s3 = v0;
0x000013c8 jalr t9 | t9 ();
0x000013cc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000013d0 bnez v0, 0x1ac8 | goto label_29;
| }
0x000013d4 lw v1, 0x64(sp) | v1 = *(var_64h);
0x000013d8 addiu v0, zero, 1 | v0 = 1;
| if (v1 == v0) {
0x000013dc beql v1, v0, 0x1474 | goto label_30;
| }
0x000013e0 lw s1, 4(s1) | s1 = *((s1 + 1));
| label_1:
0x000013e4 lw t9, -0x7f5c(gp) | t9 = sym.imp.apr_stat;
| if (s5 == 0) {
0x000013e8 beqz s5, 0x14a8 | goto label_31;
| }
| label_2:
0x000013ec andi v0, s0, 0xc | v0 = s0 & 0xc;
| if (v0 == 0) {
0x000013f0 beql v0, zero, 0x1558 | goto label_13;
| }
0x000013f4 move s1, zero | s1 = 0;
0x000013f8 lw v0, -0x7fdc(gp) | v0 = *(gp);
| if (s4 == 0) {
0x000013fc beqz s4, 0x15bc | goto label_32;
| }
0x00001400 andi s0, s0, 4 | s0 &= 4;
0x00001404 lw a0, (v0) | a0 = *(v0);
| if (s0 == 0) {
0x00001408 beqz s0, 0x1afc | goto label_33;
| }
| label_3:
0x0000140c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001410 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001414 move a2, s3 | a2 = s3;
0x00001418 addiu a1, a1, 0x357c | a1 += str.User__s_not_found_n;
| label_10:
0x0000141c jalr t9 | t9 ();
0x00001420 nop |
0x00001424 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001428 lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x0000142c move a0, zero | a0 = 0;
0x00001430 jalr t9 | t9 ();
| label_27:
0x00001434 sll s3, s1, 2 | s3 = s1 << 2;
0x00001438 lw t9, -0x7f38(gp) | t9 = sym.imp.strlen;
0x0000143c lwx s3, s3(v0) | __asm ("lwx s3, s3(v0)");
0x00001440 move a0, s3 | a0 = s3;
0x00001444 jalr t9 | t9 ();
0x00001448 sltiu v0, v0, 0x1000 | v0 = (v0 < 0x1000) ? 1 : 0;
0x0000144c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00001450 beqz v0, 0x1b20 | goto label_34;
| }
0x00001454 lw t9, -0x7f30(gp) | t9 = sym.imp.apr_pstrdup;
0x00001458 lw a0, 0x20(sp) | a0 = *(var_20h);
0x0000145c move a1, s3 | a1 = s3;
0x00001460 jalr t9 | t9 ();
0x00001464 addiu s1, s1, 1 | s1++;
0x00001468 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000146c sw v0, 0x28(sp) | *(var_28h) = v0;
0x00001470 b 0x137c |
| } while (1);
| label_30:
0x00001474 lw t9, -0x7f38(gp) | t9 = sym.imp.strlen;
0x00001478 move a0, s1 | a0 = s1;
0x0000147c jalr t9 | t9 ();
0x00001480 sltiu v0, v0, 0x100 | v0 = (v0 < 0x100) ? 1 : 0;
0x00001484 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00001488 beqz v0, 0x1bc4 | goto label_35;
| }
0x0000148c lw t9, -0x7f30(gp) | t9 = sym.imp.apr_pstrdup;
0x00001490 lw a0, 0x20(sp) | a0 = *(var_20h);
0x00001494 move a1, s1 | a1 = s1;
0x00001498 jalr t9 | t9 ();
0x0000149c sw v0, 0x58(sp) | *(var_58h) = v0;
0x000014a0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000014a4 b 0x13e4 | goto label_1;
| label_31:
0x000014a8 lw a3, 0x40(sp) | a3 = *(var_40h);
0x000014ac lw a1, 0x28(sp) | a1 = *(var_28h);
0x000014b0 ori a2, zero, 0x8000 | a2 = 0x8000;
0x000014b4 move a0, s2 | a0 = s2;
0x000014b8 jalr t9 | t9 ();
0x000014bc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000014c0 bnez v0, 0x150c |
0x000014c4 lw v1, 0x74(sp) | v1 = *(var_74h);
0x000014c8 addiu v0, zero, 1 | v0 = 1;
0x000014cc andi v0, s0, 1 | v0 = s0 & 1;
| if (v1 != v0) {
0x000014d0 bne v1, v0, 0x1510 | goto label_36;
| }
0x000014d4 lw a0, 0x40(sp) | a0 = *(var_40h);
| if (s4 == 0) {
0x000014d8 beqz s4, 0x1a1c | goto label_37;
| }
0x000014dc lw t9, -0x7fd8(gp) | t9 = *((gp - 8182));
0x000014e0 lw a1, 0x28(sp) | a1 = *(var_28h);
0x000014e4 addiu t9, t9, 0x1ec4 | t9 += fcn.00001ec4;
0x000014e8 addiu a2, zero, 1 | a2 = 1;
0x000014ec bal 0x1ec4 | fcn_00001ec4 ();
0x000014f0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000014f4 beqz v0, 0x1c3c | goto label_38;
| }
0x000014f8 andi v0, s0, 0xc | v0 = s0 & 0xc;
0x000014fc andi v0, s0, 1 | v0 = s0 & 1;
| if (v0 != 0) {
0x00001500 bnez v0, 0x1624 | goto label_39;
| }
0x00001504 addiu s1, zero, 1 | s1 = 1;
0x00001508 b 0x1558 | goto label_13;
| }
0x0000150c andi v0, s0, 1 | v0 = s0 & 1;
| label_36:
0x00001510 lw t9, -0x7fd8(gp) | t9 = *((gp - 8182));
| if (v0 == 0) {
0x00001514 beqz v0, 0x1b50 | goto label_40;
| }
0x00001518 lw a0, 0x40(sp) | a0 = *(var_40h);
0x0000151c lw a1, 0x28(sp) | a1 = *(var_28h);
0x00001520 addiu t9, t9, 0x1ec4 | t9 += fcn.00001ec4;
0x00001524 addiu a2, zero, 6 | a2 = 6;
0x00001528 bal 0x1ec4 | fcn_00001ec4 ();
0x0000152c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00001530 bnez v0, 0x13ec | goto label_2;
| }
0x00001534 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001538 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x0000153c lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001540 lw a0, (v0) | a0 = *(v0);
0x00001544 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001548 lw a3, 0x28(sp) | a3 = *(var_28h);
0x0000154c addiu a1, a1, 0x341c | a1 += str._s:_cannot_create_file__s_n;
0x00001550 lw a2, (v0) | a2 = *(v0);
0x00001554 b 0x1b70 | goto label_17;
| label_13:
0x00001558 lw t9, -0x7fc8(gp) | t9 = sym.mkhash;
0x0000155c addiu v0, zero, 0x100 | v0 = 0x100;
0x00001560 addiu s7, sp, 0x1e4 | s7 = sp + 0x1e4;
0x00001564 addiu a0, sp, 0x48 | a0 = sp + 0x48;
0x00001568 sw s7, 0x50(sp) | *(var_50h) = s7;
0x0000156c sw v0, 0x54(sp) | *(var_54h) = v0;
0x00001570 bal 0x2484 | sym_mkhash ();
0x00001574 move fp, v0 | fp = v0;
0x00001578 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0000157c beqz v0, 0x1700 | goto label_41;
| }
0x00001580 sw zero, 0x50(sp) | *(var_50h) = 0;
0x00001584 sw zero, 0x54(sp) | *(var_54h) = 0;
| label_15:
0x00001588 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000158c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001590 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001594 lw a0, (v0) | a0 = *(v0);
0x00001598 lw v0, 0x34(sp) | v0 = *(var_34h);
0x0000159c lw a3, 0x4c(sp) | a3 = *(var_4ch);
0x000015a0 addiu a1, a1, 0x32bc | a1 += str._s:__s_n;
0x000015a4 lw a2, (v0) | a2 = *(v0);
0x000015a8 jalr t9 | t9 ();
0x000015ac lw gp, 0x18(sp) | gp = *(var_18h);
0x000015b0 lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x000015b4 move a0, fp | a0 = fp;
0x000015b8 jalr t9 | t9 ();
| label_32:
0x000015bc move s1, zero | s1 = 0;
0x000015c0 lw t9, -0x7f08(gp) | t9 = sym.imp.apr_temp_dir_get;
| label_14:
0x000015c4 lw a1, 0x40(sp) | a1 = *(var_40h);
| label_5:
0x000015c8 lw a0, 0x2c(sp) | a0 = *(var_2ch);
0x000015cc jalr t9 | t9 ();
0x000015d0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000015d4 bnez v0, 0x1be8 | goto label_42;
| }
0x000015d8 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x000015dc lw t9, -0x7f44(gp) | t9 = sym.imp.apr_psprintf
0x000015e0 lw a2, 0x44(sp) | a2 = *(var_44h);
0x000015e4 lw a0, 0x40(sp) | a0 = *(var_40h);
0x000015e8 addiu a3, sp, 0xd0 | a3 = sp + 0xd0;
0x000015ec addiu a1, a1, 0x347c | a1 += str._s__s;
0x000015f0 jalr t9 | t9 ();
0x000015f4 lw gp, 0x18(sp) | gp = *(var_18h);
0x000015f8 lw a3, 0x40(sp) | a3 = *(var_40h);
0x000015fc move a2, zero | a2 = 0;
0x00001600 lw t9, -0x7eec(gp) | t9 = sym.imp.apr_file_mktemp;
0x00001604 lw a0, -0x7fc4(gp) | a0 = *(gp);
0x00001608 move a1, v0 | a1 = v0;
0x0000160c sw v0, 0x44(sp) | *(var_44h) = v0;
0x00001610 jalr t9 | t9 ();
0x00001614 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00001618 bnez v0, 0x1c18 | goto label_43;
| }
| label_4:
0x0000161c andi v0, s0, 1 | v0 = s0 & 1;
| if (s1 != 0) {
0x00001620 beqz s1, 0x162c |
| label_39:
0x00001624 lw v0, 0x40(sp) | v0 = *(var_40h);
| if (v0 == 0) {
0x00001628 beqz v0, 0x176c | goto label_44;
| }
| }
0x0000162c lw s5, -0x7fdc(gp) | s5 = *(gp);
| label_8:
0x00001630 andi s0, s0, 4 | s0 &= 4;
0x00001634 lw a0, (s5) | a0 = *(s5);
| if (s0 != 0) {
0x00001638 bnez s0, 0x140c | goto label_3;
| }
0x0000163c lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
| if (s4 != 0) {
0x00001640 bnez s4, 0x1afc | goto label_33;
| }
0x00001644 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001648 addiu a1, a1, 0x3590 | a1 += str.Adding_;
0x0000164c jalr t9 | t9 ();
0x00001650 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001654 lw a1, 0x50(sp) | a1 = *(var_50h);
0x00001658 lw v0, -0x7fc4(gp) | v0 = *(gp);
0x0000165c lw t9, -0x7fc0(gp) | t9 = sym.putline;
0x00001660 lw a0, (v0) | a0 = *(v0);
0x00001664 bal 0x213c | sym_putline ();
0x00001668 lw gp, 0x18(sp) | gp = *(var_18h);
| label_9:
0x0000166c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001670 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001674 lw a0, (s5) | a0 = *(s5);
0x00001678 move a2, s3 | a2 = s3;
0x0000167c addiu a1, a1, 0x35b8 | a1 += str.password_for_user__s_n;
0x00001680 jalr t9 | t9 ();
0x00001684 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001688 lw a3, 0x40(sp) | a3 = *(var_40h);
0x0000168c lw a0, 0x44(sp) | a0 = *(var_44h);
0x00001690 lw t9, -0x7f90(gp) | t9 = sym.imp.apr_file_copy;
0x00001694 lw a1, 0x28(sp) | a1 = *(var_28h);
0x00001698 addiu a2, zero, 0xfff | a2 = 0xfff;
0x0000169c jalr t9 | t9 ();
0x000016a0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000016a4 bnez v0, 0x1b88 | goto label_45;
| }
0x000016a8 lw v0, -0x7fc4(gp) | v0 = *(gp);
0x000016ac lw t9, -0x7f2c(gp) | t9 = sym.imp.apr_file_close;
0x000016b0 lw a0, (v0) | a0 = *(v0);
0x000016b4 jalr t9 | t9 ();
0x000016b8 lw v0, 0x30(sp) | v0 = *(var_30h);
0x000016bc lw a0, 0x2e4(sp) | a0 = *(var_2e4h);
0x000016c0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000016c4 lw v1, (v0) | v1 = *(v0);
0x000016c8 move v0, zero | v0 = 0;
| if (a0 != v1) {
0x000016cc bne a0, v1, 0x1ba8 | goto label_46;
| }
0x000016d0 lw ra, 0x30c(sp) | ra = *(var_30ch);
0x000016d4 lw fp, 0x308(sp) | fp = *(var_308h);
0x000016d8 lw s7, 0x304(sp) | s7 = *(var_304h);
0x000016dc lw s6, 0x300(sp) | s6 = *(var_300h);
0x000016e0 lw s5, 0x2fc(sp) | s5 = *(var_2fch);
0x000016e4 lw s4, 0x2f8(sp) | s4 = *(var_2f8h);
0x000016e8 lw s3, 0x2f4(sp) | s3 = *(var_2f4h);
0x000016ec lw s2, 0x2f0(sp) | s2 = *(var_2f0h);
0x000016f0 lw s1, 0x2ec(sp) | s1 = *(var_2ech);
0x000016f4 lw s0, 0x2e8(sp) | s0 = *(var_2e8h);
0x000016f8 addiu sp, sp, 0x310 |
0x000016fc jr ra | return v0;
| label_41:
0x00001700 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00001704 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00001708 lw t9, -0x7f6c(gp) | t9 = sym.imp.apr_pstrcat;
0x0000170c lw a0, 0x48(sp) | a0 = *(var_48h);
0x00001710 addiu v0, v0, 0x3368 | v0 += 0x3368;
0x00001714 move a3, s7 | a3 = s7;
0x00001718 addiu a2, a2, 0x3438 | a2 += 0x3438;
0x0000171c move a1, s3 | a1 = s3;
0x00001720 sw zero, 0x14(sp) | *(var_14h) = 0;
0x00001724 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00001728 jalr t9 | t9 ();
0x0000172c lw gp, 0x18(sp) | gp = *(var_18h);
0x00001730 move a0, v0 | a0 = v0;
0x00001734 sw v0, 0x50(sp) | *(var_50h) = v0;
0x00001738 lw t9, -0x7f38(gp) | t9 = sym.imp.strlen;
0x0000173c move s7, v0 | s7 = v0;
0x00001740 jalr t9 | t9 ();
0x00001744 sltiu v1, v0, 0x100 | v1 = (v0 < 0x100) ? 1 : 0;
0x00001748 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000174c sw v0, 0x54(sp) | *(var_54h) = v0;
| if (v1 == 0) {
0x00001750 beqz v1, 0x1a4c | goto label_47;
| }
0x00001754 lw t9, -0x7f1c(gp) | t9 = sym.imp.puts;
| if (s5 != 0) {
0x00001758 bnez s5, 0x1a04 | goto label_48;
| }
0x0000175c lw t9, -0x7f08(gp) | t9 = sym.imp.apr_temp_dir_get;
| if (s4 != 0) {
0x00001760 bnez s4, 0x161c | goto label_4;
| }
0x00001764 lw a1, 0x40(sp) | a1 = *(var_40h);
0x00001768 b 0x15c8 | goto label_5;
| label_44:
0x0000176c lw t9, -0x7f60(gp) | t9 = sym.imp.apr_file_open;
0x00001770 lw a1, 0x28(sp) | a1 = *(var_28h);
0x00001774 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00001778 addiu a3, zero, 0xfff | a3 = 0xfff;
0x0000177c addiu a2, zero, 0x81 | a2 = 0x81;
0x00001780 addiu a0, sp, 0x3c | a0 = sp + 0x3c;
0x00001784 jalr t9 | t9 ();
0x00001788 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0000178c bnez v0, 0x1cc8 | goto label_49;
| }
0x00001790 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00001794 lw s7, -0x7fd8(gp) | s7 = *((gp - 8182));
0x00001798 sw v0, 0x24(sp) | *(var_24h) = v0;
0x0000179c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x000017a0 lw s5, -0x7fdc(gp) | s5 = *(gp);
0x000017a4 addiu v0, v0, 0x3570 | v0 += str.Updating_;
0x000017a8 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x000017ac addiu v0, s7, 0x3514 | v0 = s7 + 0x3514;
0x000017b0 move s1, zero | s1 = 0;
0x000017b4 addiu fp, sp, 0xe4 | fp = sp + 0xe4;
0x000017b8 sw v0, 0x20(sp) | *(var_20h) = v0;
| label_6:
0x000017bc lw t9, -0x7f70(gp) | t9 = sym.imp.apr_file_gets;
0x000017c0 lw a2, 0x3c(sp) | a2 = *(var_3ch);
0x000017c4 addiu a1, zero, 0x100 | a1 = 0x100;
0x000017c8 move a0, fp | a0 = fp;
0x000017cc jalr t9 | t9 ();
0x000017d0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000017d4 bnez v0, 0x1954 | goto label_50;
| }
| label_7:
0x000017d8 lw t9, -0x7f58(gp) | t9 = sym.imp.__strcpy_chk;
0x000017dc addiu s6, sp, 0x1e4 | s6 = sp + 0x1e4;
0x000017e0 move a1, fp | a1 = fp;
0x000017e4 addiu a2, zero, 0x100 | a2 = 0x100;
0x000017e8 move a0, s6 | a0 = s6;
0x000017ec jalr t9 | t9 ();
0x000017f0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000017f4 lw t9, -0x7f94(gp) | t9 = sym.imp.__ctype_b_loc;
0x000017f8 jalr t9 | t9 ();
0x000017fc nop |
0x00001800 lw a1, (v0) | a1 = *(v0);
0x00001804 lw gp, 0x18(sp) | gp = *(var_18h);
| do {
0x00001808 lb a0, (s6) | a0 = *(s6);
0x0000180c andi v0, a0, 0xff | v0 = a0 & 0xff;
0x00001810 sll v0, v0, 1 | v0 <<= 1;
0x00001814 addu v0, a1, v0 | v0 = a1 + v0;
0x00001818 lhu v0, (v0) | v0 = *(v0);
0x0000181c andi v0, v0, 0x2000 | v0 &= 0x2000;
0x00001820 addiu s6, s6, 1 | s6++;
0x00001824 bnel v0, zero, 0x1808 |
| } while (v0 == 0);
0x00001828 addiu v0, zero, 0x23 | v0 = 0x23;
| if (a0 == 0) {
0x0000182c beqz a0, 0x1920 | goto label_51;
| }
0x00001830 lw t9, -0x7f34(gp) | t9 = sym.imp.strchr;
| if (a0 == v0) {
0x00001834 beq a0, v0, 0x1920 | goto label_51;
| }
0x00001838 addiu a1, zero, 0x3a | a1 = 0x3a;
0x0000183c move a0, s6 | a0 = s6;
0x00001840 jalr t9 | t9 ();
0x00001844 move s7, v0 | s7 = v0;
0x00001848 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0000184c beqz v0, 0x1c88 | goto label_52;
| }
0x00001850 lw t9, -0x7ed4(gp) | t9 = sym.imp.strcmp;
0x00001854 sb zero, (v0) | *(v0) = 0;
0x00001858 move a1, s6 | a1 = s6;
0x0000185c move a0, s3 | a0 = s3;
0x00001860 jalr t9 | t9 ();
0x00001864 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00001868 bnez v0, 0x1920 | goto label_51;
| }
0x0000186c andi v0, s0, 4 | v0 = s0 & 4;
0x00001870 addiu s1, s1, 1 | s1++;
| if (v0 != 0) {
0x00001874 bnez v0, 0x1984 | goto label_53;
| }
0x00001878 lw t9, -0x7ee8(gp) | t9 = sym.imp.strcspn;
| if (s4 == 0) {
0x0000187c beqz s4, 0x19a0 | goto label_54;
| }
0x00001880 addiu s7, s7, 1 | s7++;
0x00001884 lw a1, 0x20(sp) | a1 = *(var_20h);
0x00001888 move a0, s7 | a0 = s7;
0x0000188c jalr t9 | t9 ();
0x00001890 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00001894 beqz v0, 0x1c60 | goto label_55;
| }
0x00001898 addu v0, s7, v0 | v0 = s7 + v0;
0x0000189c lw a0, 0x58(sp) | a0 = *(var_58h);
0x000018a0 sb zero, (v0) | *(v0) = 0;
| if (a0 == 0) {
0x000018a4 beqz a0, 0x19d0 | goto label_56;
| }
| label_12:
0x000018a8 lw t9, -0x7f10(gp) | t9 = sym.imp.apr_password_validate;
0x000018ac move a1, s7 | a1 = s7;
0x000018b0 jalr t9 | t9 ();
0x000018b4 sw v0, 0x68(sp) | *(var_68h) = v0;
0x000018b8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000018bc beqz v0, 0x17bc | goto label_6;
| }
0x000018c0 lui v1, 1 | v1 = 0x11188;
0x000018c4 addiu v1, v1, 0x1188 |
0x000018c8 lw t9, -0x7f44(gp) | t9 = sym.imp.apr_psprintf
| if (v0 == v1) {
0x000018cc beq v0, v1, 0x19f0 | goto label_57;
| }
0x000018d0 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x000018d4 lw a0, 0x48(sp) | a0 = *(var_48h);
0x000018d8 move a2, s2 | a2 = s2;
0x000018dc addiu a1, a1, 0x3550 | a1 += str.Could_not_verify_password:__pm;
0x000018e0 jalr t9 | t9 ();
0x000018e4 lw gp, 0x18(sp) | gp = *(var_18h);
0x000018e8 sw v0, 0x4c(sp) | *(var_4ch) = v0;
0x000018ec addiu v1, zero, 9 | v1 = 9;
| label_11:
0x000018f0 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x000018f4 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x000018f8 lw a0, (s5) | a0 = *(s5);
0x000018fc lw a2, 0x4c(sp) | a2 = *(var_4ch);
0x00001900 sw v1, 0x20(sp) | *(var_20h) = v1;
0x00001904 addiu a1, a1, 0x32c0 | a1 += 0x32c0;
0x00001908 jalr t9 | t9 ();
0x0000190c lw gp, 0x18(sp) | gp = *(var_18h);
0x00001910 lw v1, 0x20(sp) | v1 = *(var_20h);
0x00001914 lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001918 move a0, v1 | a0 = v1;
0x0000191c jalr t9 | t9 ();
| label_51:
0x00001920 lw v0, -0x7fc4(gp) | v0 = *(gp);
0x00001924 lw t9, -0x7fc0(gp) | t9 = sym.putline;
0x00001928 move a1, fp | a1 = fp;
0x0000192c lw a0, (v0) | a0 = *(v0);
0x00001930 bal 0x213c | sym_putline ();
0x00001934 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001938 lw a2, 0x3c(sp) | a2 = *(var_3ch);
0x0000193c addiu a1, zero, 0x100 | a1 = 0x100;
0x00001940 lw t9, -0x7f70(gp) | t9 = sym.imp.apr_file_gets;
0x00001944 move a0, fp | a0 = fp;
0x00001948 jalr t9 | t9 ();
0x0000194c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00001950 beqz v0, 0x17d8 | goto label_7;
| }
| label_50:
0x00001954 lw t9, -0x7f2c(gp) | t9 = sym.imp.apr_file_close;
0x00001958 lw a0, 0x3c(sp) | a0 = *(var_3ch);
0x0000195c jalr t9 | t9 ();
0x00001960 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s1 == 0) {
0x00001964 beqz s1, 0x1630 | goto label_8;
| }
0x00001968 lw a0, (s5) | a0 = *(s5);
| if (s4 == 0) {
0x0000196c beqz s4, 0x166c | goto label_9;
| }
0x00001970 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001974 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001978 move a2, s3 | a2 = s3;
0x0000197c addiu a1, a1, 0x3598 | a1 += str.Password_for_user__s_correct._n;
0x00001980 b 0x141c | goto label_10;
| label_53:
0x00001984 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00001988 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x0000198c lw a0, (s5) | a0 = *(s5);
0x00001990 addiu a1, v0, 0x3508 | a1 = v0 + str.Deleting_;
0x00001994 jalr t9 | t9 ();
0x00001998 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000199c b 0x17bc | goto label_6;
| label_54:
0x000019a0 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x000019a4 lw a0, (s5) | a0 = *(s5);
0x000019a8 lw a1, 0x2c(sp) | a1 = *(var_2ch);
0x000019ac jalr t9 | t9 ();
0x000019b0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000019b4 lw a1, 0x50(sp) | a1 = *(var_50h);
0x000019b8 lw v0, -0x7fc4(gp) | v0 = *(gp);
0x000019bc lw t9, -0x7fc0(gp) | t9 = sym.putline;
0x000019c0 lw a0, (v0) | a0 = *(v0);
0x000019c4 bal 0x213c | sym_putline ();
0x000019c8 lw gp, 0x18(sp) | gp = *(var_18h);
0x000019cc b 0x17bc | goto label_6;
| label_56:
0x000019d0 lw t9, -0x7fbc(gp) | t9 = sym.get_password;
0x000019d4 addiu a0, sp, 0x48 | a0 = sp + 0x48;
0x000019d8 bal 0x21f4 | sym_get_password ();
0x000019dc move v1, v0 | v1 = v0;
0x000019e0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000019e4 bnez v0, 0x18f0 | goto label_11;
| }
0x000019e8 lw a0, 0x58(sp) | a0 = *(var_58h);
0x000019ec b 0x18a8 | goto label_12;
| label_57:
0x000019f0 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x000019f4 addiu v1, zero, 3 | v1 = 3;
0x000019f8 addiu v0, v0, 0x3530 | v0 += str.password_verification_failed;
0x000019fc sw v0, 0x4c(sp) | *(var_4ch) = v0;
0x00001a00 b 0x18f0 | goto label_11;
| label_48:
0x00001a04 move a0, s7 | a0 = s7;
0x00001a08 jalr t9 | t9 ();
0x00001a0c lw gp, 0x18(sp) | gp = *(var_18h);
0x00001a10 lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001a14 move a0, zero | a0 = 0;
0x00001a18 jalr t9 | t9 ();
| label_37:
0x00001a1c lw t9, -0x7fd8(gp) | t9 = *((gp - 8182));
0x00001a20 lw a1, 0x28(sp) | a1 = *(var_28h);
0x00001a24 addiu t9, t9, 0x1ec4 | t9 += fcn.00001ec4;
0x00001a28 addiu a2, zero, 3 | a2 = 3;
0x00001a2c bal 0x1ec4 | fcn_00001ec4 ();
0x00001a30 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00001a34 beqz v0, 0x1cec | goto label_58;
| }
0x00001a38 andi v0, s0, 0xc | v0 = s0 & 0xc;
0x00001a3c addiu s1, zero, 1 | s1 = 1;
| if (v0 == 0) {
0x00001a40 beqz v0, 0x1558 | goto label_13;
| }
0x00001a44 lw t9, -0x7f08(gp) | t9 = sym.imp.apr_temp_dir_get;
0x00001a48 b 0x15c4 | goto label_14;
| label_47:
0x00001a4c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00001a50 addiu fp, zero, 5 | fp = 5;
0x00001a54 addiu v0, v0, 0x343c | v0 += str.resultant_record_too_long;
0x00001a58 sw v0, 0x4c(sp) | *(var_4ch) = v0;
0x00001a5c b 0x1588 | goto label_15;
| label_25:
0x00001a60 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001a64 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001a68 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001a6c lw a0, (v0) | a0 = *(v0);
0x00001a70 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00001a74 addiu a1, a1, 0x32d4 | a1 += str._s:_only_one_of__c__n__v__D_may_be_specified_n;
0x00001a78 lw a2, (v0) | a2 = *(v0);
0x00001a7c jalr t9 | t9 ();
0x00001a80 lw gp, 0x18(sp) | gp = *(var_18h);
| label_18:
0x00001a84 lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001a88 addiu a0, zero, 2 | a0 = 2;
0x00001a8c jalr t9 | t9 ();
| label_28:
0x00001a90 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001a94 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001a98 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001a9c lw a0, (v0) | a0 = *(v0);
0x00001aa0 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00001aa4 addiu a3, zero, 0xff | a3 = 0xff;
0x00001aa8 addiu a1, a1, 0x331c | a1 += str._s:_username_too_long_____d__n;
0x00001aac lw a2, (v0) | a2 = *(v0);
| label_16:
0x00001ab0 jalr t9 | t9 ();
0x00001ab4 nop |
0x00001ab8 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001abc lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001ac0 addiu a0, zero, 5 | a0 = 5;
0x00001ac4 jalr t9 | t9 ();
| label_29:
0x00001ac8 lw v1, -0x7fdc(gp) | v1 = *(gp);
0x00001acc lb a3, (v0) | a3 = *(v0);
0x00001ad0 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00001ad4 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001ad8 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001adc lw a0, (v1) | a0 = *(v1);
0x00001ae0 lw a2, (v0) | a2 = *(v0);
0x00001ae4 addiu a1, a1, 0x333c | a1 += str._s:_username_contains_illegal_character__c_n;
0x00001ae8 jalr t9 | t9 ();
0x00001aec lw gp, 0x18(sp) | gp = *(var_18h);
0x00001af0 lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001af4 addiu a0, zero, 6 | a0 = 6;
0x00001af8 jalr t9 | t9 ();
| label_33:
0x00001afc lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001b00 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001b04 move a2, s3 | a2 = s3;
0x00001b08 addiu a1, a1, 0x357c | a1 += str.User__s_not_found_n;
0x00001b0c jalr t9 | t9 ();
0x00001b10 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001b14 lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001b18 addiu a0, zero, 6 | a0 = 6;
0x00001b1c jalr t9 | t9 ();
| label_34:
0x00001b20 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001b24 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001b28 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001b2c lw a0, (v0) | a0 = *(v0);
0x00001b30 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00001b34 addiu a1, a1, 0x3304 | a1 += str._s:_filename_too_long_n;
0x00001b38 lw a2, (v0) | a2 = *(v0);
0x00001b3c jalr t9 | t9 ();
0x00001b40 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001b44 lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001b48 addiu a0, zero, 5 | a0 = 5;
0x00001b4c jalr t9 | t9 ();
| label_40:
0x00001b50 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001b54 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001b58 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001b5c lw a0, (v0) | a0 = *(v0);
0x00001b60 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001b64 lw a3, 0x28(sp) | a3 = *(var_28h);
0x00001b68 addiu a1, a1, 0x33e8 | a1 += str._s:_cannot_modify_file__s__use__c_to_create_it_n;
0x00001b6c lw a2, (v0) | a2 = *(v0);
| do {
| label_17:
0x00001b70 jalr t9 | t9 ();
0x00001b74 nop |
0x00001b78 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001b7c lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001b80 addiu a0, zero, 1 | a0 = 1;
0x00001b84 jalr t9 | t9 ();
| label_45:
0x00001b88 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001b8c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001b90 lw a0, (s5) | a0 = *(s5);
0x00001b94 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001b98 lw a2, (v0) | a2 = *(v0);
0x00001b9c lw a3, 0x28(sp) | a3 = *(var_28h);
0x00001ba0 addiu a1, a1, 0x35d0 | a1 += str._s:_unable_to_update_file__s_n;
0x00001ba4 b 0x1b70 |
| } while (1);
| label_46:
0x00001ba8 lw t9, -0x7f14(gp) | t9 = sym.imp.__stack_chk_fail;
0x00001bac jalr t9 | t9 ();
0x00001bb0 nop |
| label_24:
0x00001bb4 lw t9, -0x7fd8(gp) | t9 = *((gp - 8182));
0x00001bb8 addiu t9, t9, 0x1e80 | t9 += fcn.00001e80;
0x00001bbc bal 0x1e80 | fcn_00001e80 ();
0x00001bc0 nop |
| label_35:
0x00001bc4 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001bc8 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001bcc lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001bd0 lw a0, (v0) | a0 = *(v0);
0x00001bd4 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00001bd8 addiu a3, zero, 0x100 | a3 = 0x100;
0x00001bdc addiu a1, a1, 0x336c | a1 += str._s:_password_too_long_____d__n;
0x00001be0 lw a2, (v0) | a2 = *(v0);
0x00001be4 b 0x1ab0 | goto label_16;
| label_42:
0x00001be8 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001bec lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001bf0 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001bf4 lw a0, (v0) | a0 = *(v0);
0x00001bf8 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001bfc addiu a1, a1, 0x3458 | a1 += str._s:_could_not_determine_temp_dir_n;
0x00001c00 lw a2, (v0) | a2 = *(v0);
0x00001c04 jalr t9 | t9 ();
0x00001c08 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001c0c lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001c10 addiu a0, zero, 1 | a0 = 1;
0x00001c14 jalr t9 | t9 ();
| label_43:
0x00001c18 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001c1c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001c20 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001c24 lw a0, (v0) | a0 = *(v0);
0x00001c28 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001c2c lw a3, 0x44(sp) | a3 = *(var_44h);
0x00001c30 addiu a1, a1, 0x3484 | a1 += str._s:_unable_to_create_temporary_file__s_n;
0x00001c34 lw a2, (v0) | a2 = *(v0);
0x00001c38 b 0x1b70 | goto label_17;
| label_38:
0x00001c3c lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001c40 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001c44 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001c48 lw a0, (v0) | a0 = *(v0);
0x00001c4c lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001c50 lw a3, 0x28(sp) | a3 = *(var_28h);
0x00001c54 addiu a1, a1, 0x33bc | a1 += str._s:_cannot_open_file__s_for_read_access_n;
0x00001c58 lw a2, (v0) | a2 = *(v0);
0x00001c5c b 0x1b70 | goto label_17;
| label_55:
0x00001c60 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001c64 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001c68 lw a0, (s5) | a0 = *(s5);
0x00001c6c move a2, s3 | a2 = s3;
0x00001c70 addiu a1, a1, 0x3518 | a1 += str.Empty_hash_for_user__s_n;
0x00001c74 jalr t9 | t9 ();
0x00001c78 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001c7c lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001c80 addiu a0, zero, 7 | a0 = 7;
0x00001c84 jalr t9 | t9 ();
| label_52:
0x00001c88 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001c8c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001c90 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001c94 lw a0, (s5) | a0 = *(s5);
0x00001c98 lw a2, (v0) | a2 = *(v0);
0x00001c9c lw a3, 0x28(sp) | a3 = *(var_28h);
0x00001ca0 addiu a1, a1, 0x34c8 | a1 += str._s:_The_file__s_does_not_appear_to_be_a_valid_htpasswd_file._n;
0x00001ca4 jalr t9 | t9 ();
0x00001ca8 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001cac lw t9, -0x7f2c(gp) | t9 = sym.imp.apr_file_close;
0x00001cb0 lw a0, 0x3c(sp) | a0 = *(var_3ch);
0x00001cb4 jalr t9 | t9 ();
0x00001cb8 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001cbc lw t9, -0x7f28(gp) | t9 = sym.imp.exit;
0x00001cc0 addiu a0, zero, 7 | a0 = 7;
0x00001cc4 jalr t9 | t9 ();
| label_49:
0x00001cc8 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001ccc lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001cd0 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001cd4 lw a0, (v0) | a0 = *(v0);
0x00001cd8 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001cdc lw a3, 0x28(sp) | a3 = *(var_28h);
0x00001ce0 addiu a1, a1, 0x34ac | a1 += str._s:_unable_to_read_file__s_n;
0x00001ce4 lw a2, (v0) | a2 = *(v0);
0x00001ce8 b 0x1b70 | goto label_17;
| label_58:
0x00001cec lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00001cf0 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001cf4 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00001cf8 lw a0, (v0) | a0 = *(v0);
0x00001cfc lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001d00 lw a3, 0x28(sp) | a3 = *(var_28h);
0x00001d04 addiu a1, a1, 0x338c | a1 += str._s:_cannot_open_file__s_for_read_write_access_n;
0x00001d08 lw a2, (v0) | a2 = *(v0);
0x00001d0c b 0x1b70 | goto label_17;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/htpasswd @ 0x21f4 */
| #include <stdint.h>
|
; (fcn) sym.get_password () | void get_password () {
0x000021f4 lui gp, 2 |
0x000021f8 addiu gp, gp, -0x61e4 |
0x000021fc addu gp, gp, t9 | gp += t9;
0x00002200 addiu sp, sp, -0x140 |
0x00002204 addiu v1, zero, 2 | v1 = 2;
0x00002208 sw s1, 0x12c(sp) | *(var_12ch) = s1;
0x0000220c lw s1, -0x7f04(gp) | s1 = *((gp - 8129));
0x00002210 sw s0, 0x128(sp) | *(var_128h) = s0;
0x00002214 move s0, a0 | s0 = a0;
0x00002218 lw a0, (s1) | a0 = *(s1);
0x0000221c lw v0, 0x1c(s0) | v0 = *((s0 + 7));
0x00002220 sw gp, 0x10(sp) | *(var_10h_2) = gp;
0x00002224 sw ra, 0x13c(sp) | *(var_13ch) = ra;
0x00002228 sw s4, 0x138(sp) | *(var_138h) = s4;
0x0000222c sw s3, 0x134(sp) | *(var_134h) = s3;
0x00002230 sw s2, 0x130(sp) | *(var_130h) = s2;
0x00002234 sw a0, 0x124(sp) | *(var_124h) = a0;
0x00002238 addiu v1, zero, 3 | v1 = 3;
| if (v0 == v1) {
0x0000223c beq v0, v1, 0x2348 | goto label_2;
| }
0x00002240 lw t9, -0x7f18(gp) | t9 = sym.imp.apr_password_get;
| if (v0 == v1) {
0x00002244 beq v0, v1, 0x22f8 | goto label_3;
| }
0x00002248 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x0000224c addiu s4, sp, 0x1c | s4 = sp + 0x1c;
0x00002250 addiu s2, sp, 0x20 | s2 = sp + 0x20;
0x00002254 addiu s3, zero, 0x101 | s3 = 0x101;
0x00002258 move a2, s4 | a2 = s4;
0x0000225c move a1, s2 | a1 = s2;
0x00002260 addiu a0, a0, 0x3694 | a0 += str.New_password:_;
0x00002264 sw s3, 0x1c(sp) | *(var_1ch_4) = s3;
0x00002268 jalr t9 | t9 ();
0x0000226c lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 != 0) {
0x00002270 bnez v0, 0x2320 | goto label_0;
| }
0x00002274 lw t9, -0x7f30(gp) | t9 = sym.imp.apr_pstrdup;
0x00002278 lw a0, (s0) | a0 = *(s0);
0x0000227c move a1, s2 | a1 = s2;
0x00002280 jalr t9 | t9 ();
0x00002284 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002288 move a2, s4 | a2 = s4;
0x0000228c move a1, s2 | a1 = s2;
0x00002290 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00002294 lw t9, -0x7f18(gp) | t9 = sym.imp.apr_password_get;
0x00002298 addiu a0, a0, 0x36a4 | a0 += str.Re_type_new_password:_;
0x0000229c sw s3, 0x1c(sp) | *(var_1ch_4) = s3;
0x000022a0 sw v0, 0x10(s0) | *((s0 + 4)) = v0;
0x000022a4 sb zero, 0x20(sp) | *(var_20h_3) = 0;
0x000022a8 jalr t9 | t9 ();
0x000022ac lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000022b0 lw s3, 0x10(s0) | s3 = *((s0 + 4));
0x000022b4 move a1, s2 | a1 = s2;
0x000022b8 lw t9, -0x7ed4(gp) | t9 = sym.imp.strcmp;
0x000022bc move a0, s3 | a0 = s3;
0x000022c0 jalr t9 | t9 ();
0x000022c4 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 != 0) {
0x000022c8 bnez v0, 0x243c | goto label_4;
| }
| do {
| label_1:
0x000022cc lw a0, 0x124(sp) | a0 = *(var_124h);
0x000022d0 lw v1, (s1) | v1 = *(s1);
0x000022d4 lw ra, 0x13c(sp) | ra = *(var_13ch);
| if (a0 != v1) {
0x000022d8 bne a0, v1, 0x2478 | goto label_5;
| }
0x000022dc lw s4, 0x138(sp) | s4 = *(var_138h);
0x000022e0 lw s3, 0x134(sp) | s3 = *(var_134h);
0x000022e4 lw s2, 0x130(sp) | s2 = *(var_130h);
0x000022e8 lw s1, 0x12c(sp) | s1 = *(var_12ch);
0x000022ec lw s0, 0x128(sp) | s0 = *(var_128h);
0x000022f0 addiu sp, sp, 0x140 |
0x000022f4 jr ra | return v0;
| label_3:
0x000022f8 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x000022fc addiu v0, zero, 0x101 | v0 = 0x101;
0x00002300 addiu s2, sp, 0x20 | s2 = sp + 0x20;
0x00002304 addiu a2, sp, 0x1c | a2 = sp + 0x1c;
0x00002308 move a1, s2 | a1 = s2;
0x0000230c addiu a0, a0, 0x3680 | a0 += str.Enter_password:_;
0x00002310 sw v0, 0x1c(sp) | *(var_1ch_4) = v0;
0x00002314 jalr t9 | t9 ();
0x00002318 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 == 0) {
0x0000231c beqz v0, 0x2408 | goto label_6;
| }
| label_0:
0x00002320 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00002324 lw t9, -0x7f44(gp) | t9 = sym.imp.apr_psprintf
0x00002328 lw a0, (s0) | a0 = *(s0);
0x0000232c addiu a2, zero, 0x100 | a2 = 0x100;
0x00002330 addiu a1, a1, 0x36d8 | a1 += str.password_too_long____u_;
0x00002334 jalr t9 | t9 ();
0x00002338 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x0000233c sw v0, 4(s0) | *((s0 + 1)) = v0;
0x00002340 addiu v0, zero, 5 | v0 = 5;
0x00002344 b 0x22cc |
| } while (1);
| label_2:
0x00002348 lw t9, -0x7ef4(gp) | t9 = sym.imp.apr_file_open_stdin;
0x0000234c lw a1, (s0) | a1 = *(s0);
0x00002350 addiu a0, sp, 0x18 | a0 = sp + 0x18;
0x00002354 jalr t9 | t9 ();
0x00002358 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 != 0) {
0x0000235c bnez v0, 0x2428 | goto label_7;
| }
0x00002360 lw t9, -0x7ee0(gp) | t9 = sym.imp.apr_file_read_full;
0x00002364 addiu s2, sp, 0x20 | s2 = sp + 0x20;
0x00002368 lw a0, 0x18(sp) | a0 = *(var_18h_2);
0x0000236c addiu a3, sp, 0x1c | a3 = sp + 0x1c;
0x00002370 addiu a2, zero, 0x100 | a2 = 0x100;
0x00002374 move a1, s2 | a1 = s2;
0x00002378 jalr t9 | t9 ();
0x0000237c lui v1, 1 | v1 = 0x1117e;
0x00002380 addiu v1, v1, 0x117e |
0x00002384 lw gp, 0x10(sp) | gp = *(var_10h_2);
| if (v0 != v1) {
0x00002388 bne v0, v1, 0x2320 | goto label_0;
| }
0x0000238c lw v0, 0x1c(sp) | v0 = *(var_1ch_4);
0x00002390 addiu v1, zero, 0x100 | v1 = 0x100;
0x00002394 addiu v1, sp, 0x128 | v1 = sp + 0x128;
| if (v0 == v1) {
0x00002398 beq v0, v1, 0x2320 | goto label_0;
| }
0x0000239c addu v1, v1, v0 | v1 += v0;
0x000023a0 sb zero, -0x108(v1) | *((v1 - 264)) = 0;
| if (v0 != 0) {
0x000023a4 beqz v0, 0x23ec |
0x000023a8 addiu a0, sp, 0x128 | a0 = sp + 0x128;
0x000023ac addiu v1, v0, -1 | v1 = v0 + -1;
0x000023b0 addu v1, a0, v1 | v1 = a0 + v1;
0x000023b4 addiu a0, zero, 0xa | a0 = 0xa;
0x000023b8 lb a1, -0x108(v1) | a1 = *((v1 - 264));
0x000023bc lw t9, -0x7f2c(gp) | t9 = sym.imp.apr_file_close;
| if (a1 != a0) {
0x000023c0 bne a1, a0, 0x23f0 | goto label_8;
| }
0x000023c4 sltiu a0, v0, 2 | a0 = (v0 < 2) ? 1 : 0;
0x000023c8 sb zero, -0x108(v1) | *((v1 - 264)) = 0;
| if (a0 != 0) {
0x000023cc bnez a0, 0x23f0 | goto label_8;
| }
0x000023d0 addiu v1, sp, 0x128 | v1 = sp + 0x128;
0x000023d4 addiu v0, v0, -2 | v0 += -2;
0x000023d8 addu v0, v1, v0 | v0 = v1 + v0;
0x000023dc addiu v1, zero, 0xd | v1 = 0xd;
0x000023e0 lb a0, -0x108(v0) | a0 = *((v0 - 264));
| if (a0 == v1) {
0x000023e4 beql a0, v1, 0x23f0 | goto label_8;
| }
0x000023e8 sb zero, -0x108(v0) | *((v0 - 264)) = 0;
| }
0x000023ec lw t9, -0x7f2c(gp) | t9 = sym.imp.apr_file_close;
| label_8:
0x000023f0 lw a0, 0x18(sp) | a0 = *(var_18h_2);
0x000023f4 jalr t9 | t9 ();
0x000023f8 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x000023fc lw a0, (s0) | a0 = *(s0);
0x00002400 lw t9, -0x7f30(gp) | t9 = sym.imp.apr_pstrdup;
0x00002404 b 0x2410 | goto label_9;
| label_6:
0x00002408 lw t9, -0x7f30(gp) | t9 = sym.imp.apr_pstrdup;
0x0000240c lw a0, (s0) | a0 = *(s0);
| label_9:
0x00002410 move a1, s2 | a1 = s2;
0x00002414 jalr t9 | t9 ();
0x00002418 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x0000241c sw v0, 0x10(s0) | *((s0 + 4)) = v0;
0x00002420 move v0, zero | v0 = 0;
0x00002424 b 0x22cc | goto label_1;
| label_7:
0x00002428 lw v1, -0x7fd8(gp) | v1 = *((gp - 8182));
0x0000242c addiu v0, zero, 9 | v0 = 9;
0x00002430 addiu v1, v1, 0x3664 | v1 += str.Unable_to_read_from_stdin.;
0x00002434 sw v1, 4(s0) | *((s0 + 1)) = v1;
0x00002438 b 0x22cc | goto label_1;
| label_4:
0x0000243c lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00002440 lw t9, -0x7f38(gp) | t9 = sym.imp.strlen;
0x00002444 addiu v0, v0, 0x36bc | v0 += str.password_verification_error;
0x00002448 move a0, s3 | a0 = s3;
0x0000244c sw v0, 4(s0) | *((s0 + 1)) = v0;
0x00002450 jalr t9 | t9 ();
0x00002454 lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002458 move a2, v0 | a2 = v0;
0x0000245c move a1, zero | a1 = 0;
0x00002460 lw t9, -0x7f50(gp) | t9 = sym.imp.memset;
0x00002464 move a0, s3 | a0 = s3;
0x00002468 jalr t9 | t9 ();
0x0000246c lw gp, 0x10(sp) | gp = *(var_10h_2);
0x00002470 addiu v0, zero, 3 | v0 = 3;
0x00002474 b 0x22cc | goto label_1;
| label_5:
0x00002478 lw t9, -0x7f14(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000247c jalr t9 | t9 ();
0x00002480 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/htpasswd @ 0x2484 */
| #include <stdint.h>
|
; (fcn) sym.mkhash () | void mkhash () {
0x00002484 lui gp, 2 |
0x00002488 addiu gp, gp, -0x6474 |
0x0000248c addu gp, gp, t9 | gp += t9;
0x00002490 addiu sp, sp, -0x58 |
0x00002494 lw v0, 0x18(a0) | v0 = *((a0 + 6));
0x00002498 sw s3, 0x48(sp) | *(var_48h) = s3;
0x0000249c lw s3, -0x7f04(gp) | s3 = *((gp - 8129));
0x000024a0 sw gp, 0x18(sp) | *(var_18h_3) = gp;
0x000024a4 sw s0, 0x3c(sp) | *(var_3ch) = s0;
0x000024a8 lw v1, (s3) | v1 = *(s3);
0x000024ac sw ra, 0x54(sp) | *(var_54h) = ra;
0x000024b0 sw s5, 0x50(sp) | *(var_50h) = s5;
0x000024b4 sw s4, 0x4c(sp) | *(var_4ch) = s4;
0x000024b8 sw s2, 0x44(sp) | *(var_44h) = s2;
0x000024bc sw s1, 0x40(sp) | *(var_40h) = s1;
0x000024c0 move s0, a0 | s0 = a0;
0x000024c4 sw v1, 0x34(sp) | *(var_34h) = v1;
| if (v0 != 0) {
0x000024c8 beql v0, zero, 0x2588 |
0x000024cc lw s1, 0x10(s0) | s1 = *((s0 + 4));
0x000024d0 lw v1, 0x14(a0) | v1 = *((a0 + 5));
0x000024d4 addiu v0, zero, 4 | v0 = 4;
0x000024d8 lw v0, -0x7fdc(gp) | v0 = *(gp);
| if (v1 == v0) {
0x000024dc bne v1, v0, 0x256c |
0x000024e0 lw s1, 0x10(a0) | s1 = *((a0 + 4));
0x000024e4 lw t9, -0x7fbc(gp) | t9 = sym.get_password;
| if (s1 == 0) {
0x000024e8 beqz s1, 0x2718 | goto label_2;
| }
0x000024ec lw t9, -0x7f7c(gp) | t9 = sym.imp.apr_generate_random_bytes;
0x000024f0 addiu s2, sp, 0x24 | s2 = sp + 0x24;
0x000024f4 addiu a1, zero, 0x10 | a1 = 0x10;
0x000024f8 move a0, s2 | a0 = s2;
0x000024fc jalr t9 | t9 ();
0x00002500 sw v0, 0x20(sp) | *(var_20h_2) = v0;
0x00002504 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 != 0) {
0x00002508 bnez v0, 0x2734 | goto label_3;
| }
0x0000250c lw a1, 0x18(s0) | a1 = *((s0 + 6));
0x00002510 lw v1, 0xc(s0) | v1 = *((s0 + 3));
| if (a1 != 0) {
0x00002514 bnel a1, zero, 0x2528 |
0x00002518 addiu v0, zero, 5 | v0 = 5;
0x0000251c sw v0, 0x18(s0) | *((s0 + 6)) = v0;
0x00002520 addiu a1, zero, 5 | a1 = 5;
0x00002524 lw v1, 0xc(s0) | v1 = *((s0 + 3));
| }
0x00002528 lw v0, 8(s0) | v0 = *((s0 + 2));
0x0000252c lw t9, -0x7f74(gp) | t9 = sym.imp.apr_bcrypt_encode;
0x00002530 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00002534 sw v0, 0x10(sp) | *(var_10h_5) = v0;
0x00002538 addiu a3, zero, 0x10 | a3 = 0x10;
0x0000253c move a2, s2 | a2 = s2;
0x00002540 move a0, s1 | a0 = s1;
0x00002544 jalr t9 | t9 ();
0x00002548 sw v0, 0x20(sp) | *(var_20h_2) = v0;
0x0000254c lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 != 0) {
0x00002550 bnez v0, 0x287c | goto label_4;
| }
0x00002554 lw t9, -0x7f38(gp) | t9 = sym.imp.strlen;
0x00002558 move a0, s1 | a0 = s1;
0x0000255c jalr t9 | t9 ();
0x00002560 move s2, zero | s2 = 0;
0x00002564 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00002568 b 0x25e0 | goto label_1;
| }
0x0000256c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00002570 lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x00002574 lw a0, (v0) | a0 = *(v0);
0x00002578 addiu a1, a1, 0x36f0 | a1 += str.Warning:_Ignoring__C_argument_for_this_algorithm._n;
0x0000257c jalr t9 | t9 ();
0x00002580 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00002584 lw s1, 0x10(s0) | s1 = *((s0 + 4));
| }
0x00002588 lw t9, -0x7fbc(gp) | t9 = sym.get_password;
| if (s1 == 0) {
0x0000258c beqz s1, 0x2718 | goto label_2;
| }
| label_0:
0x00002590 lw s2, 0x14(s0) | s2 = *((s0 + 5));
0x00002594 sltiu v0, s2, 5 | v0 = (s2 < 5) ? 1 : 0;
0x00002598 lw v1, -0x7fd8(gp) | v1 = *((gp - 8182));
| if (v0 == 0) {
0x0000259c beqz v0, 0x28d4 | goto label_5;
| }
0x000025a0 sll v0, s2, 2 | v0 = s2 << 2;
0x000025a4 addiu v1, v1, 0x3890 | v1 += 0x3890;
0x000025a8 lwx v0, v0(v1) | __asm ("lwx v0, v0(v1)");
0x000025ac addu v0, v0, gp | v0 += gp;
0x000025b0 jr v0 | v0 ();
0x000025b4 nop |
| label_1:
0x000025e0 lw t9, -0x7f50(gp) | t9 = sym.imp.memset;
0x000025e4 move a2, v0 | a2 = v0;
0x000025e8 move a1, zero | a1 = 0;
0x000025ec move a0, s1 | a0 = s1;
0x000025f0 jalr t9 | t9 ();
0x000025f4 lw gp, 0x18(sp) | gp = *(var_18h_3);
| do {
0x000025f8 lw a0, 0x34(sp) | a0 = *(var_34h);
0x000025fc lw v1, (s3) | v1 = *(s3);
0x00002600 move v0, s2 | v0 = s2;
| if (a0 != v1) {
0x00002604 bne a0, v1, 0x2900 | goto label_6;
| }
0x00002608 lw ra, 0x54(sp) | ra = *(var_54h);
0x0000260c lw s5, 0x50(sp) | s5 = *(var_50h);
0x00002610 lw s4, 0x4c(sp) | s4 = *(var_4ch);
0x00002614 lw s3, 0x48(sp) | s3 = *(var_48h);
0x00002618 lw s2, 0x44(sp) | s2 = *(var_44h);
0x0000261c lw s1, 0x40(sp) | s1 = *(var_40h);
0x00002620 lw s0, 0x3c(sp) | s0 = *(var_3ch);
0x00002624 addiu sp, sp, 0x58 |
0x00002628 jr ra | return v0;
| label_2:
0x00002718 move a0, s0 | a0 = s0;
0x0000271c bal 0x21f4 | sym_get_password ();
0x00002720 move s2, v0 | s2 = v0;
0x00002724 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00002728 bnez v0, 0x25f8 |
| } while (v0 != 0);
0x0000272c lw s1, 0x10(s0) | s1 = *((s0 + 4));
0x00002730 b 0x2590 | goto label_0;
| label_3:
0x00002734 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00002738 lw t9, -0x7f44(gp) | t9 = sym.imp.apr_psprintf
0x0000273c lw a0, (s0) | a0 = *(s0);
0x00002740 addiu a2, sp, 0x20 | a2 = sp + 0x20;
0x00002744 addiu a1, a1, 0x3604 | a1 += str.Unable_to_generate_random_bytes:__pm;
0x00002748 jalr t9 | t9 ();
0x0000274c lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00002750 sw v0, 4(s0) | *((s0 + 1)) = v0;
0x00002754 move a0, s1 | a0 = s1;
0x00002758 lw t9, -0x7f38(gp) | t9 = sym.imp.strlen;
0x0000275c addiu s2, zero, 8 | s2 = 8;
0x00002760 jalr t9 | t9 ();
0x00002764 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00002768 b 0x25e0 | goto label_1;
| label_4:
0x0000287c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00002880 lw t9, -0x7f44(gp) | t9 = sym.imp.apr_psprintf
0x00002884 lw a0, (s0) | a0 = *(s0);
0x00002888 addiu a2, sp, 0x20 | a2 = sp + 0x20;
0x0000288c addiu a1, a1, 0x379c | a1 += str.Unable_to_encode_with_bcrypt:__pm;
0x00002890 jalr t9 | t9 ();
0x00002894 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00002898 sw v0, 4(s0) | *((s0 + 1)) = v0;
0x0000289c move a0, s1 | a0 = s1;
0x000028a0 lw t9, -0x7f38(gp) | t9 = sym.imp.strlen;
0x000028a4 addiu s2, zero, 3 | s2 = 3;
0x000028a8 jalr t9 | t9 ();
0x000028ac lw gp, 0x18(sp) | gp = *(var_18h_3);
0x000028b0 b 0x25e0 | goto label_1;
| label_5:
0x000028d4 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x000028d8 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x000028dc lw t9, -0x7f84(gp) | t9 = sym.imp.apr_file_printf;
0x000028e0 lw a0, (v0) | a0 = *(v0);
0x000028e4 move a2, s2 | a2 = s2;
0x000028e8 addiu a1, a1, 0x37c0 | a1 += str.mkhash__:_BUG:_invalid_algorithm__d;
0x000028ec jalr t9 | t9 ();
0x000028f0 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x000028f4 lw t9, -0x7f80(gp) | t9 = sym.imp.abort;
0x000028f8 jalr t9 | t9 ();
0x000028fc nop |
| label_6:
0x00002900 lw t9, -0x7f14(gp) | t9 = sym.imp.__stack_chk_fail;
0x00002904 jalr t9 | t9 ();
0x00002908 nop |
| }
[*] Function sprintf used 7 times htpasswd