[*] Binary protection state of php-cli

  
  	Full RELRO     No Canary found   NX enabled   No PIE       No RPATH     No RUNPATH   No Symbols


[*] Function strcat tear down of php-cli

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/usr/bin/php-cli @ 0x511df0 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.00511df0 ()                  | void fcn_00511df0 () {
                                             | label_81:
    0x00511df0 lui gp, 0x20                  |     
    0x00511df4 addiu gp, gp, -0x3bf0         |     
    0x00511df8 addu gp, gp, t9               |     gp += t9;
    0x00511dfc addiu sp, sp, -0xd30          |     
    0x00511e00 lw v0, 0xd48(sp)              |     v0 = *(arg_d48h);
    0x00511e04 sw gp, 0x28(sp)               |     *(var_28h) = gp;
    0x00511e08 sw s0, 0xd08(sp)              |     *(var_d08h) = s0;
    0x00511e0c sw ra, 0xd2c(sp)              |     *(var_d2ch) = ra;
    0x00511e10 sw fp, 0xd28(sp)              |     *(var_d28h) = fp;
    0x00511e14 sw s7, 0xd24(sp)              |     *(var_d24h) = s7;
    0x00511e18 sw s6, 0xd20(sp)              |     *(var_d20h) = s6;
    0x00511e1c sw s5, 0xd1c(sp)              |     *(var_d1ch) = s5;
    0x00511e20 sw s4, 0xd18(sp)              |     *(var_d18h) = s4;
    0x00511e24 sw s3, 0xd14(sp)              |     *(var_d14h) = s3;
    0x00511e28 sw s2, 0xd10(sp)              |     *(var_d10h) = s2;
    0x00511e2c sw s1, 0xd0c(sp)              |     *(var_d0ch) = s1;
    0x00511e30 sw a0, 0xd30(sp)              |     *(arg_d30h) = a0;
    0x00511e34 sw a1, 0xd34(sp)              |     *(arg_d34h) = a1;
    0x00511e38 sw a2, 0xd38(sp)              |     *(arg_d38h) = a2;
    0x00511e3c sw a3, 0xd3c(sp)              |     *(arg_d3ch) = a3;
    0x00511e40 lw s0, 0xd44(sp)              |     s0 = *(arg_d44h);
    0x00511e44 sw zero, 0xcd0(sp)            |     *(var_cd0h) = 0;
    0x00511e48 sw zero, 0xcc0(sp)            |     *(var_cc0h) = 0;
    0x00511e4c sw zero, 0xcc4(sp)            |     *(var_cc4h) = 0;
    0x00511e50 sb zero, 0xc30(sp)            |     *(var_c30h) = 0;
                                             |     if (v0 <= 0) {
    0x00511e54 bgtz v0, 0x511e74             |         
    0x00511e58 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x00511e5c lw t9, -0x6aa4(gp)            |         t9 = sym.php_stream_wrapper_log_error;
                                             |         /* str.Redirection_limit_reached__aborting */
    0x00511e60 addiu a2, a2, -0x1bf0         |         a2 += -0x1bf0;
    0x00511e64 move a1, a3                   |         a1 = a3;
    0x00511e68 jalr t9                       |         t9 ();
                                             | label_1:
    0x00511e6c move s6, zero                 |         s6 = 0;
    0x00511e70 b 0x511f14                    |         goto label_64;
                                             |     }
    0x00511e74 lw t9, -0x6ab0(gp)            |     t9 = sym.php_url_parse;
    0x00511e78 lw a0, 0xd34(sp)              |     a0 = *(arg_d34h);
    0x00511e7c bal 0x5023c4                  |     sym_php_url_parse ();
    0x00511e80 move fp, v0                   |     fp = v0;
    0x00511e84 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00511e88 bnez v0, 0x511e94             |         
                                             | label_90:
    0x00511e8c move s6, zero                 |         s6 = 0;
    0x00511e90 b 0x511f14                    |         goto label_64;
                                             |     }
    0x00511e94 lw s2, -0x7fd0(gp)            |     s2 = *((gp - 8180));
    0x00511e98 lw s1, (v0)                   |     s1 = *(v0);
    0x00511e9c lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
    0x00511ea0 addiu a2, zero, 5             |     a2 = 5;
                                             |     /* str.http */
    0x00511ea4 addiu a1, s2, 0x18c0          |     a1 = s2 + 0x18c0;
    0x00511ea8 move a0, s1                   |     a0 = s1;
    0x00511eac jalr t9                       |     t9 ();
    0x00511eb0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00511eb4 sw s2, 0xcdc(sp)              |     *(var_cdch) = s2;
                                             |     if (v0 == 0) {
    0x00511eb8 beqz v0, 0x51222c             |         goto label_104;
                                             |     }
    0x00511ebc lw a1, -0x7fd0(gp)            |     a1 = *((gp - 8180));
    0x00511ec0 lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
    0x00511ec4 addiu a2, zero, 6             |     a2 = 6;
                                             |     /* str.https */
    0x00511ec8 addiu a1, a1, 0x18c8          |     a1 += 0x18c8;
    0x00511ecc move a0, s1                   |     a0 = s1;
    0x00511ed0 jalr t9                       |     t9 ();
    0x00511ed4 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00511ed8 beqz v0, 0x51222c             |         goto label_104;
                                             |     }
    0x00511edc lw v0, 0xd30(sp)              |     v0 = *(arg_d30h);
    0x00511ee0 bnez s0, 0x511f48             |     
                                             |     while (v0 == 0) {
    0x00511ee4 lw t9, -0x70b8(gp)            |         t9 = sym.php_url_free;
                                             | label_0:
    0x00511ee8 move a0, fp                   |         a0 = fp;
    0x00511eec bal 0x501a24                  |         sym_php_url_free ();
    0x00511ef0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00511ef4 lw a1, 0xd38(sp)              |         a1 = *(arg_d38h);
    0x00511ef8 lw a0, 0xd34(sp)              |         a0 = *(arg_d34h);
    0x00511efc lw t9, -0x7a3c(gp)            |         t9 = sym._php_stream_open_wrapper_ex;
    0x00511f00 sw s0, 0x10(sp)               |         *(var_10h) = s0;
    0x00511f04 move a3, zero                 |         a3 = 0;
    0x00511f08 addiu a2, zero, 8             |         a2 = 8;
    0x00511f0c jalr t9                       |         t9 ();
    0x00511f10 move s6, v0                   |         s6 = v0;
                                             | label_64:
    0x00511f14 lw ra, 0xd2c(sp)              |         ra = *(var_d2ch);
                                             | label_65:
    0x00511f18 move v0, s6                   |         v0 = s6;
    0x00511f1c lw fp, 0xd28(sp)              |         fp = *(var_d28h);
    0x00511f20 lw s7, 0xd24(sp)              |         s7 = *(var_d24h);
    0x00511f24 lw s6, 0xd20(sp)              |         s6 = *(var_d20h);
    0x00511f28 lw s5, 0xd1c(sp)              |         s5 = *(var_d1ch);
    0x00511f2c lw s4, 0xd18(sp)              |         s4 = *(var_d18h);
    0x00511f30 lw s3, 0xd14(sp)              |         s3 = *(var_d14h);
    0x00511f34 lw s2, 0xd10(sp)              |         s2 = *(var_d10h);
    0x00511f38 lw s1, 0xd0c(sp)              |         s1 = *(var_d0ch);
    0x00511f3c lw s0, 0xd08(sp)              |         s0 = *(var_d08h);
    0x00511f40 addiu sp, sp, 0xd30           |         
    0x00511f44 jr ra                         |         return v0;
    0x00511f48 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x00511f4c lw t9, -0x6a94(gp)            |         t9 = sym.php_stream_context_get_option;
    0x00511f50 lw v0, (v0)                   |         v0 = *(v0);
                                             |         /* str.proxy */
    0x00511f54 addiu a2, a2, -0x1df4         |         a2 += -0x1df4;
    0x00511f58 move a0, s0                   |         a0 = s0;
    0x00511f5c lw a1, 0x14(v0)               |         a1 = *((v0 + 5));
    0x00511f60 jalr t9                       |         t9 ();
    0x00511f64 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00511f68 beqz v0, 0x511ee4             |         
                                             |     }
    0x00511f6c lbu a0, 8(v0)                 |     a0 = *((v0 + 8));
    0x00511f70 addiu v1, zero, 6             |     v1 = 6;
    0x00511f74 lw t9, -0x70b8(gp)            |     t9 = sym.php_url_free;
                                             |     if (a0 != v1) {
    0x00511f78 bne a0, v1, 0x511ee8          |         goto label_0;
                                             |     }
    0x00511f7c lw a0, (v0)                   |     a0 = *(v0);
    0x00511f80 lw s1, 0xc(a0)                |     s1 = *((a0 + 3));
    0x00511f84 move a1, s1                   |     a1 = s1;
                                             |     if (s1 == 0) {
    0x00511f88 beqz s1, 0x511ee8             |         goto label_0;
                                             |     }
    0x00511f8c lw t9, -0x7e84(gp)            |     t9 = sym._estrndup;
    0x00511f90 addiu a0, a0, 0x10            |     a0 += 0x10;
    0x00511f94 jalr t9                       |     t9 ();
    0x00511f98 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00511f9c sw v0, 0xcd4(sp)              |     *(var_cd4h) = v0;
    0x00511fa0 addiu s4, zero, 1             |     s4 = 1;
    0x00511fa4 addiu s5, zero, 1             |     s5 = 1;
    0x00511fa8 sw zero, 0xcd8(sp)            |     *(var_cd8h) = 0;
                                             |     do {
                                             | label_100:
    0x00511fac lw v0, 0xd30(sp)              |         v0 = *(arg_d30h);
    0x00511fb0 lw a2, -0x7fb8(gp)            |         a2 = *((gp - 8174));
    0x00511fb4 lw t9, -0x6a94(gp)            |         t9 = sym.php_stream_context_get_option;
    0x00511fb8 lw v0, (v0)                   |         v0 = *(v0);
                                             |         /* str.timeout */
    0x00511fbc addiu a2, a2, -0x4b74         |         a2 += -0x4b74;
    0x00511fc0 move a0, s0                   |         a0 = s0;
    0x00511fc4 lw a1, 0x14(v0)               |         a1 = *((v0 + 5));
    0x00511fc8 jalr t9                       |         t9 ();
    0x00511fcc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00511fd0 beqz v0, 0x515624             |             goto label_105;
                                             |         }
    0x00511fd4 lbu a0, 8(v0)                 |         a0 = *((v0 + 8));
    0x00511fd8 addiu v1, zero, 5             |         v1 = 5;
    0x00511fdc lw t9, -0x7ebc(gp)            |         t9 = sym._zval_get_double_func;
                                             |         if (a0 != v1) {
    0x00511fe0 bne a0, v1, 0x512348          |             goto label_106;
                                             |         }
    0x00511fe4 lw s2, (v0)                   |         s2 = *(v0);
    0x00511fe8 lw s3, 4(v0)                  |         s3 = *((v0 + 1));
                                             | label_2:
    0x00511fec lw t9, -0x5ee8(gp)            |         t9 = sym.imp.__fixdfsi;
    0x00511ff0 move a1, s3                   |         a1 = s3;
    0x00511ff4 move a0, s2                   |         a0 = s2;
    0x00511ff8 jalr t9                       |         t9 ();
    0x00511ffc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512000 move a0, v0                   |         a0 = v0;
    0x00512004 lw t9, -0x6198(gp)            |         t9 = sym.imp.__floatsidf;
    0x00512008 sw v0, 0xcc8(sp)              |         *(var_cc8h) = v0;
    0x0051200c jalr t9                       |         t9 ();
    0x00512010 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512014 move a2, v0                   |         a2 = v0;
    0x00512018 move a3, v1                   |         a3 = v1;
    0x0051201c lw t9, -0x619c(gp)            |         t9 = sym.imp.__subdf3;
    0x00512020 move a0, s2                   |         a0 = s2;
    0x00512024 move a1, s3                   |         a1 = s3;
    0x00512028 jalr t9                       |         t9 ();
    0x0051202c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512030 move a1, v1                   |         a1 = v1;
    0x00512034 lw a0, -0x7fd0(gp)            |         a0 = *((gp - 8180));
    0x00512038 lw t9, -0x61a8(gp)            |         t9 = sym.imp.__muldf3;
    0x0051203c lw a2, -0x3a00(a0)            |         a2 = *((a0 - 3712));
    0x00512040 lw a3, -0x39fc(a0)            |         a3 = *((a0 - 3711));
    0x00512044 move a0, v0                   |         a0 = v0;
    0x00512048 jalr t9                       |         t9 ();
    0x0051204c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512050 move a0, v0                   |         a0 = v0;
    0x00512054 lw t9, -0x6248(gp)            |         t9 = sym.imp.__fixunsdfsi;
    0x00512058 move a1, v1                   |         a1 = v1;
    0x0051205c jalr t9                       |         t9 ();
    0x00512060 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512064 sw v0, 0xccc(sp)              |         *(var_ccch) = v0;
                                             | label_101:
    0x00512068 lw t9, -0x6c50(gp)            |         t9 = sym._php_stream_xport_create;
    0x0051206c addiu v0, sp, 0xcd0           |         v0 = sp + 0xcd0;
    0x00512070 addiu s2, sp, 0xcc8           |         s2 = sp + 0xcc8;
    0x00512074 lw a2, 0xd3c(sp)              |         a2 = *(arg_d3ch);
    0x00512078 lw a0, 0xcd4(sp)              |         a0 = *(var_cd4h);
    0x0051207c sw zero, 0x20(sp)             |         *(var_20h) = 0;
    0x00512080 sw v0, 0x1c(sp)               |         *(var_1ch) = v0;
    0x00512084 sw s0, 0x18(sp)               |         *(var_18h) = s0;
    0x00512088 sw s2, 0x14(sp)               |         *(var_14h) = s2;
    0x0051208c sw zero, 0x10(sp)             |         *(var_10h) = 0;
    0x00512090 addiu a3, zero, 2             |         a3 = 2;
    0x00512094 move a1, s1                   |         a1 = s1;
    0x00512098 jalr t9                       |         t9 ();
    0x0051209c move s6, v0                   |         s6 = v0;
    0x005120a0 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x005120a4 beqz v0, 0x5120c4             |             
    0x005120a8 lw t9, -0x7a58(gp)            |             t9 = sym._php_stream_set_option;
    0x005120ac move a3, s2                   |             a3 = s2;
    0x005120b0 move a2, zero                 |             a2 = 0;
    0x005120b4 addiu a1, zero, 4             |             a1 = 4;
    0x005120b8 move a0, v0                   |             a0 = v0;
    0x005120bc jalr t9                       |             t9 ();
    0x005120c0 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x005120c4 lw a3, 0xcd0(sp)              |         a3 = *(var_cd0h);
    0x005120c8 lw a2, -0x7fc4(gp)            |         a2 = *((gp - 8177));
                                             |         if (a3 != 0) {
    0x005120cc beqz a3, 0x51212c             |             
    0x005120d0 lw t9, -0x6aa4(gp)            |             t9 = sym.php_stream_wrapper_log_error;
    0x005120d4 lw a0, 0xd30(sp)              |             a0 = *(arg_d30h);
    0x005120d8 lw a1, 0xd3c(sp)              |             a1 = *(arg_d3ch);
    0x005120dc addiu a3, a3, 0x10            |             a3 += 0x10;
                                             |             /* esilref: '&s' */
    0x005120e0 addiu a2, a2, -0x40cc         |             a2 += -0x40cc;
    0x005120e4 jalr t9                       |             t9 ();
    0x005120e8 lw a0, 0xcd0(sp)              |             a0 = *(var_cd0h);
    0x005120ec lbu v0, 5(a0)                 |             v0 = *((a0 + 5));
    0x005120f0 andi v1, v0, 2                |             v1 = v0 & 2;
    0x005120f4 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v1 == 0) {
    0x005120f8 bnez v1, 0x512128             |                 
    0x005120fc lw v1, (a0)                   |                 v1 = *(a0);
    0x00512100 addiu v1, v1, -1              |                 v1 += -1;
    0x00512104 sw v1, (a0)                   |                 *(a0) = v1;
                                             |                 if (v1 != 0) {
    0x00512108 bnez v1, 0x512128             |                     goto label_3;
                                             |                 }
    0x0051210c andi v0, v0, 1                |                 v0 &= 1;
    0x00512110 lw t9, -0x7fe4(gp)            |                 t9 = sym._efree;
                                             |                 if (v0 == 0) {
    0x00512114 beqz v0, 0x512360             |                     goto label_107;
                                             |                 }
    0x00512118 lw t9, -0x60d4(gp)            |                 t9 = *((gp - 6197));
    0x0051211c jalr t9                       |                 t9 ();
    0x00512120 nop                           |                 
    0x00512124 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
                                             | label_3:
    0x00512128 sw zero, 0xcd0(sp)            |             *(var_cd0h) = 0;
                                             |         }
    0x0051212c lw v0, 0xd4c(sp)              |         v0 = *(arg_d4ch);
    0x00512130 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00512134 andi v0, v0, 1                |         v0 &= 1;
    0x00512138 lw a0, 0xcd4(sp)              |         a0 = *(var_cd4h);
    0x0051213c sw v0, 0xce8(sp)              |         *(var_ce8h) = v0;
    0x00512140 jalr t9                       |         t9 ();
    0x00512144 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (s6 == 0) {
    0x00512148 beqz s6, 0x5153f0             |             goto label_108;
                                             |         }
    0x0051214c lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
                                             |         if (s5 == 0) {
    0x00512150 beqz s5, 0x5129ac             |             goto label_109;
                                             |         }
    0x00512154 lw v0, 0xcd8(sp)              |         v0 = *(var_cd8h);
    0x00512158 lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
                                             |         if (v0 == 0) {
    0x0051215c beqz v0, 0x5129ac             |             goto label_109;
                                             |         }
    0x00512160 sw zero, 0x430(sp)            |         *(var_430h) = 0;
    0x00512164 sw zero, 0x434(sp)            |         *(var_434h) = 0;
    0x00512168 lw s7, -0x7fbc(gp)            |         s7 = *((gp - 8175));
    0x0051216c lw s3, -0x7fbc(gp)            |         s3 = *((gp - 8175));
                                             |         if (s0 != 0) {
    0x00512170 bnez s0, 0x512370             |             goto label_110;
                                             |         }
                                             | label_4:
    0x00512174 lw v0, 0xc(fp)                |         v0 = *(arg_d3ch);
    0x00512178 lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
    0x0051217c move a0, v0                   |         a0 = v0;
    0x00512180 sw v0, 0xce4(sp)              |         *(var_ce4h) = v0;
    0x00512184 jalr t9                       |         t9 ();
    0x00512188 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051218c move s2, v0                   |         s2 = v0;
    0x00512190 addiu a0, v0, 0x18            |         a0 = v0 + 0x18;
    0x00512194 lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x00512198 addiu v0, zero, -8            |         v0 = -8;
    0x0051219c and a0, a0, v0                |         a0 &= v0;
    0x005121a0 jalr t9                       |         t9 ();
    0x005121a4 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005121a8 move s1, v0                   |         s1 = v0;
    0x005121ac addiu v0, zero, 1             |         v0 = 1;
    0x005121b0 sw v0, (s1)                   |         *(s1) = v0;
    0x005121b4 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x005121b8 addiu v0, zero, 6             |         v0 = 6;
    0x005121bc sw s2, 0xc(s1)                |         *((s1 + 3)) = s2;
    0x005121c0 move a2, s2                   |         a2 = s2;
    0x005121c4 lw a1, 0xce4(sp)              |         a1 = *(var_ce4h);
    0x005121c8 addu s2, s1, s2               |         s2 = s1 + s2;
    0x005121cc sw v0, 4(s1)                  |         *((s1 + 1)) = v0;
    0x005121d0 sw zero, 8(s1)                |         *((s1 + 2)) = 0;
    0x005121d4 addiu a0, s1, 0x10            |         a0 = s1 + 0x10;
    0x005121d8 jalr t9                       |         t9 ();
    0x005121dc addiu v0, zero, 0x1406        |         v0 = 0x1406;
    0x005121e0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005121e4 sb zero, 0x10(s2)             |         *((s2 + 16)) = 0;
    0x005121e8 sw v0, 0xcb8(sp)              |         *(var_cb8h) = v0;
    0x005121ec lw v0, 0x5c(s6)               |         v0 = *(var_d2ch);
    0x005121f0 sw s1, 0xcb0(sp)              |         *(var_cb0h) = s1;
                                             |         if (v0 != 0) {
    0x005121f4 bnez v0, 0x5127a8             |             goto label_111;
                                             |         }
    0x005121f8 move a0, zero                 |         a0 = 0;
                                             | label_6:
    0x005121fc lw t9, -0x6a88(gp)            |         t9 = sym.php_stream_context_set_option;
    0x00512200 addiu s1, sp, 0xcb0           |         s1 = sp + 0xcb0;
    0x00512204 move a3, s1                   |         a3 = s1;
                                             |         /* str.peer_name */
    0x00512208 addiu a2, s7, -0x1b80         |         a2 = s7 + -0x1b80;
                                             |         /* esilref: 'ssl' */
    0x0051220c addiu a1, s3, -0x1b74         |         a1 = s3 + -0x1b74;
    0x00512210 jalr t9                       |         t9 ();
    0x00512214 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512218 lw t9, -0x7f28(gp)            |         t9 = sym._zval_ptr_dtor;
    0x0051221c move a0, s1                   |         a0 = s1;
    0x00512220 jalr t9                       |         t9 ();
    0x00512224 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512228 b 0x51238c                    |         goto label_112;
                                             | label_104:
    0x0051222c lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
    0x00512230 lw t9, -0x6364(gp)            |         t9 = sym.imp.strpbrk;
    0x00512234 lw a0, 0xd38(sp)              |         a0 = *(arg_d38h);
                                             |         /* str.awx */
    0x00512238 addiu a1, a1, -0x1bcc         |         a1 += -0x1bcc;
    0x0051223c jalr t9                       |         t9 ();
    0x00512240 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00512244 beqz v0, 0x512278             |             
    0x00512248 lw a2, -0x7fbc(gp)            |             a2 = *((gp - 8175));
    0x0051224c lw t9, -0x6aa4(gp)            |             t9 = sym.php_stream_wrapper_log_error;
    0x00512250 lw a0, 0xd30(sp)              |             a0 = *(arg_d30h);
    0x00512254 lw a1, 0xd3c(sp)              |             a1 = *(arg_d3ch);
                                             |             /* str.HTTP_wrapper_does_not_support_writeable_connections */
    0x00512258 addiu a2, a2, -0x1bc4         |             a2 += -0x1bc4;
    0x0051225c jalr t9                       |             t9 ();
    0x00512260 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00512264 lw t9, -0x70b8(gp)            |             t9 = sym.php_url_free;
    0x00512268 move a0, fp                   |             a0 = fp;
    0x0051226c bal 0x501a24                  |             sym_php_url_free ();
    0x00512270 b 0x511e6c                    |             goto label_1;
    0x00512274 nop                           |             
                                             |         }
    0x00512278 lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
    0x0051227c move a0, s1                   |         a0 = s1;
    0x00512280 jalr t9                       |         t9 ();
    0x00512284 sltiu v0, v0, 5               |         v0 = (v0 < 5) ? 1 : 0;
    0x00512288 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051228c lhu v1, 0x10(fp)              |         v1 = *(arg_10h);
                                             |         if (v0 == 0) {
    0x00512290 bnez v0, 0x5122c4             |             
    0x00512294 lb a0, 4(s1)                  |             a0 = *((s1 + 4));
    0x00512298 addiu v0, zero, 0x73          |             v0 = 0x73;
                                             |             if (a0 == v0) {
    0x0051229c bne a0, v0, 0x5122c4          |                 
    0x005122a0 nop                           |                 
    0x005122a4 addiu v0, zero, 0x1bb         |                 v0 = 0x1bb;
                                             |                 if (v1 == 0) {
    0x005122a8 bnez v1, 0x5122b0             |                     
    0x005122ac sh v0, 0x10(fp)               |                     *(arg_10h) = v0;
                                             |                 }
    0x005122b0 lw a3, -0x7fbc(gp)            |                 a3 = *((gp - 8175));
                                             |                 if (s0 == 0) {
    0x005122b4 beqz s0, 0x515638             |                     goto label_113;
                                             |                 }
    0x005122b8 addiu v0, zero, 1             |                 v0 = 1;
    0x005122bc sw v0, 0xcd8(sp)              |                 *(var_cd8h) = v0;
    0x005122c0 b 0x5122dc                    |                 
                                             |             }
                                             |         } else {
    0x005122c4 addiu v0, zero, 0x50          |             v0 = 0x50;
                                             |             if (v1 == 0) {
    0x005122c8 bnez v1, 0x5122d0             |                 
    0x005122cc sh v0, 0x10(fp)               |                 *(arg_10h) = v0;
                                             |             }
                                             |             if (s0 == 0) {
    0x005122d0 beqz s0, 0x5155dc             |                 goto label_114;
                                             |             }
    0x005122d4 nop                           |             
    0x005122d8 sw zero, 0xcd8(sp)            |             *(var_cd8h) = 0;
                                             |         }
    0x005122dc lw v0, 0xd30(sp)              |         v0 = *(arg_d30h);
    0x005122e0 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x005122e4 lw t9, -0x6a94(gp)            |         t9 = sym.php_stream_context_get_option;
    0x005122e8 lw v0, (v0)                   |         v0 = *(v0);
                                             |         /* str.proxy */
    0x005122ec addiu a2, a2, -0x1df4         |         a2 += -0x1df4;
    0x005122f0 move a0, s0                   |         a0 = s0;
    0x005122f4 lw a1, 0x14(v0)               |         a1 = *((v0 + 5));
    0x005122f8 jalr t9                       |         t9 ();
    0x005122fc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00512300 beqz v0, 0x5155d0             |             goto label_115;
                                             |         }
    0x00512304 lbu a0, 8(v0)                 |         a0 = *((v0 + 8));
    0x00512308 addiu v1, zero, 6             |         v1 = 6;
                                             |         if (a0 != v1) {
    0x0051230c bne a0, v1, 0x5155d0          |             goto label_115;
                                             |         }
    0x00512310 nop                           |         
    0x00512314 lw a0, (v0)                   |         a0 = *(v0);
    0x00512318 lw s1, 0xc(a0)                |         s1 = *((a0 + 3));
    0x0051231c lw v0, 0xcd8(sp)              |         v0 = *(var_cd8h);
                                             |         if (s1 == 0) {
    0x00512320 beqz s1, 0x5155d4             |             goto label_116;
                                             |         }
    0x00512324 lw t9, -0x7e84(gp)            |         t9 = sym._estrndup;
    0x00512328 move a1, s1                   |         a1 = s1;
    0x0051232c addiu a0, a0, 0x10            |         a0 += 0x10;
    0x00512330 jalr t9                       |         t9 ();
    0x00512334 sw v0, 0xcd4(sp)              |         *(var_cd4h) = v0;
    0x00512338 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051233c move s4, zero                 |         s4 = 0;
    0x00512340 addiu s5, zero, 1             |         s5 = 1;
    0x00512344 b 0x511fac                    |         
                                             |     } while (1);
                                             | label_106:
    0x00512348 move a0, v0                   |     a0 = v0;
    0x0051234c jalr t9                       |     t9 ();
    0x00512350 move s2, v0                   |     s2 = v0;
    0x00512354 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00512358 move s3, v1                   |     s3 = v1;
    0x0051235c b 0x511fec                    |     goto label_2;
                                             | label_107:
    0x00512360 jalr t9                       |     t9 ();
    0x00512364 nop                           |     
    0x00512368 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051236c b 0x512128                    |     goto label_3;
                                             | label_110:
    0x00512370 lw t9, -0x6a94(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.peer_name */
    0x00512374 addiu a2, s7, -0x1b80         |     a2 = s7 + -0x1b80;
                                             |     /* esilref: 'ssl' */
    0x00512378 addiu a1, s3, -0x1b74         |     a1 = s3 + -0x1b74;
    0x0051237c move a0, s0                   |     a0 = s0;
    0x00512380 jalr t9                       |     t9 ();
    0x00512384 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00512388 beqz v0, 0x512174             |         goto label_4;
                                             |     }
                                             | label_112:
    0x0051238c lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00512390 addiu s1, zero, 8             |     s1 = 8;
                                             |     if (v0 != 0) {
    0x00512394 beqz v0, 0x5123b0             |         
    0x00512398 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x0051239c lw v0, 0x434(sp)              |         v0 = *(var_434h);
    0x005123a0 addiu s1, s1, 8               |         s1 += 8;
    0x005123a4 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x005123a8 lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |         if (v0 != 0) {
    0x005123ac bnez v0, 0x5123c8             |             goto label_117;
                                             |         }
                                             |     }
    0x005123b0 lw t9, -0x7ed4(gp)            |     t9 = sym.smart_str_erealloc;
    0x005123b4 move a1, s1                   |     a1 = s1;
    0x005123b8 addiu a0, sp, 0x430           |     a0 = sp + 0x430;
    0x005123bc jalr t9                       |     t9 ();
    0x005123c0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005123c4 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             | label_117:
    0x005123c8 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x005123cc addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x005123d0 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005123d4 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x005123d8 addiu a2, zero, 8             |     a2 = 8;
                                             |     /* str.CONNECT_ */
    0x005123dc addiu a1, a1, -0x1b70         |     a1 += -0x1b70;
    0x005123e0 addu a0, a0, v0               |     a0 += v0;
    0x005123e4 jalr t9                       |     t9 ();
    0x005123e8 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005123ec lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x005123f0 lw s2, 0xc(fp)                |     s2 = *(arg_d3ch);
    0x005123f4 lw t9, -0x6194(gp)            |     t9 = sym.imp.strlen;
    0x005123f8 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
    0x005123fc move a0, s2                   |     a0 = s2;
    0x00512400 jalr t9                       |     t9 ();
    0x00512404 addu s1, v0, s1               |     s1 = v0 + s1;
    0x00512408 move s3, v0                   |     s3 = v0;
    0x0051240c lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x00512410 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00512414 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00512418 bnez v0, 0x512430             |         
    0x0051241c lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00512420 move a1, s1                   |         a1 = s1;
    0x00512424 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x00512428 jalr t9                       |         t9 ();
    0x0051242c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00512430 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00512434 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00512438 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x0051243c lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00512440 move a1, s2                   |     a1 = s2;
    0x00512444 move a2, s3                   |     a2 = s3;
    0x00512448 addu a0, a0, v0               |     a0 += v0;
    0x0051244c jalr t9                       |     t9 ();
    0x00512450 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00512454 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00512458 addiu s2, s1, 1               |     s2 = s1 + 1;
    0x0051245c sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
    0x00512460 lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x00512464 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x00512468 lw v1, 0x430(sp)              |     v1 = *(var_430h);
                                             |     if (v0 == 0) {
    0x0051246c bnez v0, 0x512488             |         
    0x00512470 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00512474 move a1, s2                   |         a1 = s2;
    0x00512478 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x0051247c jalr t9                       |         t9 ();
    0x00512480 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512484 lw v1, 0x430(sp)              |         v1 = *(var_430h);
                                             |     }
    0x00512488 addiu v0, zero, 0x3a          |     v0 = 0x3a;
    0x0051248c addu s1, v1, s1               |     s1 = v1 + s1;
    0x00512490 addiu a1, zero, 0xa           |     a1 = 0xa;
    0x00512494 sb v0, 0x10(s1)               |     *((s1 + 16)) = v0;
    0x00512498 sw s2, 0xc(v1)                |     *((v1 + 3)) = s2;
    0x0051249c addiu s2, sp, 0x4f            |     s2 = sp + 0x4f;
    0x005124a0 lhu v0, 0x10(fp)              |     v0 = *(arg_10h);
    0x005124a4 move s3, s2                   |     s3 = s2;
    0x005124a8 sb zero, 0x4f(sp)             |     *(var_4fh) = 0;
                                             |     do {
    0x005124ac divu zero, v0, a1             |         __asm ("divu zero, v0, a1");
    0x005124b0 teq a1, zero, 7               |         __asm ("teq a1, zero, 7");
    0x005124b4 addiu s2, s2, -1              |         s2 += -1;
    0x005124b8 mfhi a0                       |         __asm ("mfhi a0");
    0x005124bc mflo v0                       |         __asm ("mflo v0");
    0x005124c0 addiu a0, a0, 0x30            |         a0 += 0x30;
    0x005124c4 sb a0, (s2)                   |         *(s2) = a0;
    0x005124c8 bnez v0, 0x5124ac             |         
                                             |     } while (v0 != 0);
    0x005124cc lw s1, 0xc(v1)                |     s1 = *((v1 + 3));
    0x005124d0 subu s3, s3, s2               |     __asm ("subu s3, s3, s2");
    0x005124d4 lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x005124d8 addu s1, s3, s1               |     s1 = s3 + s1;
    0x005124dc sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x005124e0 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x005124e4 bnez v0, 0x512500             |         
    0x005124e8 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x005124ec move a1, s1                   |         a1 = s1;
    0x005124f0 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x005124f4 jalr t9                       |         t9 ();
    0x005124f8 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005124fc lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |     }
    0x00512500 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00512504 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00512508 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x0051250c move a2, s3                   |     a2 = s3;
    0x00512510 move a1, s2                   |     a1 = s2;
    0x00512514 addu a0, a0, v0               |     a0 += v0;
    0x00512518 jalr t9                       |     t9 ();
    0x0051251c lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00512520 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00512524 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
    0x00512528 lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x0051252c addiu s1, s1, 0xb             |     s1 += 0xb;
    0x00512530 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00512534 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00512538 bnez v0, 0x512554             |         
    0x0051253c lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00512540 move a1, s1                   |         a1 = s1;
    0x00512544 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x00512548 jalr t9                       |         t9 ();
    0x0051254c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512550 lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |     }
    0x00512554 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x00512558 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x0051255c lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00512560 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00512564 addiu a2, zero, 0xb           |     a2 = 0xb;
                                             |     /* str._HTTP_1.0_r_n */
    0x00512568 addiu a1, a1, -0x1b64         |     a1 += -0x1b64;
    0x0051256c addu a0, a0, v0               |     a0 += v0;
    0x00512570 jalr t9                       |     t9 ();
    0x00512574 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00512578 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051257c sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
                                             |     if (s0 != 0) {
    0x00512580 beqz s0, 0x5125ec             |         
    0x00512584 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x00512588 lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
    0x0051258c lw t9, -0x6a94(gp)            |         t9 = sym.php_stream_context_get_option;
                                             |         /* esilref: 'header' */
    0x00512590 addiu a2, a2, -0x19dc         |         a2 += -0x19dc;
    0x00512594 addiu a1, v0, 0x18c0          |         a1 = v0 + 0x18c0;
    0x00512598 move a0, s0                   |         a0 = s0;
    0x0051259c jalr t9                       |         t9 ();
    0x005125a0 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x005125a4 beqz v0, 0x5125ec             |             goto label_14;
                                             |         }
    0x005125a8 lbu v1, 8(v0)                 |         v1 = *((v0 + 8));
    0x005125ac addiu a0, zero, 7             |         a0 = 7;
    0x005125b0 addiu a0, zero, 6             |         a0 = 6;
                                             |         if (v1 != a0) {
    0x005125b4 bne v1, a0, 0x512894          |             goto label_118;
                                             |         }
    0x005125b8 lw v0, (v0)                   |         v0 = *(v0);
    0x005125bc addiu v1, zero, 0x18          |         v1 = 0x18;
    0x005125c0 lw s3, 0x10(v0)               |         s3 = *((v0 + 4));
    0x005125c4 lw v0, 0x14(v0)               |         v0 = *((v0 + 5));
    0x005125c8 mul a0, v1, v0                |         __asm ("mul a0, v1, v0");
    0x005125cc addu v0, a0, s3               |         v0 = a0 + s3;
    0x005125d0 sw v0, 0xce4(sp)              |         *(var_ce4h) = v0;
    0x005125d4 lw v0, -0x7fbc(gp)            |         v0 = *((gp - 8175));
                                             |         /* str.Proxy_Authorization: */
    0x005125d8 addiu v0, v0, -0x1b58         |         v0 += -0x1b58;
    0x005125dc sw v0, 0xcec(sp)              |         *(var_cech) = v0;
                                             | label_7:
    0x005125e0 lw v0, 0xce4(sp)              |         v0 = *(var_ce4h);
    0x005125e4 addiu v0, zero, 6             |         v0 = 6;
                                             |         if (s3 != v0) {
    0x005125e8 bne s3, v0, 0x5127b0          |             goto label_119;
                                             |         }
                                             |     }
                                             | label_14:
    0x005125ec lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             | label_15:
    0x005125f0 addiu s1, zero, 2             |     s1 = 2;
                                             |     if (v0 != 0) {
    0x005125f4 beqz v0, 0x512610             |         
    0x005125f8 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x005125fc lw v0, 0x434(sp)              |         v0 = *(var_434h);
    0x00512600 addiu s1, s1, 2               |         s1 += 2;
    0x00512604 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00512608 lw v1, 0x430(sp)              |         v1 = *(var_430h);
                                             |         if (v0 != 0) {
    0x0051260c bnez v0, 0x512628             |             goto label_120;
                                             |         }
                                             |     }
    0x00512610 lw t9, -0x7ed4(gp)            |     t9 = sym.smart_str_erealloc;
    0x00512614 move a1, s1                   |     a1 = s1;
    0x00512618 addiu a0, sp, 0x430           |     a0 = sp + 0x430;
    0x0051261c jalr t9                       |     t9 ();
    0x00512620 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00512624 lw v1, 0x430(sp)              |     v1 = *(var_430h);
                                             | label_120:
    0x00512628 lw t9, -0x7a60(gp)            |     t9 = sym._php_stream_write;
    0x0051262c addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00512630 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00512634 move a2, s1                   |     a2 = s1;
    0x00512638 addu v0, v0, v1               |     v0 += v1;
    0x0051263c addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00512640 sb v1, (v0)                   |     *(v0) = v1;
    0x00512644 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00512648 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x0051264c lw a1, 0x430(sp)              |     a1 = *(var_430h);
    0x00512650 move a0, s6                   |     a0 = s6;
    0x00512654 addiu a1, a1, 0x10            |     a1 += 0x10;
    0x00512658 sw s1, -4(a1)                 |     *((a1 - 1)) = s1;
    0x0051265c jalr t9                       |     t9 ();
    0x00512660 lw v1, 0x430(sp)              |     v1 = *(var_430h);
    0x00512664 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00512668 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != v1) {
    0x0051266c beq v0, v1, 0x5126a4          |         
    0x00512670 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x00512674 lw t9, -0x6aa4(gp)            |         t9 = sym.php_stream_wrapper_log_error;
    0x00512678 lw a1, 0xd3c(sp)              |         a1 = *(arg_d3ch);
    0x0051267c lw a0, 0xd30(sp)              |         a0 = *(arg_d30h);
                                             |         /* str.Cannot_connect_to_HTTPS_server_through_proxy */
    0x00512680 addiu a2, a2, -0x1b40         |         a2 += -0x1b40;
    0x00512684 jalr t9                       |         t9 ();
    0x00512688 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051268c move a0, s6                   |         a0 = s6;
    0x00512690 addiu a1, zero, 3             |         a1 = 3;
    0x00512694 lw t9, -0x7a1c(gp)            |         t9 = sym._php_stream_free;
    0x00512698 move s6, zero                 |         s6 = 0;
    0x0051269c jalr t9                       |         t9 ();
    0x005126a0 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x005126a4 lw a0, 0x430(sp)              |     a0 = *(var_430h);
                                             |     if (a0 != 0) {
    0x005126a8 beqz a0, 0x5126f0             |         
    0x005126ac nop                           |         
    0x005126b0 lbu v0, 5(a0)                 |         v0 = *((a0 + 5));
    0x005126b4 andi v1, v0, 2                |         v1 = v0 & 2;
                                             |         if (v1 == 0) {
    0x005126b8 bnez v1, 0x5126ec             |             
    0x005126bc nop                           |             
    0x005126c0 lw v1, (a0)                   |             v1 = *(a0);
    0x005126c4 addiu v1, v1, -1              |             v1 += -1;
    0x005126c8 sw v1, (a0)                   |             *(a0) = v1;
                                             |             if (v1 != 0) {
    0x005126cc bnez v1, 0x5126ec             |                 goto label_22;
                                             |             }
    0x005126d0 andi v0, v0, 1                |             v0 &= 1;
    0x005126d4 lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
                                             |             if (v0 == 0) {
    0x005126d8 beqz v0, 0x512980             |                 goto label_121;
                                             |             }
    0x005126dc lw t9, -0x60d4(gp)            |             t9 = *((gp - 6197));
    0x005126e0 jalr t9                       |             t9 ();
    0x005126e4 nop                           |             
    0x005126e8 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
                                             | label_22:
    0x005126ec sw zero, 0x430(sp)            |         *(var_430h) = 0;
                                             |     }
    0x005126f0 lw t9, -0x7a74(gp)            |     t9 = sym._php_stream_get_line;
                                             |     if (s6 == 0) {
    0x005126f4 beqz s6, 0x5153f0             |         goto label_108;
                                             |     }
    0x005126f8 sw zero, 0x434(sp)            |     *(var_434h) = 0;
    0x005126fc addiu s1, sp, 0x30            |     s1 = sp + 0x30;
    0x00512700 addiu s2, zero, 0x2401        |     s2 = 0x2401;
                                             |     do {
    0x00512704 move a3, zero                 |         a3 = 0;
                                             | label_5:
    0x00512708 addiu a2, zero, 0x3ff         |         a2 = 0x3ff;
    0x0051270c move a1, s1                   |         a1 = s1;
    0x00512710 move a0, s6                   |         a0 = s6;
    0x00512714 jalr t9                       |         t9 ();
    0x00512718 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x0051271c beqz v0, 0x512740             |             goto label_122;
                                             |         }
    0x00512720 lbu v0, 0x30(sp)              |         v0 = *(var_30h);
    0x00512724 sltiu v1, v0, 0xe             |         v1 = (v0 < 0xe) ? 1 : 0;
    0x00512728 lw t9, -0x7a74(gp)            |         t9 = sym._php_stream_get_line;
    0x0051272c beqz v1, 0x512704             |         
                                             |     } while (v1 == 0);
    0x00512730 srlv v0, s2, v0               |     v0 = s2 >> v0;
    0x00512734 ext v0, v0, 0, 1              |     __asm ("ext v0, v0, 0, 1");
    0x00512738 move a3, zero                 |     a3 = 0;
                                             |     if (v0 == 0) {
    0x0051273c beqz v0, 0x512708             |         goto label_5;
                                             |     }
                                             | label_122:
    0x00512740 lw t9, -0x6a9c(gp)            |     t9 = sym.php_stream_xport_crypto_setup;
    0x00512744 move a2, zero                 |     a2 = 0;
    0x00512748 addiu a1, zero, 0x39          |     a1 = 0x39;
    0x0051274c move a0, s6                   |     a0 = s6;
    0x00512750 jalr t9                       |     t9 ();
    0x00512754 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 >= 0) {
    0x00512758 bgez v0, 0x512990             |         goto label_123;
                                             |     }
                                             | label_23:
    0x0051275c lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
    0x00512760 lw t9, -0x6aa4(gp)            |     t9 = sym.php_stream_wrapper_log_error;
    0x00512764 lw a1, 0xd3c(sp)              |     a1 = *(arg_d3ch);
    0x00512768 lw a0, 0xd30(sp)              |     a0 = *(arg_d30h);
                                             |     /* str.Cannot_connect_to_HTTPS_server_through_proxy */
    0x0051276c addiu a2, a2, -0x1b40         |     a2 += -0x1b40;
    0x00512770 jalr t9                       |     t9 ();
    0x00512774 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00512778 addiu a1, zero, 3             |     a1 = 3;
    0x0051277c move a0, s6                   |     a0 = s6;
    0x00512780 lw t9, -0x7a1c(gp)            |     t9 = sym._php_stream_free;
    0x00512784 move s7, zero                 |     s7 = 0;
    0x00512788 jalr t9                       |     t9 ();
    0x0051278c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00512790 sw zero, 0xcf0(sp)            |     *(var_cf0h) = 0;
    0x00512794 sw zero, 0xce4(sp)            |     *(var_ce4h) = 0;
    0x00512798 sw zero, 0xcec(sp)            |     *(var_cech) = 0;
    0x0051279c move s1, zero                 |     s1 = 0;
                                             | label_40:
    0x005127a0 move s6, zero                 |     s6 = 0;
    0x005127a4 b 0x514dfc                    |     goto label_82;
                                             | label_111:
    0x005127a8 lw a0, 0x10(v0)               |     a0 = *((v0 + 4));
    0x005127ac b 0x5121fc                    |     goto label_6;
                                             | label_119:
    0x005127b0 lbu v1, 8(s3)                 |     v1 = *((s3 + 8));
                                             |     if (v1 != v0) {
    0x005127b4 bne v1, v0, 0x512838          |         goto label_9;
                                             |     }
    0x005127b8 nop                           |     
    0x005127bc lw s2, (s3)                   |     s2 = *(s3);
    0x005127c0 addiu s7, zero, 0x20          |     s7 = 0x20;
    0x005127c4 addiu s2, s2, 0x10            |     s2 += 0x10;
                                             |     do {
    0x005127c8 lb v0, (s2)                   |         v0 = *(s2);
    0x005127cc addiu s1, s2, 1               |         s1 = s2 + 1;
                                             |         if (v0 != s7) {
    0x005127d0 beq v0, s7, 0x512840          |             
    0x005127d4 addiu v1, zero, 9             |             v1 = 9;
                                             |             if (v0 == v1) {
    0x005127d8 beq v0, v1, 0x512840          |                 goto label_124;
                                             |             }
    0x005127dc nop                           |             
    0x005127e0 move s1, s2                   |             s1 = s2;
    0x005127e4 addiu a0, zero, 0xd           |             a0 = 0xd;
    0x005127e8 addiu v1, zero, 0xa           |             v1 = 0xa;
                                             | label_8:
    0x005127ec lb v0, (s1)                   |             v0 = *(s1);
                                             |             if (v0 != 0) {
    0x005127f0 beqz v0, 0x512838             |                 
    0x005127f4 nop                           |                 
    0x005127f8 addiu a1, zero, 0x3a          |                 a1 = 0x3a;
                                             |                 if (v0 == a1) {
    0x005127fc beq v0, a1, 0x51542c          |                     goto label_125;
                                             |                 }
    0x00512800 nop                           |                 
                                             |                 if (v0 != a0) {
    0x00512804 beq v0, a0, 0x512814          |                     
    0x00512808 nop                           |                     
                                             |                     if (v0 != v1) {
    0x0051280c bne v0, v1, 0x512848          |                         goto label_126;
                                             |                     }
    0x00512810 nop                           |                     
                                             |                 }
                                             | label_10:
    0x00512814 addiu a0, zero, 0xd           |                 a0 = 0xd;
                                             | label_12:
    0x00512818 addiu v1, zero, 0xa           |                 v1 = 0xa;
                                             | label_13:
    0x0051281c lb v0, (s1)                   |                 v0 = *(s1);
                                             |                 if (v0 == a0) {
    0x00512820 beq v0, a0, 0x51288c          |                     goto label_127;
                                             |                 }
    0x00512824 nop                           |                 
                                             |                 if (v0 == v1) {
    0x00512828 beq v0, v1, 0x51288c          |                     goto label_127;
                                             |                 }
    0x0051282c nop                           |                 
                                             |                 if (v0 != 0) {
    0x00512830 bnez v0, 0x512840             |                     goto label_124;
                                             |                 }
    0x00512834 nop                           |                 
                                             |             }
                                             | label_9:
    0x00512838 addiu s3, s3, 0x18            |             s3 += 0x18;
    0x0051283c b 0x5125e0                    |             goto label_7;
                                             |         }
                                             | label_124:
    0x00512840 move s2, s1                   |         s2 = s1;
    0x00512844 b 0x5127c8                    |         
                                             |     } while (1);
                                             | label_126:
    0x00512848 addiu s1, s1, 1               |     s1++;
    0x0051284c b 0x5127ec                    |     goto label_8;
                                             | label_94:
    0x00512850 addiu s1, s1, 1               |     s1++;
    0x00512854 b 0x515460                    |     goto label_128;
                                             | label_11:
    0x00512858 lb v0, (s1)                   |     v0 = *(s1);
                                             |     if (v0 == 0) {
    0x0051285c beqz v0, 0x512838             |         goto label_9;
                                             |     }
    0x00512860 nop                           |     
                                             |     if (v0 == a0) {
    0x00512864 beq v0, a0, 0x512814          |         goto label_10;
                                             |     }
    0x00512868 nop                           |     
    0x0051286c addiu s1, s1, 1               |     s1++;
                                             |     if (v0 != v1) {
    0x00512870 bne v0, v1, 0x512858          |         goto label_11;
                                             |     }
    0x00512874 addiu s1, s1, -1              |     s1 += -1;
    0x00512878 addiu a0, zero, 0xd           |     a0 = 0xd;
    0x0051287c b 0x512818                    |     goto label_12;
                                             | label_93:
    0x00512880 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             | label_92:
    0x00512884 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00512888 b 0x512858                    |     goto label_11;
                                             | label_127:
    0x0051288c addiu s1, s1, 1               |     s1++;
    0x00512890 b 0x51281c                    |     goto label_13;
                                             |     if (v1 != a0) {
                                             | label_118:
    0x00512894 bne v1, a0, 0x5125ec          |         goto label_14;
                                             |     }
    0x00512898 nop                           |     
    0x0051289c lw s2, (v0)                   |     s2 = *(v0);
    0x005128a0 lw v0, 0xc(s2)                |     v0 = *((s2 + 3));
    0x005128a4 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x005128a8 beqz v0, 0x5125f0             |         goto label_15;
                                             |     }
    0x005128ac lw s3, -0x7fbc(gp)            |     s3 = *((gp - 8175));
    0x005128b0 addiu s2, s2, 0x10            |     s2 += 0x10;
    0x005128b4 addiu s7, zero, 0x20          |     s7 = 0x20;
                                             |     /* str.Proxy_Authorization: */
    0x005128b8 addiu s3, s3, -0x1b58         |     s3 += -0x1b58;
                                             | label_16:
    0x005128bc lb v0, (s2)                   |     v0 = *(s2);
    0x005128c0 addiu v1, zero, 9             |     v1 = 9;
                                             |     if (v0 == s7) {
    0x005128c4 beq v0, s7, 0x512928          |         goto label_129;
                                             |     }
    0x005128c8 move s1, s2                   |     s1 = s2;
                                             |     if (v0 == v1) {
    0x005128cc beq v0, v1, 0x512928          |         goto label_129;
                                             |     }
    0x005128d0 addiu a0, zero, 0xd           |     a0 = 0xd;
    0x005128d4 addiu v1, zero, 0xa           |     v1 = 0xa;
                                             | label_17:
    0x005128d8 lb v0, (s1)                   |     v0 = *(s1);
    0x005128dc addiu a1, zero, 0x3a          |     a1 = 0x3a;
                                             |     if (v0 == 0) {
    0x005128e0 beqz v0, 0x5125ec             |         goto label_14;
                                             |     }
                                             |     if (v0 == a1) {
    0x005128e4 beq v0, a1, 0x515530          |         goto label_130;
                                             |     }
    0x005128e8 nop                           |     
                                             |     if (v0 != a0) {
    0x005128ec beq v0, a0, 0x5128fc          |         
    0x005128f0 nop                           |         
                                             |         if (v0 != v1) {
    0x005128f4 bne v0, v1, 0x512934          |             goto label_131;
                                             |         }
    0x005128f8 nop                           |         
                                             |     }
                                             | label_18:
    0x005128fc addiu a0, zero, 0xd           |     a0 = 0xd;
                                             | label_20:
    0x00512900 addiu v1, zero, 0xa           |     v1 = 0xa;
                                             | label_21:
    0x00512904 lb v0, (s1)                   |     v0 = *(s1);
                                             |     if (v0 == a0) {
    0x00512908 beq v0, a0, 0x512978          |         goto label_132;
                                             |     }
    0x0051290c nop                           |     
                                             |     if (v0 == v1) {
    0x00512910 beq v0, v1, 0x512978          |         goto label_132;
                                             |     }
    0x00512914 nop                           |     
    0x00512918 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x0051291c bnez v0, 0x51292c             |         
    0x00512920 b 0x5125f0                    |         goto label_15;
    0x00512924 nop                           |         
                                             | label_129:
    0x00512928 addiu s1, s2, 1               |         s1 = s2 + 1;
                                             |     }
    0x0051292c move s2, s1                   |     s2 = s1;
    0x00512930 b 0x5128bc                    |     goto label_16;
                                             | label_131:
    0x00512934 addiu s1, s1, 1               |     s1++;
    0x00512938 b 0x5128d8                    |     goto label_17;
                                             | label_95:
    0x0051293c move s3, s1                   |     s3 = s1;
    0x00512940 b 0x51549c                    |     goto label_133;
                                             | label_19:
    0x00512944 lb v0, (s1)                   |     v0 = *(s1);
                                             |     if (v0 == 0) {
    0x00512948 beqz v0, 0x5125ec             |         goto label_14;
                                             |     }
    0x0051294c nop                           |     
                                             |     if (v0 == a0) {
    0x00512950 beq v0, a0, 0x5128fc          |         goto label_18;
                                             |     }
    0x00512954 nop                           |     
    0x00512958 addiu s1, s1, 1               |     s1++;
                                             |     if (v0 != v1) {
    0x0051295c bne v0, v1, 0x512944          |         goto label_19;
                                             |     }
    0x00512960 addiu s1, s1, -1              |     s1 += -1;
    0x00512964 addiu a0, zero, 0xd           |     a0 = 0xd;
    0x00512968 b 0x512900                    |     goto label_20;
                                             | label_97:
    0x0051296c addiu a0, zero, 0xd           |     a0 = 0xd;
                                             | label_96:
    0x00512970 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00512974 b 0x512944                    |     goto label_19;
                                             | label_132:
    0x00512978 addiu s1, s1, 1               |     s1++;
    0x0051297c b 0x512904                    |     goto label_21;
                                             | label_121:
    0x00512980 jalr t9                       |     t9 ();
    0x00512984 nop                           |     
    0x00512988 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051298c b 0x5126ec                    |     goto label_22;
                                             | label_123:
    0x00512990 lw t9, -0x6a98(gp)            |     t9 = sym.php_stream_xport_crypto_enable;
    0x00512994 addiu a1, zero, 1             |     a1 = 1;
    0x00512998 move a0, s6                   |     a0 = s6;
    0x0051299c jalr t9                       |     t9 ();
    0x005129a0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 < 0) {
    0x005129a4 bltz v0, 0x51275c             |         goto label_23;
                                             |     }
    0x005129a8 lw v0, 0xd3c(sp)              |     v0 = *(arg_d3ch);
                                             | label_109:
    0x005129ac andi v0, v0, 0x20             |     v0 &= 0x20;
    0x005129b0 lw t9, -0x7a58(gp)            |     t9 = sym._php_stream_set_option;
                                             |     if (v0 == 0) {
    0x005129b4 beqz v0, 0x512bb4             |         goto label_134;
                                             |     }
    0x005129b8 move a3, zero                 |     a3 = 0;
    0x005129bc addiu a2, zero, 1             |     a2 = 1;
    0x005129c0 addiu a1, zero, 5             |     a1 = 5;
    0x005129c4 move a0, s6                   |     a0 = s6;
    0x005129c8 jalr t9                       |     t9 ();
    0x005129cc lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005129d0 sw v0, 0xcec(sp)              |     *(var_cech) = v0;
                                             |     do {
    0x005129d4 lw v0, 0x4c(s6)               |         v0 = *(var_d1ch);
    0x005129d8 lw t9, -0x6aac(gp)            |         t9 = sym.php_stream_context_set;
    0x005129dc andi v1, v0, 0xc              |         v1 = v0 & 0xc;
    0x005129e0 sw v1, 0xcf0(sp)              |         *(var_cf0h) = v1;
    0x005129e4 addiu v1, zero, -0xd          |         v1 = -0xd;
    0x005129e8 and v0, v0, v1                |         v0 &= v1;
    0x005129ec sw v0, 0x4c(s6)               |         *(var_d1ch) = v0;
    0x005129f0 move a1, s0                   |         a1 = s0;
    0x005129f4 move a0, s6                   |         a0 = s6;
    0x005129f8 jalr t9                       |         t9 ();
    0x005129fc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (s0 == 0) {
    0x00512a00 beqz s0, 0x512c0c             |             goto label_135;
                                             |         }
    0x00512a04 lw v0, (s0)                   |         v0 = *(s0);
    0x00512a08 lw t9, -0x6aa8(gp)            |         t9 = sym.php_stream_notification_notify;
                                             |         if (v0 != 0) {
    0x00512a0c beqz v0, 0x512a38             |             
    0x00512a10 sw zero, 0x1c(sp)             |             *(var_1ch) = 0;
    0x00512a14 sw zero, 0x18(sp)             |             *(var_18h) = 0;
    0x00512a18 sw zero, 0x14(sp)             |             *(var_14h) = 0;
    0x00512a1c sw zero, 0x10(sp)             |             *(var_10h) = 0;
    0x00512a20 move a3, zero                 |             a3 = 0;
    0x00512a24 move a2, zero                 |             a2 = 0;
    0x00512a28 addiu a1, zero, 2             |             a1 = 2;
    0x00512a2c move a0, s0                   |             a0 = s0;
    0x00512a30 jalr t9                       |             t9 ();
    0x00512a34 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00512a38 lw v0, 0xce8(sp)              |         v0 = *(var_ce8h);
    0x00512a3c lw a2, -0x7fc4(gp)            |         a2 = *((gp - 8177));
                                             |         if (v0 != 0) {
    0x00512a40 beqz v0, 0x512a6c             |             
    0x00512a44 lw a2, -0x7fbc(gp)            |             a2 = *((gp - 8175));
    0x00512a48 lw v0, 0xcdc(sp)              |             v0 = *(var_cdch);
    0x00512a4c lw t9, -0x6a94(gp)            |             t9 = sym.php_stream_context_get_option;
                                             |             /* str.max_redirects */
    0x00512a50 addiu a2, a2, -0x1b10         |             a2 += -0x1b10;
    0x00512a54 addiu a1, v0, 0x18c0          |             a1 = v0 + 0x18c0;
    0x00512a58 move a0, s0                   |             a0 = s0;
    0x00512a5c jalr t9                       |             t9 ();
    0x00512a60 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 != 0) {
    0x00512a64 bnez v0, 0x512bbc             |                 goto label_136;
                                             |             }
                                             | label_24:
    0x00512a68 lw a2, -0x7fc4(gp)            |             a2 = *((gp - 8177));
                                             |         }
    0x00512a6c lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
    0x00512a70 lw t9, -0x6a94(gp)            |         t9 = sym.php_stream_context_get_option;
                                             |         /* esilref: 'method' */
    0x00512a74 addiu a2, a2, -0x7a00         |         a2 += -0x7a00;
    0x00512a78 addiu a1, v0, 0x18c0          |         a1 = v0 + 0x18c0;
    0x00512a7c move a0, s0                   |         a0 = s0;
    0x00512a80 jalr t9                       |         t9 ();
    0x00512a84 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00512a88 beqz v0, 0x512c0c             |             goto label_135;
                                             |         }
    0x00512a8c lbu a0, 8(v0)                 |         a0 = *((v0 + 8));
    0x00512a90 addiu v1, zero, 6             |         v1 = 6;
                                             |         if (a0 != v1) {
    0x00512a94 bne a0, v1, 0x512c0c          |             goto label_135;
                                             |         }
    0x00512a98 nop                           |         
    0x00512a9c lw s2, (v0)                   |         s2 = *(v0);
    0x00512aa0 lw s3, 0xc(s2)                |         s3 = *((s2 + 3));
    0x00512aa4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (s3 == 0) {
    0x00512aa8 beqz s3, 0x512c10             |             goto label_137;
                                             |         }
    0x00512aac lw v1, 0xd4c(sp)              |         v1 = *(arg_d4ch);
    0x00512ab0 addiu v0, zero, 1             |         v0 = 1;
    0x00512ab4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v1 != v0) {
    0x00512ab8 beq v1, v0, 0x512af0          |             
    0x00512abc addiu v0, zero, 3             |             v0 = 3;
    0x00512ac0 addiu v0, zero, 4             |             v0 = 4;
                                             |             if (s3 != v0) {
    0x00512ac4 bne s3, v0, 0x512be8          |                 goto label_138;
                                             |             }
    0x00512ac8 lw a0, -0x7fbc(gp)            |             a0 = *((gp - 8175));
    0x00512acc addiu a2, zero, 3             |             a2 = 3;
    0x00512ad0 addiu a1, s2, 0x10            |             a1 = s2 + 0x10;
                                             |             /* esilref: 'GET' */
    0x00512ad4 addiu a0, a0, -0x1b00         |             a0 += -0x1b00;
                                             | label_25:
    0x00512ad8 lw t9, -0x5f4c(gp)            |             t9 = sym.imp.memcmp;
    0x00512adc jalr t9                       |             t9 ();
    0x00512ae0 nop                           |             
    0x00512ae4 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 != 0) {
    0x00512ae8 bnez v0, 0x512c0c             |                 goto label_135;
                                             |             }
    0x00512aec lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |         }
    0x00512af0 addiu s2, s2, 0x10            |         s2 += 0x10;
                                             |         if (v0 == 0) {
    0x00512af4 beqz v0, 0x512c04             |             goto label_139;
                                             |         }
    0x00512af8 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x00512afc lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00512b00 addu s1, s3, s1               |         s1 = s3 + s1;
    0x00512b04 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00512b08 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 == 0) {
    0x00512b0c bnez v0, 0x512b28             |             
                                             | label_26:
    0x00512b10 lw t9, -0x7ed4(gp)            |             t9 = sym.smart_str_erealloc;
    0x00512b14 move a1, s1                   |             a1 = s1;
    0x00512b18 addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00512b1c jalr t9                       |             t9 ();
    0x00512b20 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00512b24 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |         }
    0x00512b28 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x00512b2c addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00512b30 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00512b34 move a1, s2                   |         a1 = s2;
    0x00512b38 move a2, s3                   |         a2 = s3;
    0x00512b3c addu a0, a0, v0               |         a0 += v0;
    0x00512b40 jalr t9                       |         t9 ();
    0x00512b44 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00512b48 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512b4c addiu s2, s1, 1               |         s2 = s1 + 1;
    0x00512b50 sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00512b54 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00512b58 sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x00512b5c lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 == 0) {
    0x00512b60 bnez v0, 0x512b7c             |             
    0x00512b64 lw t9, -0x7ed4(gp)            |             t9 = sym.smart_str_erealloc;
    0x00512b68 move a1, s2                   |             a1 = s2;
    0x00512b6c addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00512b70 jalr t9                       |             t9 ();
    0x00512b74 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00512b78 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |         }
    0x00512b7c addiu v1, zero, 0x20          |         v1 = 0x20;
    0x00512b80 addu s1, v0, s1               |         s1 = v0 + s1;
    0x00512b84 sb v1, 0x10(s1)               |         *((s1 + 16)) = v1;
    0x00512b88 sw s2, 0xc(v0)                |         *((v0 + 3)) = s2;
                                             |         if (s4 == 0) {
    0x00512b8c beqz s4, 0x512c80             |             goto label_140;
                                             |         }
                                             | label_27:
    0x00512b90 lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
    0x00512b94 lw a0, 0xd34(sp)              |         a0 = *(arg_d34h);
    0x00512b98 jalr t9                       |         t9 ();
    0x00512b9c move s2, v0                   |         s2 = v0;
    0x00512ba0 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00512ba4 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00512ba8 bnez v0, 0x512de8             |             goto label_141;
                                             |         }
    0x00512bac move s1, s2                   |         s1 = s2;
    0x00512bb0 b 0x512e00                    |         goto label_142;
                                             | label_134:
    0x00512bb4 sw zero, 0xcec(sp)            |         *(var_cech) = 0;
    0x00512bb8 b 0x5129d4                    |         
                                             |     } while (1);
                                             | label_136:
    0x00512bbc lbu a0, 8(v0)                 |     a0 = *((v0 + 8));
    0x00512bc0 addiu v1, zero, 4             |     v1 = 4;
    0x00512bc4 lw t9, -0x7ec0(gp)            |     t9 = sym._zval_get_long_func;
                                             |     if (a0 != v1) {
    0x00512bc8 bne a0, v1, 0x512bd8          |         goto label_143;
                                             |     }
    0x00512bcc lw v0, (v0)                   |     v0 = *(v0);
                                             |     do {
    0x00512bd0 sw v0, 0xd48(sp)              |         *(arg_d48h) = v0;
    0x00512bd4 b 0x512a68                    |         goto label_24;
                                             | label_143:
    0x00512bd8 move a0, v0                   |         a0 = v0;
    0x00512bdc jalr t9                       |         t9 ();
    0x00512be0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512be4 b 0x512bd0                    |         
                                             |     } while (1);
                                             | label_138:
    0x00512be8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (s3 == v0) {
    0x00512bec bne s3, v0, 0x512c10          |         
    0x00512bf0 lw a0, -0x7fbc(gp)            |         a0 = *((gp - 8175));
    0x00512bf4 addiu a2, zero, 4             |         a2 = 4;
    0x00512bf8 addiu a1, s2, 0x10            |         a1 = s2 + 0x10;
                                             |         /* str.HEAD */
    0x00512bfc addiu a0, a0, -0x1afc         |         a0 += -0x1afc;
    0x00512c00 b 0x512ad8                    |         goto label_25;
                                             | label_139:
    0x00512c04 move s1, s3                   |         s1 = s3;
    0x00512c08 b 0x512b10                    |         goto label_26;
                                             | label_135:
    0x00512c0c lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
                                             | label_137:
    0x00512c10 addiu s1, zero, 4             |     s1 = 4;
                                             |     if (v0 != 0) {
    0x00512c14 beqz v0, 0x512c30             |         
    0x00512c18 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x00512c1c lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00512c20 addiu s1, s1, 4               |         s1 += 4;
    0x00512c24 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00512c28 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00512c2c bnez v0, 0x512c48             |             goto label_144;
                                             |         }
                                             |     }
    0x00512c30 lw t9, -0x7ed4(gp)            |     t9 = sym.smart_str_erealloc;
    0x00512c34 move a1, s1                   |     a1 = s1;
    0x00512c38 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x00512c3c jalr t9                       |     t9 ();
    0x00512c40 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00512c44 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_144:
    0x00512c48 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x00512c4c addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00512c50 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00512c54 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00512c58 addiu a2, zero, 4             |     a2 = 4;
                                             |     /* str.GET_ */
    0x00512c5c addiu a1, a1, -0x1af4         |     a1 += -0x1af4;
    0x00512c60 addu a0, a0, v0               |     a0 += v0;
    0x00512c64 jalr t9                       |     t9 ();
    0x00512c68 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00512c6c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00512c70 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
                                             |     if (s4 != 0) {
    0x00512c74 bnez s4, 0x512b90             |         goto label_27;
                                             |     }
                                             |     if (s0 == 0) {
    0x00512c78 beqz s0, 0x512cbc             |         goto label_145;
                                             |     }
    0x00512c7c nop                           |     
                                             | label_140:
    0x00512c80 lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
    0x00512c84 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
    0x00512c88 lw t9, -0x6a94(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.request_fulluri */
    0x00512c8c addiu a2, a2, -0x1aec         |     a2 += -0x1aec;
    0x00512c90 addiu a1, v0, 0x18c0          |     a1 = v0 + 0x18c0;
    0x00512c94 move a0, s0                   |     a0 = s0;
    0x00512c98 jalr t9                       |     t9 ();
    0x00512c9c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00512ca0 beqz v0, 0x512cbc             |         goto label_145;
                                             |     }
    0x00512ca4 lw t9, -0x7ec4(gp)            |     t9 = sym.zend_is_true;
    0x00512ca8 move a0, v0                   |     a0 = v0;
    0x00512cac jalr t9                       |     t9 ();
    0x00512cb0 andi v0, v0, 0xff             |     v0 &= 0xff;
    0x00512cb4 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00512cb8 bnez v0, 0x512b90             |         goto label_27;
                                             |     }
                                             | label_145:
    0x00512cbc lw s2, 0x14(fp)               |     s2 = *(arg_d44h);
    0x00512cc0 lw s1, 0xcc0(sp)              |     s1 = *(var_cc0h);
                                             |     if (s2 == 0) {
    0x00512cc4 beqz s2, 0x513488             |         goto label_146;
                                             |     }
    0x00512cc8 lb v0, (s2)                   |     v0 = *(s2);
    0x00512ccc lw t9, -0x6194(gp)            |     t9 = sym.imp.strlen;
                                             |     if (v0 == 0) {
    0x00512cd0 beqz v0, 0x513488             |         goto label_146;
                                             |     }
    0x00512cd4 move a0, s2                   |     a0 = s2;
    0x00512cd8 jalr t9                       |     t9 ();
    0x00512cdc move s3, v0                   |     s3 = v0;
    0x00512ce0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (s1 == 0) {
    0x00512ce4 beqz s1, 0x513480             |         goto label_147;
                                             |     }
    0x00512ce8 lw s1, 0xc(s1)                |     s1 = *((s1 + 3));
    0x00512cec addu s1, v0, s1               |     s1 = v0 + s1;
    0x00512cf0 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00512cf4 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00512cf8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00512cfc bnez v0, 0x512d18             |     
                                             |     while (1) {
    0x00512d00 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00512d04 move a1, s1                   |         a1 = s1;
    0x00512d08 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00512d0c jalr t9                       |         t9 ();
    0x00512d10 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512d14 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00512d18 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x00512d1c addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00512d20 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00512d24 move a2, s3                   |         a2 = s3;
    0x00512d28 move a1, s2                   |         a1 = s2;
    0x00512d2c addu a0, a0, v0               |         a0 += v0;
    0x00512d30 jalr t9                       |         t9 ();
    0x00512d34 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512d38 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_28:
    0x00512d3c sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00512d40 lw v0, 0x18(fp)               |         v0 = *(arg_d48h);
    0x00512d44 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00512d48 beqz v0, 0x512e40             |             
    0x00512d4c addiu s1, zero, 1             |             s1 = 1;
                                             |             if (v0 != 0) {
    0x00512d50 beqz v0, 0x512d6c             |                 
    0x00512d54 lw s1, 0xc(v0)                |                 s1 = *((v0 + 3));
    0x00512d58 lw v0, 0xcc4(sp)              |                 v0 = *(var_cc4h);
    0x00512d5c addiu s1, s1, 1               |                 s1++;
    0x00512d60 sltu v0, s1, v0               |                 v0 = (s1 < v0) ? 1 : 0;
    0x00512d64 lw v0, 0xcc0(sp)              |                 v0 = *(var_cc0h);
                                             |                 if (v0 != 0) {
    0x00512d68 bnez v0, 0x512d84             |                     goto label_148;
                                             |                 }
                                             |             }
    0x00512d6c lw t9, -0x7ed4(gp)            |             t9 = sym.smart_str_erealloc;
    0x00512d70 move a1, s1                   |             a1 = s1;
    0x00512d74 addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00512d78 jalr t9                       |             t9 ();
    0x00512d7c lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00512d80 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             | label_148:
    0x00512d84 addiu a0, zero, 0x3f          |             a0 = 0x3f;
    0x00512d88 addu v1, v0, s1               |             v1 = v0 + s1;
    0x00512d8c lw t9, -0x6194(gp)            |             t9 = sym.imp.strlen;
    0x00512d90 sb a0, 0xf(v1)                |             *((v1 + 15)) = a0;
    0x00512d94 lw s2, 0x18(fp)               |             s2 = *(arg_d48h);
    0x00512d98 sw s1, 0xc(v0)                |             *((v0 + 3)) = s1;
    0x00512d9c move a0, s2                   |             a0 = s2;
    0x00512da0 jalr t9                       |             t9 ();
    0x00512da4 addu s1, v0, s1               |             s1 = v0 + s1;
    0x00512da8 move s3, v0                   |             s3 = v0;
    0x00512dac lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00512db0 sltu v0, s1, v0               |             v0 = (s1 < v0) ? 1 : 0;
    0x00512db4 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00512db8 bnez v0, 0x512dd0             |                 
    0x00512dbc lw t9, -0x7ed4(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00512dc0 move a1, s1                   |                 a1 = s1;
    0x00512dc4 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x00512dc8 jalr t9                       |                 t9 ();
    0x00512dcc lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x00512dd0 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00512dd4 move a2, s3                   |             a2 = s3;
    0x00512dd8 addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x00512ddc move a1, s2                   |             a1 = s2;
    0x00512de0 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x00512de4 b 0x512e28                    |             goto label_149;
                                             | label_141:
    0x00512de8 lw s1, 0xc(v0)                |             s1 = *((v0 + 3));
    0x00512dec lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00512df0 addu s1, s2, s1               |             s1 = s2 + s1;
    0x00512df4 sltu v0, s1, v0               |             v0 = (s1 < v0) ? 1 : 0;
    0x00512df8 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 == 0) {
    0x00512dfc bnez v0, 0x512e18             |                 
                                             | label_142:
    0x00512e00 lw t9, -0x7ed4(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00512e04 move a1, s1                   |                 a1 = s1;
    0x00512e08 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x00512e0c jalr t9                       |                 t9 ();
    0x00512e10 lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00512e14 lw v0, 0xcc0(sp)              |                 v0 = *(var_cc0h);
                                             |             }
    0x00512e18 lw a1, 0xd34(sp)              |             a1 = *(arg_d34h);
    0x00512e1c addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x00512e20 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x00512e24 move a2, s2                   |             a2 = s2;
                                             | label_149:
    0x00512e28 lw t9, -0x6188(gp)            |             t9 = sym.imp.memcpy;
    0x00512e2c addu a0, a0, v0               |             a0 += v0;
    0x00512e30 jalr t9                       |             t9 ();
    0x00512e34 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00512e38 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00512e3c sw s1, 0xc(v0)                |             *((v0 + 3)) = s1;
                                             |         }
    0x00512e40 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
                                             |         if (s0 == 0) {
    0x00512e44 beqz s0, 0x5134f0             |             goto label_150;
                                             |         }
    0x00512e48 lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
    0x00512e4c lw t9, -0x6a94(gp)            |         t9 = sym.php_stream_context_get_option;
                                             |         /* str.protocol_version */
    0x00512e50 addiu a2, a2, -0x1adc         |         a2 += -0x1adc;
    0x00512e54 addiu a1, v0, 0x18c0          |         a1 = v0 + 0x18c0;
    0x00512e58 move a0, s0                   |         a0 = s0;
    0x00512e5c jalr t9                       |         t9 ();
    0x00512e60 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00512e64 beqz v0, 0x5134f0             |             goto label_150;
                                             |         }
    0x00512e68 lbu a0, 8(v0)                 |         a0 = *((v0 + 8));
    0x00512e6c addiu v1, zero, 5             |         v1 = 5;
    0x00512e70 lw t9, -0x7ebc(gp)            |         t9 = sym._zval_get_double_func;
                                             |         if (a0 != v1) {
    0x00512e74 bne a0, v1, 0x5134d8          |             goto label_151;
                                             |         }
    0x00512e78 lw v1, 4(v0)                  |         v1 = *((v0 + 1));
    0x00512e7c lw v0, (v0)                   |         v0 = *(v0);
                                             | label_29:
    0x00512e80 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x00512e84 lw t9, -0x7a0c(gp)            |         t9 = sym.zend_spprintf;
    0x00512e88 sw v0, 0x10(sp)               |         *(var_10h) = v0;
    0x00512e8c sw v1, 0x14(sp)               |         *(var_14h) = v1;
                                             |         /* str._.1F */
    0x00512e90 addiu a2, a2, -0x1ac8         |         a2 += -0x1ac8;
    0x00512e94 move a1, zero                 |         a1 = 0;
    0x00512e98 addiu a0, sp, 0x30            |         a0 = sp + 0x30;
    0x00512e9c jalr t9                       |         t9 ();
    0x00512ea0 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00512ea4 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00512ea8 beqz v0, 0x5134e8             |             goto label_152;
                                             |         }
    0x00512eac lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x00512eb0 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00512eb4 addiu s1, s1, 6               |         s1 += 6;
    0x00512eb8 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00512ebc lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 == 0) {
    0x00512ec0 bnez v0, 0x512edc             |             
                                             | label_30:
    0x00512ec4 lw t9, -0x7ed4(gp)            |             t9 = sym.smart_str_erealloc;
    0x00512ec8 move a1, s1                   |             a1 = s1;
    0x00512ecc addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00512ed0 jalr t9                       |             t9 ();
    0x00512ed4 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00512ed8 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |         }
    0x00512edc lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
    0x00512ee0 addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00512ee4 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00512ee8 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x00512eec addiu a2, zero, 6             |         a2 = 6;
                                             |         /* str._HTTP_ */
    0x00512ef0 addiu a1, a1, -0x1ac0         |         a1 += -0x1ac0;
    0x00512ef4 addu a0, a0, v0               |         a0 += v0;
    0x00512ef8 jalr t9                       |         t9 ();
    0x00512efc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512f00 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00512f04 lw s2, 0x30(sp)               |         s2 = *(var_30h);
    0x00512f08 lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
    0x00512f0c sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00512f10 move a0, s2                   |         a0 = s2;
    0x00512f14 jalr t9                       |         t9 ();
    0x00512f18 addu s1, v0, s1               |         s1 = v0 + s1;
    0x00512f1c move s3, v0                   |         s3 = v0;
    0x00512f20 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00512f24 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00512f28 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00512f2c bnez v0, 0x512f44             |             
    0x00512f30 lw t9, -0x7ed4(gp)            |             t9 = sym.smart_str_erealloc;
    0x00512f34 move a1, s1                   |             a1 = s1;
    0x00512f38 addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00512f3c jalr t9                       |             t9 ();
    0x00512f40 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00512f44 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00512f48 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x00512f4c addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00512f50 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00512f54 move a2, s3                   |         a2 = s3;
    0x00512f58 move a1, s2                   |         a1 = s2;
    0x00512f5c addu a0, a0, v0               |         a0 += v0;
    0x00512f60 jalr t9                       |         t9 ();
    0x00512f64 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00512f68 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00512f6c sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00512f70 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00512f74 addiu s1, s1, 2               |         s1 += 2;
    0x00512f78 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00512f7c lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |         if (v0 == 0) {
    0x00512f80 bnez v0, 0x512f9c             |             
    0x00512f84 lw t9, -0x7ed4(gp)            |             t9 = sym.smart_str_erealloc;
    0x00512f88 move a1, s1                   |             a1 = s1;
    0x00512f8c addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00512f90 jalr t9                       |             t9 ();
    0x00512f94 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00512f98 lw v1, 0xcc0(sp)              |             v1 = *(var_cc0h);
                                             |         }
    0x00512f9c lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00512fa0 addiu v0, v1, 0x10            |         v0 = v1 + 0x10;
    0x00512fa4 lw v1, 0xc(v1)                |         v1 = *((v1 + 3));
    0x00512fa8 addu v0, v0, v1               |         v0 += v1;
    0x00512fac addiu v1, zero, 0xd           |         v1 = 0xd;
    0x00512fb0 sb v1, (v0)                   |         *(v0) = v1;
    0x00512fb4 addiu v1, zero, 0xa           |         v1 = 0xa;
    0x00512fb8 sb v1, 1(v0)                  |         *((v0 + 1)) = v1;
    0x00512fbc lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00512fc0 lw a0, 0x30(sp)               |         a0 = *(var_30h);
    0x00512fc4 sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00512fc8 jalr t9                       |         t9 ();
    0x00512fcc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             | label_31:
    0x00512fd0 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x00512fd4 lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
    0x00512fd8 lw t9, -0x6a94(gp)            |         t9 = sym.php_stream_context_get_option;
                                             |         /* esilref: 'header' */
    0x00512fdc addiu a2, a2, -0x19dc         |         a2 += -0x19dc;
    0x00512fe0 addiu a1, v0, 0x18c0          |         a1 = v0 + 0x18c0;
    0x00512fe4 move a0, s0                   |         a0 = s0;
    0x00512fe8 jalr t9                       |         t9 ();
    0x00512fec lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00512ff0 beqz v0, 0x51355c             |             goto label_153;
                                             |         }
    0x00512ff4 lbu v1, 8(v0)                 |         v1 = *((v0 + 8));
    0x00512ff8 addiu a0, zero, 7             |         a0 = 7;
    0x00512ffc addiu s7, sp, 0x30            |         s7 = sp + 0x30;
                                             |         if (v1 != a0) {
    0x00513000 bne v1, a0, 0x513650          |             goto label_154;
                                             |         }
    0x00513004 lw v0, (v0)                   |         v0 = *(v0);
    0x00513008 addiu v1, zero, 0x18          |         v1 = 0x18;
    0x0051300c sw zero, 0x30(sp)             |         *(var_30h) = 0;
    0x00513010 lw s2, 0x10(v0)               |         s2 = *((v0 + 4));
    0x00513014 lw v0, 0x14(v0)               |         v0 = *((v0 + 5));
    0x00513018 sw zero, 0x34(sp)             |         *(var_34h) = 0;
    0x0051301c mul a0, v1, v0                |         __asm ("mul a0, v1, v0");
    0x00513020 addu v0, a0, s2               |         v0 = a0 + s2;
    0x00513024 sw v0, 0xce4(sp)              |         *(var_ce4h) = v0;
                                             | label_32:
    0x00513028 lw v0, 0xce4(sp)              |         v0 = *(var_ce4h);
    0x0051302c lw a0, 0x30(sp)               |         a0 = *(var_30h);
                                             |         if (s2 != v0) {
    0x00513030 bne s2, v0, 0x513568          |             goto label_155;
                                             |         }
    0x00513034 lw t9, -0x6b80(gp)            |         t9 = sym.php_trim;
                                             |         if (a0 == 0) {
    0x00513038 beqz a0, 0x51355c             |             goto label_153;
                                             |         }
    0x0051303c lw v0, 0xc(a0)                |         v0 = *((a0 + 3));
    0x00513040 addu v0, a0, v0               |         v0 = a0 + v0;
    0x00513044 addiu a3, zero, 3             |         a3 = 3;
    0x00513048 sb zero, 0x10(v0)             |         *((v0 + 16)) = 0;
    0x0051304c move a2, zero                 |         a2 = 0;
    0x00513050 move a1, zero                 |         a1 = 0;
    0x00513054 jalr t9                       |         t9 ();
    0x00513058 lw a0, 0x30(sp)               |         a0 = *(var_30h);
    0x0051305c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513060 move s2, v0                   |         s2 = v0;
                                             |         if (a0 != 0) {
    0x00513064 beqz a0, 0x5130a4             |             
    0x00513068 lbu v0, 5(a0)                 |             v0 = *((a0 + 5));
    0x0051306c andi v1, v0, 2                |             v1 = v0 & 2;
                                             |             if (v1 != 0) {
    0x00513070 bnez v1, 0x5130a4             |                 goto label_33;
                                             |             }
    0x00513074 nop                           |             
    0x00513078 lw v1, (a0)                   |             v1 = *(a0);
    0x0051307c addiu v1, v1, -1              |             v1 += -1;
    0x00513080 sw v1, (a0)                   |             *(a0) = v1;
                                             |             if (v1 != 0) {
    0x00513084 bnez v1, 0x5130a4             |                 goto label_33;
                                             |             }
    0x00513088 andi v0, v0, 1                |             v0 &= 1;
    0x0051308c lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
                                             |             if (v0 == 0) {
    0x00513090 beqz v0, 0x513640             |                 goto label_156;
                                             |             }
    0x00513094 lw t9, -0x60d4(gp)            |             t9 = *((gp - 6197));
    0x00513098 jalr t9                       |             t9 ();
    0x0051309c nop                           |             
    0x005130a0 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
                                             | label_33:
    0x005130a4 move s4, zero                 |         s4 = 0;
                                             |         if (s2 == 0) {
    0x005130a8 beqz s2, 0x513560             |             goto label_34;
                                             |         }
    0x005130ac lw a1, 0xc(s2)                |         a1 = *((s2 + 3));
    0x005130b0 lw t9, -0x7e84(gp)            |         t9 = sym._estrndup;
                                             |         if (a1 == 0) {
    0x005130b4 beqz a1, 0x515588             |             goto label_157;
                                             |         }
    0x005130b8 addiu s3, s2, 0x10            |         s3 = s2 + 0x10;
    0x005130bc move a0, s3                   |         a0 = s3;
    0x005130c0 jalr t9                       |         t9 ();
    0x005130c4 move s4, v0                   |         s4 = v0;
    0x005130c8 lbu v0, 5(s2)                 |         v0 = *((s2 + 5));
    0x005130cc andi v0, v0, 2                |         v0 &= 2;
    0x005130d0 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x005130d4 beqz v0, 0x513688             |             goto label_158;
                                             |         }
    0x005130d8 lw s1, 0xc(s2)                |         s1 = *((s2 + 3));
                                             | label_36:
    0x005130dc lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x005130e0 addiu a0, s1, 0x18            |         a0 = s1 + 0x18;
    0x005130e4 addiu v0, zero, -8            |         v0 = -8;
    0x005130e8 and a0, a0, v0                |         a0 &= v0;
    0x005130ec jalr t9                       |         t9 ();
    0x005130f0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005130f4 move s2, v0                   |         s2 = v0;
    0x005130f8 addiu v0, zero, 1             |         v0 = 1;
    0x005130fc sw v0, (s2)                   |         *(s2) = v0;
    0x00513100 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x00513104 addiu v0, zero, 6             |         v0 = 6;
    0x00513108 sw s1, 0xc(s2)                |         *((s2 + 3)) = s1;
    0x0051310c move a2, s1                   |         a2 = s1;
    0x00513110 addu s1, s2, s1               |         s1 = s2 + s1;
    0x00513114 sw v0, 4(s2)                  |         *((s2 + 1)) = v0;
    0x00513118 sw zero, 8(s2)                |         *((s2 + 2)) = 0;
    0x0051311c move a1, s3                   |         a1 = s3;
    0x00513120 addiu a0, s2, 0x10            |         a0 = s2 + 0x10;
    0x00513124 jalr t9                       |         t9 ();
    0x00513128 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051312c sb zero, 0x10(s1)             |         *((s1 + 16)) = 0;
                                             | label_35:
    0x00513130 lw t9, -0x77a0(gp)            |         t9 = sym.php_strtolower;
    0x00513134 addiu s3, s2, 0x10            |         s3 = s2 + 0x10;
    0x00513138 lw a1, 0xc(s2)                |         a1 = *((s2 + 3));
    0x0051313c move a0, s3                   |         a0 = s3;
    0x00513140 bal 0x4f3918                  |         sym_php_strtolower ();
    0x00513144 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513148 lw v0, -0x7fbc(gp)            |         v0 = *((gp - 8175));
    0x0051314c sw v0, 0xce4(sp)              |         *(var_ce4h) = v0;
    0x00513150 lw v0, 0xce8(sp)              |         v0 = *(var_ce8h);
    0x00513154 lw s7, -0x7fbc(gp)            |         s7 = *((gp - 8175));
                                             |         if (v0 == 0) {
    0x00513158 bnez v0, 0x513194             |             
    0x0051315c lw s1, -0x79b8(gp)            |             s1 = *((gp - 7790));
    0x00513160 lw v0, -0x7fbc(gp)            |             v0 = *((gp - 8175));
                                             |             /* fcn.00511ce8 */
    0x00513164 addiu s1, s1, 0x1ce8          |             s1 += 0x1ce8;
                                             |             /* str.content_length: */
    0x00513168 addiu a2, v0, -0x1ab8         |             a2 = v0 + -0x1ab8;
    0x0051316c move a1, s3                   |             a1 = s3;
    0x00513170 move t9, s1                   |             t9 = s1;
    0x00513174 move a0, s4                   |             a0 = s4;
    0x00513178 bal 0x511ce8                  |             fcn_00511ce8 ();
                                             |             /* str.content_type: */
    0x0051317c addiu a2, s7, -0x1aa8         |             a2 = s7 + -0x1aa8;
    0x00513180 move a1, s3                   |             a1 = s3;
    0x00513184 move t9, s1                   |             t9 = s1;
    0x00513188 move a0, s4                   |             a0 = s4;
    0x0051318c bal 0x511ce8                  |             fcn_00511ce8 ();
    0x00513190 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00513194 lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
    0x00513198 lw t9, -0x6258(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.user_agent: */
    0x0051319c addiu a1, a1, -0x1a98         |         a1 += -0x1a98;
    0x005131a0 move a0, s3                   |         a0 = s3;
    0x005131a4 jalr t9                       |         t9 ();
    0x005131a8 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x005131ac beqz v0, 0x5136a4             |             goto label_159;
                                             |         }
    0x005131b0 addiu s1, zero, 1             |         s1 = 1;
                                             |         if (s3 != v0) {
    0x005131b4 beq s3, v0, 0x5131e0          |             
    0x005131b8 lbu v0, -1(v0)                |             v0 = *((v0 - 1));
    0x005131bc addiu v0, v0, -9              |             v0 += -9;
    0x005131c0 andi v0, v0, 0xff             |             v0 &= 0xff;
    0x005131c4 sltiu v1, v0, 0x18            |             v1 = (v0 < 0x18) ? 1 : 0;
    0x005131c8 move s1, zero                 |             s1 = 0;
                                             |             if (v1 == 0) {
    0x005131cc beqz v1, 0x5131e0             |                 goto label_37;
                                             |             }
    0x005131d0 lui s1, 0x80                  |             s1 = 0x800013;
    0x005131d4 addiu s1, s1, 0x13            |             
    0x005131d8 srlv s1, s1, v0               |             s1 >>= v0;
    0x005131dc andi s1, s1, 1                |             s1 &= 1;
                                             |         }
                                             | label_37:
    0x005131e0 lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
    0x005131e4 lw t9, -0x6258(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.host: */
    0x005131e8 addiu a1, a1, -0x1a8c         |         a1 += -0x1a8c;
    0x005131ec move a0, s3                   |         a0 = s3;
    0x005131f0 jalr t9                       |         t9 ();
    0x005131f4 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x005131f8 beqz v0, 0x513238             |             
                                             |             if (s3 != v0) {
    0x005131fc beq s3, v0, 0x513234          |                 
    0x00513200 nop                           |                 
    0x00513204 lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x00513208 addiu v0, v0, -9              |                 v0 += -9;
    0x0051320c andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x00513210 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x00513214 lw a1, -0x7fbc(gp)            |                 a1 = *((gp - 8175));
                                             |                 if (v0 == 0) {
    0x00513218 beqz v0, 0x51323c             |                     goto label_160;
                                             |                 }
    0x0051321c lui v0, 0x80                  |                 v0 = 0x800013;
    0x00513220 addiu v0, v0, 0x13            |                 
    0x00513224 srlv v0, v0, v1               |                 v0 >>= v1;
    0x00513228 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
    0x0051322c lw t9, -0x6258(gp)            |                 t9 = sym.imp.strstr;
                                             |                 if (v0 == 0) {
    0x00513230 beqz v0, 0x513240             |                     goto label_161;
                                             |                 }
                                             |             }
    0x00513234 ori s1, s1, 2                 |             s1 |= 2;
                                             |         }
    0x00513238 lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
                                             | label_160:
    0x0051323c lw t9, -0x6258(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.from: */
                                             | label_161:
    0x00513240 addiu a1, a1, -0x1a84         |         a1 += -0x1a84;
    0x00513244 move a0, s3                   |         a0 = s3;
    0x00513248 jalr t9                       |         t9 ();
    0x0051324c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00513250 beqz v0, 0x513290             |             
                                             |             if (s3 != v0) {
    0x00513254 beq s3, v0, 0x51328c          |                 
    0x00513258 nop                           |                 
    0x0051325c lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x00513260 addiu v0, v0, -9              |                 v0 += -9;
    0x00513264 andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x00513268 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x0051326c lw a1, -0x7fbc(gp)            |                 a1 = *((gp - 8175));
                                             |                 if (v0 == 0) {
    0x00513270 beqz v0, 0x513294             |                     goto label_162;
                                             |                 }
    0x00513274 lui v0, 0x80                  |                 v0 = 0x800013;
    0x00513278 addiu v0, v0, 0x13            |                 
    0x0051327c srlv v0, v0, v1               |                 v0 >>= v1;
    0x00513280 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
    0x00513284 lw t9, -0x6258(gp)            |                 t9 = sym.imp.strstr;
                                             |                 if (v0 == 0) {
    0x00513288 beqz v0, 0x513298             |                     goto label_163;
                                             |                 }
                                             |             }
    0x0051328c ori s1, s1, 8                 |             s1 |= 8;
                                             |         }
    0x00513290 lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
                                             | label_162:
    0x00513294 lw t9, -0x6258(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.authorization: */
                                             | label_163:
    0x00513298 addiu a1, a1, -0x1a7c         |         a1 += -0x1a7c;
    0x0051329c move a0, s3                   |         a0 = s3;
    0x005132a0 jalr t9                       |         t9 ();
    0x005132a4 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x005132a8 beqz v0, 0x5132e8             |             
                                             |             if (s3 != v0) {
    0x005132ac beq s3, v0, 0x5132e4          |                 
    0x005132b0 nop                           |                 
    0x005132b4 lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x005132b8 addiu v0, v0, -9              |                 v0 += -9;
    0x005132bc andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x005132c0 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x005132c4 lw v0, -0x7fbc(gp)            |                 v0 = *((gp - 8175));
                                             |                 if (v0 == 0) {
    0x005132c8 beqz v0, 0x5132ec             |                     goto label_164;
                                             |                 }
    0x005132cc lui v0, 0x80                  |                 v0 = 0x800013;
    0x005132d0 addiu v0, v0, 0x13            |                 
    0x005132d4 srlv v0, v0, v1               |                 v0 >>= v1;
    0x005132d8 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
    0x005132dc lw v0, -0x7fbc(gp)            |                 v0 = *((gp - 8175));
                                             |                 if (v0 == 0) {
    0x005132e0 beqz v0, 0x5132ec             |                     goto label_164;
                                             |                 }
                                             |             }
    0x005132e4 ori s1, s1, 4                 |             s1 |= 4;
                                             |         }
    0x005132e8 lw v0, -0x7fbc(gp)            |         v0 = *((gp - 8175));
                                             | label_164:
    0x005132ec lw t9, -0x6258(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.content_length: */
    0x005132f0 addiu a1, v0, -0x1ab8         |         a1 = v0 + -0x1ab8;
    0x005132f4 move a0, s3                   |         a0 = s3;
    0x005132f8 jalr t9                       |         t9 ();
    0x005132fc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00513300 beqz v0, 0x513340             |             
                                             |             if (s3 != v0) {
    0x00513304 beq s3, v0, 0x51333c          |                 
    0x00513308 nop                           |                 
    0x0051330c lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x00513310 addiu v0, v0, -9              |                 v0 += -9;
    0x00513314 andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x00513318 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x0051331c lw t9, -0x6258(gp)            |                 t9 = sym.imp.strstr;
                                             |                 if (v0 == 0) {
    0x00513320 beqz v0, 0x513344             |                     goto label_165;
                                             |                 }
    0x00513324 lui v0, 0x80                  |                 v0 = 0x800013;
    0x00513328 addiu v0, v0, 0x13            |                 
    0x0051332c srlv v0, v0, v1               |                 v0 >>= v1;
    0x00513330 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
                                             |                 /* str.content_type: */
    0x00513334 addiu a1, s7, -0x1aa8         |                 a1 = s7 + -0x1aa8;
                                             |                 if (v0 == 0) {
    0x00513338 beqz v0, 0x513348             |                     goto label_166;
                                             |                 }
                                             |             }
    0x0051333c ori s1, s1, 0x10              |             s1 |= 0x10;
                                             |         }
    0x00513340 lw t9, -0x6258(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.content_type: */
                                             | label_165:
    0x00513344 addiu a1, s7, -0x1aa8         |         a1 = s7 + -0x1aa8;
                                             | label_166:
    0x00513348 move a0, s3                   |         a0 = s3;
    0x0051334c jalr t9                       |         t9 ();
    0x00513350 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00513354 beqz v0, 0x513394             |             
                                             |             if (s3 != v0) {
    0x00513358 beq s3, v0, 0x513390          |                 
    0x0051335c nop                           |                 
    0x00513360 lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x00513364 addiu v0, v0, -9              |                 v0 += -9;
    0x00513368 andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x0051336c sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x00513370 lw a1, -0x7fbc(gp)            |                 a1 = *((gp - 8175));
                                             |                 if (v0 == 0) {
    0x00513374 beqz v0, 0x513398             |                     goto label_167;
                                             |                 }
    0x00513378 lui v0, 0x80                  |                 v0 = 0x800013;
    0x0051337c addiu v0, v0, 0x13            |                 
    0x00513380 srlv v0, v0, v1               |                 v0 >>= v1;
    0x00513384 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
    0x00513388 lw t9, -0x6258(gp)            |                 t9 = sym.imp.strstr;
                                             |                 if (v0 == 0) {
    0x0051338c beqz v0, 0x51339c             |                     goto label_168;
                                             |                 }
                                             |             }
    0x00513390 ori s1, s1, 0x20              |             s1 |= 0x20;
                                             |         }
    0x00513394 lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
                                             | label_167:
    0x00513398 lw t9, -0x6258(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.connection: */
                                             | label_168:
    0x0051339c addiu a1, a1, -0x1a6c         |         a1 += -0x1a6c;
    0x005133a0 move a0, s3                   |         a0 = s3;
    0x005133a4 jalr t9                       |         t9 ();
    0x005133a8 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x005133ac beqz v0, 0x5133e8             |             
                                             |             if (s3 != v0) {
    0x005133b0 beq s3, v0, 0x5133e4          |                 
    0x005133b4 nop                           |                 
    0x005133b8 lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x005133bc addiu v0, v0, -9              |                 v0 += -9;
    0x005133c0 andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x005133c4 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x005133c8 lui v0, 0x80                  |                 v0 = 0x800000;
                                             |                 if (v0 == 0) {
    0x005133cc beqz v0, 0x5133e8             |                     goto label_169;
                                             |                 }
    0x005133d0 addiu v0, v0, 0x13            |                 v0 += 0x13;
    0x005133d4 srlv v0, v0, v1               |                 v0 >>= v1;
    0x005133d8 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
                                             |                 if (v0 == 0) {
    0x005133dc beqz v0, 0x5133e8             |                     goto label_169;
                                             |                 }
    0x005133e0 nop                           |                 
                                             |             }
    0x005133e4 ori s1, s1, 0x40              |             s1 |= 0x40;
                                             |         }
                                             | label_169:
    0x005133e8 lw v0, 0xcd8(sp)              |         v0 = *(var_cd8h);
                                             |         if (s5 == 0) {
    0x005133ec beqz s5, 0x513750             |             goto label_42;
                                             |         }
    0x005133f0 lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
                                             |         if (v0 == 0) {
    0x005133f4 beqz v0, 0x513750             |             goto label_42;
                                             |         }
    0x005133f8 lw t9, -0x6258(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.proxy_authorization: */
    0x005133fc addiu a1, a1, -0x1a60         |         a1 += -0x1a60;
    0x00513400 move a0, s3                   |         a0 = s3;
    0x00513404 jalr t9                       |         t9 ();
    0x00513408 move s5, v0                   |         s5 = v0;
    0x0051340c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00513410 beqz v0, 0x513750             |             goto label_42;
                                             |         }
                                             |         if (s3 != v0) {
    0x00513414 beq s3, v0, 0x513448          |             
    0x00513418 nop                           |             
    0x0051341c lbu v0, -1(v0)                |             v0 = *((v0 - 1));
    0x00513420 addiu v0, v0, -9              |             v0 += -9;
    0x00513424 andi v1, v0, 0xff             |             v1 = v0 & 0xff;
    0x00513428 sltiu v0, v1, 0x18            |             v0 = (v1 < 0x18) ? 1 : 0;
    0x0051342c lui v0, 0x80                  |             v0 = 0x800000;
                                             |             if (v0 == 0) {
    0x00513430 beqz v0, 0x513750             |                 goto label_42;
                                             |             }
    0x00513434 addiu v0, v0, 0x13            |             v0 += 0x13;
    0x00513438 srlv v0, v0, v1               |             v0 >>= v1;
    0x0051343c ext v0, v0, 0, 1              |             __asm ("ext v0, v0, 0, 1");
                                             |             if (v0 == 0) {
    0x00513440 beqz v0, 0x513750             |                 goto label_42;
                                             |             }
    0x00513444 nop                           |             
                                             |         }
    0x00513448 addiu s7, s5, 0x14            |         s7 = s5 + 0x14;
    0x0051344c addiu a0, zero, 0x20          |         a0 = 0x20;
    0x00513450 addiu v1, zero, 9             |         v1 = 9;
                                             | label_38:
    0x00513454 sltu v0, s3, s5               |         v0 = (s3 < s5) ? 1 : 0;
                                             |         if (v0 != 0) {
    0x00513458 beqz v0, 0x513474             |             
    0x0051345c nop                           |             
    0x00513460 lb v0, -1(s5)                 |             v0 = *((s5 - 1));
                                             |             if (v0 == a0) {
    0x00513464 beq v0, a0, 0x5136ac          |                 goto label_170;
                                             |             }
    0x00513468 nop                           |             
                                             |             if (v0 == v1) {
    0x0051346c beq v0, v1, 0x5136ac          |                 goto label_170;
                                             |             }
    0x00513470 nop                           |             
                                             |         }
    0x00513474 addiu a0, zero, 0xd           |         a0 = 0xd;
    0x00513478 addiu v1, zero, 0xa           |         v1 = 0xa;
    0x0051347c b 0x5136b4                    |         goto label_171;
                                             | label_147:
    0x00513480 move s1, v0                   |         s1 = v0;
    0x00513484 b 0x512d00                    |         
                                             |     }
                                             |     if (s1 == 0) {
                                             | label_146:
    0x00513488 beqz s1, 0x5134d0             |         goto label_172;
                                             |     }
    0x0051348c nop                           |     
    0x00513490 lw s1, 0xc(s1)                |     s1 = *((s1 + 3));
    0x00513494 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00513498 addiu s1, s1, 1               |     s1++;
    0x0051349c sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
                                             |     if (v0 != 0) {
    0x005134a0 bnez v0, 0x5134bc             |         goto label_173;
                                             |     }
    0x005134a4 nop                           |     
                                             |     do {
    0x005134a8 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x005134ac move a1, s1                   |         a1 = s1;
    0x005134b0 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x005134b4 jalr t9                       |         t9 ();
    0x005134b8 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             | label_173:
    0x005134bc lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x005134c0 addiu a0, zero, 0x2f          |         a0 = 0x2f;
    0x005134c4 addu v1, v0, s1               |         v1 = v0 + s1;
    0x005134c8 sb a0, 0xf(v1)                |         *((v1 + 15)) = a0;
    0x005134cc b 0x512d3c                    |         goto label_28;
                                             | label_172:
    0x005134d0 addiu s1, zero, 1             |         s1 = 1;
    0x005134d4 b 0x5134a8                    |         
                                             |     } while (1);
                                             | label_151:
    0x005134d8 move a0, v0                   |     a0 = v0;
    0x005134dc jalr t9                       |     t9 ();
    0x005134e0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005134e4 b 0x512e80                    |     goto label_29;
                                             | label_152:
    0x005134e8 addiu s1, zero, 6             |     s1 = 6;
    0x005134ec b 0x512ec4                    |     goto label_30;
                                             | label_150:
    0x005134f0 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x005134f4 addiu s1, zero, 0xb           |     s1 = 0xb;
                                             |     if (v0 != 0) {
    0x005134f8 beqz v0, 0x513514             |         
    0x005134fc lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x00513500 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00513504 addiu s1, s1, 0xb             |         s1 += 0xb;
    0x00513508 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x0051350c lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00513510 bnez v0, 0x51352c             |             goto label_174;
                                             |         }
                                             |     }
    0x00513514 lw t9, -0x7ed4(gp)            |     t9 = sym.smart_str_erealloc;
    0x00513518 move a1, s1                   |     a1 = s1;
    0x0051351c addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x00513520 jalr t9                       |     t9 ();
    0x00513524 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513528 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_174:
    0x0051352c lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x00513530 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00513534 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513538 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x0051353c addiu a2, zero, 0xb           |     a2 = 0xb;
                                             |     /* str._HTTP_1.0_r_n */
    0x00513540 addiu a1, a1, -0x1b64         |     a1 += -0x1b64;
    0x00513544 addu a0, a0, v0               |     a0 += v0;
    0x00513548 jalr t9                       |     t9 ();
    0x0051354c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00513550 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513554 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
                                             |     if (s0 != 0) {
    0x00513558 bnez s0, 0x512fd0             |         goto label_31;
                                             |     }
                                             | label_153:
    0x0051355c move s4, zero                 |     s4 = 0;
                                             | label_34:
    0x00513560 move s1, zero                 |     s1 = 0;
    0x00513564 b 0x513798                    |     goto label_175;
                                             | label_155:
    0x00513568 lbu v0, 8(s2)                 |     v0 = *((s2 + 8));
    0x0051356c addiu v1, zero, 6             |     v1 = 6;
                                             |     if (v0 != v1) {
    0x00513570 bne v0, v1, 0x513630          |         goto label_176;
                                             |     }
    0x00513574 nop                           |     
    0x00513578 lw v0, (s2)                   |     v0 = *(s2);
    0x0051357c addiu s4, v0, 0x10            |     s4 = v0 + 0x10;
    0x00513580 lw s3, 0xc(v0)                |     s3 = *((v0 + 3));
                                             |     if (a0 == 0) {
    0x00513584 beqz a0, 0x513638             |         goto label_177;
                                             |     }
    0x00513588 lw s1, 0xc(a0)                |     s1 = *((a0 + 3));
    0x0051358c lw v0, 0x34(sp)               |     v0 = *(var_34h);
    0x00513590 addu s1, s3, s1               |     s1 = s3 + s1;
    0x00513594 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00513598 lw v0, 0x30(sp)               |     v0 = *(var_30h);
    0x0051359c bnez v0, 0x5135b8             |     
                                             |     while (1) {
    0x005135a0 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x005135a4 move a1, s1                   |         a1 = s1;
    0x005135a8 move a0, s7                   |         a0 = s7;
    0x005135ac jalr t9                       |         t9 ();
    0x005135b0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005135b4 lw v0, 0x30(sp)               |         v0 = *(var_30h);
    0x005135b8 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x005135bc addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x005135c0 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x005135c4 move a2, s3                   |         a2 = s3;
    0x005135c8 move a1, s4                   |         a1 = s4;
    0x005135cc addu a0, a0, v0               |         a0 += v0;
    0x005135d0 jalr t9                       |         t9 ();
    0x005135d4 lw v0, 0x30(sp)               |         v0 = *(var_30h);
    0x005135d8 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005135dc sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x005135e0 lw v0, 0x34(sp)               |         v0 = *(var_34h);
    0x005135e4 addiu s1, s1, 2               |         s1 += 2;
    0x005135e8 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
                                             |         if (v0 == 0) {
    0x005135ec bnez v0, 0x513608             |             
    0x005135f0 nop                           |             
    0x005135f4 lw t9, -0x7ed4(gp)            |             t9 = sym.smart_str_erealloc;
    0x005135f8 move a1, s1                   |             a1 = s1;
    0x005135fc move a0, s7                   |             a0 = s7;
    0x00513600 jalr t9                       |             t9 ();
    0x00513604 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00513608 lw v1, 0x30(sp)               |         v1 = *(var_30h);
    0x0051360c addiu v0, v1, 0x10            |         v0 = v1 + 0x10;
    0x00513610 lw v1, 0xc(v1)                |         v1 = *((v1 + 3));
    0x00513614 addu v0, v0, v1               |         v0 += v1;
    0x00513618 addiu v1, zero, 0xd           |         v1 = 0xd;
    0x0051361c sb v1, (v0)                   |         *(v0) = v1;
    0x00513620 addiu v1, zero, 0xa           |         v1 = 0xa;
    0x00513624 sb v1, 1(v0)                  |         *((v0 + 1)) = v1;
    0x00513628 lw v0, 0x30(sp)               |         v0 = *(var_30h);
    0x0051362c sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
                                             | label_176:
    0x00513630 addiu s2, s2, 0x18            |         s2 += 0x18;
    0x00513634 b 0x513028                    |         goto label_32;
                                             | label_177:
    0x00513638 move s1, s3                   |         s1 = s3;
    0x0051363c b 0x5135a0                    |         
                                             |     }
                                             | label_156:
    0x00513640 jalr t9                       |     t9 ();
    0x00513644 nop                           |     
    0x00513648 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051364c b 0x5130a4                    |     goto label_33;
                                             | label_154:
    0x00513650 addiu a0, zero, 6             |     a0 = 6;
    0x00513654 move s4, zero                 |     s4 = 0;
                                             |     if (v1 != a0) {
    0x00513658 bne v1, a0, 0x513560          |         goto label_34;
                                             |     }
    0x0051365c lw a0, (v0)                   |     a0 = *(v0);
    0x00513660 lw v0, 0xc(a0)                |     v0 = *((a0 + 3));
    0x00513664 lw t9, -0x6b80(gp)            |     t9 = sym.php_trim;
                                             |     if (v0 == 0) {
    0x00513668 beqz v0, 0x513560             |         goto label_34;
                                             |     }
    0x0051366c addiu a3, zero, 3             |     a3 = 3;
    0x00513670 move a2, zero                 |     a2 = 0;
    0x00513674 move a1, zero                 |     a1 = 0;
    0x00513678 jalr t9                       |     t9 ();
    0x0051367c move s2, v0                   |     s2 = v0;
    0x00513680 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513684 b 0x5130a4                    |     goto label_33;
                                             | label_158:
    0x00513688 lw v0, (s2)                   |     v0 = *(s2);
    0x0051368c sltiu v1, v0, 2               |     v1 = (v0 < 2) ? 1 : 0;
    0x00513690 addiu v0, v0, -1              |     v0 += -1;
                                             |     if (v1 != 0) {
    0x00513694 bnez v1, 0x513130             |         goto label_35;
                                             |     }
    0x00513698 lw s1, 0xc(s2)                |     s1 = *((s2 + 3));
    0x0051369c sw v0, (s2)                   |     *(s2) = v0;
    0x005136a0 b 0x5130dc                    |     goto label_36;
                                             | label_159:
    0x005136a4 move s1, zero                 |     s1 = 0;
    0x005136a8 b 0x5131e0                    |     goto label_37;
                                             | label_170:
    0x005136ac addiu s5, s5, -1              |     s5 += -1;
    0x005136b0 b 0x513454                    |     goto label_38;
                                             |     do {
                                             | label_171:
    0x005136b4 lb v0, (s7)                   |         v0 = *(s7);
                                             |         if (v0 == 0) {
    0x005136b8 beqz v0, 0x513700             |             goto label_178;
                                             |         }
    0x005136bc nop                           |         
                                             |         if (v0 == a0) {
    0x005136c0 beq v0, a0, 0x5136d4          |             goto label_179;
                                             |         }
    0x005136c4 nop                           |         
    0x005136c8 addiu s7, s7, 1               |         s7++;
    0x005136cc bne v0, v1, 0x5136b4          |         
                                             |     } while (v0 != v1);
    0x005136d0 addiu s7, s7, -1              |     s7 += -1;
                                             | label_179:
    0x005136d4 addiu a0, zero, 0xd           |     a0 = 0xd;
    0x005136d8 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x005136dc b 0x5136e4                    |     
                                             |     while (v0 == a0) {
                                             | label_39:
    0x005136e0 addiu s7, s7, 1               |         s7++;
    0x005136e4 lb v0, (s7)                   |         v0 = *(s7);
    0x005136e8 beq v0, a0, 0x5136e0          |         
                                             |     }
    0x005136ec nop                           |     
                                             |     if (v0 == v1) {
    0x005136f0 beq v0, v1, 0x5136e0          |         goto label_39;
                                             |     }
    0x005136f4 nop                           |     
    0x005136f8 lw t9, -0x6194(gp)            |     t9 = sym.imp.strlen;
                                             |     if (v0 != 0) {
    0x005136fc bnez v0, 0x5149a4             |         goto label_180;
                                             |     }
                                             | label_178:
    0x00513700 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             |     if (s3 != s5) {
    0x00513704 beq s3, s5, 0x51373c          |         
    0x00513708 addiu v1, zero, 0xa           |         v1 = 0xa;
                                             | label_41:
    0x0051370c sltu v0, s3, s5               |         v0 = (s3 < s5) ? 1 : 0;
                                             |         if (v0 != 0) {
    0x00513710 beqz v0, 0x51372c             |             
    0x00513714 nop                           |             
    0x00513718 lb v0, -1(s5)                 |             v0 = *((s5 - 1));
                                             |             if (v0 == a0) {
    0x0051371c beq v0, a0, 0x51499c          |                 goto label_181;
                                             |             }
    0x00513720 nop                           |             
                                             |             if (v0 == v1) {
    0x00513724 beq v0, v1, 0x51499c          |                 goto label_181;
                                             |             }
    0x00513728 nop                           |             
                                             |         }
    0x0051372c subu s3, s5, s3               |         __asm ("subu s3, s5, s3");
    0x00513730 addu s3, s4, s3               |         s3 = s4 + s3;
    0x00513734 sb zero, (s3)                 |         *(s3) = 0;
    0x00513738 b 0x513750                    |         
                                             |     } else {
    0x0051373c lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00513740 move a0, s4                   |         a0 = s4;
    0x00513744 jalr t9                       |         t9 ();
    0x00513748 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051374c move s4, zero                 |         s4 = 0;
                                             |     }
                                             | label_42:
    0x00513750 lbu v0, 5(s2)                 |     v0 = *((s2 + 5));
    0x00513754 andi v1, v0, 2                |     v1 = v0 & 2;
                                             |     if (v1 == 0) {
    0x00513758 bnez v1, 0x51378c             |         
    0x0051375c nop                           |         
    0x00513760 lw v1, (s2)                   |         v1 = *(s2);
    0x00513764 addiu v1, v1, -1              |         v1 += -1;
    0x00513768 sw v1, (s2)                   |         *(s2) = v1;
                                             |         if (v1 != 0) {
    0x0051376c bnez v1, 0x51378c             |             goto label_43;
                                             |         }
    0x00513770 andi v0, v0, 1                |         v0 &= 1;
    0x00513774 move a0, s2                   |         a0 = s2;
                                             |         if (v0 == 0) {
    0x00513778 beqz v0, 0x5149d4             |             goto label_182;
                                             |         }
    0x0051377c lw t9, -0x60d4(gp)            |         t9 = *((gp - 6197));
    0x00513780 jalr t9                       |         t9 ();
    0x00513784 nop                           |         
    0x00513788 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
                                             | label_43:
    0x0051378c andi v0, s1, 4                |     v0 = s1 & 4;
    0x00513790 andi v0, s1, 8                |     v0 = s1 & 8;
                                             |     if (v0 == 0) {
    0x00513794 bnez v0, 0x513a14             |         
                                             | label_175:
    0x00513798 lw v0, 4(fp)                  |         v0 = *(arg_d34h);
    0x0051379c lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
                                             |         if (v0 != 0) {
    0x005137a0 beqz v0, 0x513a10             |             
    0x005137a4 lw a0, 0xd34(sp)              |             a0 = *(arg_d34h);
    0x005137a8 jalr t9                       |             t9 ();
    0x005137ac lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005137b0 lw t9, -0x7f5c(gp)            |             t9 = sym._emalloc;
    0x005137b4 addiu a0, v0, 1               |             a0 = v0 + 1;
    0x005137b8 jalr t9                       |             t9 ();
    0x005137bc lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005137c0 lw s2, 4(fp)                  |             s2 = *(arg_d34h);
    0x005137c4 move s3, v0                   |             s3 = v0;
    0x005137c8 lw t9, -0x6194(gp)            |             t9 = sym.imp.strlen;
    0x005137cc move a0, s2                   |             a0 = s2;
    0x005137d0 jalr t9                       |             t9 ();
    0x005137d4 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005137d8 move a0, s2                   |             a0 = s2;
    0x005137dc lw t9, -0x6ae8(gp)            |             t9 = sym.php_url_decode;
    0x005137e0 move a1, v0                   |             a1 = v0;
    0x005137e4 bal 0x502dc8                  |             sym_php_url_decode ();
    0x005137e8 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005137ec lw a1, 4(fp)                  |             a1 = *(arg_d34h);
    0x005137f0 lw t9, -0x61d8(gp)            |             t9 = sym.imp.strcpy;
    0x005137f4 move a0, s3                   |             a0 = s3;
    0x005137f8 jalr t9                       |             t9 ();
    0x005137fc lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00513800 move a0, s3                   |             a0 = s3;
    0x00513804 lw a1, -0x7fbc(gp)            |             a1 = *((gp - 8175));
    0x00513808 lw t9, -0x62ec(gp)            |             t9 = sym.imp.strcat
    0x0051380c addiu a1, a1, 0x3eb0          |             a1 += 0x3eb0;
    0x00513810 jalr t9                       |             t9 ();
    0x00513814 lw s2, 8(fp)                  |             s2 = *(arg_d38h);
    0x00513818 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (s2 != 0) {
    0x0051381c beqz s2, 0x513858             |                 
    0x00513820 lw t9, -0x6194(gp)            |                 t9 = sym.imp.strlen;
    0x00513824 move a0, s2                   |                 a0 = s2;
    0x00513828 jalr t9                       |                 t9 ();
    0x0051382c lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00513830 move a1, v0                   |                 a1 = v0;
    0x00513834 lw t9, -0x6ae8(gp)            |                 t9 = sym.php_url_decode;
    0x00513838 move a0, s2                   |                 a0 = s2;
    0x0051383c bal 0x502dc8                  |                 sym_php_url_decode ();
    0x00513840 lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00513844 lw a1, 8(fp)                  |                 a1 = *(arg_d38h);
    0x00513848 lw t9, -0x62ec(gp)            |                 t9 = sym.imp.strcat
    0x0051384c move a0, s3                   |                 a0 = s3;
    0x00513850 jalr t9                       |                 t9 ();
    0x00513854 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x00513858 lw t9, -0x6194(gp)            |             t9 = sym.imp.strlen;
    0x0051385c move a0, s3                   |             a0 = s3;
    0x00513860 jalr t9                       |             t9 ();
    0x00513864 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00513868 move a1, v0                   |             a1 = v0;
    0x0051386c lw t9, -0x6e94(gp)            |             t9 = sym.php_base64_encode;
    0x00513870 move a0, s3                   |             a0 = s3;
    0x00513874 jalr t9                       |             t9 ();
    0x00513878 move s5, v0                   |             s5 = v0;
    0x0051387c lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00513880 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00513884 beqz v0, 0x5149e8             |                 goto label_183;
                                             |             }
    0x00513888 lw s2, 0xc(v0)                |             s2 = *((v0 + 3));
    0x0051388c lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00513890 addiu s2, s2, 0x15            |             s2 += 0x15;
    0x00513894 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00513898 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 == 0) {
    0x0051389c bnez v0, 0x5138b8             |                 
                                             | label_44:
    0x005138a0 lw t9, -0x7ed4(gp)            |                 t9 = sym.smart_str_erealloc;
    0x005138a4 move a1, s2                   |                 a1 = s2;
    0x005138a8 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x005138ac jalr t9                       |                 t9 ();
    0x005138b0 lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x005138b4 lw v0, 0xcc0(sp)              |                 v0 = *(var_cc0h);
                                             |             }
    0x005138b8 lw a1, -0x7fbc(gp)            |             a1 = *((gp - 8175));
    0x005138bc addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x005138c0 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x005138c4 lw t9, -0x6188(gp)            |             t9 = sym.imp.memcpy;
    0x005138c8 addiu a2, zero, 0x15          |             a2 = 0x15;
                                             |             /* str.Authorization:_Basic_ */
    0x005138cc addiu a1, a1, -0x1a48         |             a1 += -0x1a48;
    0x005138d0 addu a0, a0, v0               |             a0 += v0;
    0x005138d4 jalr t9                       |             t9 ();
    0x005138d8 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005138dc lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x005138e0 lw t9, -0x6194(gp)            |             t9 = sym.imp.strlen;
    0x005138e4 sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
    0x005138e8 addiu v0, s5, 0x10            |             v0 = s5 + 0x10;
    0x005138ec sw v0, 0xce4(sp)              |             *(var_ce4h) = v0;
    0x005138f0 move a0, v0                   |             a0 = v0;
    0x005138f4 jalr t9                       |             t9 ();
    0x005138f8 addu s2, v0, s2               |             s2 = v0 + s2;
    0x005138fc move s7, v0                   |             s7 = v0;
    0x00513900 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00513904 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00513908 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x0051390c bnez v0, 0x513924             |                 
    0x00513910 lw t9, -0x7ed4(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00513914 move a1, s2                   |                 a1 = s2;
    0x00513918 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x0051391c jalr t9                       |                 t9 ();
    0x00513920 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x00513924 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00513928 lw t9, -0x6188(gp)            |             t9 = sym.imp.memcpy;
    0x0051392c addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x00513930 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x00513934 move a2, s7                   |             a2 = s7;
    0x00513938 addiu a1, s5, 0x10            |             a1 = s5 + 0x10;
    0x0051393c addu a0, a0, v0               |             a0 += v0;
    0x00513940 jalr t9                       |             t9 ();
    0x00513944 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00513948 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x0051394c sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
    0x00513950 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00513954 addiu s2, s2, 2               |             s2 += 2;
    0x00513958 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x0051395c lw v1, 0xcc0(sp)              |             v1 = *(var_cc0h);
                                             |             if (v0 == 0) {
    0x00513960 bnez v0, 0x51397c             |                 
    0x00513964 lw t9, -0x7ed4(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00513968 move a1, s2                   |                 a1 = s2;
    0x0051396c addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x00513970 jalr t9                       |                 t9 ();
    0x00513974 lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00513978 lw v1, 0xcc0(sp)              |                 v1 = *(var_cc0h);
                                             |             }
    0x0051397c addiu v0, v1, 0x10            |             v0 = v1 + 0x10;
    0x00513980 lw v1, 0xc(v1)                |             v1 = *((v1 + 3));
    0x00513984 addu v0, v0, v1               |             v0 += v1;
    0x00513988 addiu v1, zero, 0xd           |             v1 = 0xd;
    0x0051398c sb v1, (v0)                   |             *(v0) = v1;
    0x00513990 addiu v1, zero, 0xa           |             v1 = 0xa;
    0x00513994 sb v1, 1(v0)                  |             *((v0 + 1)) = v1;
    0x00513998 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x0051399c sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
                                             |             if (s0 != 0) {
    0x005139a0 beqz s0, 0x5139d8             |                 
    0x005139a4 lw v0, (s0)                   |                 v0 = *(s0);
    0x005139a8 lw t9, -0x6aa8(gp)            |                 t9 = sym.php_stream_notification_notify;
                                             |                 if (v0 == 0) {
    0x005139ac beqz v0, 0x5139d8             |                     goto label_184;
                                             |                 }
    0x005139b0 sw zero, 0x1c(sp)             |                 *(var_1ch) = 0;
    0x005139b4 sw zero, 0x18(sp)             |                 *(var_18h) = 0;
    0x005139b8 sw zero, 0x14(sp)             |                 *(var_14h) = 0;
    0x005139bc sw zero, 0x10(sp)             |                 *(var_10h) = 0;
    0x005139c0 move a3, zero                 |                 a3 = 0;
    0x005139c4 move a2, zero                 |                 a2 = 0;
    0x005139c8 addiu a1, zero, 3             |                 a1 = 3;
    0x005139cc move a0, s0                   |                 a0 = s0;
    0x005139d0 jalr t9                       |                 t9 ();
    0x005139d4 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
                                             | label_184:
    0x005139d8 lbu v0, 5(s5)                 |             v0 = *((s5 + 5));
    0x005139dc andi v1, v0, 2                |             v1 = v0 & 2;
    0x005139e0 andi v0, v0, 1                |             v0 &= 1;
                                             |             if (v1 == 0) {
    0x005139e4 bnez v1, 0x513a00             |                 
    0x005139e8 move a0, s5                   |                 a0 = s5;
                                             |                 if (v0 == 0) {
    0x005139ec beqz v0, 0x5149f0             |                     goto label_185;
                                             |                 }
    0x005139f0 lw t9, -0x60d4(gp)            |                 t9 = *((gp - 6197));
    0x005139f4 jalr t9                       |                 t9 ();
    0x005139f8 nop                           |                 
    0x005139fc lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
                                             | label_45:
    0x00513a00 lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
    0x00513a04 move a0, s3                   |             a0 = s3;
    0x00513a08 jalr t9                       |             t9 ();
    0x00513a0c lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00513a10 andi v0, s1, 8                |         v0 = s1 & 8;
                                             |     }
    0x00513a14 andi v0, s1, 2                |     v0 = s1 & 2;
                                             |     if (v0 == 0) {
    0x00513a18 bnez v0, 0x513b4c             |         
    0x00513a1c lw s3, -0x7a50(gp)            |         s3 = *(gp);
    0x00513a20 lw v0, 0x14(s3)               |         v0 = *((s3 + 5));
    0x00513a24 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00513a28 beqz v0, 0x513b48             |             
    0x00513a2c addiu s2, zero, 6             |             s2 = 6;
                                             |             if (v0 != 0) {
    0x00513a30 beqz v0, 0x513a4c             |                 
    0x00513a34 lw s2, 0xc(v0)                |                 s2 = *((v0 + 3));
    0x00513a38 lw v0, 0xcc4(sp)              |                 v0 = *(var_cc4h);
    0x00513a3c addiu s2, s2, 6               |                 s2 += 6;
    0x00513a40 sltu v0, s2, v0               |                 v0 = (s2 < v0) ? 1 : 0;
    0x00513a44 lw v0, 0xcc0(sp)              |                 v0 = *(var_cc0h);
                                             |                 if (v0 != 0) {
    0x00513a48 bnez v0, 0x513a64             |                     goto label_186;
                                             |                 }
                                             |             }
    0x00513a4c lw t9, -0x7ed4(gp)            |             t9 = sym.smart_str_erealloc;
    0x00513a50 move a1, s2                   |             a1 = s2;
    0x00513a54 addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00513a58 jalr t9                       |             t9 ();
    0x00513a5c lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00513a60 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             | label_186:
    0x00513a64 lw a1, -0x7fbc(gp)            |             a1 = *((gp - 8175));
    0x00513a68 addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x00513a6c lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x00513a70 lw t9, -0x6188(gp)            |             t9 = sym.imp.memcpy;
    0x00513a74 addiu a2, zero, 6             |             a2 = 6;
                                             |             /* str.From:_ */
    0x00513a78 addiu a1, a1, -0x1a30         |             a1 += -0x1a30;
    0x00513a7c addu a0, a0, v0               |             a0 += v0;
    0x00513a80 jalr t9                       |             t9 ();
    0x00513a84 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00513a88 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00513a8c lw s3, 0x14(s3)               |             s3 = *((s3 + 5));
    0x00513a90 lw t9, -0x6194(gp)            |             t9 = sym.imp.strlen;
    0x00513a94 sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
    0x00513a98 move a0, s3                   |             a0 = s3;
    0x00513a9c jalr t9                       |             t9 ();
    0x00513aa0 addu s2, v0, s2               |             s2 = v0 + s2;
    0x00513aa4 move s5, v0                   |             s5 = v0;
    0x00513aa8 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00513aac sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00513ab0 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00513ab4 bnez v0, 0x513acc             |                 
    0x00513ab8 lw t9, -0x7ed4(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00513abc move a1, s2                   |                 a1 = s2;
    0x00513ac0 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x00513ac4 jalr t9                       |                 t9 ();
    0x00513ac8 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x00513acc lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00513ad0 lw t9, -0x6188(gp)            |             t9 = sym.imp.memcpy;
    0x00513ad4 addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x00513ad8 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x00513adc move a2, s5                   |             a2 = s5;
    0x00513ae0 move a1, s3                   |             a1 = s3;
    0x00513ae4 addu a0, a0, v0               |             a0 += v0;
    0x00513ae8 jalr t9                       |             t9 ();
    0x00513aec lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00513af0 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00513af4 sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
    0x00513af8 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00513afc addiu s2, s2, 2               |             s2 += 2;
    0x00513b00 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00513b04 lw v1, 0xcc0(sp)              |             v1 = *(var_cc0h);
                                             |             if (v0 == 0) {
    0x00513b08 bnez v0, 0x513b24             |                 
    0x00513b0c lw t9, -0x7ed4(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00513b10 move a1, s2                   |                 a1 = s2;
    0x00513b14 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x00513b18 jalr t9                       |                 t9 ();
    0x00513b1c lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00513b20 lw v1, 0xcc0(sp)              |                 v1 = *(var_cc0h);
                                             |             }
    0x00513b24 addiu v0, v1, 0x10            |             v0 = v1 + 0x10;
    0x00513b28 lw v1, 0xc(v1)                |             v1 = *((v1 + 3));
    0x00513b2c addu v0, v0, v1               |             v0 += v1;
    0x00513b30 addiu v1, zero, 0xd           |             v1 = 0xd;
    0x00513b34 sb v1, (v0)                   |             *(v0) = v1;
    0x00513b38 addiu v1, zero, 0xa           |             v1 = 0xa;
    0x00513b3c sb v1, 1(v0)                  |             *((v0 + 1)) = v1;
    0x00513b40 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00513b44 sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
                                             |         }
    0x00513b48 andi v0, s1, 2                |         v0 = s1 & 2;
                                             |     }
    0x00513b4c andi v0, s1, 0x40             |     v0 = s1 & 0x40;
                                             |     if (v0 != 0) {
    0x00513b50 bnez v0, 0x513d74             |         goto label_187;
                                             |     }
    0x00513b54 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00513b58 addiu s2, zero, 6             |     s2 = 6;
                                             |     if (v0 != 0) {
    0x00513b5c beqz v0, 0x513b78             |         
    0x00513b60 lw s2, 0xc(v0)                |         s2 = *((v0 + 3));
    0x00513b64 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00513b68 addiu s2, s2, 6               |         s2 += 6;
    0x00513b6c sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x00513b70 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00513b74 bnez v0, 0x513b90             |             goto label_188;
                                             |         }
                                             |     }
    0x00513b78 lw t9, -0x7ed4(gp)            |     t9 = sym.smart_str_erealloc;
    0x00513b7c move a1, s2                   |     a1 = s2;
    0x00513b80 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x00513b84 jalr t9                       |     t9 ();
    0x00513b88 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513b8c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_188:
    0x00513b90 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x00513b94 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00513b98 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513b9c lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00513ba0 addiu a2, zero, 6             |     a2 = 6;
                                             |     /* str.Host:_ */
    0x00513ba4 addiu a1, a1, -0x1a28         |     a1 += -0x1a28;
    0x00513ba8 addu a0, a0, v0               |     a0 += v0;
    0x00513bac jalr t9                       |     t9 ();
    0x00513bb0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513bb4 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00513bb8 lw s3, 0xc(fp)                |     s3 = *(arg_d3ch);
    0x00513bbc lw t9, -0x6194(gp)            |     t9 = sym.imp.strlen;
    0x00513bc0 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x00513bc4 move a0, s3                   |     a0 = s3;
    0x00513bc8 jalr t9                       |     t9 ();
    0x00513bcc addu s2, v0, s2               |     s2 = v0 + s2;
    0x00513bd0 move s5, v0                   |     s5 = v0;
    0x00513bd4 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00513bd8 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x00513bdc lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00513be0 bnez v0, 0x513bf8             |         
    0x00513be4 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00513be8 move a1, s2                   |         a1 = s2;
    0x00513bec addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00513bf0 jalr t9                       |         t9 ();
    0x00513bf4 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00513bf8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00513bfc lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00513c00 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00513c04 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513c08 move a2, s5                   |     a2 = s5;
    0x00513c0c move a1, s3                   |     a1 = s3;
    0x00513c10 addu a0, a0, v0               |     a0 += v0;
    0x00513c14 jalr t9                       |     t9 ();
    0x00513c18 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00513c1c lw v1, 0xcd8(sp)              |     v1 = *(var_cd8h);
    0x00513c20 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513c24 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x00513c28 lhu v0, 0x10(fp)              |     v0 = *(arg_10h);
                                             |     if (v1 == 0) {
    0x00513c2c beqz v1, 0x514a0c             |         goto label_189;
                                             |     }
    0x00513c30 addiu v1, zero, 0x1bb         |     v1 = 0x1bb;
                                             |     if (v0 == v1) {
                                             | label_46:
    0x00513c34 beq v0, v1, 0x513d10          |         goto label_190;
                                             |     }
    0x00513c38 nop                           |     
    0x00513c3c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00513c40 beqz v0, 0x513d14             |         goto label_191;
                                             |     }
    0x00513c44 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00513c48 addiu s3, s2, 1               |     s3 = s2 + 1;
    0x00513c4c sltu v0, s3, v0               |     v0 = (s3 < v0) ? 1 : 0;
    0x00513c50 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00513c54 bnez v0, 0x513c70             |         
    0x00513c58 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00513c5c move a1, s3                   |         a1 = s3;
    0x00513c60 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00513c64 jalr t9                       |         t9 ();
    0x00513c68 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513c6c lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |     }
    0x00513c70 addiu v0, zero, 0x3a          |     v0 = 0x3a;
    0x00513c74 addu s2, v1, s2               |     s2 = v1 + s2;
    0x00513c78 addiu a1, zero, 0xa           |     a1 = 0xa;
    0x00513c7c sb v0, 0x10(s2)               |     *((s2 + 16)) = v0;
    0x00513c80 addiu s2, sp, 0x4f            |     s2 = sp + 0x4f;
    0x00513c84 sw s3, 0xc(v1)                |     *((v1 + 3)) = s3;
    0x00513c88 lhu v0, 0x10(fp)              |     v0 = *(arg_10h);
    0x00513c8c move s5, s2                   |     s5 = s2;
    0x00513c90 sb zero, 0x4f(sp)             |     *(var_4fh) = 0;
                                             |     do {
    0x00513c94 divu zero, v0, a1             |         __asm ("divu zero, v0, a1");
    0x00513c98 teq a1, zero, 7               |         __asm ("teq a1, zero, 7");
    0x00513c9c addiu s2, s2, -1              |         s2 += -1;
    0x00513ca0 mfhi a0                       |         __asm ("mfhi a0");
    0x00513ca4 mflo v0                       |         __asm ("mflo v0");
    0x00513ca8 addiu a0, a0, 0x30            |         a0 += 0x30;
    0x00513cac sb a0, (s2)                   |         *(s2) = a0;
    0x00513cb0 bnez v0, 0x513c94             |         
                                             |     } while (v0 != 0);
    0x00513cb4 lw s3, 0xc(v1)                |     s3 = *((v1 + 3));
    0x00513cb8 subu s5, s5, s2               |     __asm ("subu s5, s5, s2");
    0x00513cbc lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00513cc0 addu s3, s5, s3               |     s3 = s5 + s3;
    0x00513cc4 sltu v0, s3, v0               |     v0 = (s3 < v0) ? 1 : 0;
    0x00513cc8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00513ccc bnez v0, 0x513ce8             |         
    0x00513cd0 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00513cd4 move a1, s3                   |         a1 = s3;
    0x00513cd8 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00513cdc jalr t9                       |         t9 ();
    0x00513ce0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513ce4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x00513ce8 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00513cec addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00513cf0 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513cf4 move a2, s5                   |     a2 = s5;
    0x00513cf8 move a1, s2                   |     a1 = s2;
    0x00513cfc addu a0, a0, v0               |     a0 += v0;
    0x00513d00 jalr t9                       |     t9 ();
    0x00513d04 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00513d08 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513d0c sw s3, 0xc(v0)                |     *((v0 + 3)) = s3;
                                             | label_190:
    0x00513d10 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_191:
    0x00513d14 addiu s2, zero, 2             |     s2 = 2;
                                             |     if (v0 != 0) {
    0x00513d18 beqz v0, 0x513d34             |         
    0x00513d1c lw s2, 0xc(v0)                |         s2 = *((v0 + 3));
    0x00513d20 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00513d24 addiu s2, s2, 2               |         s2 += 2;
    0x00513d28 sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x00513d2c lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00513d30 bnez v0, 0x513d4c             |             goto label_192;
                                             |         }
                                             |     }
    0x00513d34 lw t9, -0x7ed4(gp)            |     t9 = sym.smart_str_erealloc;
    0x00513d38 move a1, s2                   |     a1 = s2;
    0x00513d3c addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x00513d40 jalr t9                       |     t9 ();
    0x00513d44 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513d48 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             | label_192:
    0x00513d4c addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00513d50 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00513d54 addu v0, v0, v1               |     v0 += v1;
    0x00513d58 addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00513d5c sb v1, (v0)                   |     *(v0) = v1;
    0x00513d60 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00513d64 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x00513d68 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00513d6c sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x00513d70 andi v0, s1, 0x40             |     v0 = s1 & 0x40;
                                             | label_187:
    0x00513d74 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00513d78 bnez v0, 0x513de0             |         
    0x00513d7c addiu s2, zero, 0x13          |         s2 = 0x13;
                                             |         if (v0 != 0) {
    0x00513d80 beqz v0, 0x513d9c             |             
    0x00513d84 lw s2, 0xc(v0)                |             s2 = *((v0 + 3));
    0x00513d88 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00513d8c addiu s2, s2, 0x13            |             s2 += 0x13;
    0x00513d90 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00513d94 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 != 0) {
    0x00513d98 bnez v0, 0x513db4             |                 goto label_193;
                                             |             }
                                             |         }
    0x00513d9c lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00513da0 move a1, s2                   |         a1 = s2;
    0x00513da4 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00513da8 jalr t9                       |         t9 ();
    0x00513dac lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513db0 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_193:
    0x00513db4 lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
    0x00513db8 addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00513dbc lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00513dc0 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x00513dc4 addiu a2, zero, 0x13          |         a2 = 0x13;
                                             |         /* str.Connection:_close_r_n */
    0x00513dc8 addiu a1, a1, -0x1a20         |         a1 += -0x1a20;
    0x00513dcc addu a0, a0, v0               |         a0 += v0;
    0x00513dd0 jalr t9                       |         t9 ();
    0x00513dd4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00513dd8 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513ddc sw s2, 0xc(v0)                |         *((v0 + 3)) = s2;
                                             |     }
    0x00513de0 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
                                             |     if (s0 == 0) {
    0x00513de4 beqz s0, 0x514a1c             |         goto label_194;
                                             |     }
    0x00513de8 lw a2, -0x7fb8(gp)            |     a2 = *((gp - 8174));
    0x00513dec lw t9, -0x6a94(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.user_agent */
    0x00513df0 addiu a2, a2, -0x214c         |     a2 += -0x214c;
    0x00513df4 addiu a1, v0, 0x18c0          |     a1 = v0 + 0x18c0;
    0x00513df8 move a0, s0                   |     a0 = s0;
    0x00513dfc jalr t9                       |     t9 ();
    0x00513e00 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00513e04 beqz v0, 0x514a1c             |         goto label_194;
                                             |     }
    0x00513e08 lbu a0, 8(v0)                 |     a0 = *((v0 + 8));
    0x00513e0c addiu v1, zero, 6             |     v1 = 6;
                                             |     if (a0 != v1) {
    0x00513e10 bne a0, v1, 0x514a1c          |         goto label_194;
                                             |     }
    0x00513e14 nop                           |     
    0x00513e18 lw s2, (v0)                   |     s2 = *(v0);
    0x00513e1c addiu s2, s2, 0x10            |     s2 += 0x10;
                                             | label_47:
    0x00513e20 andi v0, s1, 1                |     v0 = s1 & 1;
                                             |     if (v0 == 0) {
    0x00513e24 bnez v0, 0x513f04             |         
    0x00513e28 nop                           |         
                                             |         if (s2 == 0) {
    0x00513e2c beqz s2, 0x513f04             |             goto label_195;
                                             |         }
    0x00513e30 nop                           |         
    0x00513e34 lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
    0x00513e38 move a0, s2                   |         a0 = s2;
    0x00513e3c jalr t9                       |         t9 ();
    0x00513e40 addiu s5, v0, 0x11            |         s5 = v0 + 0x11;
    0x00513e44 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00513e48 beqz v0, 0x513f04             |             goto label_195;
                                             |         }
    0x00513e4c lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x00513e50 addiu a0, v0, 0x12            |         a0 = v0 + 0x12;
    0x00513e54 jalr t9                       |         t9 ();
    0x00513e58 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513e5c move a1, s5                   |         a1 = s5;
    0x00513e60 move a3, s2                   |         a3 = s2;
    0x00513e64 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x00513e68 lw t9, -0x7ed8(gp)            |         t9 = sym.ap_php_slprintf;
                                             |         /* str.User_Agent:__s_r_n */
    0x00513e6c addiu a2, a2, -0x1a0c         |         a2 += -0x1a0c;
    0x00513e70 move a0, v0                   |         a0 = v0;
    0x00513e74 move s3, v0                   |         s3 = v0;
    0x00513e78 bal 0x52d848                  |         sym_ap_php_slprintf ();
    0x00513e7c move s5, v0                   |         s5 = v0;
    0x00513e80 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00513e84 beqz v0, 0x514a28             |             goto label_196;
                                             |         }
    0x00513e88 addu v0, s3, v0               |         v0 = s3 + v0;
    0x00513e8c sb zero, (v0)                 |         *(v0) = 0;
    0x00513e90 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00513e94 move s2, s5                   |         s2 = s5;
                                             |         if (v0 != 0) {
    0x00513e98 beqz v0, 0x513eb4             |             
    0x00513e9c lw s2, 0xc(v0)                |             s2 = *((v0 + 3));
    0x00513ea0 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00513ea4 addu s2, s5, s2               |             s2 = s5 + s2;
    0x00513ea8 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00513eac lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 != 0) {
    0x00513eb0 bnez v0, 0x513ecc             |                 goto label_197;
                                             |             }
                                             |         }
    0x00513eb4 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00513eb8 move a1, s2                   |         a1 = s2;
    0x00513ebc addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00513ec0 jalr t9                       |         t9 ();
    0x00513ec4 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513ec8 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_197:
    0x00513ecc lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x00513ed0 addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00513ed4 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00513ed8 move a2, s5                   |         a2 = s5;
    0x00513edc move a1, s3                   |         a1 = s3;
    0x00513ee0 addu a0, a0, v0               |         a0 += v0;
    0x00513ee4 jalr t9                       |         t9 ();
    0x00513ee8 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00513eec lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513ef0 sw s2, 0xc(v0)                |         *((v0 + 3)) = s2;
                                             | label_48:
    0x00513ef4 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00513ef8 move a0, s3                   |         a0 = s3;
    0x00513efc jalr t9                       |         t9 ();
    0x00513f00 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
                                             | label_195:
    0x00513f04 lw v0, 0xce8(sp)              |     v0 = *(var_ce8h);
                                             |     if (s4 == 0) {
    0x00513f08 beqz s4, 0x51418c             |         goto label_198;
                                             |     }
                                             |     if (v0 == 0) {
    0x00513f0c beqz v0, 0x5140b8             |         goto label_199;
                                             |     }
    0x00513f10 nop                           |     
    0x00513f14 andi v0, s1, 0x10             |     v0 = s1 & 0x10;
                                             |     if (s0 == 0) {
    0x00513f18 beqz s0, 0x5140b8             |         goto label_199;
                                             |     }
    0x00513f1c lw t9, -0x6194(gp)            |     t9 = sym.imp.strlen;
                                             |     if (v0 != 0) {
    0x00513f20 bnez v0, 0x5140bc             |         goto label_200;
                                             |     }
    0x00513f24 lw a2, -0x7fb8(gp)            |     a2 = *((gp - 8174));
    0x00513f28 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
    0x00513f2c lw t9, -0x6a94(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.content */
    0x00513f30 addiu a2, a2, -0x2154         |     a2 += -0x2154;
    0x00513f34 addiu a1, v0, 0x18c0          |     a1 = v0 + 0x18c0;
    0x00513f38 move a0, s0                   |     a0 = s0;
    0x00513f3c jalr t9                       |     t9 ();
    0x00513f40 move s3, v0                   |     s3 = v0;
    0x00513f44 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00513f48 beqz v0, 0x5140b8             |         goto label_199;
                                             |     }
    0x00513f4c lbu v1, 8(v0)                 |     v1 = *((v0 + 8));
    0x00513f50 addiu v0, zero, 6             |     v0 = 6;
                                             |     if (v1 != v0) {
    0x00513f54 bne v1, v0, 0x5140b8          |         goto label_199;
                                             |     }
    0x00513f58 nop                           |     
    0x00513f5c lw v0, (s3)                   |     v0 = *(s3);
    0x00513f60 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513f64 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00513f68 beqz v0, 0x5140b8             |         goto label_199;
                                             |     }
    0x00513f6c addiu s2, zero, 0x10          |     s2 = 0x10;
                                             |     if (v0 != 0) {
    0x00513f70 beqz v0, 0x513f8c             |         
    0x00513f74 lw s2, 0xc(v0)                |         s2 = *((v0 + 3));
    0x00513f78 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00513f7c addiu s2, s2, 0x10            |         s2 += 0x10;
    0x00513f80 sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x00513f84 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00513f88 bnez v0, 0x513fa4             |             goto label_201;
                                             |         }
                                             |     }
    0x00513f8c lw t9, -0x7ed4(gp)            |     t9 = sym.smart_str_erealloc;
    0x00513f90 move a1, s2                   |     a1 = s2;
    0x00513f94 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x00513f98 jalr t9                       |     t9 ();
    0x00513f9c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513fa0 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_201:
    0x00513fa4 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x00513fa8 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00513fac lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513fb0 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
                                             |     /* str.Content_Length:_ */
    0x00513fb4 addiu a1, a1, -0x19d4         |     a1 += -0x19d4;
    0x00513fb8 addu a0, a0, v0               |     a0 += v0;
    0x00513fbc addiu a2, zero, 0x10          |     a2 = 0x10;
    0x00513fc0 jalr t9                       |     t9 ();
    0x00513fc4 lw a0, 0xcc0(sp)              |     a0 = *(var_cc0h);
    0x00513fc8 lw v0, (s3)                   |     v0 = *(s3);
    0x00513fcc lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513fd0 addiu s3, sp, 0x4f            |     s3 = sp + 0x4f;
    0x00513fd4 sw s2, 0xc(a0)                |     *((a0 + 3)) = s2;
    0x00513fd8 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513fdc move s5, s3                   |     s5 = s3;
    0x00513fe0 sb zero, 0x4f(sp)             |     *(var_4fh) = 0;
    0x00513fe4 addiu a1, zero, 0xa           |     a1 = 0xa;
                                             |     do {
    0x00513fe8 divu zero, v0, a1             |         __asm ("divu zero, v0, a1");
    0x00513fec teq a1, zero, 7               |         __asm ("teq a1, zero, 7");
    0x00513ff0 addiu s3, s3, -1              |         s3 += -1;
    0x00513ff4 mfhi v1                       |         __asm ("mfhi v1");
    0x00513ff8 mflo v0                       |         __asm ("mflo v0");
    0x00513ffc addiu v1, v1, 0x30            |         v1 += 0x30;
    0x00514000 sb v1, (s3)                   |         *(s3) = v1;
    0x00514004 bnez v0, 0x513fe8             |         
                                             |     } while (v0 != 0);
    0x00514008 lw s2, 0xc(a0)                |     s2 = *((a0 + 3));
    0x0051400c subu s5, s5, s3               |     __asm ("subu s5, s5, s3");
    0x00514010 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00514014 addu s2, s5, s2               |     s2 = s5 + s2;
    0x00514018 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x0051401c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00514020 bnez v0, 0x51403c             |         
    0x00514024 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00514028 move a1, s2                   |         a1 = s2;
    0x0051402c addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00514030 jalr t9                       |         t9 ();
    0x00514034 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514038 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x0051403c lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00514040 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00514044 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00514048 move a2, s5                   |     a2 = s5;
    0x0051404c move a1, s3                   |     a1 = s3;
    0x00514050 addu a0, a0, v0               |     a0 += v0;
    0x00514054 jalr t9                       |     t9 ();
    0x00514058 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x0051405c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514060 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x00514064 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00514068 addiu s2, s2, 2               |     s2 += 2;
    0x0051406c sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x00514070 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00514074 bnez v0, 0x514090             |         
    0x00514078 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x0051407c move a1, s2                   |         a1 = s2;
    0x00514080 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00514084 jalr t9                       |         t9 ();
    0x00514088 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051408c lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |     }
    0x00514090 ori s1, s1, 0x10              |     s1 |= 0x10;
    0x00514094 addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00514098 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x0051409c addu v0, v0, v1               |     v0 += v1;
    0x005140a0 addiu v1, zero, 0xd           |     v1 = 0xd;
    0x005140a4 sb v1, (v0)                   |     *(v0) = v1;
    0x005140a8 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x005140ac sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x005140b0 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x005140b4 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
                                             | label_199:
    0x005140b8 lw t9, -0x6194(gp)            |     t9 = sym.imp.strlen;
                                             | label_200:
    0x005140bc move a0, s4                   |     a0 = s4;
    0x005140c0 jalr t9                       |     t9 ();
    0x005140c4 move s3, v0                   |     s3 = v0;
    0x005140c8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x005140cc lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x005140d0 beqz v0, 0x514a48             |         goto label_202;
                                             |     }
    0x005140d4 lw s2, 0xc(v0)                |     s2 = *((v0 + 3));
    0x005140d8 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x005140dc addu s2, s3, s2               |     s2 = s3 + s2;
    0x005140e0 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x005140e4 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x005140e8 bnez v0, 0x514104             |         
                                             | label_49:
    0x005140ec lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x005140f0 move a1, s2                   |         a1 = s2;
    0x005140f4 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x005140f8 jalr t9                       |         t9 ();
    0x005140fc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514100 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x00514104 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00514108 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x0051410c lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00514110 move a2, s3                   |     a2 = s3;
    0x00514114 move a1, s4                   |     a1 = s4;
    0x00514118 addu a0, a0, v0               |     a0 += v0;
    0x0051411c jalr t9                       |     t9 ();
    0x00514120 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00514124 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514128 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x0051412c lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00514130 addiu s2, s2, 2               |     s2 += 2;
    0x00514134 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x00514138 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x0051413c bnez v0, 0x514158             |         
    0x00514140 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00514144 move a1, s2                   |         a1 = s2;
    0x00514148 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x0051414c jalr t9                       |         t9 ();
    0x00514150 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514154 lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |     }
    0x00514158 lw t9, -0x7fe4(gp)            |     t9 = sym._efree;
    0x0051415c addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00514160 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00514164 move a0, s4                   |     a0 = s4;
    0x00514168 addu v0, v0, v1               |     v0 += v1;
    0x0051416c addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00514170 sb v1, (v0)                   |     *(v0) = v1;
    0x00514174 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00514178 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x0051417c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00514180 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x00514184 jalr t9                       |     t9 ();
    0x00514188 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             | label_198:
    0x0051418c lw v0, 0xce8(sp)              |     v0 = *(var_ce8h);
    0x00514190 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00514194 beqz v0, 0x514a5c             |         goto label_203;
                                             |     }
    0x00514198 lw a2, -0x7fb8(gp)            |     a2 = *((gp - 8174));
                                             |     if (s0 == 0) {
    0x0051419c beqz s0, 0x514a5c             |         goto label_203;
                                             |     }
    0x005141a0 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
    0x005141a4 lw t9, -0x6a94(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.content */
    0x005141a8 addiu a2, a2, -0x2154         |     a2 += -0x2154;
    0x005141ac addiu a1, v0, 0x18c0          |     a1 = v0 + 0x18c0;
    0x005141b0 move a0, s0                   |     a0 = s0;
    0x005141b4 jalr t9                       |     t9 ();
    0x005141b8 move s4, v0                   |     s4 = v0;
    0x005141bc lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x005141c0 beqz v0, 0x514a58             |         goto label_204;
                                             |     }
    0x005141c4 lbu v1, 8(v0)                 |     v1 = *((v0 + 8));
    0x005141c8 addiu v0, zero, 6             |     v0 = 6;
    0x005141cc lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v1 != v0) {
    0x005141d0 bne v1, v0, 0x514a5c          |         goto label_203;
                                             |     }
    0x005141d4 lw v0, (s4)                   |     v0 = *(s4);
    0x005141d8 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005141dc lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x005141e0 beqz v0, 0x514a5c             |         goto label_203;
                                             |     }
    0x005141e4 andi v0, s1, 0x10             |     v0 = s1 & 0x10;
    0x005141e8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 != 0) {
    0x005141ec bnez v0, 0x514338             |         goto label_205;
                                             |     }
    0x005141f0 addiu s2, zero, 0x10          |     s2 = 0x10;
                                             |     if (v0 != 0) {
    0x005141f4 beqz v0, 0x514210             |         
    0x005141f8 lw s2, 0xc(v0)                |         s2 = *((v0 + 3));
    0x005141fc lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00514200 addiu s2, s2, 0x10            |         s2 += 0x10;
    0x00514204 sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x00514208 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x0051420c bnez v0, 0x514228             |             goto label_206;
                                             |         }
                                             |     }
    0x00514210 lw t9, -0x7ed4(gp)            |     t9 = sym.smart_str_erealloc;
    0x00514214 move a1, s2                   |     a1 = s2;
    0x00514218 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x0051421c jalr t9                       |     t9 ();
    0x00514220 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514224 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_206:
    0x00514228 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x0051422c addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00514230 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00514234 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
                                             |     /* str.Content_Length:_ */
    0x00514238 addiu a1, a1, -0x19d4         |     a1 += -0x19d4;
    0x0051423c addu a0, a0, v0               |     a0 += v0;
    0x00514240 addiu a2, zero, 0x10          |     a2 = 0x10;
    0x00514244 jalr t9                       |     t9 ();
    0x00514248 lw a0, 0xcc0(sp)              |     a0 = *(var_cc0h);
    0x0051424c lw v0, (s4)                   |     v0 = *(s4);
    0x00514250 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514254 addiu s3, sp, 0x4f            |     s3 = sp + 0x4f;
    0x00514258 sw s2, 0xc(a0)                |     *((a0 + 3)) = s2;
    0x0051425c lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00514260 move s5, s3                   |     s5 = s3;
    0x00514264 sb zero, 0x4f(sp)             |     *(var_4fh) = 0;
    0x00514268 addiu a1, zero, 0xa           |     a1 = 0xa;
                                             |     do {
    0x0051426c divu zero, v0, a1             |         __asm ("divu zero, v0, a1");
    0x00514270 teq a1, zero, 7               |         __asm ("teq a1, zero, 7");
    0x00514274 addiu s3, s3, -1              |         s3 += -1;
    0x00514278 mfhi v1                       |         __asm ("mfhi v1");
    0x0051427c mflo v0                       |         __asm ("mflo v0");
    0x00514280 addiu v1, v1, 0x30            |         v1 += 0x30;
    0x00514284 sb v1, (s3)                   |         *(s3) = v1;
    0x00514288 bnez v0, 0x51426c             |         
                                             |     } while (v0 != 0);
    0x0051428c lw s2, 0xc(a0)                |     s2 = *((a0 + 3));
    0x00514290 subu s5, s5, s3               |     __asm ("subu s5, s5, s3");
    0x00514294 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00514298 addu s2, s5, s2               |     s2 = s5 + s2;
    0x0051429c sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x005142a0 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x005142a4 bnez v0, 0x5142c0             |         
    0x005142a8 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x005142ac move a1, s2                   |         a1 = s2;
    0x005142b0 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x005142b4 jalr t9                       |         t9 ();
    0x005142b8 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005142bc lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x005142c0 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x005142c4 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x005142c8 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005142cc move a2, s5                   |     a2 = s5;
    0x005142d0 move a1, s3                   |     a1 = s3;
    0x005142d4 addu a0, a0, v0               |     a0 += v0;
    0x005142d8 jalr t9                       |     t9 ();
    0x005142dc lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x005142e0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005142e4 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x005142e8 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x005142ec addiu s2, s2, 2               |     s2 += 2;
    0x005142f0 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x005142f4 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x005142f8 bnez v0, 0x514314             |         
    0x005142fc lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00514300 move a1, s2                   |         a1 = s2;
    0x00514304 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00514308 jalr t9                       |         t9 ();
    0x0051430c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514310 lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |     }
    0x00514314 addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00514318 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x0051431c addu v0, v0, v1               |     v0 += v1;
    0x00514320 addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00514324 sb v1, (v0)                   |     *(v0) = v1;
    0x00514328 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x0051432c sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x00514330 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00514334 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
                                             | label_205:
    0x00514338 andi s1, s1, 0x20             |     s1 &= 0x20;
    0x0051433c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (s1 == 0) {
    0x00514340 bnez s1, 0x5143c8             |         
    0x00514344 addiu s1, zero, 0x31          |         s1 = 0x31;
                                             |         if (v0 != 0) {
    0x00514348 beqz v0, 0x514364             |             
    0x0051434c lw s1, 0xc(v0)                |             s1 = *((v0 + 3));
    0x00514350 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00514354 addiu s1, s1, 0x31            |             s1 += 0x31;
    0x00514358 sltu v0, s1, v0               |             v0 = (s1 < v0) ? 1 : 0;
    0x0051435c lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 != 0) {
    0x00514360 bnez v0, 0x51437c             |                 goto label_207;
                                             |             }
                                             |         }
    0x00514364 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00514368 move a1, s1                   |         a1 = s1;
    0x0051436c addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00514370 jalr t9                       |         t9 ();
    0x00514374 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514378 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_207:
    0x0051437c lw a1, -0x7fbc(gp)            |         a1 = *((gp - 8175));
    0x00514380 addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00514384 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00514388 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x0051438c addiu a2, zero, 0x31          |         a2 = 0x31;
                                             |         /* str.Content_Type:_application_x_www_form_urlencoded_r_n */
    0x00514390 addiu a1, a1, -0x19c0         |         a1 += -0x19c0;
    0x00514394 addu a0, a0, v0               |         a0 += v0;
    0x00514398 jalr t9                       |         t9 ();
    0x0051439c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005143a0 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x005143a4 addiu a1, zero, 8             |         a1 = 8;
    0x005143a8 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x005143ac lw t9, -0x7ef4(gp)            |         t9 = sym.php_error_docref0;
    0x005143b0 sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
                                             |         /* str.Content_type_not_specified_assuming_application_x_www_form_urlencoded */
    0x005143b4 addiu a2, a2, -0x198c         |         a2 += -0x198c;
    0x005143b8 move a0, zero                 |         a0 = 0;
    0x005143bc jalr t9                       |         t9 ();
    0x005143c0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005143c4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x005143c8 addiu s1, zero, 2             |     s1 = 2;
                                             |     if (v0 != 0) {
    0x005143cc beqz v0, 0x5143e8             |         
    0x005143d0 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x005143d4 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x005143d8 addiu s1, s1, 2               |         s1 += 2;
    0x005143dc sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x005143e0 lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x005143e4 bnez v0, 0x514400             |             goto label_208;
                                             |         }
                                             |     }
    0x005143e8 lw t9, -0x7ed4(gp)            |     t9 = sym.smart_str_erealloc;
    0x005143ec move a1, s1                   |     a1 = s1;
    0x005143f0 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x005143f4 jalr t9                       |     t9 ();
    0x005143f8 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005143fc lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             | label_208:
    0x00514400 addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00514404 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00514408 addu v0, v0, v1               |     v0 += v1;
    0x0051440c addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00514410 sb v1, (v0)                   |     *(v0) = v1;
    0x00514414 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00514418 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x0051441c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00514420 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
    0x00514424 lw v0, (s4)                   |     v0 = *(s4);
    0x00514428 addiu s3, v0, 0x10            |     s3 = v0 + 0x10;
    0x0051442c lw s2, 0xc(v0)                |     s2 = *((v0 + 3));
    0x00514430 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00514434 addu s1, s2, s1               |     s1 = s2 + s1;
    0x00514438 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x0051443c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00514440 bnez v0, 0x51445c             |         
    0x00514444 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00514448 move a1, s1                   |         a1 = s1;
    0x0051444c addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00514450 jalr t9                       |         t9 ();
    0x00514454 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514458 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x0051445c lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00514460 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00514464 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00514468 move a2, s2                   |     a2 = s2;
    0x0051446c move a1, s3                   |     a1 = s3;
    0x00514470 addu a0, a0, v0               |     a0 += v0;
    0x00514474 jalr t9                       |     t9 ();
    0x00514478 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     do {
    0x0051447c lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00514480 lw a1, 0xcc0(sp)              |         a1 = *(var_cc0h);
    0x00514484 lw t9, -0x7a60(gp)            |         t9 = sym._php_stream_write;
    0x00514488 sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x0051448c lw a2, 0xc(a1)                |         a2 = *((a1 + 3));
    0x00514490 move a0, s6                   |         a0 = s6;
    0x00514494 addiu a1, a1, 0x10            |         a1 += 0x10;
    0x00514498 jalr t9                       |         t9 ();
    0x0051449c lw v0, 0xd50(sp)              |         v0 = *(arg_d50h);
    0x005144a0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005144a4 sb zero, 0x830(sp)            |         *(var_830h) = 0;
    0x005144a8 lbu v0, 8(v0)                 |         v0 = *((v0 + 8));
    0x005144ac lw t9, -0x7a7c(gp)            |         t9 = sym._php_stream_eof;
                                             |         if (v0 == 0) {
    0x005144b0 bnez v0, 0x5144cc             |             
    0x005144b4 lw t9, -0x7f08(gp)            |             t9 = sym._array_init;
    0x005144b8 lw a0, 0xd50(sp)              |             a0 = *(arg_d50h);
    0x005144bc move a1, zero                 |             a1 = 0;
    0x005144c0 jalr t9                       |             t9 ();
    0x005144c4 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005144c8 lw t9, -0x7a7c(gp)            |             t9 = sym._php_stream_eof;
                                             |         }
    0x005144cc move a0, s6                   |         a0 = s6;
    0x005144d0 jalr t9                       |         t9 ();
    0x005144d4 sw v0, 0xcf8(sp)              |         *(var_cf8h) = v0;
    0x005144d8 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x005144dc bnez v0, 0x514bb0             |             goto label_209;
                                             |         }
    0x005144e0 lw t9, -0x7a74(gp)            |         t9 = sym._php_stream_get_line;
    0x005144e4 addiu s5, sp, 0x430           |         s5 = sp + 0x430;
    0x005144e8 addiu s3, sp, 0xc30           |         s3 = sp + 0xc30;
    0x005144ec move a3, s5                   |         a3 = s5;
    0x005144f0 addiu a2, zero, 0x7f          |         a2 = 0x7f;
    0x005144f4 move a1, s3                   |         a1 = s3;
    0x005144f8 move a0, s6                   |         a0 = s6;
    0x005144fc jalr t9                       |         t9 ();
    0x00514500 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00514504 beqz v0, 0x514ba8             |             goto label_210;
                                             |         }
    0x00514508 lw v0, 0x430(sp)              |         v0 = *(var_430h);
    0x0051450c sltiu v0, v0, 0xa             |         v0 = (v0 < 0xa) ? 1 : 0;
                                             |         if (v0 != 0) {
    0x00514510 bnez v0, 0x514ab4             |             goto label_211;
                                             |         }
    0x00514514 nop                           |         
    0x00514518 lw t9, -0x6214(gp)            |         t9 = sym.imp.atoi;
    0x0051451c addiu a0, sp, 0xc39           |         a0 = sp + 0xc39;
    0x00514520 jalr t9                       |         t9 ();
    0x00514524 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514528 sw v0, 0xce0(sp)              |         *(var_ce0h) = v0;
                                             | label_50:
    0x0051452c lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
                                             |         if (s0 != 0) {
    0x00514530 bnez s0, 0x514abc             |             goto label_212;
                                             |         }
                                             | label_51:
    0x00514534 sw zero, 0xcf4(sp)            |         *(var_cf4h) = 0;
                                             | label_52:
    0x00514538 lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
    0x0051453c andi v0, v0, 0x200            |         v0 &= 0x200;
    0x00514540 addiu s1, zero, 1             |         s1 = 1;
                                             |         if (v0 == 0) {
    0x00514544 bnez v0, 0x514550             |             
    0x00514548 lw v0, 0xcf4(sp)              |             v0 = *(var_cf4h);
    0x0051454c sltu s1, zero, v0             |             s1 = (0 < v0) ? 1 : 0;
                                             |         }
    0x00514550 lw v0, 0xce0(sp)              |         v0 = *(var_ce0h);
    0x00514554 addiu v0, v0, -0x64           |         v0 += -0x64;
    0x00514558 sltiu v0, v0, 0x64            |         v0 = (v0 < 0x64) ? 1 : 0;
    0x0051455c lw v0, 0xce0(sp)              |         v0 = *(var_ce0h);
                                             |         if (v0 != 0) {
    0x00514560 beqz v0, 0x514598             |             
    0x00514564 lw s2, -0x7fbc(gp)            |             s2 = *((gp - 8175));
                                             |             /* str.HTTP_1 */
    0x00514568 addiu s2, s2, -0x1934         |             s2 += -0x1934;
                                             | label_55:
    0x0051456c lw t9, -0x7a7c(gp)            |             t9 = sym._php_stream_eof;
                                             | label_54:
    0x00514570 move a0, s6                   |             a0 = s6;
    0x00514574 jalr t9                       |             t9 ();
    0x00514578 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x0051457c beqz v0, 0x514af8             |                 goto label_213;
                                             |             }
                                             | label_53:
    0x00514580 lw v0, 0x430(sp)              |             v0 = *(var_430h);
                                             | label_56:
    0x00514584 sltiu v0, v0, 0xa             |             v0 = (v0 < 0xa) ? 1 : 0;
                                             |             if (v0 == 0) {
    0x00514588 beqz v0, 0x514b4c             |                 goto label_214;
                                             |             }
    0x0051458c nop                           |             
    0x00514590 sw zero, 0xce0(sp)            |             *(var_ce0h) = 0;
                                             | label_57:
    0x00514594 lw v0, 0xce0(sp)              |             v0 = *(var_ce0h);
                                             |         }
    0x00514598 addiu v0, v0, -0xc8           |         v0 += -0xc8;
    0x0051459c sltiu v0, v0, 0xc8            |         v0 = (v0 < 0xc8) ? 1 : 0;
    0x005145a0 addiu s7, sp, 0x30            |         s7 = sp + 0x30;
                                             |         if (v0 != 0) {
    0x005145a4 bnez v0, 0x514ba0             |             goto label_215;
                                             |         }
    0x005145a8 lw v1, 0xce0(sp)              |         v1 = *(var_ce0h);
    0x005145ac addiu v0, zero, 0x193         |         v0 = 0x193;
    0x005145b0 lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |         if (v1 != v0) {
    0x005145b4 bne v1, v0, 0x514b64          |             goto label_216;
                                             |         }
                                             |         if (s0 != 0) {
    0x005145b8 beqz s0, 0x5145fc             |             
    0x005145bc nop                           |             
    0x005145c0 lw v0, (s0)                   |             v0 = *(s0);
    0x005145c4 lw v0, 0x430(sp)              |             v0 = *(var_430h);
                                             |             if (v0 == 0) {
    0x005145c8 beqz v0, 0x5145fc             |                 goto label_217;
                                             |             }
    0x005145cc sw zero, 0x1c(sp)             |             *(var_1ch) = 0;
    0x005145d0 sw zero, 0x18(sp)             |             *(var_18h) = 0;
    0x005145d4 sw zero, 0x14(sp)             |             *(var_14h) = 0;
    0x005145d8 sw v1, 0x10(sp)               |             *(var_10h) = v1;
    0x005145dc move a3, s3                   |             a3 = s3;
    0x005145e0 addiu a2, zero, 2             |             a2 = 2;
    0x005145e4 addiu a1, zero, 0xa           |             a1 = 0xa;
                                             | label_60:
    0x005145e8 lw t9, -0x6aa8(gp)            |             t9 = sym.php_stream_notification_notify;
    0x005145ec move a0, s0                   |             a0 = s0;
    0x005145f0 jalr t9                       |             t9 ();
    0x005145f4 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             | label_59:
    0x005145f8 lw v0, 0x430(sp)              |             v0 = *(var_430h);
                                             |         }
                                             | label_217:
    0x005145fc addiu v1, v0, -1              |         v1 = v0 + -1;
                                             |         if (v0 != 0) {
    0x00514600 beqz v0, 0x51463c             |             
                                             | label_102:
    0x00514604 addu a0, s7, v1               |             a0 = s7 + v1;
    0x00514608 lb a1, 0xc00(a0)              |             a1 = *(var_c00h);
    0x0051460c addiu a0, zero, 0xa           |             a0 = 0xa;
                                             |             if (a1 != a0) {
    0x00514610 bne a1, a0, 0x51463c          |                 goto label_58;
                                             |             }
    0x00514614 nop                           |             
    0x00514618 sw v1, 0x430(sp)              |             *(var_430h) = v1;
                                             |             if (v1 == 0) {
    0x0051461c beqz v1, 0x51463c             |                 goto label_58;
                                             |             }
    0x00514620 addiu v0, v0, -2              |             v0 += -2;
    0x00514624 addu v1, s7, v0               |             v1 = s7 + v0;
    0x00514628 lb a0, 0xc00(v1)              |             a0 = *(var_c00h_2);
    0x0051462c addiu v1, zero, 0xd           |             v1 = 0xd;
    0x00514630 lw s4, 0x430(sp)              |             s4 = *(var_430h);
                                             |             if (a0 != v1) {
    0x00514634 bne a0, v1, 0x514640          |                 goto label_218;
                                             |             }
    0x00514638 sw v0, 0x430(sp)              |             *(var_430h) = v0;
                                             |         }
                                             | label_58:
    0x0051463c lw s4, 0x430(sp)              |         s4 = *(var_430h);
                                             | label_218:
    0x00514640 lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x00514644 addiu a0, s4, 0x18            |         a0 = s4 + 0x18;
    0x00514648 addiu v0, zero, -8            |         v0 = -8;
    0x0051464c and a0, a0, v0                |         a0 &= v0;
    0x00514650 jalr t9                       |         t9 ();
    0x00514654 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514658 move s2, v0                   |         s2 = v0;
    0x0051465c addiu v0, zero, 1             |         v0 = 1;
    0x00514660 sw v0, (s2)                   |         *(s2) = v0;
    0x00514664 lw t9, -0x6188(gp)            |         t9 = sym.imp.memcpy;
    0x00514668 addiu v0, zero, 6             |         v0 = 6;
    0x0051466c move a2, s4                   |         a2 = s4;
    0x00514670 sw s4, 0xc(s2)                |         *((s2 + 3)) = s4;
    0x00514674 move a1, s3                   |         a1 = s3;
    0x00514678 addiu a0, s2, 0x10            |         a0 = s2 + 0x10;
    0x0051467c sw v0, 4(s2)                  |         *((s2 + 1)) = v0;
    0x00514680 sw zero, 8(s2)                |         *((s2 + 2)) = 0;
    0x00514684 jalr t9                       |         t9 ();
    0x00514688 addiu v0, zero, 0x1406        |         v0 = 0x1406;
    0x0051468c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514690 sw v0, 0x38(sp)               |         *(var_38h) = v0;
    0x00514694 lw v0, 0xd50(sp)              |         v0 = *(arg_d50h);
    0x00514698 addu s4, s2, s4               |         s4 = s2 + s4;
    0x0051469c lw t9, -0x7c10(gp)            |         t9 = sym._zend_hash_next_index_insert;
    0x005146a0 lw a0, (v0)                   |         a0 = *(v0);
    0x005146a4 sb zero, 0x10(s4)             |         *((s4 + 16)) = 0;
    0x005146a8 sw s2, 0x30(sp)               |         *(var_30h) = s2;
    0x005146ac move a1, s7                   |         a1 = s7;
    0x005146b0 jalr t9                       |         t9 ();
    0x005146b4 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005146b8 sw s1, 0xcf8(sp)              |         *(var_cf8h) = s1;
                                             | label_61:
    0x005146bc lw t9, -0x6b10(gp)            |         t9 = sym._emalloc_1024;
    0x005146c0 move s7, zero                 |         s7 = 0;
    0x005146c4 jalr t9                       |         t9 ();
    0x005146c8 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005146cc move s1, v0                   |         s1 = v0;
    0x005146d0 addiu s4, zero, 1             |         s4 = 1;
    0x005146d4 lw v0, -0x7fbc(gp)            |         v0 = *((gp - 8175));
    0x005146d8 sw zero, 0xce4(sp)            |         *(var_ce4h) = 0;
                                             |         /* str.Location: */
    0x005146dc addiu v0, v0, -0x18e0         |         v0 += -0x18e0;
    0x005146e0 sw v0, 0xcfc(sp)              |         *(var_cfch) = v0;
    0x005146e4 lw v0, -0x7fbc(gp)            |         v0 = *((gp - 8175));
                                             |         /* str.Content_Type: */
    0x005146e8 addiu v0, v0, -0x18c4         |         v0 += -0x18c4;
    0x005146ec sw v0, 0xd00(sp)              |         *(var_d00h) = v0;
    0x005146f0 lw v0, -0x7fbc(gp)            |         v0 = *((gp - 8175));
    0x005146f4 sw v0, 0xd04(sp)              |         *(var_d04h) = v0;
                                             | label_63:
    0x005146f8 lw t9, -0x7a7c(gp)            |         t9 = sym._php_stream_eof;
                                             | label_67:
    0x005146fc move a0, s6                   |         a0 = s6;
    0x00514700 jalr t9                       |         t9 ();
    0x00514704 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00514708 beqz v0, 0x514bdc             |             goto label_219;
                                             |         }
                                             | label_62:
    0x0051470c lw v0, 0xcf8(sp)              |         v0 = *(var_cf8h);
                                             |         if (v0 != 0) {
    0x00514710 beqz v0, 0x514724             |             
    0x00514714 nop                           |             
    0x00514718 lb v0, 0x830(sp)              |             v0 = *(var_830h);
                                             |             if (v0 == 0) {
    0x0051471c beqz v0, 0x514dfc             |                 goto label_82;
                                             |             }
    0x00514720 nop                           |             
                                             |         }
    0x00514724 lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
                                             |         if (s4 == 0) {
    0x00514728 beqz s4, 0x514dfc             |             goto label_82;
                                             |         }
    0x0051472c andi v0, v0, 0x200            |         v0 &= 0x200;
    0x00514730 lw v0, 0xd48(sp)              |         v0 = *(arg_d48h);
                                             |         if (v0 == 0) {
    0x00514734 bnez v0, 0x514748             |             
    0x00514738 lw v0, 0xcf4(sp)              |             v0 = *(var_cf4h);
    0x0051473c lb v0, 0x830(sp)              |             v0 = *(var_830h);
                                             |             if (v0 == 0) {
    0x00514740 beqz v0, 0x514754             |                 goto label_220;
                                             |             }
    0x00514744 lw v0, 0xd48(sp)              |             v0 = *(arg_d48h);
                                             |         }
    0x00514748 slti v0, v0, 2                |         v0 = (v0 < 2) ? 1 : 0;
    0x0051474c lb v0, 0x830(sp)              |         v0 = *(var_830h);
                                             |         if (v0 != 0) {
    0x00514750 bnez v0, 0x514dfc             |             goto label_82;
                                             |         }
                                             | label_220:
    0x00514754 lw t9, -0x7a1c(gp)            |         t9 = sym._php_stream_free;
                                             |         if (v0 != 0) {
    0x00514758 beqz v0, 0x51479c             |             
                                             |             if (s0 == 0) {
    0x0051475c beqz s0, 0x51479c             |                 goto label_221;
                                             |             }
    0x00514760 nop                           |             
    0x00514764 lw v0, (s0)                   |             v0 = *(s0);
    0x00514768 lw t9, -0x6aa8(gp)            |             t9 = sym.php_stream_notification_notify;
                                             |             if (v0 != 0) {
    0x0051476c beqz v0, 0x514798             |                 
    0x00514770 sw zero, 0x1c(sp)             |                 *(var_1ch) = 0;
    0x00514774 sw zero, 0x18(sp)             |                 *(var_18h) = 0;
    0x00514778 sw zero, 0x14(sp)             |                 *(var_14h) = 0;
    0x0051477c sw zero, 0x10(sp)             |                 *(var_10h) = 0;
    0x00514780 addiu a3, sp, 0x830           |                 a3 = sp + 0x830;
    0x00514784 move a2, zero                 |                 a2 = 0;
    0x00514788 addiu a1, zero, 6             |                 a1 = 6;
    0x0051478c move a0, s0                   |                 a0 = s0;
    0x00514790 jalr t9                       |                 t9 ();
    0x00514794 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x00514798 lw t9, -0x7a1c(gp)            |             t9 = sym._php_stream_free;
                                             |         }
                                             | label_221:
    0x0051479c addiu a1, zero, 3             |         a1 = 3;
    0x005147a0 move a0, s6                   |         a0 = s6;
    0x005147a4 jalr t9                       |         t9 ();
    0x005147a8 lb s4, 0x830(sp)              |         s4 = *(var_830h);
    0x005147ac lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (s4 == 0) {
    0x005147b0 beqz s4, 0x5153e0             |             goto label_222;
                                             |         }
    0x005147b4 lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
    0x005147b8 addiu s2, sp, 0x830           |         s2 = sp + 0x830;
    0x005147bc sb zero, 0x430(sp)            |         *(var_430h) = 0;
    0x005147c0 move a0, s2                   |         a0 = s2;
    0x005147c4 jalr t9                       |         t9 ();
    0x005147c8 sltiu v0, v0, 8               |         v0 = (v0 < 8) ? 1 : 0;
    0x005147cc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x005147d0 bnez v0, 0x514854             |             
    0x005147d4 lw a1, -0x7fbc(gp)            |             a1 = *((gp - 8175));
    0x005147d8 lw t9, -0x62dc(gp)            |             t9 = sym.imp.strncasecmp;
    0x005147dc addiu a2, zero, 7             |             a2 = 7;
                                             |             /* str.http:__ */
    0x005147e0 addiu a1, a1, -0x1874         |             a1 += -0x1874;
    0x005147e4 move a0, s2                   |             a0 = s2;
    0x005147e8 jalr t9                       |             t9 ();
    0x005147ec lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x005147f0 beqz v0, 0x5151e4             |                 goto label_223;
                                             |             }
    0x005147f4 lw a1, -0x7fbc(gp)            |             a1 = *((gp - 8175));
    0x005147f8 lw t9, -0x62dc(gp)            |             t9 = sym.imp.strncasecmp;
    0x005147fc addiu a2, zero, 8             |             a2 = 8;
                                             |             /* str.https:__ */
    0x00514800 addiu a1, a1, -0x186c         |             a1 += -0x186c;
    0x00514804 move a0, s2                   |             a0 = s2;
    0x00514808 jalr t9                       |             t9 ();
    0x0051480c lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00514810 beqz v0, 0x5151e4             |                 goto label_223;
                                             |             }
    0x00514814 lw a1, -0x7fbc(gp)            |             a1 = *((gp - 8175));
    0x00514818 lw t9, -0x62dc(gp)            |             t9 = sym.imp.strncasecmp;
    0x0051481c addiu a2, zero, 6             |             a2 = 6;
                                             |             /* str.ftp:__ */
    0x00514820 addiu a1, a1, -0x1860         |             a1 += -0x1860;
    0x00514824 move a0, s2                   |             a0 = s2;
    0x00514828 jalr t9                       |             t9 ();
    0x0051482c lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00514830 beqz v0, 0x5151e4             |                 goto label_223;
                                             |             }
    0x00514834 lw a1, -0x7fbc(gp)            |             a1 = *((gp - 8175));
    0x00514838 lw t9, -0x62dc(gp)            |             t9 = sym.imp.strncasecmp;
    0x0051483c addiu a2, zero, 7             |             a2 = 7;
                                             |             /* str.ftps:__ */
    0x00514840 addiu a1, a1, -0x1858         |             a1 += -0x1858;
    0x00514844 move a0, s2                   |             a0 = s2;
    0x00514848 jalr t9                       |             t9 ();
    0x0051484c lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00514850 beqz v0, 0x5151e4             |                 goto label_223;
                                             |             }
                                             |         }
    0x00514854 addiu s6, zero, 0x2f          |         s6 = 0x2f;
    0x00514858 addiu s3, sp, 0x30            |         s3 = sp + 0x30;
                                             |         if (s4 == s6) {
    0x0051485c beq s4, s6, 0x515198          |             goto label_224;
                                             |         }
    0x00514860 lb v0, 0x831(sp)              |         v0 = *(var_831h);
    0x00514864 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
                                             |         if (v0 == 0) {
    0x00514868 beqz v0, 0x515178             |             goto label_225;
                                             |         }
    0x0051486c lw s4, 0x14(fp)               |         s4 = *(arg_d44h);
    0x00514870 lw t9, -0x7f54(gp)            |         t9 = sym.ap_php_snprintf;
                                             |         if (s4 == 0) {
    0x00514874 beqz s4, 0x51517c             |             goto label_226;
                                             |         }
    0x00514878 lw t9, -0x605c(gp)            |         t9 = sym.imp.strrchr;
    0x0051487c addiu a1, zero, 0x2f          |         a1 = 0x2f;
    0x00514880 move a0, s4                   |         a0 = s4;
    0x00514884 jalr t9                       |         t9 ();
    0x00514888 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x0051488c bnez v0, 0x5148c4             |             
    0x00514890 lb v0, (s4)                   |             v0 = *(s4);
                                             |             if (v0 != 0) {
    0x00514894 bnez v0, 0x51515c             |                 goto label_227;
                                             |             }
    0x00514898 nop                           |             
    0x0051489c lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
    0x005148a0 move a0, s4                   |             a0 = s4;
    0x005148a4 jalr t9                       |             t9 ();
    0x005148a8 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005148ac lw a0, -0x7fbc(gp)            |             a0 = *((gp - 8175));
    0x005148b0 lw t9, -0x7f6c(gp)            |             t9 = sym._estrdup;
    0x005148b4 addiu a0, a0, 0x3190          |             a0 += 0x3190;
    0x005148b8 jalr t9                       |             t9 ();
    0x005148bc lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005148c0 sw v0, 0x14(fp)               |             *(arg_d44h) = v0;
                                             |         }
                                             | label_76:
    0x005148c4 sb zero, 1(v0)                |         *((v0 + 1)) = 0;
    0x005148c8 lw a3, 0x14(fp)               |         a3 = *(arg_d44h);
    0x005148cc lw t9, -0x7f54(gp)            |         t9 = sym.ap_php_snprintf;
                                             |         if (a3 == 0) {
    0x005148d0 beqz a3, 0x515168             |             goto label_228;
                                             |         }
    0x005148d4 lb v1, (a3)                   |         v1 = *(a3);
    0x005148d8 addiu v0, zero, 0x2f          |         v0 = 0x2f;
                                             |         if (v1 != v0) {
    0x005148dc bne v1, v0, 0x515168          |             goto label_228;
                                             |         }
    0x005148e0 nop                           |         
    0x005148e4 lb v0, 1(a3)                  |         v0 = *((a3 + 1));
    0x005148e8 lw a2, -0x7fd0(gp)            |         a2 = *((gp - 8180));
                                             |         if (v0 != 0) {
    0x005148ec bnez v0, 0x51516c             |             goto label_229;
                                             |         }
    0x005148f0 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x005148f4 sw s2, 0x10(sp)               |         *(var_10h) = s2;
                                             |         /* esilref: '&s&s' */
    0x005148f8 addiu a2, a2, 0x1fe4          |         a2 += 0x1fe4;
                                             | label_77:
    0x005148fc addiu a1, zero, 0x3ff         |         a1 = 0x3ff;
    0x00514900 move a0, s3                   |         a0 = s3;
    0x00514904 bal 0x52c524                  |         sym_ap_php_snprintf ();
    0x00514908 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             | label_78:
    0x0051490c lw v1, 0xcd8(sp)              |         v1 = *(var_cd8h);
    0x00514910 lhu v0, 0x10(fp)              |         v0 = *(arg_10h);
    0x00514914 lw a3, (fp)                   |         a3 = *(fp);
    0x00514918 lw t9, -0x7f54(gp)            |         t9 = sym.ap_php_snprintf;
                                             |         if (v1 == 0) {
    0x0051491c beqz v1, 0x5151b4             |             goto label_230;
                                             |         }
    0x00514920 addiu v1, zero, 0x1bb         |         v1 = 0x1bb;
                                             | label_79:
    0x00514924 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
                                             |         if (v0 == v1) {
    0x00514928 beq v0, v1, 0x5151bc          |             goto label_231;
                                             |         }
    0x0051492c sw s3, 0x18(sp)               |         *(var_18h) = s3;
    0x00514930 sw v0, 0x14(sp)               |         *(var_14h) = v0;
    0x00514934 lw v0, 0xc(fp)                |         v0 = *(arg_d3ch);
                                             |         /* str._s:___s:_d_s */
    0x00514938 addiu a2, a2, -0x184c         |         a2 += -0x184c;
    0x0051493c sw v0, 0x10(sp)               |         *(var_10h) = v0;
    0x00514940 addiu a1, zero, 0x3ff         |         a1 = 0x3ff;
    0x00514944 move a0, s5                   |         a0 = s5;
    0x00514948 bal 0x52c524                  |         sym_ap_php_snprintf ();
    0x0051494c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             | label_80:
    0x00514950 lw t9, -0x70b8(gp)            |         t9 = sym.php_url_free;
    0x00514954 move a0, fp                   |         a0 = fp;
    0x00514958 bal 0x501a24                  |         sym_php_url_free ();
    0x0051495c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514960 lw t9, -0x6ab0(gp)            |         t9 = sym.php_url_parse;
    0x00514964 move a0, s5                   |         a0 = s5;
    0x00514968 bal 0x5023c4                  |         sym_php_url_parse ();
    0x0051496c move fp, v0                   |         fp = v0;
    0x00514970 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00514974 bnez v0, 0x515200             |             goto label_232;
                                             |         }
                                             | label_84:
    0x00514978 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x0051497c move a3, s5                   |         a3 = s5;
                                             |         /* str.Invalid_redirect_URL___s */
    0x00514980 addiu a2, a2, -0x1830         |         a2 += -0x1830;
                                             | label_87:
    0x00514984 lw t9, -0x6aa4(gp)            |         t9 = sym.php_stream_wrapper_log_error;
    0x00514988 lw a1, 0xd3c(sp)              |         a1 = *(arg_d3ch);
    0x0051498c lw a0, 0xd30(sp)              |         a0 = *(arg_d30h);
    0x00514990 jalr t9                       |         t9 ();
    0x00514994 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514998 b 0x5127a0                    |         goto label_40;
                                             | label_181:
    0x0051499c addiu s5, s5, -1              |         s5 += -1;
    0x005149a0 b 0x51370c                    |         goto label_41;
                                             | label_180:
    0x005149a4 move a0, s7                   |         a0 = s7;
    0x005149a8 jalr t9                       |         t9 ();
    0x005149ac lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005149b0 subu a1, s7, s3               |         __asm ("subu a1, s7, s3");
    0x005149b4 subu s3, s5, s3               |         __asm ("subu s3, s5, s3");
    0x005149b8 lw t9, -0x62e0(gp)            |         t9 = sym.imp.memmove;
    0x005149bc addiu a2, v0, 1               |         a2 = v0 + 1;
    0x005149c0 addu a1, s4, a1               |         a1 = s4 + a1;
    0x005149c4 addu a0, s4, s3               |         a0 = s4 + s3;
    0x005149c8 jalr t9                       |         t9 ();
    0x005149cc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005149d0 b 0x513750                    |         goto label_42;
                                             | label_182:
    0x005149d4 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x005149d8 jalr t9                       |         t9 ();
    0x005149dc nop                           |         
    0x005149e0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005149e4 b 0x51378c                    |         goto label_43;
                                             | label_183:
    0x005149e8 addiu s2, zero, 0x15          |         s2 = 0x15;
    0x005149ec b 0x5138a0                    |         goto label_44;
                                             | label_185:
    0x005149f0 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x005149f4 jalr t9                       |         t9 ();
    0x005149f8 nop                           |         
    0x005149fc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514a00 b 0x513a00                    |         goto label_45;
                                             | label_189:
    0x00514a0c addiu v1, zero, 0x50          |         v1 = 0x50;
    0x00514a10 b 0x513c34                    |         goto label_46;
                                             | label_194:
    0x00514a1c lw v0, -0x7a50(gp)            |         v0 = *(gp);
    0x00514a20 lw s2, 0x10(v0)               |         s2 = *((v0 + 4));
    0x00514a24 b 0x513e20                    |         goto label_47;
                                             | label_196:
    0x00514a28 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x00514a2c lw t9, -0x7ef4(gp)            |         t9 = sym.php_error_docref0;
                                             |         /* str.Cannot_construct_User_agent_header */
    0x00514a30 addiu a2, a2, -0x19f8         |         a2 += -0x19f8;
    0x00514a34 addiu a1, zero, 2             |         a1 = 2;
    0x00514a38 move a0, zero                 |         a0 = 0;
    0x00514a3c jalr t9                       |         t9 ();
    0x00514a40 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514a44 b 0x513ef4                    |         goto label_48;
                                             | label_202:
    0x00514a48 move s2, s3                   |         s2 = s3;
    0x00514a4c b 0x5140ec                    |         goto label_49;
                                             | label_204:
    0x00514a58 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_203:
    0x00514a5c addiu s1, zero, 2             |         s1 = 2;
                                             |         if (v0 != 0) {
    0x00514a60 beqz v0, 0x514a7c             |             
    0x00514a64 lw s1, 0xc(v0)                |             s1 = *((v0 + 3));
    0x00514a68 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00514a6c addiu s1, s1, 2               |             s1 += 2;
    0x00514a70 sltu v0, s1, v0               |             v0 = (s1 < v0) ? 1 : 0;
    0x00514a74 lw v1, 0xcc0(sp)              |             v1 = *(var_cc0h);
                                             |             if (v0 != 0) {
    0x00514a78 bnez v0, 0x514a94             |                 goto label_233;
                                             |             }
                                             |         }
    0x00514a7c lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x00514a80 move a1, s1                   |         a1 = s1;
    0x00514a84 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00514a88 jalr t9                       |         t9 ();
    0x00514a8c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514a90 lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             | label_233:
    0x00514a94 addiu v0, v1, 0x10            |         v0 = v1 + 0x10;
    0x00514a98 lw v1, 0xc(v1)                |         v1 = *((v1 + 3));
    0x00514a9c addu v0, v0, v1               |         v0 += v1;
    0x00514aa0 addiu v1, zero, 0xd           |         v1 = 0xd;
    0x00514aa4 sb v1, (v0)                   |         *(v0) = v1;
    0x00514aa8 addiu v1, zero, 0xa           |         v1 = 0xa;
    0x00514aac sb v1, 1(v0)                  |         *((v0 + 1)) = v1;
    0x00514ab0 b 0x51447c                    |         
                                             |     } while (1);
                                             | label_211:
    0x00514ab4 sw zero, 0xce0(sp)            |     *(var_ce0h) = 0;
    0x00514ab8 b 0x51452c                    |     goto label_50;
                                             | label_212:
    0x00514abc lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
    0x00514ac0 lw t9, -0x6a94(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.ignore_errors */
    0x00514ac4 addiu a2, a2, -0x1944         |     a2 += -0x1944;
    0x00514ac8 addiu a1, v0, 0x18c0          |     a1 = v0 + 0x18c0;
    0x00514acc move a0, s0                   |     a0 = s0;
    0x00514ad0 jalr t9                       |     t9 ();
    0x00514ad4 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00514ad8 beqz v0, 0x514534             |         goto label_51;
                                             |     }
    0x00514adc lw t9, -0x7ec4(gp)            |     t9 = sym.zend_is_true;
    0x00514ae0 move a0, v0                   |     a0 = v0;
    0x00514ae4 jalr t9                       |     t9 ();
    0x00514ae8 andi v0, v0, 0xff             |     v0 &= 0xff;
    0x00514aec lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514af0 sw v0, 0xcf4(sp)              |     *(var_cf4h) = v0;
    0x00514af4 b 0x514538                    |     goto label_52;
                                             | label_213:
    0x00514af8 lw t9, -0x7a74(gp)            |     t9 = sym._php_stream_get_line;
    0x00514afc move a3, s5                   |     a3 = s5;
    0x00514b00 addiu a2, zero, 0x7f          |     a2 = 0x7f;
    0x00514b04 move a1, s3                   |     a1 = s3;
    0x00514b08 move a0, s6                   |     a0 = s6;
    0x00514b0c jalr t9                       |     t9 ();
    0x00514b10 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00514b14 beqz v0, 0x514580             |         goto label_53;
                                             |     }
    0x00514b18 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00514b1c sltiu v0, v0, 6               |     v0 = (v0 < 6) ? 1 : 0;
    0x00514b20 lw t9, -0x7a7c(gp)            |     t9 = sym._php_stream_eof;
                                             |     if (v0 != 0) {
    0x00514b24 bnez v0, 0x514570             |         goto label_54;
                                             |     }
    0x00514b28 lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
    0x00514b2c addiu a2, zero, 6             |     a2 = 6;
    0x00514b30 move a1, s2                   |     a1 = s2;
    0x00514b34 move a0, s3                   |     a0 = s3;
    0x00514b38 jalr t9                       |     t9 ();
    0x00514b3c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00514b40 bnez v0, 0x51456c             |         goto label_55;
                                             |     }
    0x00514b44 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00514b48 b 0x514584                    |     goto label_56;
                                             | label_214:
    0x00514b4c lw t9, -0x6214(gp)            |     t9 = sym.imp.atoi;
    0x00514b50 addiu a0, sp, 0xc39           |     a0 = sp + 0xc39;
    0x00514b54 jalr t9                       |     t9 ();
    0x00514b58 sw v0, 0xce0(sp)              |     *(var_ce0h) = v0;
    0x00514b5c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514b60 b 0x514594                    |     goto label_57;
                                             |     if (v0 != 0) {
                                             | label_216:
    0x00514b64 bnez v0, 0x515680             |         goto label_234;
                                             |     }
    0x00514b68 nop                           |     
    0x00514b6c sb zero, 0xc30(sp)            |     *(var_c30h) = 0;
                                             |     if (s0 == 0) {
    0x00514b70 beqz s0, 0x51463c             |         goto label_58;
                                             |     }
    0x00514b74 lw v0, (s0)                   |     v0 = *(s0);
                                             | label_103:
    0x00514b78 lw v0, 0xce0(sp)              |     v0 = *(var_ce0h);
                                             |     if (v0 == 0) {
    0x00514b7c beqz v0, 0x5145f8             |         goto label_59;
                                             |     }
    0x00514b80 sw zero, 0x1c(sp)             |     *(var_1ch) = 0;
    0x00514b84 sw zero, 0x18(sp)             |     *(var_18h) = 0;
    0x00514b88 sw zero, 0x14(sp)             |     *(var_14h) = 0;
    0x00514b8c sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x00514b90 move a3, s3                   |     a3 = s3;
    0x00514b94 addiu a2, zero, 2             |     a2 = 2;
    0x00514b98 addiu a1, zero, 9             |     a1 = 9;
    0x00514b9c b 0x5145e8                    |     goto label_60;
                                             | label_215:
    0x00514ba0 addiu s1, zero, 1             |     s1 = 1;
    0x00514ba4 b 0x5145f8                    |     goto label_59;
                                             | label_210:
    0x00514ba8 sw zero, 0xcf4(sp)            |     *(var_cf4h) = 0;
    0x00514bac b 0x5146bc                    |     goto label_61;
                                             | label_209:
    0x00514bb0 lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
    0x00514bb4 lw t9, -0x6aa4(gp)            |     t9 = sym.php_stream_wrapper_log_error;
    0x00514bb8 lw a1, 0xd3c(sp)              |     a1 = *(arg_d3ch);
    0x00514bbc lw a0, 0xd30(sp)              |     a0 = *(arg_d30h);
                                             |     /* str.HTTP_request_failed__unexpected_end_of_socket_ */
    0x00514bc0 addiu a2, a2, -0x192c         |     a2 += -0x192c;
    0x00514bc4 jalr t9                       |     t9 ();
    0x00514bc8 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514bcc move s7, zero                 |     s7 = 0;
    0x00514bd0 sw zero, 0xce4(sp)            |     *(var_ce4h) = 0;
                                             | label_88:
    0x00514bd4 move s1, zero                 |     s1 = 0;
    0x00514bd8 b 0x514dfc                    |     goto label_82;
                                             | label_219:
    0x00514bdc lw t9, -0x7a74(gp)            |     t9 = sym._php_stream_get_line;
    0x00514be0 move a3, s5                   |     a3 = s5;
    0x00514be4 addiu a2, zero, 0x400         |     a2 = 0x400;
    0x00514be8 move a1, s1                   |     a1 = s1;
    0x00514bec move a0, s6                   |     a0 = s6;
    0x00514bf0 jalr t9                       |     t9 ();
    0x00514bf4 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00514bf8 beqz v0, 0x51470c             |         goto label_62;
                                             |     }
    0x00514bfc lb v0, (s1)                   |     v0 = *(s1);
    0x00514c00 addiu v1, zero, 0xa           |     v1 = 0xa;
                                             |     if (v0 == v1) {
    0x00514c04 beq v0, v1, 0x51470c          |         goto label_62;
                                             |     }
    0x00514c08 nop                           |     
    0x00514c0c addiu a0, zero, 0xd           |     a0 = 0xd;
    0x00514c10 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == a0) {
    0x00514c14 beq v0, a0, 0x51470c          |         goto label_62;
                                             |     }
    0x00514c18 addiu v0, v0, -1              |     v0 += -1;
    0x00514c1c addu v0, s1, v0               |     v0 = s1 + v0;
    0x00514c20 lb a0, (v0)                   |     a0 = *(v0);
    0x00514c24 addiu s2, zero, 0xa           |     s2 = 0xa;
                                             |     if (a0 != v1) {
    0x00514c28 bne a0, v1, 0x514dc0          |         goto label_66;
                                             |     }
    0x00514c2c addiu a1, zero, 0xa           |     a1 = 0xa;
    0x00514c30 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             | label_68:
    0x00514c34 sltu v1, v0, s1               |     v1 = (v0 < s1) ? 1 : 0;
    0x00514c38 addiu s3, v0, 1               |     s3 = v0 + 1;
                                             |     if (v1 != 0) {
    0x00514c3c bnez v1, 0x514c80             |         goto label_235;
                                             |     }
    0x00514c40 lb v1, (v0)                   |     v1 = *(v0);
                                             |     if (v1 == a1) {
    0x00514c44 beq v1, a1, 0x514f98          |         goto label_236;
                                             |     }
    0x00514c48 nop                           |     
                                             |     if (v1 == a0) {
    0x00514c4c beq v1, a0, 0x514f98          |         goto label_236;
                                             |     }
    0x00514c50 nop                           |     
    0x00514c54 addiu a1, zero, 0x20          |     a1 = 0x20;
    0x00514c58 addiu a0, zero, 9             |     a0 = 9;
                                             |     do {
    0x00514c5c lb v1, (v0)                   |         v1 = *(v0);
                                             |         if (v1 != a1) {
    0x00514c60 beq v1, a1, 0x514c70          |             
    0x00514c64 nop                           |             
    0x00514c68 addiu s3, v0, 1               |             s3 = v0 + 1;
                                             |             if (v1 != a0) {
    0x00514c6c bne v1, a0, 0x514c80          |                 goto label_235;
                                             |             }
                                             |         }
    0x00514c70 addiu v0, v0, -1              |         v0 += -1;
    0x00514c74 sltu v1, v0, s1               |         v1 = (v0 < s1) ? 1 : 0;
    0x00514c78 addiu s3, v0, 1               |         s3 = v0 + 1;
    0x00514c7c beqz v1, 0x514c5c             |         
                                             |     } while (v1 == 0);
                                             | label_235:
    0x00514c80 lw t9, -0x6340(gp)            |     t9 = sym.imp.memchr;
    0x00514c84 subu a2, s3, s1               |     __asm ("subu a2, s3, s1");
    0x00514c88 sb zero, 1(v0)                |     *((v0 + 1)) = 0;
    0x00514c8c sw a2, 0x430(sp)              |     *(var_430h) = a2;
    0x00514c90 addiu a1, zero, 0x3a          |     a1 = 0x3a;
    0x00514c94 move a0, s1                   |     a0 = s1;
    0x00514c98 jalr t9                       |     t9 ();
    0x00514c9c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00514ca0 beqz v0, 0x514fa8             |         goto label_237;
                                             |     }
    0x00514ca4 addiu s2, v0, 1               |     s2 = v0 + 1;
    0x00514ca8 addiu a0, zero, 0x20          |     a0 = 0x20;
    0x00514cac addiu v1, zero, 9             |     v1 = 9;
                                             | label_69:
    0x00514cb0 sltu v0, s2, s3               |     v0 = (s2 < s3) ? 1 : 0;
    0x00514cb4 lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
                                             |     if (v0 != 0) {
    0x00514cb8 beqz v0, 0x514cd4             |         
    0x00514cbc lb v0, (s2)                   |         v0 = *(s2);
                                             |         if (v0 == a0) {
    0x00514cc0 beq v0, a0, 0x514fa0          |             goto label_238;
                                             |         }
    0x00514cc4 nop                           |         
                                             |         if (v0 == v1) {
    0x00514cc8 beq v0, v1, 0x514fa0          |             goto label_238;
                                             |         }
    0x00514ccc nop                           |         
                                             | label_70:
    0x00514cd0 lw t9, -0x62dc(gp)            |         t9 = sym.imp.strncasecmp;
                                             |     }
    0x00514cd4 lw a1, 0xcfc(sp)              |     a1 = *(var_cfch);
    0x00514cd8 addiu a2, zero, 9             |     a2 = 9;
    0x00514cdc move a0, s1                   |     a0 = s1;
    0x00514ce0 jalr t9                       |     t9 ();
    0x00514ce4 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00514ce8 bnez v0, 0x514fd8             |         goto label_239;
                                             |     }
    0x00514cec lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
                                             |     if (s0 == 0) {
    0x00514cf0 beqz s0, 0x514fb0             |         goto label_240;
                                             |     }
    0x00514cf4 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
    0x00514cf8 lw t9, -0x6a94(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.follow_location */
    0x00514cfc addiu a2, a2, -0x18d4         |     a2 += -0x18d4;
    0x00514d00 addiu a1, v0, 0x18c0          |     a1 = v0 + 0x18c0;
    0x00514d04 move a0, s0                   |     a0 = s0;
    0x00514d08 jalr t9                       |     t9 ();
    0x00514d0c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00514d10 beqz v0, 0x514fb0             |         goto label_240;
                                             |     }
    0x00514d14 lw t9, -0x7ec4(gp)            |     t9 = sym.zend_is_true;
    0x00514d18 move a0, v0                   |     a0 = v0;
    0x00514d1c jalr t9                       |     t9 ();
    0x00514d20 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514d24 andi s4, v0, 0xff             |     s4 = v0 & 0xff;
    0x00514d28 lw t9, -0x6f0c(gp)            |     t9 = sym.php_strlcpy;
                                             | label_71:
    0x00514d2c addiu a2, zero, 0x400         |     a2 = 0x400;
    0x00514d30 move a1, s2                   |     a1 = s2;
    0x00514d34 addiu a0, sp, 0x830           |     a0 = sp + 0x830;
    0x00514d38 jalr t9                       |     t9 ();
    0x00514d3c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             | label_73:
    0x00514d40 lw s3, 0x430(sp)              |     s3 = *(var_430h);
                                             | label_72:
    0x00514d44 lw t9, -0x7f5c(gp)            |     t9 = sym._emalloc;
    0x00514d48 addiu a0, s3, 0x18            |     a0 = s3 + 0x18;
    0x00514d4c addiu v0, zero, -8            |     v0 = -8;
    0x00514d50 and a0, a0, v0                |     a0 &= v0;
    0x00514d54 jalr t9                       |     t9 ();
    0x00514d58 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514d5c move s2, v0                   |     s2 = v0;
    0x00514d60 addiu v0, zero, 1             |     v0 = 1;
    0x00514d64 sw v0, (s2)                   |     *(s2) = v0;
    0x00514d68 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x00514d6c addiu v0, zero, 6             |     v0 = 6;
    0x00514d70 move a2, s3                   |     a2 = s3;
    0x00514d74 sw s3, 0xc(s2)                |     *((s2 + 3)) = s3;
    0x00514d78 move a1, s1                   |     a1 = s1;
    0x00514d7c addiu a0, s2, 0x10            |     a0 = s2 + 0x10;
    0x00514d80 sw v0, 4(s2)                  |     *((s2 + 1)) = v0;
    0x00514d84 sw zero, 8(s2)                |     *((s2 + 2)) = 0;
    0x00514d88 jalr t9                       |     t9 ();
    0x00514d8c addiu v0, zero, 0x1406        |     v0 = 0x1406;
    0x00514d90 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514d94 sw v0, 0x38(sp)               |     *(var_38h) = v0;
    0x00514d98 lw v0, 0xd50(sp)              |     v0 = *(arg_d50h);
    0x00514d9c addu s3, s2, s3               |     s3 = s2 + s3;
    0x00514da0 lw t9, -0x7c10(gp)            |     t9 = sym._zend_hash_next_index_insert;
    0x00514da4 lw a0, (v0)                   |     a0 = *(v0);
    0x00514da8 sb zero, 0x10(s3)             |     *((s3 + 16)) = 0;
    0x00514dac sw s2, 0x30(sp)               |     *(var_30h) = s2;
    0x00514db0 addiu a1, sp, 0x30            |     a1 = sp + 0x30;
    0x00514db4 jalr t9                       |     t9 ();
    0x00514db8 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514dbc b 0x5146f8                    |     goto label_63;
                                             | label_66:
    0x00514dc0 lw t9, -0x7a74(gp)            |     t9 = sym._php_stream_get_line;
    0x00514dc4 move a3, s5                   |     a3 = s5;
    0x00514dc8 addiu a2, zero, 0x400         |     a2 = 0x400;
    0x00514dcc move a1, s1                   |     a1 = s1;
    0x00514dd0 move a0, s6                   |     a0 = s6;
    0x00514dd4 jalr t9                       |     t9 ();
    0x00514dd8 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00514ddc bnez v0, 0x514f7c             |         goto label_241;
                                             |     }
    0x00514de0 lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
    0x00514de4 lw t9, -0x6aa4(gp)            |     t9 = sym.php_stream_wrapper_log_error;
    0x00514de8 lw a1, 0xd3c(sp)              |     a1 = *(arg_d3ch);
    0x00514dec lw a0, 0xd30(sp)              |     a0 = *(arg_d30h);
                                             |     /* str.Failed_to_read_HTTP_headers */
    0x00514df0 addiu a2, a2, -0x18fc         |     a2 += -0x18fc;
    0x00514df4 jalr t9                       |     t9 ();
    0x00514df8 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             | label_82:
    0x00514dfc lw a0, 0xcc0(sp)              |     a0 = *(var_cc0h);
                                             |     if (a0 != 0) {
    0x00514e00 beqz a0, 0x514e48             |         
    0x00514e04 nop                           |         
    0x00514e08 lbu v0, 5(a0)                 |         v0 = *((a0 + 5));
    0x00514e0c andi v1, v0, 2                |         v1 = v0 & 2;
                                             |         if (v1 == 0) {
    0x00514e10 bnez v1, 0x514e44             |             
    0x00514e14 nop                           |             
    0x00514e18 lw v1, (a0)                   |             v1 = *(a0);
    0x00514e1c addiu v1, v1, -1              |             v1 += -1;
    0x00514e20 sw v1, (a0)                   |             *(a0) = v1;
                                             |             if (v1 != 0) {
    0x00514e24 bnez v1, 0x514e44             |                 goto label_89;
                                             |             }
    0x00514e28 andi v0, v0, 1                |             v0 &= 1;
    0x00514e2c lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
                                             |             if (v0 == 0) {
    0x00514e30 beqz v0, 0x515404             |                 goto label_242;
                                             |             }
    0x00514e34 lw t9, -0x60d4(gp)            |             t9 = *((gp - 6197));
    0x00514e38 jalr t9                       |             t9 ();
    0x00514e3c nop                           |             
    0x00514e40 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
                                             | label_89:
    0x00514e44 sw zero, 0xcc0(sp)            |         *(var_cc0h) = 0;
                                             |     }
    0x00514e48 sw zero, 0xcc4(sp)            |     *(var_cc4h) = 0;
                                             |     if (s1 != 0) {
    0x00514e4c beqz s1, 0x514e60             |         
    0x00514e50 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00514e54 move a0, s1                   |         a0 = s1;
    0x00514e58 jalr t9                       |         t9 ();
    0x00514e5c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00514e60 lw t9, -0x70b8(gp)            |     t9 = sym.php_url_free;
                                             |     if (fp != 0) {
    0x00514e64 beqz fp, 0x514e74             |         
    0x00514e68 move a0, fp                   |         a0 = fp;
    0x00514e6c bal 0x501a24                  |         sym_php_url_free ();
    0x00514e70 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00514e74 lw v0, 0xce8(sp)              |     v0 = *(var_ce8h);
                                             |     if (s6 == 0) {
    0x00514e78 beqz s6, 0x515414             |         goto label_243;
                                             |     }
    0x00514e7c lw v0, 0xd50(sp)              |     v0 = *(arg_d50h);
                                             |     if (v0 != 0) {
    0x00514e80 beqz v0, 0x514eb4             |         
    0x00514e84 lw a0, 0xd50(sp)              |         a0 = *(arg_d50h);
    0x00514e88 lw v1, (v0)                   |         v1 = *(v0);
    0x00514e8c lw v0, 8(v0)                  |         v0 = *((v0 + 2));
    0x00514e90 lw a0, 4(a0)                  |         a0 = *((a0 + 1));
    0x00514e94 sw v0, 0x30(s6)               |         *(var_d00h) = v0;
    0x00514e98 andi v0, v0, 0x400            |         v0 &= 0x400;
    0x00514e9c sw v1, 0x28(s6)               |         *(var_cf8h) = v1;
    0x00514ea0 sw a0, 0x2c(s6)               |         *(var_cfch) = a0;
                                             |         if (v0 == 0) {
    0x00514ea4 beqz v0, 0x514eb4             |             goto label_244;
                                             |         }
    0x00514ea8 lw v0, (v1)                   |         v0 = *(v1);
    0x00514eac addiu v0, v0, 1               |         v0++;
    0x00514eb0 sw v0, (v1)                   |         *(v1) = v0;
                                             |     }
                                             | label_244:
    0x00514eb4 lw v0, 0xd3c(sp)              |     v0 = *(arg_d3ch);
                                             |     if (s0 != 0) {
    0x00514eb8 beqz s0, 0x514f10             |         
    0x00514ebc lw v0, (s0)                   |         v0 = *(s0);
    0x00514ec0 lw v1, 0xce4(sp)              |         v1 = *(var_ce4h);
                                             |         if (v0 != 0) {
    0x00514ec4 beqz v0, 0x514f0c             |             
    0x00514ec8 sw zero, 0x1c(v0)             |             *((v0 + 7)) = 0;
    0x00514ecc sw v1, 0x20(v0)               |             *((v0 + 8)) = v1;
    0x00514ed0 lw v1, 0x18(v0)               |             v1 = *((v0 + 6));
    0x00514ed4 lw t9, -0x6aa8(gp)            |             t9 = sym.php_stream_notification_notify;
    0x00514ed8 ori v1, v1, 1                 |             v1 |= 1;
    0x00514edc sw v1, 0x18(v0)               |             *((v0 + 6)) = v1;
    0x00514ee0 lw v0, 0xce4(sp)              |             v0 = *(var_ce4h);
    0x00514ee4 sw zero, 0x1c(sp)             |             *(var_1ch) = 0;
    0x00514ee8 sw v0, 0x18(sp)               |             *(var_18h) = v0;
    0x00514eec sw zero, 0x14(sp)             |             *(var_14h) = 0;
    0x00514ef0 sw zero, 0x10(sp)             |             *(var_10h) = 0;
    0x00514ef4 move a3, zero                 |             a3 = 0;
    0x00514ef8 move a2, zero                 |             a2 = 0;
    0x00514efc addiu a1, zero, 7             |             a1 = 7;
    0x00514f00 move a0, s0                   |             a0 = s0;
    0x00514f04 jalr t9                       |             t9 ();
    0x00514f08 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00514f0c lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
                                             |     }
    0x00514f10 andi v0, v0, 0x20             |     v0 &= 0x20;
    0x00514f14 lw t9, -0x7a58(gp)            |     t9 = sym._php_stream_set_option;
                                             |     if (v0 != 0) {
    0x00514f18 beqz v0, 0x514f34             |         
    0x00514f1c lw a2, 0xcec(sp)              |         a2 = *(var_cech);
    0x00514f20 move a3, zero                 |         a3 = 0;
    0x00514f24 addiu a1, zero, 5             |         a1 = 5;
    0x00514f28 move a0, s6                   |         a0 = s6;
    0x00514f2c jalr t9                       |         t9 ();
    0x00514f30 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00514f34 lw v0, 0x4c(s6)               |     v0 = *(var_d1ch);
    0x00514f38 lw v1, 0xcf0(sp)              |     v1 = *(var_cf0h);
    0x00514f3c lw t9, -0x6f0c(gp)            |     t9 = sym.php_strlcpy;
    0x00514f40 or v0, v0, v1                 |     v0 |= v1;
    0x00514f44 lw a1, 0xd38(sp)              |     a1 = *(arg_d38h);
    0x00514f48 sw v0, 0x4c(s6)               |     *(var_d1ch) = v0;
    0x00514f4c sw zero, 0x60(s6)             |     *((s6 + 24)) = 0;
    0x00514f50 addiu a2, zero, 0x10          |     a2 = 0x10;
    0x00514f54 addiu a0, s6, 0x3a            |     a0 = s6 + 0x3a;
    0x00514f58 jalr t9                       |     t9 ();
    0x00514f5c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (s7 == 0) {
    0x00514f60 beqz s7, 0x511f14             |         goto label_64;
                                             |     }
    0x00514f64 lw t9, -0x6a84(gp)            |     t9 = sym._php_stream_filter_append;
    0x00514f68 move a1, s7                   |     a1 = s7;
    0x00514f6c addiu a0, s6, 8               |     a0 = s6 + 8;
    0x00514f70 jalr t9                       |     t9 ();
                                             | label_91:
    0x00514f74 lw ra, 0xd2c(sp)              |     ra = *(var_d2ch);
    0x00514f78 b 0x511f18                    |     goto label_65;
                                             | label_241:
    0x00514f7c lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00514f80 addu v0, s1, v0               |     v0 = s1 + v0;
    0x00514f84 lb v0, -1(v0)                 |     v0 = *((v0 - 1));
    0x00514f88 lw t9, -0x7a7c(gp)            |     t9 = sym._php_stream_eof;
                                             |     if (v0 != s2) {
    0x00514f8c bne v0, s2, 0x514dc0          |         goto label_66;
                                             |     }
    0x00514f90 b 0x5146fc                    |     goto label_67;
    0x00514f94 nop                           |     
                                             | label_236:
    0x00514f98 addiu v0, v0, -1              |     v0 += -1;
    0x00514f9c b 0x514c34                    |     goto label_68;
                                             | label_238:
    0x00514fa0 addiu s2, s2, 1               |     s2++;
    0x00514fa4 b 0x514cb0                    |     goto label_69;
                                             | label_237:
    0x00514fa8 move s2, s3                   |     s2 = s3;
    0x00514fac b 0x514cd0                    |     goto label_70;
                                             | label_240:
    0x00514fb0 lw v0, 0xce0(sp)              |     v0 = *(var_ce0h);
    0x00514fb4 addiu v0, v0, -0x12c          |     v0 += -0x12c;
    0x00514fb8 sltiu v0, v0, 4               |     v0 = (v0 < 4) ? 1 : 0;
    0x00514fbc lw t9, -0x6f0c(gp)            |     t9 = sym.php_strlcpy;
                                             |     if (v0 != 0) {
    0x00514fc0 bnez v0, 0x514d2c             |         goto label_71;
                                             |     }
    0x00514fc4 lw v0, 0xce0(sp)              |     v0 = *(var_ce0h);
    0x00514fc8 addiu v0, v0, -0x133          |     v0 += -0x133;
    0x00514fcc sltiu v0, v0, 2               |     v0 = (v0 < 2) ? 1 : 0;
                                             |     if (v0 != 0) {
    0x00514fd0 movz s4, zero, v0             |         s4 = 0;
                                             |     }
    0x00514fd4 b 0x514d2c                    |     goto label_71;
                                             | label_239:
    0x00514fd8 lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
    0x00514fdc lw a1, 0xd00(sp)              |     a1 = *(var_d00h);
    0x00514fe0 addiu a2, zero, 0xd           |     a2 = 0xd;
    0x00514fe4 move a0, s1                   |     a0 = s1;
    0x00514fe8 jalr t9                       |     t9 ();
    0x00514fec lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00514ff0 bnez v0, 0x515034             |         goto label_245;
                                             |     }
    0x00514ff4 lw s3, 0x430(sp)              |     s3 = *(var_430h);
                                             |     if (s0 == 0) {
    0x00514ff8 beqz s0, 0x514d44             |         goto label_72;
                                             |     }
    0x00514ffc lw v0, (s0)                   |     v0 = *(s0);
    0x00515000 move a3, s2                   |     a3 = s2;
                                             |     if (v0 == 0) {
    0x00515004 beqz v0, 0x514d44             |         goto label_72;
                                             |     }
    0x00515008 sw zero, 0x1c(sp)             |     *(var_1ch) = 0;
    0x0051500c sw zero, 0x18(sp)             |     *(var_18h) = 0;
    0x00515010 sw zero, 0x14(sp)             |     *(var_14h) = 0;
    0x00515014 sw zero, 0x10(sp)             |     *(var_10h) = 0;
    0x00515018 move a2, zero                 |     a2 = 0;
    0x0051501c addiu a1, zero, 4             |     a1 = 4;
                                             | label_74:
    0x00515020 lw t9, -0x6aa8(gp)            |     t9 = sym.php_stream_notification_notify;
    0x00515024 move a0, s0                   |     a0 = s0;
    0x00515028 jalr t9                       |     t9 ();
    0x0051502c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515030 b 0x514d40                    |     goto label_73;
                                             | label_245:
    0x00515034 lw v0, 0xd04(sp)              |     v0 = *(var_d04h);
    0x00515038 lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
    0x0051503c addiu a2, zero, 0xf           |     a2 = 0xf;
    0x00515040 addiu a1, v0, -0x18b4         |     a1 = v0 + -0x18b4;
    0x00515044 move a0, s1                   |     a0 = s1;
    0x00515048 jalr t9                       |     t9 ();
    0x0051504c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00515050 bnez v0, 0x515098             |         goto label_246;
                                             |     }
    0x00515054 lw t9, -0x6214(gp)            |     t9 = sym.imp.atoi;
    0x00515058 move a0, s2                   |     a0 = s2;
    0x0051505c jalr t9                       |     t9 ();
    0x00515060 sw v0, 0xce4(sp)              |     *(var_ce4h) = v0;
    0x00515064 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (s0 == 0) {
    0x00515068 beqz s0, 0x514d40             |         goto label_73;
                                             |     }
    0x0051506c lw v0, (s0)                   |     v0 = *(s0);
    0x00515070 lw v0, 0xce4(sp)              |     v0 = *(var_ce4h);
                                             |     if (v0 == 0) {
    0x00515074 beqz v0, 0x514d40             |         goto label_73;
                                             |     }
    0x00515078 sw zero, 0x1c(sp)             |     *(var_1ch) = 0;
    0x0051507c sw v0, 0x18(sp)               |     *(var_18h) = v0;
    0x00515080 sw zero, 0x14(sp)             |     *(var_14h) = 0;
    0x00515084 sw zero, 0x10(sp)             |     *(var_10h) = 0;
    0x00515088 move a3, s1                   |     a3 = s1;
    0x0051508c move a2, zero                 |     a2 = 0;
    0x00515090 addiu a1, zero, 5             |     a1 = 5;
    0x00515094 b 0x515020                    |     goto label_74;
                                             | label_246:
    0x00515098 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x0051509c lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
    0x005150a0 addiu a2, zero, 0x12          |     a2 = 0x12;
                                             |     /* str.Transfer_Encoding: */
    0x005150a4 addiu a1, a1, -0x18a4         |     a1 += -0x18a4;
    0x005150a8 move a0, s1                   |     a0 = s1;
    0x005150ac jalr t9                       |     t9 ();
    0x005150b0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x005150b4 bnez v0, 0x514d40             |         goto label_73;
                                             |     }
    0x005150b8 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x005150bc lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
    0x005150c0 addiu a2, zero, 7             |     a2 = 7;
                                             |     /* str.Chunked */
    0x005150c4 addiu a1, a1, -0x1890         |     a1 += -0x1890;
    0x005150c8 move a0, s2                   |     a0 = s2;
    0x005150cc jalr t9                       |     t9 ();
    0x005150d0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x005150d4 bnez v0, 0x514d40             |         goto label_73;
                                             |     }
    0x005150d8 lw v0, 0xd3c(sp)              |     v0 = *(arg_d3ch);
    0x005150dc andi v0, v0, 0x200            |     v0 &= 0x200;
    0x005150e0 lw s3, 0x430(sp)              |     s3 = *(var_430h);
                                             |     if (v0 != 0) {
    0x005150e4 bnez v0, 0x514d44             |         goto label_72;
                                             |     }
    0x005150e8 lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
                                             |     if (s0 != 0) {
    0x005150ec bnez s0, 0x515120             |         goto label_247;
                                             |     }
                                             | label_75:
    0x005150f0 lw a0, -0x7fbc(gp)            |     a0 = *((gp - 8175));
    0x005150f4 lw a2, 0x38(s6)               |     a2 = *(var_d08h);
    0x005150f8 lw t9, -0x6a80(gp)            |     t9 = sym.php_stream_filter_create;
    0x005150fc andi a2, a2, 1                |     a2 &= 1;
    0x00515100 move a1, zero                 |     a1 = 0;
                                             |     /* str.dechunk */
    0x00515104 addiu a0, a0, -0x1888         |     a0 += -0x1888;
    0x00515108 jalr t9                       |     t9 ();
    0x0051510c move s7, v0                   |     s7 = v0;
    0x00515110 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00515114 bnez v0, 0x5146f8             |         goto label_63;
                                             |     }
    0x00515118 lw s3, 0x430(sp)              |     s3 = *(var_430h);
    0x0051511c b 0x514d44                    |     goto label_72;
                                             | label_247:
    0x00515120 lw a1, -0x7fd0(gp)            |     a1 = *((gp - 8180));
    0x00515124 lw t9, -0x6a94(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.auto_decode */
    0x00515128 addiu a2, a2, -0x1880         |     a2 += -0x1880;
                                             |     /* str.http */
    0x0051512c addiu a1, a1, 0x18c0          |     a1 += 0x18c0;
    0x00515130 move a0, s0                   |     a0 = s0;
    0x00515134 jalr t9                       |     t9 ();
    0x00515138 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x0051513c beqz v0, 0x5150f0             |         goto label_75;
                                             |     }
    0x00515140 lw t9, -0x7ec4(gp)            |     t9 = sym.zend_is_true;
    0x00515144 move a0, v0                   |     a0 = v0;
    0x00515148 jalr t9                       |     t9 ();
    0x0051514c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00515150 bnez v0, 0x5150f0             |         goto label_75;
                                             |     }
    0x00515154 lw s3, 0x430(sp)              |     s3 = *(var_430h);
    0x00515158 b 0x514d44                    |     goto label_72;
                                             | label_227:
    0x0051515c sb s6, (s4)                   |     *(s4) = s6;
    0x00515160 move v0, s4                   |     v0 = s4;
    0x00515164 b 0x5148c4                    |     goto label_76;
                                             | label_228:
    0x00515168 lw a2, -0x7fd0(gp)            |     a2 = *((gp - 8180));
                                             | label_229:
    0x0051516c sw s2, 0x10(sp)               |     *(var_10h) = s2;
                                             |     /* esilref: '&s/&s' */
    0x00515170 addiu a2, a2, -0xbc4          |     a2 += -0xbc4;
    0x00515174 b 0x5148fc                    |     goto label_77;
                                             | label_225:
    0x00515178 lw t9, -0x7f54(gp)            |     t9 = sym.ap_php_snprintf;
                                             | label_226:
    0x0051517c move a3, s2                   |     a3 = s2;
                                             |     /* esilref: '/&s' */
    0x00515180 addiu a2, a2, -0x1850         |     a2 += -0x1850;
    0x00515184 addiu a1, zero, 0x3ff         |     a1 = 0x3ff;
    0x00515188 move a0, s3                   |     a0 = s3;
    0x0051518c bal 0x52c524                  |     sym_ap_php_snprintf ();
    0x00515190 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515194 b 0x51490c                    |     goto label_78;
                                             | label_224:
    0x00515198 lw t9, -0x6f0c(gp)            |     t9 = sym.php_strlcpy;
    0x0051519c addiu a2, zero, 0x400         |     a2 = 0x400;
    0x005151a0 move a1, s2                   |     a1 = s2;
    0x005151a4 move a0, s3                   |     a0 = s3;
    0x005151a8 jalr t9                       |     t9 ();
    0x005151ac lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005151b0 b 0x51490c                    |     goto label_78;
                                             | label_230:
    0x005151b4 addiu v1, zero, 0x50          |     v1 = 0x50;
    0x005151b8 b 0x514924                    |     goto label_79;
                                             | label_231:
    0x005151bc sw s3, 0x14(sp)               |     *(var_14h) = s3;
    0x005151c0 lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
    0x005151c4 lw v0, 0xc(fp)                |     v0 = *(arg_d3ch);
                                             |     /* str._s:___s_s */
    0x005151c8 addiu a2, a2, -0x183c         |     a2 += -0x183c;
    0x005151cc sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x005151d0 addiu a1, zero, 0x3ff         |     a1 = 0x3ff;
    0x005151d4 move a0, s5                   |     a0 = s5;
    0x005151d8 bal 0x52c524                  |     sym_ap_php_snprintf ();
    0x005151dc lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005151e0 b 0x514950                    |     goto label_80;
                                             | label_223:
    0x005151e4 lw t9, -0x6f0c(gp)            |     t9 = sym.php_strlcpy;
    0x005151e8 addiu a2, zero, 0x400         |     a2 = 0x400;
    0x005151ec move a1, s2                   |     a1 = s2;
    0x005151f0 move a0, s5                   |     a0 = s5;
    0x005151f4 jalr t9                       |     t9 ();
    0x005151f8 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005151fc b 0x514950                    |     goto label_80;
                                             | label_232:
    0x00515200 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x00515204 lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
    0x00515208 addiu a2, zero, 7             |     a2 = 7;
                                             |     /* str.http:__ */
    0x0051520c addiu a1, a1, -0x1874         |     a1 += -0x1874;
    0x00515210 move a0, s5                   |     a0 = s5;
    0x00515214 jalr t9                       |     t9 ();
    0x00515218 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x0051521c bnez v0, 0x515290             |         goto label_248;
                                             |     }
    0x00515220 lw a1, -0x7fbc(gp)            |     a1 = *((gp - 8175));
    0x00515224 lw t9, -0x62dc(gp)            |     t9 = sym.imp.strncasecmp;
    0x00515228 addiu a2, zero, 8             |     a2 = 8;
                                             |     /* str.https:__ */
    0x0051522c addiu a1, a1, -0x186c         |     a1 += -0x186c;
    0x00515230 move a0, s5                   |     a0 = s5;
    0x00515234 jalr t9                       |     t9 ();
    0x00515238 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051523c bnez v0, 0x515290             |     
                                             |     while (s2 == 0) {
    0x00515240 lw v0, 0xd50(sp)              |         v0 = *(arg_d50h);
    0x00515244 lw t9, -0x79b8(gp)            |         t9 = *((gp - 7790));
    0x00515248 sw v0, 0x20(sp)               |         *(var_20h) = v0;
    0x0051524c addiu v0, zero, 2             |         v0 = 2;
    0x00515250 sw v0, 0x1c(sp)               |         *(var_1ch) = v0;
    0x00515254 lw v0, 0xd48(sp)              |         v0 = *(arg_d48h);
    0x00515258 lw a3, 0xd3c(sp)              |         a3 = *(arg_d3ch);
    0x0051525c addiu v0, v0, -1              |         v0 += -1;
    0x00515260 sw v0, 0x18(sp)               |         *(var_18h) = v0;
    0x00515264 lw v0, 0xd40(sp)              |         v0 = *(arg_10h);
    0x00515268 lw a2, 0xd38(sp)              |         a2 = *(arg_d38h);
    0x0051526c lw a0, 0xd30(sp)              |         a0 = *(arg_d30h);
    0x00515270 sw s0, 0x14(sp)               |         *(var_14h) = s0;
    0x00515274 sw v0, 0x10(sp)               |         *(var_10h) = v0;
                                             |         /* fcn.00511df0 */
    0x00515278 addiu t9, t9, 0x1df0          |         t9 += 0x1df0;
    0x0051527c move a1, s5                   |         a1 = s5;
    0x00515280 bal 0x511df0                  |         fcn_00511df0 ();
                                             |         goto label_81;
    0x00515284 move s6, v0                   |         s6 = v0;
    0x00515288 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051528c b 0x514dfc                    |         goto label_82;
                                             | label_248:
    0x00515290 lw s2, 4(fp)                  |         s2 = *(arg_d34h);
    0x00515294 lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
                                             |         if (s2 != 0) {
    0x00515298 bnez s2, 0x515318             |             goto label_249;
                                             |         }
                                             | label_83:
    0x0051529c lw s2, 8(fp)                  |         s2 = *(arg_d38h);
    0x005152a0 lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
                                             |         if (s2 != 0) {
    0x005152a4 bnez s2, 0x51537c             |             goto label_250;
                                             |         }
                                             | label_86:
    0x005152a8 lw s2, 0x14(fp)               |         s2 = *(arg_d44h);
    0x005152ac lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
    0x005152b0 beqz s2, 0x515240             |         
                                             |     }
                                             | label_249:
    0x00515318 move a0, s2                   |     a0 = s2;
    0x0051531c jalr t9                       |     t9 ();
    0x00515320 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515324 move a0, s2                   |     a0 = s2;
    0x00515328 lw t9, -0x6ae8(gp)            |     t9 = sym.php_url_decode;
    0x0051532c move a1, v0                   |     a1 = v0;
    0x00515330 bal 0x502dc8                  |     sym_php_url_decode ();
    0x00515334 lw s2, 4(fp)                  |     s2 = *(arg_d34h);
    0x00515338 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051533c addu s3, s2, v0               |     s3 = s2 + v0;
                                             | label_85:
    0x00515340 sltu v0, s2, s3               |     v0 = (s2 < s3) ? 1 : 0;
    0x00515344 lw t9, -0x6134(gp)            |     t9 = sym.imp.__ctype_b_loc;
                                             |     if (v0 == 0) {
    0x00515348 beqz v0, 0x51529c             |         goto label_83;
                                             |     }
    0x0051534c jalr t9                       |     t9 ();
    0x00515350 nop                           |     
    0x00515354 lbu v1, (s2)                  |     v1 = *(s2);
    0x00515358 lw v0, (v0)                   |     v0 = *(v0);
    0x0051535c sll v1, v1, 1                 |     v1 <<= 1;
    0x00515360 addu v0, v0, v1               |     v0 += v1;
    0x00515364 lhu v0, (v0)                  |     v0 = *(v0);
    0x00515368 andi v0, v0, 2                |     v0 &= 2;
    0x0051536c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00515370 bnez v0, 0x514978             |         goto label_84;
                                             |     }
    0x00515374 addiu s2, s2, 1               |     s2++;
    0x00515378 b 0x515340                    |     goto label_85;
                                             | label_250:
    0x0051537c move a0, s2                   |     a0 = s2;
    0x00515380 jalr t9                       |     t9 ();
    0x00515384 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515388 move a0, s2                   |     a0 = s2;
    0x0051538c lw t9, -0x6ae8(gp)            |     t9 = sym.php_url_decode;
    0x00515390 move a1, v0                   |     a1 = v0;
    0x00515394 bal 0x502dc8                  |     sym_php_url_decode ();
    0x00515398 lw s2, 8(fp)                  |     s2 = *(arg_d38h);
    0x0051539c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005153a0 addu s3, s2, v0               |     s3 = s2 + v0;
    0x005153a4 sltu v0, s2, s3               |     v0 = (s2 < s3) ? 1 : 0;
    0x005153a8 lw t9, -0x6134(gp)            |     t9 = sym.imp.__ctype_b_loc;
                                             |     if (v0 == 0) {
    0x005153ac beqz v0, 0x5152a8             |         goto label_86;
                                             |     }
    0x005153b0 jalr t9                       |     t9 ();
    0x005153b4 nop                           |     
    0x005153b8 lbu v1, (s2)                  |     v1 = *(s2);
    0x005153bc lw v0, (v0)                   |     v0 = *(v0);
    0x005153c0 sll v1, v1, 1                 |     v1 <<= 1;
    0x005153c4 addu v0, v0, v1               |     v0 += v1;
    0x005153c8 lhu v0, (v0)                  |     v0 = *(v0);
    0x005153cc andi v0, v0, 2                |     v0 &= 2;
    0x005153d0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x005153d4 bnez v0, 0x514978             |         goto label_84;
                                             |     }
                                             | label_222:
    0x005153e0 lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
    0x005153e4 addiu a3, sp, 0xc30           |     a3 = sp + 0xc30;
                                             |     /* str.HTTP_request_failed___s */
    0x005153e8 addiu a2, a2, -0x1814         |     a2 += -0x1814;
    0x005153ec b 0x514984                    |     goto label_87;
                                             | label_108:
    0x005153f0 move s7, zero                 |     s7 = 0;
    0x005153f4 sw zero, 0xcf0(sp)            |     *(var_cf0h) = 0;
    0x005153f8 sw zero, 0xce4(sp)            |     *(var_ce4h) = 0;
    0x005153fc sw zero, 0xcec(sp)            |     *(var_cech) = 0;
    0x00515400 b 0x514bd4                    |     goto label_88;
                                             | label_242:
    0x00515404 jalr t9                       |     t9 ();
    0x00515408 nop                           |     
    0x0051540c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515410 b 0x514e44                    |     goto label_89;
                                             | label_243:
    0x00515414 lw t9, -0x6a7c(gp)            |     t9 = sym.php_stream_filter_free;
                                             |     if (s7 == 0) {
    0x00515418 beqz s7, 0x511e8c             |         goto label_90;
                                             |     }
    0x0051541c move a0, s7                   |     a0 = s7;
    0x00515420 jalr t9                       |     t9 ();
    0x00515424 b 0x514f74                    |     goto label_91;
    0x00515428 nop                           |     
                                             | label_125:
    0x0051542c addiu s1, s1, 1               |     s1++;
    0x00515430 addiu v0, s1, -0x14           |     v0 = s1 + -0x14;
    0x00515434 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             |     if (v0 != s2) {
    0x00515438 bne v0, s2, 0x512884          |         goto label_92;
                                             |     }
    0x0051543c lw t9, -0x7bec(gp)            |     t9 = sym.zend_binary_strcasecmp;
    0x00515440 lw a2, 0xcec(sp)              |     a2 = *(var_cech);
    0x00515444 addiu a3, zero, 0x14          |     a3 = 0x14;
    0x00515448 addiu a1, zero, 0x14          |     a1 = 0x14;
    0x0051544c move a0, s2                   |     a0 = s2;
    0x00515450 jalr t9                       |     t9 ();
    0x00515454 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00515458 bnez v0, 0x512880             |         goto label_93;
                                             |     }
    0x0051545c addiu v1, zero, 0x2401        |     v1 = 0x2401;
                                             | label_128:
    0x00515460 lbu v0, (s1)                  |     v0 = *(s1);
    0x00515464 sltiu a0, v0, 0xe             |     a0 = (v0 < 0xe) ? 1 : 0;
    0x00515468 srlv v0, v1, v0               |     v0 = v1 >> v0;
                                             |     if (a0 == 0) {
    0x0051546c beqz a0, 0x512850             |         goto label_94;
                                             |     }
    0x00515470 ext v0, v0, 0, 1              |     __asm ("ext v0, v0, 0, 1");
    0x00515474 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00515478 beqz v0, 0x512850             |         goto label_94;
                                             |     }
                                             | label_98:
    0x0051547c subu s1, s1, s2               |     __asm ("subu s1, s1, s2");
                                             |     if (v0 == 0) {
    0x00515480 beqz v0, 0x51293c             |         goto label_95;
                                             |     }
    0x00515484 lw s3, 0xc(v0)                |     s3 = *((v0 + 3));
    0x00515488 lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x0051548c addu s3, s1, s3               |     s3 = s1 + s3;
    0x00515490 sltu v0, s3, v0               |     v0 = (s3 < v0) ? 1 : 0;
    0x00515494 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00515498 bnez v0, 0x5154b4             |         
                                             | label_133:
    0x0051549c lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x005154a0 move a1, s3                   |         a1 = s3;
    0x005154a4 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x005154a8 jalr t9                       |         t9 ();
    0x005154ac lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005154b0 lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |     }
    0x005154b4 lw t9, -0x6188(gp)            |     t9 = sym.imp.memcpy;
    0x005154b8 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x005154bc lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005154c0 move a2, s1                   |     a2 = s1;
    0x005154c4 move a1, s2                   |     a1 = s2;
    0x005154c8 addu a0, a0, v0               |     a0 += v0;
    0x005154cc jalr t9                       |     t9 ();
    0x005154d0 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x005154d4 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005154d8 sw s3, 0xc(v0)                |     *((v0 + 3)) = s3;
    0x005154dc lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x005154e0 addiu s3, s3, 2               |     s3 += 2;
    0x005154e4 sltu v0, s3, v0               |     v0 = (s3 < v0) ? 1 : 0;
    0x005154e8 lw v1, 0x430(sp)              |     v1 = *(var_430h);
                                             |     if (v0 == 0) {
    0x005154ec bnez v0, 0x515508             |         
    0x005154f0 lw t9, -0x7ed4(gp)            |         t9 = sym.smart_str_erealloc;
    0x005154f4 move a1, s3                   |         a1 = s3;
    0x005154f8 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x005154fc jalr t9                       |         t9 ();
    0x00515500 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515504 lw v1, 0x430(sp)              |         v1 = *(var_430h);
                                             |     }
    0x00515508 addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x0051550c lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00515510 addu v0, v0, v1               |     v0 += v1;
    0x00515514 addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00515518 sb v1, (v0)                   |     *(v0) = v1;
    0x0051551c addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00515520 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x00515524 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00515528 sw s3, 0xc(v0)                |     *((v0 + 3)) = s3;
    0x0051552c b 0x5125ec                    |     goto label_14;
                                             | label_130:
    0x00515530 addiu s1, s1, 1               |     s1++;
    0x00515534 addiu v0, s1, -0x14           |     v0 = s1 + -0x14;
    0x00515538 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             |     if (v0 != s2) {
    0x0051553c bne v0, s2, 0x512970          |         goto label_96;
                                             |     }
    0x00515540 lw t9, -0x7bec(gp)            |     t9 = sym.zend_binary_strcasecmp;
    0x00515544 addiu a3, zero, 0x14          |     a3 = 0x14;
    0x00515548 move a2, s3                   |     a2 = s3;
    0x0051554c addiu a1, zero, 0x14          |     a1 = 0x14;
    0x00515550 move a0, s2                   |     a0 = s2;
    0x00515554 jalr t9                       |     t9 ();
    0x00515558 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x0051555c bnez v0, 0x51296c             |         goto label_97;
                                             |     }
    0x00515560 addiu v1, zero, 0x2401        |     v1 = 0x2401;
                                             | label_99:
    0x00515564 lbu v0, (s1)                  |     v0 = *(s1);
    0x00515568 sltiu a0, v0, 0xe             |     a0 = (v0 < 0xe) ? 1 : 0;
    0x0051556c srlv v0, v1, v0               |     v0 = v1 >> v0;
                                             |     if (a0 == 0) {
    0x00515570 beqz a0, 0x515580             |         goto label_251;
                                             |     }
    0x00515574 ext v0, v0, 0, 1              |     __asm ("ext v0, v0, 0, 1");
    0x00515578 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 != 0) {
    0x0051557c bnez v0, 0x51547c             |         goto label_98;
                                             |     }
                                             | label_251:
    0x00515580 addiu s1, s1, 1               |     s1++;
    0x00515584 b 0x515564                    |     goto label_99;
                                             | label_157:
    0x00515588 move s1, zero                 |     s1 = 0;
    0x0051558c b 0x513750                    |     goto label_42;
                                             |     do {
    0x00515590 lhu v0, 0x10(fp)              |         v0 = *(arg_10h);
    0x00515594 sw v0, 0x14(sp)               |         *(var_14h) = v0;
    0x00515598 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x0051559c lw v0, 0xc(fp)                |         v0 = *(arg_d3ch);
    0x005155a0 lw t9, -0x7a0c(gp)            |         t9 = sym.zend_spprintf;
    0x005155a4 sw v0, 0x10(sp)               |         *(var_10h) = v0;
                                             |         /* esilref: 'ssl' */
    0x005155a8 addiu a3, a3, -0x1b74         |         a3 += -0x1b74;
                                             |         /* str._s:___s:_d */
    0x005155ac addiu a2, a2, -0x1b8c         |         a2 += -0x1b8c;
    0x005155b0 move a1, zero                 |         a1 = 0;
    0x005155b4 addiu a0, sp, 0xcd4           |         a0 = sp + 0xcd4;
    0x005155b8 jalr t9                       |         t9 ();
    0x005155bc move s1, v0                   |         s1 = v0;
    0x005155c0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005155c4 move s4, zero                 |         s4 = 0;
    0x005155c8 move s5, zero                 |         s5 = 0;
    0x005155cc b 0x511fac                    |         goto label_100;
                                             | label_115:
    0x005155d0 lw v0, 0xcd8(sp)              |         v0 = *(var_cd8h);
                                             | label_116:
    0x005155d4 lw a3, -0x7fbc(gp)            |         a3 = *((gp - 8175));
    0x005155d8 bnez v0, 0x515590             |         
                                             |     } while (v0 != 0);
                                             | label_114:
    0x005155dc lhu v0, 0x10(fp)              |     v0 = *(arg_10h);
    0x005155e0 lw a3, -0x7fbc(gp)            |     a3 = *((gp - 8175));
    0x005155e4 sw v0, 0x14(sp)               |     *(var_14h) = v0;
    0x005155e8 lw a2, -0x7fbc(gp)            |     a2 = *((gp - 8175));
    0x005155ec lw v0, 0xc(fp)                |     v0 = *(arg_d3ch);
    0x005155f0 lw t9, -0x7a0c(gp)            |     t9 = sym.zend_spprintf;
    0x005155f4 sw v0, 0x10(sp)               |     *(var_10h) = v0;
                                             |     /* esilref: 'tcp' */
    0x005155f8 addiu a3, a3, -0x1b90         |     a3 += -0x1b90;
                                             |     /* str._s:___s:_d */
    0x005155fc addiu a2, a2, -0x1b8c         |     a2 += -0x1b8c;
    0x00515600 move a1, zero                 |     a1 = 0;
    0x00515604 addiu a0, sp, 0xcd4           |     a0 = sp + 0xcd4;
    0x00515608 jalr t9                       |     t9 ();
    0x0051560c move s1, v0                   |     s1 = v0;
    0x00515610 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515614 move s4, zero                 |     s4 = 0;
    0x00515618 move s5, zero                 |     s5 = 0;
    0x0051561c sw zero, 0xcd8(sp)            |     *(var_cd8h) = 0;
                                             |     if (s0 != 0) {
    0x00515620 bnez s0, 0x511fac             |         goto label_100;
                                             |     }
                                             |     do {
                                             | label_105:
    0x00515624 lw v0, -0x7a50(gp)            |         v0 = *(gp);
    0x00515628 sw zero, 0xccc(sp)            |         *(var_ccch) = 0;
    0x0051562c lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00515630 sw v0, 0xcc8(sp)              |         *(var_cc8h) = v0;
    0x00515634 b 0x512068                    |         goto label_101;
                                             | label_113:
    0x00515638 lhu v0, 0x10(fp)              |         v0 = *(arg_10h);
    0x0051563c sw v0, 0x14(sp)               |         *(var_14h) = v0;
    0x00515640 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x00515644 lw v0, 0xc(fp)                |         v0 = *(arg_d3ch);
    0x00515648 lw t9, -0x7a0c(gp)            |         t9 = sym.zend_spprintf;
    0x0051564c sw v0, 0x10(sp)               |         *(var_10h) = v0;
                                             |         /* esilref: 'ssl' */
    0x00515650 addiu a3, a3, -0x1b74         |         a3 += -0x1b74;
                                             |         /* str._s:___s:_d */
    0x00515654 addiu a2, a2, -0x1b8c         |         a2 += -0x1b8c;
    0x00515658 move a1, zero                 |         a1 = 0;
    0x0051565c addiu a0, sp, 0xcd4           |         a0 = sp + 0xcd4;
    0x00515660 jalr t9                       |         t9 ();
    0x00515664 move s1, v0                   |         s1 = v0;
    0x00515668 addiu v0, zero, 1             |         v0 = 1;
    0x0051566c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515670 move s4, zero                 |         s4 = 0;
    0x00515674 move s5, zero                 |         s5 = 0;
    0x00515678 sw v0, 0xcd8(sp)              |         *(var_cd8h) = v0;
    0x0051567c b 0x515624                    |         
                                             |     } while (1);
                                             | label_234:
    0x00515680 addiu v1, v0, -1              |     v1 = v0 + -1;
                                             |     if (s0 == 0) {
    0x00515684 beqz s0, 0x514604             |         goto label_102;
                                             |     }
    0x00515688 lw v0, (s0)                   |     v0 = *(s0);
    0x0051568c b 0x514b78                    |     goto label_103;
                                             | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/usr/bin/php-cli @ 0x54062c */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.0054062c ()                  | void fcn_0054062c () {
    0x0054062c lui gp, 0x1d                  |     
    0x00540630 addiu gp, gp, -0x242c         |     
    0x00540634 addu gp, gp, t9               |     gp += t9;
    0x00540638 addiu sp, sp, -0x58           |     
    0x0054063c lw t9, -0x7f6c(gp)            |     t9 = sym._estrdup;
    0x00540640 sw gp, 0x18(sp)               |     *(var_18h) = gp;
    0x00540644 sw fp, 0x50(sp)               |     *(var_50h) = fp;
    0x00540648 sw s5, 0x44(sp)               |     *(var_44h) = s5;
    0x0054064c sw s0, 0x30(sp)               |     *(var_30h) = s0;
    0x00540650 sw ra, 0x54(sp)               |     *(var_54h) = ra;
    0x00540654 sw s7, 0x4c(sp)               |     *(var_4ch) = s7;
    0x00540658 sw s6, 0x48(sp)               |     *(var_48h) = s6;
    0x0054065c sw s4, 0x40(sp)               |     *(var_40h) = s4;
    0x00540660 sw s3, 0x3c(sp)               |     *(var_3ch) = s3;
    0x00540664 sw s2, 0x38(sp)               |     *(var_38h) = s2;
    0x00540668 sw s1, 0x34(sp)               |     *(var_34h) = s1;
    0x0054066c move s0, a0                   |     s0 = a0;
    0x00540670 move a0, a1                   |     a0 = a1;
    0x00540674 move fp, a2                   |     fp = a2;
    0x00540678 jalr t9                       |     t9 ();
    0x0054067c move s5, v0                   |     s5 = v0;
    0x00540680 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (s0 == 0) {
    0x00540684 beqz s0, 0x54089c             |         goto label_3;
                                             |     }
    0x00540688 lw v0, -0x7a50(gp)            |     v0 = *(gp);
    0x0054068c sw s0, 0x20(sp)               |     *(var_20h) = s0;
    0x00540690 lw a0, 0x28(v0)               |     a0 = *((v0 + 10));
    0x00540694 lw t9, -0x7e94(gp)            |     t9 = sym.zend_hash_str_find;
                                             |     if (a0 == 0) {
    0x00540698 beqz a0, 0x54086c             |         goto label_4;
                                             |     }
    0x0054069c addiu a2, zero, 4             |     a2 = 4;
    0x005406a0 addiu a1, sp, 0x20            |     a1 = sp + 0x20;
    0x005406a4 jalr t9                       |     t9 ();
    0x005406a8 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 == 0) {
    0x005406ac beqz v0, 0x54086c             |         goto label_4;
                                             |     }
    0x005406b0 lw s1, (v0)                   |     s1 = *(v0);
    0x005406b4 lw t9, -0x68c4(gp)            |     t9 = sym.zend_llist_count;
    0x005406b8 move a0, s1                   |     a0 = s1;
    0x005406bc jalr t9                       |     t9 ();
    0x005406c0 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x005406c4 move s4, v0                   |     s4 = v0;
    0x005406c8 lw v0, -0x79a8(gp)            |     v0 = *(gp);
    0x005406cc lbu v0, 0x13c(v0)             |     v0 = *((v0 + 316));
    0x005406d0 lw s0, -0x7fbc(gp)            |     s0 = *((gp - 8175));
                                             |     if (v0 != 0) {
    0x005406d4 bnez v0, 0x5407dc             |         goto label_5;
                                             |     }
    0x005406d8 lw s0, -0x7fc0(gp)            |     s0 = *((gp - 8176));
    0x005406dc addiu s7, zero, 1             |     s7 = 1;
    0x005406e0 addiu s0, s0, 0x6f08          |     s0 += 0x6f08;
                                             |     do {
    0x005406e4 lw t9, -0x6964(gp)            |         t9 = sym.zend_llist_get_first_ex;
    0x005406e8 addiu s3, sp, 0x24            |         s3 = sp + 0x24;
    0x005406ec move a1, s3                   |         a1 = s3;
    0x005406f0 move a0, s1                   |         a0 = s1;
    0x005406f4 jalr t9                       |         t9 ();
    0x005406f8 addiu v1, s4, -1              |         v1 = s4 + -1;
    0x005406fc lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00540700 move s6, zero                 |         s6 = 0;
    0x00540704 move s2, zero                 |         s2 = 0;
    0x00540708 sw v1, 0x28(sp)               |         *(var_28h) = v1;
                                             | label_0:
    0x0054070c lw t9, -0x6194(gp)            |         t9 = sym.imp.strlen;
                                             |         if (v0 != 0) {
    0x00540710 bnez v0, 0x5407e8             |             goto label_6;
                                             |         }
    0x00540714 lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x00540718 addiu a0, s2, 1               |         a0 = s2 + 1;
    0x0054071c jalr t9                       |         t9 ();
    0x00540720 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00540724 sb zero, (v0)                 |         *(v0) = 0;
    0x00540728 move a1, s3                   |         a1 = s3;
    0x0054072c lw t9, -0x6964(gp)            |         t9 = sym.zend_llist_get_first_ex;
    0x00540730 move a0, s1                   |         a0 = s1;
    0x00540734 move s2, v0                   |         s2 = v0;
    0x00540738 jalr t9                       |         t9 ();
    0x0054073c lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00540740 move s6, zero                 |         s6 = 0;
    0x00540744 addiu s4, s4, -1              |         s4 += -1;
                                             | label_1:
    0x00540748 lw t9, -0x62ec(gp)            |         t9 = sym.imp.strcat
                                             |         if (v0 != 0) {
    0x0054074c bnez v0, 0x540824             |             goto label_7;
                                             |         }
    0x00540750 addiu s0, zero, 1             |         s0 = 1;
                                             | label_2:
    0x00540754 lw t9, -0x7798(gp)            |         t9 = sym.php_strip_url_passwd;
    0x00540758 move a0, s5                   |         a0 = s5;
    0x0054075c bal 0x52f9ec                  |         sym_php_strip_url_passwd ();
    0x00540760 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00540764 addiu a2, zero, 2             |         a2 = 2;
    0x00540768 move a1, s5                   |         a1 = s5;
    0x0054076c lw a3, -0x7fc4(gp)            |         a3 = *((gp - 8177));
    0x00540770 lw t9, -0x68c0(gp)            |         t9 = sym.php_error_docref1;
                                             |         /* esilref: '&s: &s' */
    0x00540774 addiu a3, a3, -0x6e00         |         a3 += -0x6e00;
    0x00540778 move a0, zero                 |         a0 = 0;
    0x0054077c sw s2, 0x14(sp)               |         *(var_14h) = s2;
    0x00540780 sw fp, 0x10(sp)               |         *(var_10h) = fp;
    0x00540784 jalr t9                       |         t9 ();
    0x00540788 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x0054078c lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00540790 move a0, s5                   |         a0 = s5;
    0x00540794 jalr t9                       |         t9 ();
    0x00540798 lw gp, 0x18(sp)               |         gp = *(var_18h);
                                             |         if (s0 != 0) {
    0x0054079c beqz s0, 0x5407ac             |             
    0x005407a0 lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
    0x005407a4 move a0, s2                   |             a0 = s2;
    0x005407a8 jalr t9                       |             t9 ();
                                             |         }
    0x005407ac lw ra, 0x54(sp)               |         ra = *(var_54h);
    0x005407b0 lw fp, 0x50(sp)               |         fp = *(var_50h);
    0x005407b4 lw s7, 0x4c(sp)               |         s7 = *(var_4ch);
    0x005407b8 lw s6, 0x48(sp)               |         s6 = *(var_48h);
    0x005407bc lw s5, 0x44(sp)               |         s5 = *(var_44h);
    0x005407c0 lw s4, 0x40(sp)               |         s4 = *(var_40h);
    0x005407c4 lw s3, 0x3c(sp)               |         s3 = *(var_3ch);
    0x005407c8 lw s2, 0x38(sp)               |         s2 = *(var_38h);
    0x005407cc lw s1, 0x34(sp)               |         s1 = *(var_34h);
    0x005407d0 lw s0, 0x30(sp)               |         s0 = *(var_30h);
    0x005407d4 addiu sp, sp, 0x58            |         
    0x005407d8 jr ra                         |         return v0;
                                             | label_5:
    0x005407dc addiu s7, zero, 7             |         s7 = 7;
                                             |         /* str._br____n */
    0x005407e0 addiu s0, s0, -0x3ba4         |         s0 += -0x3ba4;
    0x005407e4 b 0x5406e4                    |         
                                             |     } while (1);
                                             | label_6:
    0x005407e8 lw a0, (v0)                   |     a0 = *(v0);
    0x005407ec jalr t9                       |     t9 ();
    0x005407f0 addu s2, s2, v0               |     s2 += v0;
    0x005407f4 lw v0, 0x28(sp)               |     v0 = *(var_28h);
    0x005407f8 slt v0, s6, v0                |     v0 = (s6 < v0) ? 1 : 0;
    0x005407fc lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x00540800 beqz v0, 0x540808             |         
    0x00540804 addu s2, s2, s7               |         s2 += s7;
                                             |     }
    0x00540808 lw t9, -0x6960(gp)            |     t9 = sym.zend_llist_get_next_ex;
    0x0054080c move a1, s3                   |     a1 = s3;
    0x00540810 move a0, s1                   |     a0 = s1;
    0x00540814 jalr t9                       |     t9 ();
    0x00540818 addiu s6, s6, 1               |     s6++;
    0x0054081c lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x00540820 b 0x54070c                    |     goto label_0;
                                             | label_7:
    0x00540824 lw a1, (v0)                   |     a1 = *(v0);
    0x00540828 move a0, s2                   |     a0 = s2;
    0x0054082c jalr t9                       |     t9 ();
    0x00540830 slt v0, s6, s4                |     v0 = (s6 < s4) ? 1 : 0;
    0x00540834 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x00540838 beqz v0, 0x540850             |         
    0x0054083c lw t9, -0x62ec(gp)            |         t9 = sym.imp.strcat
    0x00540840 move a1, s0                   |         a1 = s0;
    0x00540844 move a0, s2                   |         a0 = s2;
    0x00540848 jalr t9                       |         t9 ();
    0x0054084c lw gp, 0x18(sp)               |         gp = *(var_18h);
                                             |     }
    0x00540850 lw t9, -0x6960(gp)            |     t9 = sym.zend_llist_get_next_ex;
    0x00540854 move a1, s3                   |     a1 = s3;
    0x00540858 move a0, s1                   |     a0 = s1;
    0x0054085c jalr t9                       |     t9 ();
    0x00540860 addiu s6, s6, 1               |     s6++;
    0x00540864 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x00540868 b 0x540748                    |     goto label_1;
                                             | label_4:
    0x0054086c lw v0, -0x6d94(gp)            |     v0 = *(gp);
    0x00540870 lw t9, -0x5ee4(gp)            |     t9 = sym.imp.__errno_location;
                                             |     if (s0 == v0) {
    0x00540874 bne s0, v0, 0x5408ac          |         
    0x00540878 move s0, zero                 |         s0 = 0;
    0x0054087c jalr t9                       |         t9 ();
    0x00540880 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00540884 lw t9, -0x5f38(gp)            |         t9 = sym.imp.strerror;
    0x00540888 lw a0, (v0)                   |         a0 = *(v0);
    0x0054088c jalr t9                       |         t9 ();
    0x00540890 move s2, v0                   |         s2 = v0;
    0x00540894 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00540898 b 0x540754                    |         goto label_2;
                                             | label_3:
    0x0054089c lw s2, -0x7fbc(gp)            |         s2 = *((gp - 8175));
    0x005408a0 move s0, zero                 |         s0 = 0;
                                             |         /* str.no_suitable_wrapper_could_be_found */
    0x005408a4 addiu s2, s2, 0x3e20          |         s2 += 0x3e20;
    0x005408a8 b 0x540754                    |         goto label_2;
                                             |     }
    0x005408ac lw s2, -0x7fbc(gp)            |     s2 = *((gp - 8175));
    0x005408b0 move s0, zero                 |     s0 = 0;
                                             |     /* str.operation_failed */
    0x005408b4 addiu s2, s2, 0x3e44          |     s2 += 0x3e44;
    0x005408b8 b 0x540754                    |     goto label_2;
                                             | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/usr/bin/php-cli @ 0x546584 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.php_stream_filter_create ()      | void php_stream_filter_create () {
    0x00546584 lui gp, 0x1c                      |     
    0x00546588 addiu gp, gp, 0x7c7c              |     
    0x0054658c addu gp, gp, t9                   |     gp += t9;
    0x00546590 lw v0, -0x7a50(gp)                |     v0 = *(gp);
    0x00546594 addiu sp, sp, -0x40               |     
    0x00546598 sw s5, 0x2c(sp)                   |     *(var_2ch) = s5;
    0x0054659c lw s5, 0x24(v0)                   |     s5 = *((v0 + 9));
    0x005465a0 sw gp, 0x10(sp)                   |     *(var_10h) = gp;
    0x005465a4 sw s7, 0x34(sp)                   |     *(var_34h) = s7;
    0x005465a8 sw s6, 0x30(sp)                   |     *(var_30h) = s6;
    0x005465ac sw s0, 0x18(sp)                   |     *(var_18h) = s0;
    0x005465b0 sw ra, 0x3c(sp)                   |     *(var_3ch) = ra;
    0x005465b4 sw fp, 0x38(sp)                   |     *(var_38h) = fp;
    0x005465b8 sw s4, 0x28(sp)                   |     *(var_28h) = s4;
    0x005465bc sw s3, 0x24(sp)                   |     *(var_24h) = s3;
    0x005465c0 sw s2, 0x20(sp)                   |     *(var_20h) = s2;
    0x005465c4 sw s1, 0x1c(sp)                   |     *(var_1ch) = s1;
    0x005465c8 move s0, a0                       |     s0 = a0;
    0x005465cc move s6, a1                       |     s6 = a1;
    0x005465d0 move s7, a2                       |     s7 = a2;
                                                 |     if (s5 == 0) {
    0x005465d4 bnez s5, 0x5465e0                 |         
    0x005465d8 lw s5, -0x793c(gp)                |         s5 = *((gp - 7759));
    0x005465dc addiu s5, s5, -0x5160             |         s5 += -0x5160;
                                                 |     }
    0x005465e0 lw t9, -0x6194(gp)                |     t9 = sym.imp.strlen;
    0x005465e4 move a0, s0                       |     a0 = s0;
    0x005465e8 jalr t9                           |     t9 ();
    0x005465ec lw gp, 0x10(sp)                   |     gp = *(var_10h);
    0x005465f0 move a2, v0                       |     a2 = v0;
    0x005465f4 move a1, s0                       |     a1 = s0;
    0x005465f8 lw t9, -0x7e94(gp)                |     t9 = sym.zend_hash_str_find;
    0x005465fc move a0, s5                       |     a0 = s5;
    0x00546600 move s2, v0                       |     s2 = v0;
    0x00546604 jalr t9                           |     t9 ();
    0x00546608 lw gp, 0x10(sp)                   |     gp = *(var_10h);
                                                 |     if (v0 != 0) {
    0x0054660c beqz v0, 0x546644                 |         
    0x00546610 lw v0, (v0)                       |         v0 = *(v0);
    0x00546614 move a2, s7                       |         a2 = s7;
    0x00546618 move a1, s6                       |         a1 = s6;
    0x0054661c lw t9, (v0)                       |         t9 = *(v0);
    0x00546620 move a0, s0                       |         a0 = s0;
    0x00546624 jalr t9                           |         t9 ();
    0x00546628 move s2, v0                       |         s2 = v0;
    0x0054662c lw gp, 0x10(sp)                   |         gp = *(var_10h);
                                                 |         if (v0 != 0) {
    0x00546630 bnez v0, 0x546680                 |             goto label_3;
                                                 |         }
    0x00546634 lw a2, -0x7fbc(gp)                |         a2 = *((gp - 8175));
    0x00546638 move a3, s0                       |         a3 = s0;
                                                 |         /* str.unable_to_create_or_locate_filter___s_ */
                                                 | label_1:
    0x0054663c addiu a2, a2, 0x4368              |         a2 += 0x4368;
    0x00546640 b 0x54666c                        |         
                                                 |     } else {
    0x00546644 lw t9, -0x605c(gp)                |         t9 = sym.imp.strrchr;
    0x00546648 addiu a1, zero, 0x2e              |         a1 = 0x2e;
    0x0054664c move a0, s0                       |         a0 = s0;
    0x00546650 jalr t9                           |         t9 ();
    0x00546654 move s1, v0                       |         s1 = v0;
    0x00546658 lw gp, 0x10(sp)                   |         gp = *(var_10h);
                                                 |         if (v0 != 0) {
    0x0054665c bnez v0, 0x5466b4                 |             goto label_4;
                                                 |         }
                                                 | label_0:
    0x00546660 lw a2, -0x7fbc(gp)                |         a2 = *((gp - 8175));
    0x00546664 move a3, s0                       |         a3 = s0;
                                                 |         /* str.unable_to_locate_filter___s_ */
    0x00546668 addiu a2, a2, 0x4348              |         a2 += 0x4348;
                                                 |     }
    0x0054666c lw t9, -0x7ef4(gp)                |     t9 = sym.php_error_docref0;
    0x00546670 addiu a1, zero, 2                 |     a1 = 2;
    0x00546674 move a0, zero                     |     a0 = 0;
    0x00546678 move s2, zero                     |     s2 = 0;
    0x0054667c jalr t9                           |     t9 ();
                                                 |     do {
                                                 | label_3:
    0x00546680 lw ra, 0x3c(sp)                   |         ra = *(var_3ch);
    0x00546684 move v0, s2                       |         v0 = s2;
    0x00546688 lw fp, 0x38(sp)                   |         fp = *(var_38h);
    0x0054668c lw s7, 0x34(sp)                   |         s7 = *(var_34h);
    0x00546690 lw s6, 0x30(sp)                   |         s6 = *(var_30h);
    0x00546694 lw s5, 0x2c(sp)                   |         s5 = *(var_2ch);
    0x00546698 lw s4, 0x28(sp)                   |         s4 = *(var_28h);
    0x0054669c lw s3, 0x24(sp)                   |         s3 = *(var_24h);
    0x005466a0 lw s2, 0x20(sp)                   |         s2 = *(var_20h);
    0x005466a4 lw s1, 0x1c(sp)                   |         s1 = *(var_1ch);
    0x005466a8 lw s0, 0x18(sp)                   |         s0 = *(var_18h);
    0x005466ac addiu sp, sp, 0x40                |         
    0x005466b0 jr ra                             |         return v0;
                                                 | label_4:
    0x005466b4 lw t9, -0x7c7c(gp)                |         t9 = sym._safe_emalloc;
    0x005466b8 move a1, s2                       |         a1 = s2;
    0x005466bc addiu a2, zero, 3                 |         a2 = 3;
    0x005466c0 addiu a0, zero, 1                 |         a0 = 1;
    0x005466c4 jalr t9                           |         t9 ();
    0x005466c8 lw gp, 0x10(sp)                   |         gp = *(var_10h);
    0x005466cc addiu a2, s2, 1                   |         a2 = s2 + 1;
    0x005466d0 move a1, s0                       |         a1 = s0;
    0x005466d4 lw t9, -0x6188(gp)                |         t9 = sym.imp.memcpy;
    0x005466d8 move a0, v0                       |         a0 = v0;
    0x005466dc move s4, v0                       |         s4 = v0;
    0x005466e0 jalr t9                           |         t9 ();
    0x005466e4 lw gp, 0x10(sp)                   |         gp = *(var_10h);
    0x005466e8 subu s1, s1, s0                   |         __asm ("subu s1, s1, s0");
    0x005466ec addu s1, s4, s1                   |         s1 = s4 + s1;
    0x005466f0 lw fp, -0x7fd0(gp)                |         fp = *((gp - 8180));
    0x005466f4 move s2, zero                     |         s2 = 0;
    0x005466f8 move s3, zero                     |         s3 = 0;
                                                 |         /* esilref: '.*' */
    0x005466fc addiu fp, fp, 0x498               |         fp += 0x498;
                                                 | label_2:
    0x00546700 lw t9, -0x7fe4(gp)                |         t9 = sym._efree;
                                                 |         if (s1 != 0) {
    0x00546704 beqz s1, 0x546714                 |             
    0x00546708 lw t9, -0x62ec(gp)                |             t9 = sym.imp.strcat
                                                 |             if (s2 == 0) {
    0x0054670c beqz s2, 0x546734                 |                 goto label_5;
                                                 |             }
    0x00546710 lw t9, -0x7fe4(gp)                |             t9 = sym._efree;
                                                 |         }
    0x00546714 move a0, s4                       |         a0 = s4;
    0x00546718 jalr t9                           |         t9 ();
    0x0054671c lw gp, 0x10(sp)                   |         gp = *(var_10h);
    0x00546720 bnez s2, 0x546680                 |         
                                                 |     } while (s2 != 0);
    0x00546724 lw a2, -0x7fbc(gp)                |     a2 = *((gp - 8175));
                                                 |     if (s3 == 0) {
    0x00546728 beqz s3, 0x546660                 |         goto label_0;
                                                 |     }
    0x0054672c move a3, s0                       |     a3 = s0;
    0x00546730 b 0x54663c                        |     goto label_1;
                                                 | label_5:
    0x00546734 move a1, fp                       |     a1 = fp;
    0x00546738 move a0, s4                       |     a0 = s4;
    0x0054673c sb zero, (s1)                     |     *(s1) = 0;
    0x00546740 jalr t9                           |     t9 ();
    0x00546744 lw gp, 0x10(sp)                   |     gp = *(var_10h);
    0x00546748 lw t9, -0x6194(gp)                |     t9 = sym.imp.strlen;
    0x0054674c move a0, s4                       |     a0 = s4;
    0x00546750 jalr t9                           |     t9 ();
    0x00546754 lw gp, 0x10(sp)                   |     gp = *(var_10h);
    0x00546758 move a2, v0                       |     a2 = v0;
    0x0054675c move a1, s4                       |     a1 = s4;
    0x00546760 lw t9, -0x7e94(gp)                |     t9 = sym.zend_hash_str_find;
    0x00546764 move a0, s5                       |     a0 = s5;
    0x00546768 jalr t9                           |     t9 ();
    0x0054676c lw gp, 0x10(sp)                   |     gp = *(var_10h);
                                                 |     if (v0 == 0) {
    0x00546770 beqz v0, 0x5467b4                 |         goto label_6;
                                                 |     }
    0x00546774 lw s3, (v0)                       |     s3 = *(v0);
    0x00546778 move a2, s7                       |     a2 = s7;
    0x0054677c move a1, s6                       |     a1 = s6;
    0x00546780 lw t9, (s3)                       |     t9 = *(s3);
    0x00546784 move a0, s0                       |     a0 = s0;
    0x00546788 jalr t9                           |     t9 ();
    0x0054678c lw gp, 0x10(sp)                   |     gp = *(var_10h);
    0x00546790 move s2, v0                       |     s2 = v0;
                                                 |     do {
    0x00546794 lw t9, -0x605c(gp)                |         t9 = sym.imp.strrchr;
    0x00546798 sb zero, (s1)                     |         *(s1) = 0;
    0x0054679c addiu a1, zero, 0x2e              |         a1 = 0x2e;
    0x005467a0 move a0, s4                       |         a0 = s4;
    0x005467a4 jalr t9                           |         t9 ();
    0x005467a8 move s1, v0                       |         s1 = v0;
    0x005467ac lw gp, 0x10(sp)                   |         gp = *(var_10h);
    0x005467b0 b 0x546700                        |         goto label_2;
                                                 | label_6:
    0x005467b4 move s3, zero                     |         s3 = 0;
    0x005467b8 b 0x546794                        |         
                                                 |     } while (1);
                                                 | }

[*] Function strcat used 6 times php-cli