[*] Binary protection state of php-fpm

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


[*] Function strcat tear down of php-fpm

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/usr/bin/php-fpm @ 0x513400 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.00513400 ()                  | void fcn_00513400 () {
                                             | label_81:
    0x00513400 lui gp, 0x20                  |     
    0x00513404 addiu gp, gp, 0x4450          |     
    0x00513408 addu gp, gp, t9               |     gp += t9;
    0x0051340c addiu sp, sp, -0xd30          |     
    0x00513410 lw v0, 0xd48(sp)              |     v0 = *(arg_d48h);
    0x00513414 sw gp, 0x28(sp)               |     *(var_28h) = gp;
    0x00513418 sw s0, 0xd08(sp)              |     *(var_d08h) = s0;
    0x0051341c sw ra, 0xd2c(sp)              |     *(var_d2ch) = ra;
    0x00513420 sw fp, 0xd28(sp)              |     *(var_d28h) = fp;
    0x00513424 sw s7, 0xd24(sp)              |     *(var_d24h) = s7;
    0x00513428 sw s6, 0xd20(sp)              |     *(var_d20h) = s6;
    0x0051342c sw s5, 0xd1c(sp)              |     *(var_d1ch) = s5;
    0x00513430 sw s4, 0xd18(sp)              |     *(var_d18h) = s4;
    0x00513434 sw s3, 0xd14(sp)              |     *(var_d14h) = s3;
    0x00513438 sw s2, 0xd10(sp)              |     *(var_d10h) = s2;
    0x0051343c sw s1, 0xd0c(sp)              |     *(var_d0ch) = s1;
    0x00513440 sw a0, 0xd30(sp)              |     *(arg_d30h) = a0;
    0x00513444 sw a1, 0xd34(sp)              |     *(arg_d34h) = a1;
    0x00513448 sw a2, 0xd38(sp)              |     *(arg_d38h) = a2;
    0x0051344c sw a3, 0xd3c(sp)              |     *(arg_d3ch) = a3;
    0x00513450 lw s0, 0xd44(sp)              |     s0 = *(arg_d44h);
    0x00513454 sw zero, 0xcd0(sp)            |     *(var_cd0h) = 0;
    0x00513458 sw zero, 0xcc0(sp)            |     *(var_cc0h) = 0;
    0x0051345c sw zero, 0xcc4(sp)            |     *(var_cc4h) = 0;
    0x00513460 sb zero, 0xc30(sp)            |     *(var_c30h) = 0;
                                             |     if (v0 <= 0) {
    0x00513464 bgtz v0, 0x513484             |         
    0x00513468 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x0051346c lw t9, -0x6a10(gp)            |         t9 = sym.php_stream_wrapper_log_error;
                                             |         /* str.Redirection_limit_reached__aborting */
    0x00513470 addiu a2, a2, -0x5c30         |         a2 += -0x5c30;
    0x00513474 move a1, a3                   |         a1 = a3;
    0x00513478 jalr t9                       |         t9 ();
                                             | label_1:
    0x0051347c move s6, zero                 |         s6 = 0;
    0x00513480 b 0x513524                    |         goto label_64;
                                             |     }
    0x00513484 lw t9, -0x6a1c(gp)            |     t9 = sym.php_url_parse;
    0x00513488 lw a0, 0xd34(sp)              |     a0 = *(arg_d34h);
    0x0051348c bal 0x5039d4                  |     sym_php_url_parse ();
    0x00513490 move fp, v0                   |     fp = v0;
    0x00513494 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00513498 bnez v0, 0x5134a4             |         
                                             | label_90:
    0x0051349c move s6, zero                 |         s6 = 0;
    0x005134a0 b 0x513524                    |         goto label_64;
                                             |     }
    0x005134a4 lw s2, -0x7fc4(gp)            |     s2 = *((gp - 8177));
    0x005134a8 lw s1, (v0)                   |     s1 = *(v0);
    0x005134ac lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
    0x005134b0 addiu a2, zero, 5             |     a2 = 5;
                                             |     /* str.http */
    0x005134b4 addiu a1, s2, -0x27a0         |     a1 = s2 + -0x27a0;
    0x005134b8 move a0, s1                   |     a0 = s1;
    0x005134bc jalr t9                       |     t9 ();
    0x005134c0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005134c4 sw s2, 0xcdc(sp)              |     *(var_cdch) = s2;
                                             |     if (v0 == 0) {
    0x005134c8 beqz v0, 0x51383c             |         goto label_104;
                                             |     }
    0x005134cc lw a1, -0x7fc4(gp)            |     a1 = *((gp - 8177));
    0x005134d0 lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
    0x005134d4 addiu a2, zero, 6             |     a2 = 6;
                                             |     /* str.https */
    0x005134d8 addiu a1, a1, -0x2798         |     a1 += -0x2798;
    0x005134dc move a0, s1                   |     a0 = s1;
    0x005134e0 jalr t9                       |     t9 ();
    0x005134e4 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x005134e8 beqz v0, 0x51383c             |         goto label_104;
                                             |     }
    0x005134ec lw v0, 0xd30(sp)              |     v0 = *(arg_d30h);
    0x005134f0 bnez s0, 0x513558             |     
                                             |     while (v0 == 0) {
    0x005134f4 lw t9, -0x7030(gp)            |         t9 = sym.php_url_free;
                                             | label_0:
    0x005134f8 move a0, fp                   |         a0 = fp;
    0x005134fc bal 0x503034                  |         sym_php_url_free ();
    0x00513500 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513504 lw a1, 0xd38(sp)              |         a1 = *(arg_d38h);
    0x00513508 lw a0, 0xd34(sp)              |         a0 = *(arg_d34h);
    0x0051350c lw t9, -0x7a3c(gp)            |         t9 = sym._php_stream_open_wrapper_ex;
    0x00513510 sw s0, 0x10(sp)               |         *(var_10h) = s0;
    0x00513514 move a3, zero                 |         a3 = 0;
    0x00513518 addiu a2, zero, 8             |         a2 = 8;
    0x0051351c jalr t9                       |         t9 ();
    0x00513520 move s6, v0                   |         s6 = v0;
                                             | label_64:
    0x00513524 lw ra, 0xd2c(sp)              |         ra = *(var_d2ch);
                                             | label_65:
    0x00513528 move v0, s6                   |         v0 = s6;
    0x0051352c lw fp, 0xd28(sp)              |         fp = *(var_d28h);
    0x00513530 lw s7, 0xd24(sp)              |         s7 = *(var_d24h);
    0x00513534 lw s6, 0xd20(sp)              |         s6 = *(var_d20h);
    0x00513538 lw s5, 0xd1c(sp)              |         s5 = *(var_d1ch);
    0x0051353c lw s4, 0xd18(sp)              |         s4 = *(var_d18h);
    0x00513540 lw s3, 0xd14(sp)              |         s3 = *(var_d14h);
    0x00513544 lw s2, 0xd10(sp)              |         s2 = *(var_d10h);
    0x00513548 lw s1, 0xd0c(sp)              |         s1 = *(var_d0ch);
    0x0051354c lw s0, 0xd08(sp)              |         s0 = *(var_d08h);
    0x00513550 addiu sp, sp, 0xd30           |         
    0x00513554 jr ra                         |         return v0;
    0x00513558 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x0051355c lw t9, -0x6a00(gp)            |         t9 = sym.php_stream_context_get_option;
    0x00513560 lw v0, (v0)                   |         v0 = *(v0);
                                             |         /* str.proxy */
    0x00513564 addiu a2, a2, -0x5e34         |         a2 += -0x5e34;
    0x00513568 move a0, s0                   |         a0 = s0;
    0x0051356c lw a1, 0x14(v0)               |         a1 = *((v0 + 5));
    0x00513570 jalr t9                       |         t9 ();
    0x00513574 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513578 beqz v0, 0x5134f4             |         
                                             |     }
    0x0051357c lbu a0, 8(v0)                 |     a0 = *((v0 + 8));
    0x00513580 addiu v1, zero, 6             |     v1 = 6;
    0x00513584 lw t9, -0x7030(gp)            |     t9 = sym.php_url_free;
                                             |     if (a0 != v1) {
    0x00513588 bne a0, v1, 0x5134f8          |         goto label_0;
                                             |     }
    0x0051358c lw a0, (v0)                   |     a0 = *(v0);
    0x00513590 lw s1, 0xc(a0)                |     s1 = *((a0 + 3));
    0x00513594 move a1, s1                   |     a1 = s1;
                                             |     if (s1 == 0) {
    0x00513598 beqz s1, 0x5134f8             |         goto label_0;
                                             |     }
    0x0051359c lw t9, -0x7e80(gp)            |     t9 = sym._estrndup;
    0x005135a0 addiu a0, a0, 0x10            |     a0 += 0x10;
    0x005135a4 jalr t9                       |     t9 ();
    0x005135a8 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005135ac sw v0, 0xcd4(sp)              |     *(var_cd4h) = v0;
    0x005135b0 addiu s4, zero, 1             |     s4 = 1;
    0x005135b4 addiu s5, zero, 1             |     s5 = 1;
    0x005135b8 sw zero, 0xcd8(sp)            |     *(var_cd8h) = 0;
                                             |     do {
                                             | label_100:
    0x005135bc lw v0, 0xd30(sp)              |         v0 = *(arg_d30h);
    0x005135c0 lw a2, -0x7fbc(gp)            |         a2 = *((gp - 8175));
    0x005135c4 lw t9, -0x6a00(gp)            |         t9 = sym.php_stream_context_get_option;
    0x005135c8 lw v0, (v0)                   |         v0 = *(v0);
                                             |         /* esilref: 'timeout' */
    0x005135cc addiu a2, a2, -0x6548         |         a2 += -0x6548;
    0x005135d0 move a0, s0                   |         a0 = s0;
    0x005135d4 lw a1, 0x14(v0)               |         a1 = *((v0 + 5));
    0x005135d8 jalr t9                       |         t9 ();
    0x005135dc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x005135e0 beqz v0, 0x516c34             |             goto label_105;
                                             |         }
    0x005135e4 lbu a0, 8(v0)                 |         a0 = *((v0 + 8));
    0x005135e8 addiu v1, zero, 5             |         v1 = 5;
    0x005135ec lw t9, -0x7eb8(gp)            |         t9 = sym._zval_get_double_func;
                                             |         if (a0 != v1) {
    0x005135f0 bne a0, v1, 0x513958          |             goto label_106;
                                             |         }
    0x005135f4 lw s2, (v0)                   |         s2 = *(v0);
    0x005135f8 lw s3, 4(v0)                  |         s3 = *((v0 + 1));
                                             | label_2:
    0x005135fc lw t9, -0x5c8c(gp)            |         t9 = sym.imp.__fixdfsi;
    0x00513600 move a1, s3                   |         a1 = s3;
    0x00513604 move a0, s2                   |         a0 = s2;
    0x00513608 jalr t9                       |         t9 ();
    0x0051360c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513610 move a0, v0                   |         a0 = v0;
    0x00513614 lw t9, -0x5f5c(gp)            |         t9 = sym.imp.__floatsidf;
    0x00513618 sw v0, 0xcc8(sp)              |         *(var_cc8h) = v0;
    0x0051361c jalr t9                       |         t9 ();
    0x00513620 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513624 move a2, v0                   |         a2 = v0;
    0x00513628 move a3, v1                   |         a3 = v1;
    0x0051362c lw t9, -0x5f60(gp)            |         t9 = sym.imp.__subdf3;
    0x00513630 move a0, s2                   |         a0 = s2;
    0x00513634 move a1, s3                   |         a1 = s3;
    0x00513638 jalr t9                       |         t9 ();
    0x0051363c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513640 move a1, v1                   |         a1 = v1;
    0x00513644 lw a0, -0x7fc4(gp)            |         a0 = *((gp - 8177));
    0x00513648 lw t9, -0x5f6c(gp)            |         t9 = sym.imp.__muldf3;
    0x0051364c lw a2, -0x7a80(a0)            |         a2 = *((a0 - 7840));
    0x00513650 lw a3, -0x7a7c(a0)            |         a3 = *((a0 - 7839));
    0x00513654 move a0, v0                   |         a0 = v0;
    0x00513658 jalr t9                       |         t9 ();
    0x0051365c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513660 move a0, v0                   |         a0 = v0;
    0x00513664 lw t9, -0x6014(gp)            |         t9 = sym.imp.__fixunsdfsi;
    0x00513668 move a1, v1                   |         a1 = v1;
    0x0051366c jalr t9                       |         t9 ();
    0x00513670 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513674 sw v0, 0xccc(sp)              |         *(var_ccch) = v0;
                                             | label_101:
    0x00513678 lw t9, -0x6bc4(gp)            |         t9 = sym._php_stream_xport_create;
    0x0051367c addiu v0, sp, 0xcd0           |         v0 = sp + 0xcd0;
    0x00513680 addiu s2, sp, 0xcc8           |         s2 = sp + 0xcc8;
    0x00513684 lw a2, 0xd3c(sp)              |         a2 = *(arg_d3ch);
    0x00513688 lw a0, 0xcd4(sp)              |         a0 = *(var_cd4h);
    0x0051368c sw zero, 0x20(sp)             |         *(var_20h) = 0;
    0x00513690 sw v0, 0x1c(sp)               |         *(var_1ch) = v0;
    0x00513694 sw s0, 0x18(sp)               |         *(var_18h) = s0;
    0x00513698 sw s2, 0x14(sp)               |         *(var_14h) = s2;
    0x0051369c sw zero, 0x10(sp)             |         *(var_10h) = 0;
    0x005136a0 addiu a3, zero, 2             |         a3 = 2;
    0x005136a4 move a1, s1                   |         a1 = s1;
    0x005136a8 jalr t9                       |         t9 ();
    0x005136ac move s6, v0                   |         s6 = v0;
    0x005136b0 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x005136b4 beqz v0, 0x5136d4             |             
    0x005136b8 lw t9, -0x7a58(gp)            |             t9 = sym._php_stream_set_option;
    0x005136bc move a3, s2                   |             a3 = s2;
    0x005136c0 move a2, zero                 |             a2 = 0;
    0x005136c4 addiu a1, zero, 4             |             a1 = 4;
    0x005136c8 move a0, v0                   |             a0 = v0;
    0x005136cc jalr t9                       |             t9 ();
    0x005136d0 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x005136d4 lw a3, 0xcd0(sp)              |         a3 = *(var_cd0h);
    0x005136d8 lw a2, -0x7ef4(gp)            |         a2 = *(gp);
                                             |         if (a3 != 0) {
    0x005136dc beqz a3, 0x51373c             |             
    0x005136e0 lw t9, -0x6a10(gp)            |             t9 = sym.php_stream_wrapper_log_error;
    0x005136e4 lw a0, 0xd30(sp)              |             a0 = *(arg_d30h);
    0x005136e8 lw a1, 0xd3c(sp)              |             a1 = *(arg_d3ch);
    0x005136ec addiu a3, a3, 0x10            |             a3 += 0x10;
                                             |             /* esilref: '&s' */
    0x005136f0 addiu a2, a2, 0x716c          |             a2 += 0x716c;
    0x005136f4 jalr t9                       |             t9 ();
    0x005136f8 lw a0, 0xcd0(sp)              |             a0 = *(var_cd0h);
    0x005136fc lbu v0, 5(a0)                 |             v0 = *((a0 + 5));
    0x00513700 andi v1, v0, 2                |             v1 = v0 & 2;
    0x00513704 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v1 == 0) {
    0x00513708 bnez v1, 0x513738             |                 
    0x0051370c lw v1, (a0)                   |                 v1 = *(a0);
    0x00513710 addiu v1, v1, -1              |                 v1 += -1;
    0x00513714 sw v1, (a0)                   |                 *(a0) = v1;
                                             |                 if (v1 != 0) {
    0x00513718 bnez v1, 0x513738             |                     goto label_3;
                                             |                 }
    0x0051371c andi v0, v0, 1                |                 v0 &= 1;
    0x00513720 lw t9, -0x7fe4(gp)            |                 t9 = sym._efree;
                                             |                 if (v0 == 0) {
    0x00513724 beqz v0, 0x513970             |                     goto label_107;
                                             |                 }
    0x00513728 lw t9, -0x5e90(gp)            |                 t9 = *((gp - 6052));
    0x0051372c jalr t9                       |                 t9 ();
    0x00513730 nop                           |                 
    0x00513734 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
                                             | label_3:
    0x00513738 sw zero, 0xcd0(sp)            |             *(var_cd0h) = 0;
                                             |         }
    0x0051373c lw v0, 0xd4c(sp)              |         v0 = *(arg_d4ch);
    0x00513740 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00513744 andi v0, v0, 1                |         v0 &= 1;
    0x00513748 lw a0, 0xcd4(sp)              |         a0 = *(var_cd4h);
    0x0051374c sw v0, 0xce8(sp)              |         *(var_ce8h) = v0;
    0x00513750 jalr t9                       |         t9 ();
    0x00513754 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (s6 == 0) {
    0x00513758 beqz s6, 0x516a00             |             goto label_108;
                                             |         }
    0x0051375c lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
                                             |         if (s5 == 0) {
    0x00513760 beqz s5, 0x513fbc             |             goto label_109;
                                             |         }
    0x00513764 lw v0, 0xcd8(sp)              |         v0 = *(var_cd8h);
    0x00513768 lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
                                             |         if (v0 == 0) {
    0x0051376c beqz v0, 0x513fbc             |             goto label_109;
                                             |         }
    0x00513770 sw zero, 0x430(sp)            |         *(var_430h) = 0;
    0x00513774 sw zero, 0x434(sp)            |         *(var_434h) = 0;
    0x00513778 lw s7, -0x7fc0(gp)            |         s7 = *((gp - 8176));
    0x0051377c lw s3, -0x7fc0(gp)            |         s3 = *((gp - 8176));
                                             |         if (s0 != 0) {
    0x00513780 bnez s0, 0x513980             |             goto label_110;
                                             |         }
                                             | label_4:
    0x00513784 lw v0, 0xc(fp)                |         v0 = *(arg_d3ch);
    0x00513788 lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
    0x0051378c move a0, v0                   |         a0 = v0;
    0x00513790 sw v0, 0xce4(sp)              |         *(var_ce4h) = v0;
    0x00513794 jalr t9                       |         t9 ();
    0x00513798 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051379c move s2, v0                   |         s2 = v0;
    0x005137a0 addiu a0, v0, 0x18            |         a0 = v0 + 0x18;
    0x005137a4 lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x005137a8 addiu v0, zero, -8            |         v0 = -8;
    0x005137ac and a0, a0, v0                |         a0 &= v0;
    0x005137b0 jalr t9                       |         t9 ();
    0x005137b4 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005137b8 move s1, v0                   |         s1 = v0;
    0x005137bc addiu v0, zero, 1             |         v0 = 1;
    0x005137c0 sw v0, (s1)                   |         *(s1) = v0;
    0x005137c4 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x005137c8 addiu v0, zero, 6             |         v0 = 6;
    0x005137cc sw s2, 0xc(s1)                |         *((s1 + 3)) = s2;
    0x005137d0 move a2, s2                   |         a2 = s2;
    0x005137d4 lw a1, 0xce4(sp)              |         a1 = *(var_ce4h);
    0x005137d8 addu s2, s1, s2               |         s2 = s1 + s2;
    0x005137dc sw v0, 4(s1)                  |         *((s1 + 1)) = v0;
    0x005137e0 sw zero, 8(s1)                |         *((s1 + 2)) = 0;
    0x005137e4 addiu a0, s1, 0x10            |         a0 = s1 + 0x10;
    0x005137e8 jalr t9                       |         t9 ();
    0x005137ec addiu v0, zero, 0x1406        |         v0 = 0x1406;
    0x005137f0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005137f4 sb zero, 0x10(s2)             |         *((s2 + 16)) = 0;
    0x005137f8 sw v0, 0xcb8(sp)              |         *(var_cb8h) = v0;
    0x005137fc lw v0, 0x5c(s6)               |         v0 = *(var_d2ch);
    0x00513800 sw s1, 0xcb0(sp)              |         *(var_cb0h) = s1;
                                             |         if (v0 != 0) {
    0x00513804 bnez v0, 0x513db8             |             goto label_111;
                                             |         }
    0x00513808 move a0, zero                 |         a0 = 0;
                                             | label_6:
    0x0051380c lw t9, -0x69f4(gp)            |         t9 = sym.php_stream_context_set_option;
    0x00513810 addiu s1, sp, 0xcb0           |         s1 = sp + 0xcb0;
    0x00513814 move a3, s1                   |         a3 = s1;
                                             |         /* str.peer_name */
    0x00513818 addiu a2, s7, -0x5bc0         |         a2 = s7 + -0x5bc0;
                                             |         /* esilref: 'ssl' */
    0x0051381c addiu a1, s3, -0x5bb4         |         a1 = s3 + -0x5bb4;
    0x00513820 jalr t9                       |         t9 ();
    0x00513824 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513828 lw t9, -0x7f28(gp)            |         t9 = sym._zval_ptr_dtor;
    0x0051382c move a0, s1                   |         a0 = s1;
    0x00513830 jalr t9                       |         t9 ();
    0x00513834 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513838 b 0x51399c                    |         goto label_112;
                                             | label_104:
    0x0051383c lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
    0x00513840 lw t9, -0x613c(gp)            |         t9 = sym.imp.strpbrk;
    0x00513844 lw a0, 0xd38(sp)              |         a0 = *(arg_d38h);
                                             |         /* str.awx */
    0x00513848 addiu a1, a1, -0x5c0c         |         a1 += -0x5c0c;
    0x0051384c jalr t9                       |         t9 ();
    0x00513850 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00513854 beqz v0, 0x513888             |             
    0x00513858 lw a2, -0x7fc0(gp)            |             a2 = *((gp - 8176));
    0x0051385c lw t9, -0x6a10(gp)            |             t9 = sym.php_stream_wrapper_log_error;
    0x00513860 lw a0, 0xd30(sp)              |             a0 = *(arg_d30h);
    0x00513864 lw a1, 0xd3c(sp)              |             a1 = *(arg_d3ch);
                                             |             /* str.HTTP_wrapper_does_not_support_writeable_connections */
    0x00513868 addiu a2, a2, -0x5c04         |             a2 += -0x5c04;
    0x0051386c jalr t9                       |             t9 ();
    0x00513870 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00513874 lw t9, -0x7030(gp)            |             t9 = sym.php_url_free;
    0x00513878 move a0, fp                   |             a0 = fp;
    0x0051387c bal 0x503034                  |             sym_php_url_free ();
    0x00513880 b 0x51347c                    |             goto label_1;
    0x00513884 nop                           |             
                                             |         }
    0x00513888 lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
    0x0051388c move a0, s1                   |         a0 = s1;
    0x00513890 jalr t9                       |         t9 ();
    0x00513894 sltiu v0, v0, 5               |         v0 = (v0 < 5) ? 1 : 0;
    0x00513898 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051389c lhu v1, 0x10(fp)              |         v1 = *(arg_10h);
                                             |         if (v0 == 0) {
    0x005138a0 bnez v0, 0x5138d4             |             
    0x005138a4 lb a0, 4(s1)                  |             a0 = *((s1 + 4));
    0x005138a8 addiu v0, zero, 0x73          |             v0 = 0x73;
                                             |             if (a0 == v0) {
    0x005138ac bne a0, v0, 0x5138d4          |                 
    0x005138b0 nop                           |                 
    0x005138b4 addiu v0, zero, 0x1bb         |                 v0 = 0x1bb;
                                             |                 if (v1 == 0) {
    0x005138b8 bnez v1, 0x5138c0             |                     
    0x005138bc sh v0, 0x10(fp)               |                     *(arg_10h) = v0;
                                             |                 }
    0x005138c0 lw a3, -0x7fc0(gp)            |                 a3 = *((gp - 8176));
                                             |                 if (s0 == 0) {
    0x005138c4 beqz s0, 0x516c48             |                     goto label_113;
                                             |                 }
    0x005138c8 addiu v0, zero, 1             |                 v0 = 1;
    0x005138cc sw v0, 0xcd8(sp)              |                 *(var_cd8h) = v0;
    0x005138d0 b 0x5138ec                    |                 
                                             |             }
                                             |         } else {
    0x005138d4 addiu v0, zero, 0x50          |             v0 = 0x50;
                                             |             if (v1 == 0) {
    0x005138d8 bnez v1, 0x5138e0             |                 
    0x005138dc sh v0, 0x10(fp)               |                 *(arg_10h) = v0;
                                             |             }
                                             |             if (s0 == 0) {
    0x005138e0 beqz s0, 0x516bec             |                 goto label_114;
                                             |             }
    0x005138e4 nop                           |             
    0x005138e8 sw zero, 0xcd8(sp)            |             *(var_cd8h) = 0;
                                             |         }
    0x005138ec lw v0, 0xd30(sp)              |         v0 = *(arg_d30h);
    0x005138f0 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x005138f4 lw t9, -0x6a00(gp)            |         t9 = sym.php_stream_context_get_option;
    0x005138f8 lw v0, (v0)                   |         v0 = *(v0);
                                             |         /* str.proxy */
    0x005138fc addiu a2, a2, -0x5e34         |         a2 += -0x5e34;
    0x00513900 move a0, s0                   |         a0 = s0;
    0x00513904 lw a1, 0x14(v0)               |         a1 = *((v0 + 5));
    0x00513908 jalr t9                       |         t9 ();
    0x0051390c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00513910 beqz v0, 0x516be0             |             goto label_115;
                                             |         }
    0x00513914 lbu a0, 8(v0)                 |         a0 = *((v0 + 8));
    0x00513918 addiu v1, zero, 6             |         v1 = 6;
                                             |         if (a0 != v1) {
    0x0051391c bne a0, v1, 0x516be0          |             goto label_115;
                                             |         }
    0x00513920 nop                           |         
    0x00513924 lw a0, (v0)                   |         a0 = *(v0);
    0x00513928 lw s1, 0xc(a0)                |         s1 = *((a0 + 3));
    0x0051392c lw v0, 0xcd8(sp)              |         v0 = *(var_cd8h);
                                             |         if (s1 == 0) {
    0x00513930 beqz s1, 0x516be4             |             goto label_116;
                                             |         }
    0x00513934 lw t9, -0x7e80(gp)            |         t9 = sym._estrndup;
    0x00513938 move a1, s1                   |         a1 = s1;
    0x0051393c addiu a0, a0, 0x10            |         a0 += 0x10;
    0x00513940 jalr t9                       |         t9 ();
    0x00513944 sw v0, 0xcd4(sp)              |         *(var_cd4h) = v0;
    0x00513948 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051394c move s4, zero                 |         s4 = 0;
    0x00513950 addiu s5, zero, 1             |         s5 = 1;
    0x00513954 b 0x5135bc                    |         
                                             |     } while (1);
                                             | label_106:
    0x00513958 move a0, v0                   |     a0 = v0;
    0x0051395c jalr t9                       |     t9 ();
    0x00513960 move s2, v0                   |     s2 = v0;
    0x00513964 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513968 move s3, v1                   |     s3 = v1;
    0x0051396c b 0x5135fc                    |     goto label_2;
                                             | label_107:
    0x00513970 jalr t9                       |     t9 ();
    0x00513974 nop                           |     
    0x00513978 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051397c b 0x513738                    |     goto label_3;
                                             | label_110:
    0x00513980 lw t9, -0x6a00(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.peer_name */
    0x00513984 addiu a2, s7, -0x5bc0         |     a2 = s7 + -0x5bc0;
                                             |     /* esilref: 'ssl' */
    0x00513988 addiu a1, s3, -0x5bb4         |     a1 = s3 + -0x5bb4;
    0x0051398c move a0, s0                   |     a0 = s0;
    0x00513990 jalr t9                       |     t9 ();
    0x00513994 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00513998 beqz v0, 0x513784             |         goto label_4;
                                             |     }
                                             | label_112:
    0x0051399c lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x005139a0 addiu s1, zero, 8             |     s1 = 8;
                                             |     if (v0 != 0) {
    0x005139a4 beqz v0, 0x5139c0             |         
    0x005139a8 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x005139ac lw v0, 0x434(sp)              |         v0 = *(var_434h);
    0x005139b0 addiu s1, s1, 8               |         s1 += 8;
    0x005139b4 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x005139b8 lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |         if (v0 != 0) {
    0x005139bc bnez v0, 0x5139d8             |             goto label_117;
                                             |         }
                                             |     }
    0x005139c0 lw t9, -0x7ed0(gp)            |     t9 = sym.smart_str_erealloc;
    0x005139c4 move a1, s1                   |     a1 = s1;
    0x005139c8 addiu a0, sp, 0x430           |     a0 = sp + 0x430;
    0x005139cc jalr t9                       |     t9 ();
    0x005139d0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005139d4 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             | label_117:
    0x005139d8 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x005139dc addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x005139e0 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005139e4 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x005139e8 addiu a2, zero, 8             |     a2 = 8;
                                             |     /* str.CONNECT_ */
    0x005139ec addiu a1, a1, -0x5bb0         |     a1 += -0x5bb0;
    0x005139f0 addu a0, a0, v0               |     a0 += v0;
    0x005139f4 jalr t9                       |     t9 ();
    0x005139f8 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005139fc lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00513a00 lw s2, 0xc(fp)                |     s2 = *(arg_d3ch);
    0x00513a04 lw t9, -0x5f58(gp)            |     t9 = sym.imp.strlen;
    0x00513a08 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
    0x00513a0c move a0, s2                   |     a0 = s2;
    0x00513a10 jalr t9                       |     t9 ();
    0x00513a14 addu s1, v0, s1               |     s1 = v0 + s1;
    0x00513a18 move s3, v0                   |     s3 = v0;
    0x00513a1c lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x00513a20 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00513a24 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00513a28 bnez v0, 0x513a40             |         
    0x00513a2c lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00513a30 move a1, s1                   |         a1 = s1;
    0x00513a34 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x00513a38 jalr t9                       |         t9 ();
    0x00513a3c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00513a40 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00513a44 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00513a48 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00513a4c lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513a50 move a1, s2                   |     a1 = s2;
    0x00513a54 move a2, s3                   |     a2 = s3;
    0x00513a58 addu a0, a0, v0               |     a0 += v0;
    0x00513a5c jalr t9                       |     t9 ();
    0x00513a60 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00513a64 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513a68 addiu s2, s1, 1               |     s2 = s1 + 1;
    0x00513a6c sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
    0x00513a70 lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x00513a74 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x00513a78 lw v1, 0x430(sp)              |     v1 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00513a7c bnez v0, 0x513a98             |         
    0x00513a80 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00513a84 move a1, s2                   |         a1 = s2;
    0x00513a88 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x00513a8c jalr t9                       |         t9 ();
    0x00513a90 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513a94 lw v1, 0x430(sp)              |         v1 = *(var_430h);
                                             |     }
    0x00513a98 addiu v0, zero, 0x3a          |     v0 = 0x3a;
    0x00513a9c addu s1, v1, s1               |     s1 = v1 + s1;
    0x00513aa0 addiu a1, zero, 0xa           |     a1 = 0xa;
    0x00513aa4 sb v0, 0x10(s1)               |     *((s1 + 16)) = v0;
    0x00513aa8 sw s2, 0xc(v1)                |     *((v1 + 3)) = s2;
    0x00513aac addiu s2, sp, 0x4f            |     s2 = sp + 0x4f;
    0x00513ab0 lhu v0, 0x10(fp)              |     v0 = *(arg_10h);
    0x00513ab4 move s3, s2                   |     s3 = s2;
    0x00513ab8 sb zero, 0x4f(sp)             |     *(var_4fh) = 0;
                                             |     do {
    0x00513abc divu zero, v0, a1             |         __asm ("divu zero, v0, a1");
    0x00513ac0 teq a1, zero, 7               |         __asm ("teq a1, zero, 7");
    0x00513ac4 addiu s2, s2, -1              |         s2 += -1;
    0x00513ac8 mfhi a0                       |         __asm ("mfhi a0");
    0x00513acc mflo v0                       |         __asm ("mflo v0");
    0x00513ad0 addiu a0, a0, 0x30            |         a0 += 0x30;
    0x00513ad4 sb a0, (s2)                   |         *(s2) = a0;
    0x00513ad8 bnez v0, 0x513abc             |         
                                             |     } while (v0 != 0);
    0x00513adc lw s1, 0xc(v1)                |     s1 = *((v1 + 3));
    0x00513ae0 subu s3, s3, s2               |     __asm ("subu s3, s3, s2");
    0x00513ae4 lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x00513ae8 addu s1, s3, s1               |     s1 = s3 + s1;
    0x00513aec sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00513af0 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00513af4 bnez v0, 0x513b10             |         
    0x00513af8 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00513afc move a1, s1                   |         a1 = s1;
    0x00513b00 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x00513b04 jalr t9                       |         t9 ();
    0x00513b08 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513b0c lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |     }
    0x00513b10 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00513b14 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00513b18 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513b1c move a2, s3                   |     a2 = s3;
    0x00513b20 move a1, s2                   |     a1 = s2;
    0x00513b24 addu a0, a0, v0               |     a0 += v0;
    0x00513b28 jalr t9                       |     t9 ();
    0x00513b2c lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00513b30 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513b34 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
    0x00513b38 lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x00513b3c addiu s1, s1, 0xb             |     s1 += 0xb;
    0x00513b40 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00513b44 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00513b48 bnez v0, 0x513b64             |         
    0x00513b4c lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00513b50 move a1, s1                   |         a1 = s1;
    0x00513b54 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x00513b58 jalr t9                       |         t9 ();
    0x00513b5c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513b60 lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |     }
    0x00513b64 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x00513b68 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00513b6c lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00513b70 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00513b74 addiu a2, zero, 0xb           |     a2 = 0xb;
                                             |     /* str._HTTP_1.0_r_n */
    0x00513b78 addiu a1, a1, -0x5ba4         |     a1 += -0x5ba4;
    0x00513b7c addu a0, a0, v0               |     a0 += v0;
    0x00513b80 jalr t9                       |     t9 ();
    0x00513b84 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00513b88 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513b8c sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
                                             |     if (s0 != 0) {
    0x00513b90 beqz s0, 0x513bfc             |         
    0x00513b94 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x00513b98 lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
    0x00513b9c lw t9, -0x6a00(gp)            |         t9 = sym.php_stream_context_get_option;
                                             |         /* esilref: 'header' */
    0x00513ba0 addiu a2, a2, -0x5a1c         |         a2 += -0x5a1c;
    0x00513ba4 addiu a1, v0, -0x27a0         |         a1 = v0 + -0x27a0;
    0x00513ba8 move a0, s0                   |         a0 = s0;
    0x00513bac jalr t9                       |         t9 ();
    0x00513bb0 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00513bb4 beqz v0, 0x513bfc             |             goto label_14;
                                             |         }
    0x00513bb8 lbu v1, 8(v0)                 |         v1 = *((v0 + 8));
    0x00513bbc addiu a0, zero, 7             |         a0 = 7;
    0x00513bc0 addiu a0, zero, 6             |         a0 = 6;
                                             |         if (v1 != a0) {
    0x00513bc4 bne v1, a0, 0x513ea4          |             goto label_118;
                                             |         }
    0x00513bc8 lw v0, (v0)                   |         v0 = *(v0);
    0x00513bcc addiu v1, zero, 0x18          |         v1 = 0x18;
    0x00513bd0 lw s3, 0x10(v0)               |         s3 = *((v0 + 4));
    0x00513bd4 lw v0, 0x14(v0)               |         v0 = *((v0 + 5));
    0x00513bd8 mul a0, v1, v0                |         __asm ("mul a0, v1, v0");
    0x00513bdc addu v0, a0, s3               |         v0 = a0 + s3;
    0x00513be0 sw v0, 0xce4(sp)              |         *(var_ce4h) = v0;
    0x00513be4 lw v0, -0x7fc0(gp)            |         v0 = *((gp - 8176));
                                             |         /* str.Proxy_Authorization: */
    0x00513be8 addiu v0, v0, -0x5b98         |         v0 += -0x5b98;
    0x00513bec sw v0, 0xcec(sp)              |         *(var_cech) = v0;
                                             | label_7:
    0x00513bf0 lw v0, 0xce4(sp)              |         v0 = *(var_ce4h);
    0x00513bf4 addiu v0, zero, 6             |         v0 = 6;
                                             |         if (s3 != v0) {
    0x00513bf8 bne s3, v0, 0x513dc0          |             goto label_119;
                                             |         }
                                             |     }
                                             | label_14:
    0x00513bfc lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             | label_15:
    0x00513c00 addiu s1, zero, 2             |     s1 = 2;
                                             |     if (v0 != 0) {
    0x00513c04 beqz v0, 0x513c20             |         
    0x00513c08 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x00513c0c lw v0, 0x434(sp)              |         v0 = *(var_434h);
    0x00513c10 addiu s1, s1, 2               |         s1 += 2;
    0x00513c14 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00513c18 lw v1, 0x430(sp)              |         v1 = *(var_430h);
                                             |         if (v0 != 0) {
    0x00513c1c bnez v0, 0x513c38             |             goto label_120;
                                             |         }
                                             |     }
    0x00513c20 lw t9, -0x7ed0(gp)            |     t9 = sym.smart_str_erealloc;
    0x00513c24 move a1, s1                   |     a1 = s1;
    0x00513c28 addiu a0, sp, 0x430           |     a0 = sp + 0x430;
    0x00513c2c jalr t9                       |     t9 ();
    0x00513c30 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513c34 lw v1, 0x430(sp)              |     v1 = *(var_430h);
                                             | label_120:
    0x00513c38 lw t9, -0x7a60(gp)            |     t9 = sym._php_stream_write;
    0x00513c3c addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00513c40 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00513c44 move a2, s1                   |     a2 = s1;
    0x00513c48 addu v0, v0, v1               |     v0 += v1;
    0x00513c4c addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00513c50 sb v1, (v0)                   |     *(v0) = v1;
    0x00513c54 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00513c58 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x00513c5c lw a1, 0x430(sp)              |     a1 = *(var_430h);
    0x00513c60 move a0, s6                   |     a0 = s6;
    0x00513c64 addiu a1, a1, 0x10            |     a1 += 0x10;
    0x00513c68 sw s1, -4(a1)                 |     *((a1 - 1)) = s1;
    0x00513c6c jalr t9                       |     t9 ();
    0x00513c70 lw v1, 0x430(sp)              |     v1 = *(var_430h);
    0x00513c74 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00513c78 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != v1) {
    0x00513c7c beq v0, v1, 0x513cb4          |         
    0x00513c80 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x00513c84 lw t9, -0x6a10(gp)            |         t9 = sym.php_stream_wrapper_log_error;
    0x00513c88 lw a1, 0xd3c(sp)              |         a1 = *(arg_d3ch);
    0x00513c8c lw a0, 0xd30(sp)              |         a0 = *(arg_d30h);
                                             |         /* str.Cannot_connect_to_HTTPS_server_through_proxy */
    0x00513c90 addiu a2, a2, -0x5b80         |         a2 += -0x5b80;
    0x00513c94 jalr t9                       |         t9 ();
    0x00513c98 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00513c9c move a0, s6                   |         a0 = s6;
    0x00513ca0 addiu a1, zero, 3             |         a1 = 3;
    0x00513ca4 lw t9, -0x7a1c(gp)            |         t9 = sym._php_stream_free;
    0x00513ca8 move s6, zero                 |         s6 = 0;
    0x00513cac jalr t9                       |         t9 ();
    0x00513cb0 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00513cb4 lw a0, 0x430(sp)              |     a0 = *(var_430h);
                                             |     if (a0 != 0) {
    0x00513cb8 beqz a0, 0x513d00             |         
    0x00513cbc nop                           |         
    0x00513cc0 lbu v0, 5(a0)                 |         v0 = *((a0 + 5));
    0x00513cc4 andi v1, v0, 2                |         v1 = v0 & 2;
                                             |         if (v1 == 0) {
    0x00513cc8 bnez v1, 0x513cfc             |             
    0x00513ccc nop                           |             
    0x00513cd0 lw v1, (a0)                   |             v1 = *(a0);
    0x00513cd4 addiu v1, v1, -1              |             v1 += -1;
    0x00513cd8 sw v1, (a0)                   |             *(a0) = v1;
                                             |             if (v1 != 0) {
    0x00513cdc bnez v1, 0x513cfc             |                 goto label_22;
                                             |             }
    0x00513ce0 andi v0, v0, 1                |             v0 &= 1;
    0x00513ce4 lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
                                             |             if (v0 == 0) {
    0x00513ce8 beqz v0, 0x513f90             |                 goto label_121;
                                             |             }
    0x00513cec lw t9, -0x5e90(gp)            |             t9 = *((gp - 6052));
    0x00513cf0 jalr t9                       |             t9 ();
    0x00513cf4 nop                           |             
    0x00513cf8 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
                                             | label_22:
    0x00513cfc sw zero, 0x430(sp)            |         *(var_430h) = 0;
                                             |     }
    0x00513d00 lw t9, -0x7a74(gp)            |     t9 = sym._php_stream_get_line;
                                             |     if (s6 == 0) {
    0x00513d04 beqz s6, 0x516a00             |         goto label_108;
                                             |     }
    0x00513d08 sw zero, 0x434(sp)            |     *(var_434h) = 0;
    0x00513d0c addiu s1, sp, 0x30            |     s1 = sp + 0x30;
    0x00513d10 addiu s2, zero, 0x2401        |     s2 = 0x2401;
                                             |     do {
    0x00513d14 move a3, zero                 |         a3 = 0;
                                             | label_5:
    0x00513d18 addiu a2, zero, 0x3ff         |         a2 = 0x3ff;
    0x00513d1c move a1, s1                   |         a1 = s1;
    0x00513d20 move a0, s6                   |         a0 = s6;
    0x00513d24 jalr t9                       |         t9 ();
    0x00513d28 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00513d2c beqz v0, 0x513d50             |             goto label_122;
                                             |         }
    0x00513d30 lbu v0, 0x30(sp)              |         v0 = *(var_30h);
    0x00513d34 sltiu v1, v0, 0xe             |         v1 = (v0 < 0xe) ? 1 : 0;
    0x00513d38 lw t9, -0x7a74(gp)            |         t9 = sym._php_stream_get_line;
    0x00513d3c beqz v1, 0x513d14             |         
                                             |     } while (v1 == 0);
    0x00513d40 srlv v0, s2, v0               |     v0 = s2 >> v0;
    0x00513d44 ext v0, v0, 0, 1              |     __asm ("ext v0, v0, 0, 1");
    0x00513d48 move a3, zero                 |     a3 = 0;
                                             |     if (v0 == 0) {
    0x00513d4c beqz v0, 0x513d18             |         goto label_5;
                                             |     }
                                             | label_122:
    0x00513d50 lw t9, -0x6a08(gp)            |     t9 = sym.php_stream_xport_crypto_setup;
    0x00513d54 move a2, zero                 |     a2 = 0;
    0x00513d58 addiu a1, zero, 0x39          |     a1 = 0x39;
    0x00513d5c move a0, s6                   |     a0 = s6;
    0x00513d60 jalr t9                       |     t9 ();
    0x00513d64 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 >= 0) {
    0x00513d68 bgez v0, 0x513fa0             |         goto label_123;
                                             |     }
                                             | label_23:
    0x00513d6c lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
    0x00513d70 lw t9, -0x6a10(gp)            |     t9 = sym.php_stream_wrapper_log_error;
    0x00513d74 lw a1, 0xd3c(sp)              |     a1 = *(arg_d3ch);
    0x00513d78 lw a0, 0xd30(sp)              |     a0 = *(arg_d30h);
                                             |     /* str.Cannot_connect_to_HTTPS_server_through_proxy */
    0x00513d7c addiu a2, a2, -0x5b80         |     a2 += -0x5b80;
    0x00513d80 jalr t9                       |     t9 ();
    0x00513d84 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513d88 addiu a1, zero, 3             |     a1 = 3;
    0x00513d8c move a0, s6                   |     a0 = s6;
    0x00513d90 lw t9, -0x7a1c(gp)            |     t9 = sym._php_stream_free;
    0x00513d94 move s7, zero                 |     s7 = 0;
    0x00513d98 jalr t9                       |     t9 ();
    0x00513d9c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513da0 sw zero, 0xcf0(sp)            |     *(var_cf0h) = 0;
    0x00513da4 sw zero, 0xce4(sp)            |     *(var_ce4h) = 0;
    0x00513da8 sw zero, 0xcec(sp)            |     *(var_cech) = 0;
    0x00513dac move s1, zero                 |     s1 = 0;
                                             | label_40:
    0x00513db0 move s6, zero                 |     s6 = 0;
    0x00513db4 b 0x51640c                    |     goto label_82;
                                             | label_111:
    0x00513db8 lw a0, 0x10(v0)               |     a0 = *((v0 + 4));
    0x00513dbc b 0x51380c                    |     goto label_6;
                                             | label_119:
    0x00513dc0 lbu v1, 8(s3)                 |     v1 = *((s3 + 8));
                                             |     if (v1 != v0) {
    0x00513dc4 bne v1, v0, 0x513e48          |         goto label_9;
                                             |     }
    0x00513dc8 nop                           |     
    0x00513dcc lw s2, (s3)                   |     s2 = *(s3);
    0x00513dd0 addiu s7, zero, 0x20          |     s7 = 0x20;
    0x00513dd4 addiu s2, s2, 0x10            |     s2 += 0x10;
                                             |     do {
    0x00513dd8 lb v0, (s2)                   |         v0 = *(s2);
    0x00513ddc addiu s1, s2, 1               |         s1 = s2 + 1;
                                             |         if (v0 != s7) {
    0x00513de0 beq v0, s7, 0x513e50          |             
    0x00513de4 addiu v1, zero, 9             |             v1 = 9;
                                             |             if (v0 == v1) {
    0x00513de8 beq v0, v1, 0x513e50          |                 goto label_124;
                                             |             }
    0x00513dec nop                           |             
    0x00513df0 move s1, s2                   |             s1 = s2;
    0x00513df4 addiu a0, zero, 0xd           |             a0 = 0xd;
    0x00513df8 addiu v1, zero, 0xa           |             v1 = 0xa;
                                             | label_8:
    0x00513dfc lb v0, (s1)                   |             v0 = *(s1);
                                             |             if (v0 != 0) {
    0x00513e00 beqz v0, 0x513e48             |                 
    0x00513e04 nop                           |                 
    0x00513e08 addiu a1, zero, 0x3a          |                 a1 = 0x3a;
                                             |                 if (v0 == a1) {
    0x00513e0c beq v0, a1, 0x516a3c          |                     goto label_125;
                                             |                 }
    0x00513e10 nop                           |                 
                                             |                 if (v0 != a0) {
    0x00513e14 beq v0, a0, 0x513e24          |                     
    0x00513e18 nop                           |                     
                                             |                     if (v0 != v1) {
    0x00513e1c bne v0, v1, 0x513e58          |                         goto label_126;
                                             |                     }
    0x00513e20 nop                           |                     
                                             |                 }
                                             | label_10:
    0x00513e24 addiu a0, zero, 0xd           |                 a0 = 0xd;
                                             | label_12:
    0x00513e28 addiu v1, zero, 0xa           |                 v1 = 0xa;
                                             | label_13:
    0x00513e2c lb v0, (s1)                   |                 v0 = *(s1);
                                             |                 if (v0 == a0) {
    0x00513e30 beq v0, a0, 0x513e9c          |                     goto label_127;
                                             |                 }
    0x00513e34 nop                           |                 
                                             |                 if (v0 == v1) {
    0x00513e38 beq v0, v1, 0x513e9c          |                     goto label_127;
                                             |                 }
    0x00513e3c nop                           |                 
                                             |                 if (v0 != 0) {
    0x00513e40 bnez v0, 0x513e50             |                     goto label_124;
                                             |                 }
    0x00513e44 nop                           |                 
                                             |             }
                                             | label_9:
    0x00513e48 addiu s3, s3, 0x18            |             s3 += 0x18;
    0x00513e4c b 0x513bf0                    |             goto label_7;
                                             |         }
                                             | label_124:
    0x00513e50 move s2, s1                   |         s2 = s1;
    0x00513e54 b 0x513dd8                    |         
                                             |     } while (1);
                                             | label_126:
    0x00513e58 addiu s1, s1, 1               |     s1++;
    0x00513e5c b 0x513dfc                    |     goto label_8;
                                             | label_94:
    0x00513e60 addiu s1, s1, 1               |     s1++;
    0x00513e64 b 0x516a70                    |     goto label_128;
                                             | label_11:
    0x00513e68 lb v0, (s1)                   |     v0 = *(s1);
                                             |     if (v0 == 0) {
    0x00513e6c beqz v0, 0x513e48             |         goto label_9;
                                             |     }
    0x00513e70 nop                           |     
                                             |     if (v0 == a0) {
    0x00513e74 beq v0, a0, 0x513e24          |         goto label_10;
                                             |     }
    0x00513e78 nop                           |     
    0x00513e7c addiu s1, s1, 1               |     s1++;
                                             |     if (v0 != v1) {
    0x00513e80 bne v0, v1, 0x513e68          |         goto label_11;
                                             |     }
    0x00513e84 addiu s1, s1, -1              |     s1 += -1;
    0x00513e88 addiu a0, zero, 0xd           |     a0 = 0xd;
    0x00513e8c b 0x513e28                    |     goto label_12;
                                             | label_93:
    0x00513e90 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             | label_92:
    0x00513e94 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00513e98 b 0x513e68                    |     goto label_11;
                                             | label_127:
    0x00513e9c addiu s1, s1, 1               |     s1++;
    0x00513ea0 b 0x513e2c                    |     goto label_13;
                                             |     if (v1 != a0) {
                                             | label_118:
    0x00513ea4 bne v1, a0, 0x513bfc          |         goto label_14;
                                             |     }
    0x00513ea8 nop                           |     
    0x00513eac lw s2, (v0)                   |     s2 = *(v0);
    0x00513eb0 lw v0, 0xc(s2)                |     v0 = *((s2 + 3));
    0x00513eb4 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00513eb8 beqz v0, 0x513c00             |         goto label_15;
                                             |     }
    0x00513ebc lw s3, -0x7fc0(gp)            |     s3 = *((gp - 8176));
    0x00513ec0 addiu s2, s2, 0x10            |     s2 += 0x10;
    0x00513ec4 addiu s7, zero, 0x20          |     s7 = 0x20;
                                             |     /* str.Proxy_Authorization: */
    0x00513ec8 addiu s3, s3, -0x5b98         |     s3 += -0x5b98;
                                             | label_16:
    0x00513ecc lb v0, (s2)                   |     v0 = *(s2);
    0x00513ed0 addiu v1, zero, 9             |     v1 = 9;
                                             |     if (v0 == s7) {
    0x00513ed4 beq v0, s7, 0x513f38          |         goto label_129;
                                             |     }
    0x00513ed8 move s1, s2                   |     s1 = s2;
                                             |     if (v0 == v1) {
    0x00513edc beq v0, v1, 0x513f38          |         goto label_129;
                                             |     }
    0x00513ee0 addiu a0, zero, 0xd           |     a0 = 0xd;
    0x00513ee4 addiu v1, zero, 0xa           |     v1 = 0xa;
                                             | label_17:
    0x00513ee8 lb v0, (s1)                   |     v0 = *(s1);
    0x00513eec addiu a1, zero, 0x3a          |     a1 = 0x3a;
                                             |     if (v0 == 0) {
    0x00513ef0 beqz v0, 0x513bfc             |         goto label_14;
                                             |     }
                                             |     if (v0 == a1) {
    0x00513ef4 beq v0, a1, 0x516b40          |         goto label_130;
                                             |     }
    0x00513ef8 nop                           |     
                                             |     if (v0 != a0) {
    0x00513efc beq v0, a0, 0x513f0c          |         
    0x00513f00 nop                           |         
                                             |         if (v0 != v1) {
    0x00513f04 bne v0, v1, 0x513f44          |             goto label_131;
                                             |         }
    0x00513f08 nop                           |         
                                             |     }
                                             | label_18:
    0x00513f0c addiu a0, zero, 0xd           |     a0 = 0xd;
                                             | label_20:
    0x00513f10 addiu v1, zero, 0xa           |     v1 = 0xa;
                                             | label_21:
    0x00513f14 lb v0, (s1)                   |     v0 = *(s1);
                                             |     if (v0 == a0) {
    0x00513f18 beq v0, a0, 0x513f88          |         goto label_132;
                                             |     }
    0x00513f1c nop                           |     
                                             |     if (v0 == v1) {
    0x00513f20 beq v0, v1, 0x513f88          |         goto label_132;
                                             |     }
    0x00513f24 nop                           |     
    0x00513f28 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00513f2c bnez v0, 0x513f3c             |         
    0x00513f30 b 0x513c00                    |         goto label_15;
    0x00513f34 nop                           |         
                                             | label_129:
    0x00513f38 addiu s1, s2, 1               |         s1 = s2 + 1;
                                             |     }
    0x00513f3c move s2, s1                   |     s2 = s1;
    0x00513f40 b 0x513ecc                    |     goto label_16;
                                             | label_131:
    0x00513f44 addiu s1, s1, 1               |     s1++;
    0x00513f48 b 0x513ee8                    |     goto label_17;
                                             | label_95:
    0x00513f4c move s3, s1                   |     s3 = s1;
    0x00513f50 b 0x516aac                    |     goto label_133;
                                             | label_19:
    0x00513f54 lb v0, (s1)                   |     v0 = *(s1);
                                             |     if (v0 == 0) {
    0x00513f58 beqz v0, 0x513bfc             |         goto label_14;
                                             |     }
    0x00513f5c nop                           |     
                                             |     if (v0 == a0) {
    0x00513f60 beq v0, a0, 0x513f0c          |         goto label_18;
                                             |     }
    0x00513f64 nop                           |     
    0x00513f68 addiu s1, s1, 1               |     s1++;
                                             |     if (v0 != v1) {
    0x00513f6c bne v0, v1, 0x513f54          |         goto label_19;
                                             |     }
    0x00513f70 addiu s1, s1, -1              |     s1 += -1;
    0x00513f74 addiu a0, zero, 0xd           |     a0 = 0xd;
    0x00513f78 b 0x513f10                    |     goto label_20;
                                             | label_97:
    0x00513f7c addiu a0, zero, 0xd           |     a0 = 0xd;
                                             | label_96:
    0x00513f80 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00513f84 b 0x513f54                    |     goto label_19;
                                             | label_132:
    0x00513f88 addiu s1, s1, 1               |     s1++;
    0x00513f8c b 0x513f14                    |     goto label_21;
                                             | label_121:
    0x00513f90 jalr t9                       |     t9 ();
    0x00513f94 nop                           |     
    0x00513f98 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513f9c b 0x513cfc                    |     goto label_22;
                                             | label_123:
    0x00513fa0 lw t9, -0x6a04(gp)            |     t9 = sym.php_stream_xport_crypto_enable;
    0x00513fa4 addiu a1, zero, 1             |     a1 = 1;
    0x00513fa8 move a0, s6                   |     a0 = s6;
    0x00513fac jalr t9                       |     t9 ();
    0x00513fb0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 < 0) {
    0x00513fb4 bltz v0, 0x513d6c             |         goto label_23;
                                             |     }
    0x00513fb8 lw v0, 0xd3c(sp)              |     v0 = *(arg_d3ch);
                                             | label_109:
    0x00513fbc andi v0, v0, 0x20             |     v0 &= 0x20;
    0x00513fc0 lw t9, -0x7a58(gp)            |     t9 = sym._php_stream_set_option;
                                             |     if (v0 == 0) {
    0x00513fc4 beqz v0, 0x5141c4             |         goto label_134;
                                             |     }
    0x00513fc8 move a3, zero                 |     a3 = 0;
    0x00513fcc addiu a2, zero, 1             |     a2 = 1;
    0x00513fd0 addiu a1, zero, 5             |     a1 = 5;
    0x00513fd4 move a0, s6                   |     a0 = s6;
    0x00513fd8 jalr t9                       |     t9 ();
    0x00513fdc lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00513fe0 sw v0, 0xcec(sp)              |     *(var_cech) = v0;
                                             |     do {
    0x00513fe4 lw v0, 0x4c(s6)               |         v0 = *(var_d1ch);
    0x00513fe8 lw t9, -0x6a18(gp)            |         t9 = sym.php_stream_context_set;
    0x00513fec andi v1, v0, 0xc              |         v1 = v0 & 0xc;
    0x00513ff0 sw v1, 0xcf0(sp)              |         *(var_cf0h) = v1;
    0x00513ff4 addiu v1, zero, -0xd          |         v1 = -0xd;
    0x00513ff8 and v0, v0, v1                |         v0 &= v1;
    0x00513ffc sw v0, 0x4c(s6)               |         *(var_d1ch) = v0;
    0x00514000 move a1, s0                   |         a1 = s0;
    0x00514004 move a0, s6                   |         a0 = s6;
    0x00514008 jalr t9                       |         t9 ();
    0x0051400c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (s0 == 0) {
    0x00514010 beqz s0, 0x51421c             |             goto label_135;
                                             |         }
    0x00514014 lw v0, (s0)                   |         v0 = *(s0);
    0x00514018 lw t9, -0x6a14(gp)            |         t9 = sym.php_stream_notification_notify;
                                             |         if (v0 != 0) {
    0x0051401c beqz v0, 0x514048             |             
    0x00514020 sw zero, 0x1c(sp)             |             *(var_1ch) = 0;
    0x00514024 sw zero, 0x18(sp)             |             *(var_18h) = 0;
    0x00514028 sw zero, 0x14(sp)             |             *(var_14h) = 0;
    0x0051402c sw zero, 0x10(sp)             |             *(var_10h) = 0;
    0x00514030 move a3, zero                 |             a3 = 0;
    0x00514034 move a2, zero                 |             a2 = 0;
    0x00514038 addiu a1, zero, 2             |             a1 = 2;
    0x0051403c move a0, s0                   |             a0 = s0;
    0x00514040 jalr t9                       |             t9 ();
    0x00514044 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00514048 lw v0, 0xce8(sp)              |         v0 = *(var_ce8h);
    0x0051404c lw a2, -0x7fb8(gp)            |         a2 = *(gp);
                                             |         if (v0 != 0) {
    0x00514050 beqz v0, 0x51407c             |             
    0x00514054 lw a2, -0x7fc0(gp)            |             a2 = *((gp - 8176));
    0x00514058 lw v0, 0xcdc(sp)              |             v0 = *(var_cdch);
    0x0051405c lw t9, -0x6a00(gp)            |             t9 = sym.php_stream_context_get_option;
                                             |             /* str.max_redirects */
    0x00514060 addiu a2, a2, -0x5b50         |             a2 += -0x5b50;
    0x00514064 addiu a1, v0, -0x27a0         |             a1 = v0 + -0x27a0;
    0x00514068 move a0, s0                   |             a0 = s0;
    0x0051406c jalr t9                       |             t9 ();
    0x00514070 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 != 0) {
    0x00514074 bnez v0, 0x5141cc             |                 goto label_136;
                                             |             }
                                             | label_24:
    0x00514078 lw a2, -0x7fb8(gp)            |             a2 = *(gp);
                                             |         }
    0x0051407c lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
    0x00514080 lw t9, -0x6a00(gp)            |         t9 = sym.php_stream_context_get_option;
                                             |         /* esilref: 'method' */
    0x00514084 addiu a2, a2, 0x45c0          |         a2 += 0x45c0;
    0x00514088 addiu a1, v0, -0x27a0         |         a1 = v0 + -0x27a0;
    0x0051408c move a0, s0                   |         a0 = s0;
    0x00514090 jalr t9                       |         t9 ();
    0x00514094 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00514098 beqz v0, 0x51421c             |             goto label_135;
                                             |         }
    0x0051409c lbu a0, 8(v0)                 |         a0 = *((v0 + 8));
    0x005140a0 addiu v1, zero, 6             |         v1 = 6;
                                             |         if (a0 != v1) {
    0x005140a4 bne a0, v1, 0x51421c          |             goto label_135;
                                             |         }
    0x005140a8 nop                           |         
    0x005140ac lw s2, (v0)                   |         s2 = *(v0);
    0x005140b0 lw s3, 0xc(s2)                |         s3 = *((s2 + 3));
    0x005140b4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (s3 == 0) {
    0x005140b8 beqz s3, 0x514220             |             goto label_137;
                                             |         }
    0x005140bc lw v1, 0xd4c(sp)              |         v1 = *(arg_d4ch);
    0x005140c0 addiu v0, zero, 1             |         v0 = 1;
    0x005140c4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v1 != v0) {
    0x005140c8 beq v1, v0, 0x514100          |             
    0x005140cc addiu v0, zero, 3             |             v0 = 3;
    0x005140d0 addiu v0, zero, 4             |             v0 = 4;
                                             |             if (s3 != v0) {
    0x005140d4 bne s3, v0, 0x5141f8          |                 goto label_138;
                                             |             }
    0x005140d8 lw a0, -0x7fc0(gp)            |             a0 = *((gp - 8176));
    0x005140dc addiu a2, zero, 3             |             a2 = 3;
    0x005140e0 addiu a1, s2, 0x10            |             a1 = s2 + 0x10;
                                             |             /* esilref: 'GET' */
    0x005140e4 addiu a0, a0, -0x5b40         |             a0 += -0x5b40;
                                             | label_25:
    0x005140e8 lw t9, -0x5cf0(gp)            |             t9 = sym.imp.memcmp;
    0x005140ec jalr t9                       |             t9 ();
    0x005140f0 nop                           |             
    0x005140f4 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 != 0) {
    0x005140f8 bnez v0, 0x51421c             |                 goto label_135;
                                             |             }
    0x005140fc lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |         }
    0x00514100 addiu s2, s2, 0x10            |         s2 += 0x10;
                                             |         if (v0 == 0) {
    0x00514104 beqz v0, 0x514214             |             goto label_139;
                                             |         }
    0x00514108 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x0051410c lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00514110 addu s1, s3, s1               |         s1 = s3 + s1;
    0x00514114 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00514118 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 == 0) {
    0x0051411c bnez v0, 0x514138             |             
                                             | label_26:
    0x00514120 lw t9, -0x7ed0(gp)            |             t9 = sym.smart_str_erealloc;
    0x00514124 move a1, s1                   |             a1 = s1;
    0x00514128 addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x0051412c jalr t9                       |             t9 ();
    0x00514130 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514134 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |         }
    0x00514138 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x0051413c addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00514140 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00514144 move a1, s2                   |         a1 = s2;
    0x00514148 move a2, s3                   |         a2 = s3;
    0x0051414c addu a0, a0, v0               |         a0 += v0;
    0x00514150 jalr t9                       |         t9 ();
    0x00514154 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00514158 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051415c addiu s2, s1, 1               |         s2 = s1 + 1;
    0x00514160 sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00514164 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00514168 sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x0051416c lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 == 0) {
    0x00514170 bnez v0, 0x51418c             |             
    0x00514174 lw t9, -0x7ed0(gp)            |             t9 = sym.smart_str_erealloc;
    0x00514178 move a1, s2                   |             a1 = s2;
    0x0051417c addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00514180 jalr t9                       |             t9 ();
    0x00514184 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514188 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |         }
    0x0051418c addiu v1, zero, 0x20          |         v1 = 0x20;
    0x00514190 addu s1, v0, s1               |         s1 = v0 + s1;
    0x00514194 sb v1, 0x10(s1)               |         *((s1 + 16)) = v1;
    0x00514198 sw s2, 0xc(v0)                |         *((v0 + 3)) = s2;
                                             |         if (s4 == 0) {
    0x0051419c beqz s4, 0x514290             |             goto label_140;
                                             |         }
                                             | label_27:
    0x005141a0 lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
    0x005141a4 lw a0, 0xd34(sp)              |         a0 = *(arg_d34h);
    0x005141a8 jalr t9                       |         t9 ();
    0x005141ac move s2, v0                   |         s2 = v0;
    0x005141b0 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x005141b4 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x005141b8 bnez v0, 0x5143f8             |             goto label_141;
                                             |         }
    0x005141bc move s1, s2                   |         s1 = s2;
    0x005141c0 b 0x514410                    |         goto label_142;
                                             | label_134:
    0x005141c4 sw zero, 0xcec(sp)            |         *(var_cech) = 0;
    0x005141c8 b 0x513fe4                    |         
                                             |     } while (1);
                                             | label_136:
    0x005141cc lbu a0, 8(v0)                 |     a0 = *((v0 + 8));
    0x005141d0 addiu v1, zero, 4             |     v1 = 4;
    0x005141d4 lw t9, -0x7ebc(gp)            |     t9 = sym._zval_get_long_func;
                                             |     if (a0 != v1) {
    0x005141d8 bne a0, v1, 0x5141e8          |         goto label_143;
                                             |     }
    0x005141dc lw v0, (v0)                   |     v0 = *(v0);
                                             |     do {
    0x005141e0 sw v0, 0xd48(sp)              |         *(arg_d48h) = v0;
    0x005141e4 b 0x514078                    |         goto label_24;
                                             | label_143:
    0x005141e8 move a0, v0                   |         a0 = v0;
    0x005141ec jalr t9                       |         t9 ();
    0x005141f0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005141f4 b 0x5141e0                    |         
                                             |     } while (1);
                                             | label_138:
    0x005141f8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (s3 == v0) {
    0x005141fc bne s3, v0, 0x514220          |         
    0x00514200 lw a0, -0x7fc0(gp)            |         a0 = *((gp - 8176));
    0x00514204 addiu a2, zero, 4             |         a2 = 4;
    0x00514208 addiu a1, s2, 0x10            |         a1 = s2 + 0x10;
                                             |         /* str.HEAD */
    0x0051420c addiu a0, a0, -0x5b3c         |         a0 += -0x5b3c;
    0x00514210 b 0x5140e8                    |         goto label_25;
                                             | label_139:
    0x00514214 move s1, s3                   |         s1 = s3;
    0x00514218 b 0x514120                    |         goto label_26;
                                             | label_135:
    0x0051421c lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
                                             | label_137:
    0x00514220 addiu s1, zero, 4             |     s1 = 4;
                                             |     if (v0 != 0) {
    0x00514224 beqz v0, 0x514240             |         
    0x00514228 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x0051422c lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00514230 addiu s1, s1, 4               |         s1 += 4;
    0x00514234 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00514238 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x0051423c bnez v0, 0x514258             |             goto label_144;
                                             |         }
                                             |     }
    0x00514240 lw t9, -0x7ed0(gp)            |     t9 = sym.smart_str_erealloc;
    0x00514244 move a1, s1                   |     a1 = s1;
    0x00514248 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x0051424c jalr t9                       |     t9 ();
    0x00514250 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514254 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_144:
    0x00514258 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x0051425c addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00514260 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00514264 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00514268 addiu a2, zero, 4             |     a2 = 4;
                                             |     /* str.GET_ */
    0x0051426c addiu a1, a1, -0x5b34         |     a1 += -0x5b34;
    0x00514270 addu a0, a0, v0               |     a0 += v0;
    0x00514274 jalr t9                       |     t9 ();
    0x00514278 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x0051427c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514280 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
                                             |     if (s4 != 0) {
    0x00514284 bnez s4, 0x5141a0             |         goto label_27;
                                             |     }
                                             |     if (s0 == 0) {
    0x00514288 beqz s0, 0x5142cc             |         goto label_145;
                                             |     }
    0x0051428c nop                           |     
                                             | label_140:
    0x00514290 lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
    0x00514294 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
    0x00514298 lw t9, -0x6a00(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.request_fulluri */
    0x0051429c addiu a2, a2, -0x5b2c         |     a2 += -0x5b2c;
    0x005142a0 addiu a1, v0, -0x27a0         |     a1 = v0 + -0x27a0;
    0x005142a4 move a0, s0                   |     a0 = s0;
    0x005142a8 jalr t9                       |     t9 ();
    0x005142ac lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x005142b0 beqz v0, 0x5142cc             |         goto label_145;
                                             |     }
    0x005142b4 lw t9, -0x7ec0(gp)            |     t9 = sym.zend_is_true;
    0x005142b8 move a0, v0                   |     a0 = v0;
    0x005142bc jalr t9                       |     t9 ();
    0x005142c0 andi v0, v0, 0xff             |     v0 &= 0xff;
    0x005142c4 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x005142c8 bnez v0, 0x5141a0             |         goto label_27;
                                             |     }
                                             | label_145:
    0x005142cc lw s2, 0x14(fp)               |     s2 = *(arg_d44h);
    0x005142d0 lw s1, 0xcc0(sp)              |     s1 = *(var_cc0h);
                                             |     if (s2 == 0) {
    0x005142d4 beqz s2, 0x514a98             |         goto label_146;
                                             |     }
    0x005142d8 lb v0, (s2)                   |     v0 = *(s2);
    0x005142dc lw t9, -0x5f58(gp)            |     t9 = sym.imp.strlen;
                                             |     if (v0 == 0) {
    0x005142e0 beqz v0, 0x514a98             |         goto label_146;
                                             |     }
    0x005142e4 move a0, s2                   |     a0 = s2;
    0x005142e8 jalr t9                       |     t9 ();
    0x005142ec move s3, v0                   |     s3 = v0;
    0x005142f0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (s1 == 0) {
    0x005142f4 beqz s1, 0x514a90             |         goto label_147;
                                             |     }
    0x005142f8 lw s1, 0xc(s1)                |     s1 = *((s1 + 3));
    0x005142fc addu s1, v0, s1               |     s1 = v0 + s1;
    0x00514300 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00514304 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00514308 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x0051430c bnez v0, 0x514328             |     
                                             |     while (1) {
    0x00514310 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00514314 move a1, s1                   |         a1 = s1;
    0x00514318 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x0051431c jalr t9                       |         t9 ();
    0x00514320 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514324 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00514328 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x0051432c addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00514330 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00514334 move a2, s3                   |         a2 = s3;
    0x00514338 move a1, s2                   |         a1 = s2;
    0x0051433c addu a0, a0, v0               |         a0 += v0;
    0x00514340 jalr t9                       |         t9 ();
    0x00514344 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514348 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_28:
    0x0051434c sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00514350 lw v0, 0x18(fp)               |         v0 = *(arg_d48h);
    0x00514354 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00514358 beqz v0, 0x514450             |             
    0x0051435c addiu s1, zero, 1             |             s1 = 1;
                                             |             if (v0 != 0) {
    0x00514360 beqz v0, 0x51437c             |                 
    0x00514364 lw s1, 0xc(v0)                |                 s1 = *((v0 + 3));
    0x00514368 lw v0, 0xcc4(sp)              |                 v0 = *(var_cc4h);
    0x0051436c addiu s1, s1, 1               |                 s1++;
    0x00514370 sltu v0, s1, v0               |                 v0 = (s1 < v0) ? 1 : 0;
    0x00514374 lw v0, 0xcc0(sp)              |                 v0 = *(var_cc0h);
                                             |                 if (v0 != 0) {
    0x00514378 bnez v0, 0x514394             |                     goto label_148;
                                             |                 }
                                             |             }
    0x0051437c lw t9, -0x7ed0(gp)            |             t9 = sym.smart_str_erealloc;
    0x00514380 move a1, s1                   |             a1 = s1;
    0x00514384 addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00514388 jalr t9                       |             t9 ();
    0x0051438c lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514390 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             | label_148:
    0x00514394 addiu a0, zero, 0x3f          |             a0 = 0x3f;
    0x00514398 addu v1, v0, s1               |             v1 = v0 + s1;
    0x0051439c lw t9, -0x5f58(gp)            |             t9 = sym.imp.strlen;
    0x005143a0 sb a0, 0xf(v1)                |             *((v1 + 15)) = a0;
    0x005143a4 lw s2, 0x18(fp)               |             s2 = *(arg_d48h);
    0x005143a8 sw s1, 0xc(v0)                |             *((v0 + 3)) = s1;
    0x005143ac move a0, s2                   |             a0 = s2;
    0x005143b0 jalr t9                       |             t9 ();
    0x005143b4 addu s1, v0, s1               |             s1 = v0 + s1;
    0x005143b8 move s3, v0                   |             s3 = v0;
    0x005143bc lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x005143c0 sltu v0, s1, v0               |             v0 = (s1 < v0) ? 1 : 0;
    0x005143c4 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x005143c8 bnez v0, 0x5143e0             |                 
    0x005143cc lw t9, -0x7ed0(gp)            |                 t9 = sym.smart_str_erealloc;
    0x005143d0 move a1, s1                   |                 a1 = s1;
    0x005143d4 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x005143d8 jalr t9                       |                 t9 ();
    0x005143dc lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x005143e0 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x005143e4 move a2, s3                   |             a2 = s3;
    0x005143e8 addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x005143ec move a1, s2                   |             a1 = s2;
    0x005143f0 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x005143f4 b 0x514438                    |             goto label_149;
                                             | label_141:
    0x005143f8 lw s1, 0xc(v0)                |             s1 = *((v0 + 3));
    0x005143fc lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00514400 addu s1, s2, s1               |             s1 = s2 + s1;
    0x00514404 sltu v0, s1, v0               |             v0 = (s1 < v0) ? 1 : 0;
    0x00514408 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 == 0) {
    0x0051440c bnez v0, 0x514428             |                 
                                             | label_142:
    0x00514410 lw t9, -0x7ed0(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00514414 move a1, s1                   |                 a1 = s1;
    0x00514418 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x0051441c jalr t9                       |                 t9 ();
    0x00514420 lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00514424 lw v0, 0xcc0(sp)              |                 v0 = *(var_cc0h);
                                             |             }
    0x00514428 lw a1, 0xd34(sp)              |             a1 = *(arg_d34h);
    0x0051442c addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x00514430 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x00514434 move a2, s2                   |             a2 = s2;
                                             | label_149:
    0x00514438 lw t9, -0x5f48(gp)            |             t9 = sym.imp.memcpy;
    0x0051443c addu a0, a0, v0               |             a0 += v0;
    0x00514440 jalr t9                       |             t9 ();
    0x00514444 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00514448 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x0051444c sw s1, 0xc(v0)                |             *((v0 + 3)) = s1;
                                             |         }
    0x00514450 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
                                             |         if (s0 == 0) {
    0x00514454 beqz s0, 0x514b00             |             goto label_150;
                                             |         }
    0x00514458 lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
    0x0051445c lw t9, -0x6a00(gp)            |         t9 = sym.php_stream_context_get_option;
                                             |         /* str.protocol_version */
    0x00514460 addiu a2, a2, -0x5b1c         |         a2 += -0x5b1c;
    0x00514464 addiu a1, v0, -0x27a0         |         a1 = v0 + -0x27a0;
    0x00514468 move a0, s0                   |         a0 = s0;
    0x0051446c jalr t9                       |         t9 ();
    0x00514470 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00514474 beqz v0, 0x514b00             |             goto label_150;
                                             |         }
    0x00514478 lbu a0, 8(v0)                 |         a0 = *((v0 + 8));
    0x0051447c addiu v1, zero, 5             |         v1 = 5;
    0x00514480 lw t9, -0x7eb8(gp)            |         t9 = sym._zval_get_double_func;
                                             |         if (a0 != v1) {
    0x00514484 bne a0, v1, 0x514ae8          |             goto label_151;
                                             |         }
    0x00514488 lw v1, 4(v0)                  |         v1 = *((v0 + 1));
    0x0051448c lw v0, (v0)                   |         v0 = *(v0);
                                             | label_29:
    0x00514490 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x00514494 lw t9, -0x7a0c(gp)            |         t9 = sym.zend_spprintf;
    0x00514498 sw v0, 0x10(sp)               |         *(var_10h) = v0;
    0x0051449c sw v1, 0x14(sp)               |         *(var_14h) = v1;
                                             |         /* str._.1F */
    0x005144a0 addiu a2, a2, -0x5b08         |         a2 += -0x5b08;
    0x005144a4 move a1, zero                 |         a1 = 0;
    0x005144a8 addiu a0, sp, 0x30            |         a0 = sp + 0x30;
    0x005144ac jalr t9                       |         t9 ();
    0x005144b0 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x005144b4 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x005144b8 beqz v0, 0x514af8             |             goto label_152;
                                             |         }
    0x005144bc lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x005144c0 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x005144c4 addiu s1, s1, 6               |         s1 += 6;
    0x005144c8 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x005144cc lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 == 0) {
    0x005144d0 bnez v0, 0x5144ec             |             
                                             | label_30:
    0x005144d4 lw t9, -0x7ed0(gp)            |             t9 = sym.smart_str_erealloc;
    0x005144d8 move a1, s1                   |             a1 = s1;
    0x005144dc addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x005144e0 jalr t9                       |             t9 ();
    0x005144e4 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005144e8 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |         }
    0x005144ec lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
    0x005144f0 addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x005144f4 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x005144f8 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x005144fc addiu a2, zero, 6             |         a2 = 6;
                                             |         /* str._HTTP_ */
    0x00514500 addiu a1, a1, -0x5b00         |         a1 += -0x5b00;
    0x00514504 addu a0, a0, v0               |         a0 += v0;
    0x00514508 jalr t9                       |         t9 ();
    0x0051450c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514510 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00514514 lw s2, 0x30(sp)               |         s2 = *(var_30h);
    0x00514518 lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
    0x0051451c sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00514520 move a0, s2                   |         a0 = s2;
    0x00514524 jalr t9                       |         t9 ();
    0x00514528 addu s1, v0, s1               |         s1 = v0 + s1;
    0x0051452c move s3, v0                   |         s3 = v0;
    0x00514530 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00514534 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00514538 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x0051453c bnez v0, 0x514554             |             
    0x00514540 lw t9, -0x7ed0(gp)            |             t9 = sym.smart_str_erealloc;
    0x00514544 move a1, s1                   |             a1 = s1;
    0x00514548 addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x0051454c jalr t9                       |             t9 ();
    0x00514550 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00514554 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00514558 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x0051455c addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00514560 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00514564 move a2, s3                   |         a2 = s3;
    0x00514568 move a1, s2                   |         a1 = s2;
    0x0051456c addu a0, a0, v0               |         a0 += v0;
    0x00514570 jalr t9                       |         t9 ();
    0x00514574 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00514578 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051457c sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00514580 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00514584 addiu s1, s1, 2               |         s1 += 2;
    0x00514588 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x0051458c lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |         if (v0 == 0) {
    0x00514590 bnez v0, 0x5145ac             |             
    0x00514594 lw t9, -0x7ed0(gp)            |             t9 = sym.smart_str_erealloc;
    0x00514598 move a1, s1                   |             a1 = s1;
    0x0051459c addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x005145a0 jalr t9                       |             t9 ();
    0x005145a4 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x005145a8 lw v1, 0xcc0(sp)              |             v1 = *(var_cc0h);
                                             |         }
    0x005145ac lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x005145b0 addiu v0, v1, 0x10            |         v0 = v1 + 0x10;
    0x005145b4 lw v1, 0xc(v1)                |         v1 = *((v1 + 3));
    0x005145b8 addu v0, v0, v1               |         v0 += v1;
    0x005145bc addiu v1, zero, 0xd           |         v1 = 0xd;
    0x005145c0 sb v1, (v0)                   |         *(v0) = v1;
    0x005145c4 addiu v1, zero, 0xa           |         v1 = 0xa;
    0x005145c8 sb v1, 1(v0)                  |         *((v0 + 1)) = v1;
    0x005145cc lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x005145d0 lw a0, 0x30(sp)               |         a0 = *(var_30h);
    0x005145d4 sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x005145d8 jalr t9                       |         t9 ();
    0x005145dc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             | label_31:
    0x005145e0 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x005145e4 lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
    0x005145e8 lw t9, -0x6a00(gp)            |         t9 = sym.php_stream_context_get_option;
                                             |         /* esilref: 'header' */
    0x005145ec addiu a2, a2, -0x5a1c         |         a2 += -0x5a1c;
    0x005145f0 addiu a1, v0, -0x27a0         |         a1 = v0 + -0x27a0;
    0x005145f4 move a0, s0                   |         a0 = s0;
    0x005145f8 jalr t9                       |         t9 ();
    0x005145fc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00514600 beqz v0, 0x514b6c             |             goto label_153;
                                             |         }
    0x00514604 lbu v1, 8(v0)                 |         v1 = *((v0 + 8));
    0x00514608 addiu a0, zero, 7             |         a0 = 7;
    0x0051460c addiu s7, sp, 0x30            |         s7 = sp + 0x30;
                                             |         if (v1 != a0) {
    0x00514610 bne v1, a0, 0x514c60          |             goto label_154;
                                             |         }
    0x00514614 lw v0, (v0)                   |         v0 = *(v0);
    0x00514618 addiu v1, zero, 0x18          |         v1 = 0x18;
    0x0051461c sw zero, 0x30(sp)             |         *(var_30h) = 0;
    0x00514620 lw s2, 0x10(v0)               |         s2 = *((v0 + 4));
    0x00514624 lw v0, 0x14(v0)               |         v0 = *((v0 + 5));
    0x00514628 sw zero, 0x34(sp)             |         *(var_34h) = 0;
    0x0051462c mul a0, v1, v0                |         __asm ("mul a0, v1, v0");
    0x00514630 addu v0, a0, s2               |         v0 = a0 + s2;
    0x00514634 sw v0, 0xce4(sp)              |         *(var_ce4h) = v0;
                                             | label_32:
    0x00514638 lw v0, 0xce4(sp)              |         v0 = *(var_ce4h);
    0x0051463c lw a0, 0x30(sp)               |         a0 = *(var_30h);
                                             |         if (s2 != v0) {
    0x00514640 bne s2, v0, 0x514b78          |             goto label_155;
                                             |         }
    0x00514644 lw t9, -0x6aec(gp)            |         t9 = sym.php_trim;
                                             |         if (a0 == 0) {
    0x00514648 beqz a0, 0x514b6c             |             goto label_153;
                                             |         }
    0x0051464c lw v0, 0xc(a0)                |         v0 = *((a0 + 3));
    0x00514650 addu v0, a0, v0               |         v0 = a0 + v0;
    0x00514654 addiu a3, zero, 3             |         a3 = 3;
    0x00514658 sb zero, 0x10(v0)             |         *((v0 + 16)) = 0;
    0x0051465c move a2, zero                 |         a2 = 0;
    0x00514660 move a1, zero                 |         a1 = 0;
    0x00514664 jalr t9                       |         t9 ();
    0x00514668 lw a0, 0x30(sp)               |         a0 = *(var_30h);
    0x0051466c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514670 move s2, v0                   |         s2 = v0;
                                             |         if (a0 != 0) {
    0x00514674 beqz a0, 0x5146b4             |             
    0x00514678 lbu v0, 5(a0)                 |             v0 = *((a0 + 5));
    0x0051467c andi v1, v0, 2                |             v1 = v0 & 2;
                                             |             if (v1 != 0) {
    0x00514680 bnez v1, 0x5146b4             |                 goto label_33;
                                             |             }
    0x00514684 nop                           |             
    0x00514688 lw v1, (a0)                   |             v1 = *(a0);
    0x0051468c addiu v1, v1, -1              |             v1 += -1;
    0x00514690 sw v1, (a0)                   |             *(a0) = v1;
                                             |             if (v1 != 0) {
    0x00514694 bnez v1, 0x5146b4             |                 goto label_33;
                                             |             }
    0x00514698 andi v0, v0, 1                |             v0 &= 1;
    0x0051469c lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
                                             |             if (v0 == 0) {
    0x005146a0 beqz v0, 0x514c50             |                 goto label_156;
                                             |             }
    0x005146a4 lw t9, -0x5e90(gp)            |             t9 = *((gp - 6052));
    0x005146a8 jalr t9                       |             t9 ();
    0x005146ac nop                           |             
    0x005146b0 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
                                             | label_33:
    0x005146b4 move s4, zero                 |         s4 = 0;
                                             |         if (s2 == 0) {
    0x005146b8 beqz s2, 0x514b70             |             goto label_34;
                                             |         }
    0x005146bc lw a1, 0xc(s2)                |         a1 = *((s2 + 3));
    0x005146c0 lw t9, -0x7e80(gp)            |         t9 = sym._estrndup;
                                             |         if (a1 == 0) {
    0x005146c4 beqz a1, 0x516b98             |             goto label_157;
                                             |         }
    0x005146c8 addiu s3, s2, 0x10            |         s3 = s2 + 0x10;
    0x005146cc move a0, s3                   |         a0 = s3;
    0x005146d0 jalr t9                       |         t9 ();
    0x005146d4 move s4, v0                   |         s4 = v0;
    0x005146d8 lbu v0, 5(s2)                 |         v0 = *((s2 + 5));
    0x005146dc andi v0, v0, 2                |         v0 &= 2;
    0x005146e0 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x005146e4 beqz v0, 0x514c98             |             goto label_158;
                                             |         }
    0x005146e8 lw s1, 0xc(s2)                |         s1 = *((s2 + 3));
                                             | label_36:
    0x005146ec lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x005146f0 addiu a0, s1, 0x18            |         a0 = s1 + 0x18;
    0x005146f4 addiu v0, zero, -8            |         v0 = -8;
    0x005146f8 and a0, a0, v0                |         a0 &= v0;
    0x005146fc jalr t9                       |         t9 ();
    0x00514700 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514704 move s2, v0                   |         s2 = v0;
    0x00514708 addiu v0, zero, 1             |         v0 = 1;
    0x0051470c sw v0, (s2)                   |         *(s2) = v0;
    0x00514710 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x00514714 addiu v0, zero, 6             |         v0 = 6;
    0x00514718 sw s1, 0xc(s2)                |         *((s2 + 3)) = s1;
    0x0051471c move a2, s1                   |         a2 = s1;
    0x00514720 addu s1, s2, s1               |         s1 = s2 + s1;
    0x00514724 sw v0, 4(s2)                  |         *((s2 + 1)) = v0;
    0x00514728 sw zero, 8(s2)                |         *((s2 + 2)) = 0;
    0x0051472c move a1, s3                   |         a1 = s3;
    0x00514730 addiu a0, s2, 0x10            |         a0 = s2 + 0x10;
    0x00514734 jalr t9                       |         t9 ();
    0x00514738 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051473c sb zero, 0x10(s1)             |         *((s1 + 16)) = 0;
                                             | label_35:
    0x00514740 lw t9, -0x779c(gp)            |         t9 = sym.php_strtolower;
    0x00514744 addiu s3, s2, 0x10            |         s3 = s2 + 0x10;
    0x00514748 lw a1, 0xc(s2)                |         a1 = *((s2 + 3));
    0x0051474c move a0, s3                   |         a0 = s3;
    0x00514750 bal 0x4f4f28                  |         sym_php_strtolower ();
    0x00514754 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514758 lw v0, -0x7fc0(gp)            |         v0 = *((gp - 8176));
    0x0051475c sw v0, 0xce4(sp)              |         *(var_ce4h) = v0;
    0x00514760 lw v0, 0xce8(sp)              |         v0 = *(var_ce8h);
    0x00514764 lw s7, -0x7fc0(gp)            |         s7 = *((gp - 8176));
                                             |         if (v0 == 0) {
    0x00514768 bnez v0, 0x5147a4             |             
    0x0051476c lw s1, -0x6a2c(gp)            |             s1 = *((gp - 6795));
    0x00514770 lw v0, -0x7fc0(gp)            |             v0 = *((gp - 8176));
                                             |             /* fcn.005132f8 */
    0x00514774 addiu s1, s1, 0x32f8          |             s1 += 0x32f8;
                                             |             /* str.content_length: */
    0x00514778 addiu a2, v0, -0x5af8         |             a2 = v0 + -0x5af8;
    0x0051477c move a1, s3                   |             a1 = s3;
    0x00514780 move t9, s1                   |             t9 = s1;
    0x00514784 move a0, s4                   |             a0 = s4;
    0x00514788 bal 0x5132f8                  |             fcn_005132f8 ();
                                             |             /* str.content_type: */
    0x0051478c addiu a2, s7, -0x5ae8         |             a2 = s7 + -0x5ae8;
    0x00514790 move a1, s3                   |             a1 = s3;
    0x00514794 move t9, s1                   |             t9 = s1;
    0x00514798 move a0, s4                   |             a0 = s4;
    0x0051479c bal 0x5132f8                  |             fcn_005132f8 ();
    0x005147a0 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x005147a4 lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
    0x005147a8 lw t9, -0x6024(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.user_agent: */
    0x005147ac addiu a1, a1, -0x5ad8         |         a1 += -0x5ad8;
    0x005147b0 move a0, s3                   |         a0 = s3;
    0x005147b4 jalr t9                       |         t9 ();
    0x005147b8 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x005147bc beqz v0, 0x514cb4             |             goto label_159;
                                             |         }
    0x005147c0 addiu s1, zero, 1             |         s1 = 1;
                                             |         if (s3 != v0) {
    0x005147c4 beq s3, v0, 0x5147f0          |             
    0x005147c8 lbu v0, -1(v0)                |             v0 = *((v0 - 1));
    0x005147cc addiu v0, v0, -9              |             v0 += -9;
    0x005147d0 andi v0, v0, 0xff             |             v0 &= 0xff;
    0x005147d4 sltiu v1, v0, 0x18            |             v1 = (v0 < 0x18) ? 1 : 0;
    0x005147d8 move s1, zero                 |             s1 = 0;
                                             |             if (v1 == 0) {
    0x005147dc beqz v1, 0x5147f0             |                 goto label_37;
                                             |             }
    0x005147e0 lui s1, 0x80                  |             s1 = 0x800013;
    0x005147e4 addiu s1, s1, 0x13            |             
    0x005147e8 srlv s1, s1, v0               |             s1 >>= v0;
    0x005147ec andi s1, s1, 1                |             s1 &= 1;
                                             |         }
                                             | label_37:
    0x005147f0 lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
    0x005147f4 lw t9, -0x6024(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.host: */
    0x005147f8 addiu a1, a1, -0x5acc         |         a1 += -0x5acc;
    0x005147fc move a0, s3                   |         a0 = s3;
    0x00514800 jalr t9                       |         t9 ();
    0x00514804 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00514808 beqz v0, 0x514848             |             
                                             |             if (s3 != v0) {
    0x0051480c beq s3, v0, 0x514844          |                 
    0x00514810 nop                           |                 
    0x00514814 lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x00514818 addiu v0, v0, -9              |                 v0 += -9;
    0x0051481c andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x00514820 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x00514824 lw a1, -0x7fc0(gp)            |                 a1 = *((gp - 8176));
                                             |                 if (v0 == 0) {
    0x00514828 beqz v0, 0x51484c             |                     goto label_160;
                                             |                 }
    0x0051482c lui v0, 0x80                  |                 v0 = 0x800013;
    0x00514830 addiu v0, v0, 0x13            |                 
    0x00514834 srlv v0, v0, v1               |                 v0 >>= v1;
    0x00514838 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
    0x0051483c lw t9, -0x6024(gp)            |                 t9 = sym.imp.strstr;
                                             |                 if (v0 == 0) {
    0x00514840 beqz v0, 0x514850             |                     goto label_161;
                                             |                 }
                                             |             }
    0x00514844 ori s1, s1, 2                 |             s1 |= 2;
                                             |         }
    0x00514848 lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
                                             | label_160:
    0x0051484c lw t9, -0x6024(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.from: */
                                             | label_161:
    0x00514850 addiu a1, a1, -0x5ac4         |         a1 += -0x5ac4;
    0x00514854 move a0, s3                   |         a0 = s3;
    0x00514858 jalr t9                       |         t9 ();
    0x0051485c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00514860 beqz v0, 0x5148a0             |             
                                             |             if (s3 != v0) {
    0x00514864 beq s3, v0, 0x51489c          |                 
    0x00514868 nop                           |                 
    0x0051486c lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x00514870 addiu v0, v0, -9              |                 v0 += -9;
    0x00514874 andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x00514878 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x0051487c lw a1, -0x7fc0(gp)            |                 a1 = *((gp - 8176));
                                             |                 if (v0 == 0) {
    0x00514880 beqz v0, 0x5148a4             |                     goto label_162;
                                             |                 }
    0x00514884 lui v0, 0x80                  |                 v0 = 0x800013;
    0x00514888 addiu v0, v0, 0x13            |                 
    0x0051488c srlv v0, v0, v1               |                 v0 >>= v1;
    0x00514890 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
    0x00514894 lw t9, -0x6024(gp)            |                 t9 = sym.imp.strstr;
                                             |                 if (v0 == 0) {
    0x00514898 beqz v0, 0x5148a8             |                     goto label_163;
                                             |                 }
                                             |             }
    0x0051489c ori s1, s1, 8                 |             s1 |= 8;
                                             |         }
    0x005148a0 lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
                                             | label_162:
    0x005148a4 lw t9, -0x6024(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.authorization: */
                                             | label_163:
    0x005148a8 addiu a1, a1, -0x5abc         |         a1 += -0x5abc;
    0x005148ac move a0, s3                   |         a0 = s3;
    0x005148b0 jalr t9                       |         t9 ();
    0x005148b4 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x005148b8 beqz v0, 0x5148f8             |             
                                             |             if (s3 != v0) {
    0x005148bc beq s3, v0, 0x5148f4          |                 
    0x005148c0 nop                           |                 
    0x005148c4 lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x005148c8 addiu v0, v0, -9              |                 v0 += -9;
    0x005148cc andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x005148d0 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x005148d4 lw v0, -0x7fc0(gp)            |                 v0 = *((gp - 8176));
                                             |                 if (v0 == 0) {
    0x005148d8 beqz v0, 0x5148fc             |                     goto label_164;
                                             |                 }
    0x005148dc lui v0, 0x80                  |                 v0 = 0x800013;
    0x005148e0 addiu v0, v0, 0x13            |                 
    0x005148e4 srlv v0, v0, v1               |                 v0 >>= v1;
    0x005148e8 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
    0x005148ec lw v0, -0x7fc0(gp)            |                 v0 = *((gp - 8176));
                                             |                 if (v0 == 0) {
    0x005148f0 beqz v0, 0x5148fc             |                     goto label_164;
                                             |                 }
                                             |             }
    0x005148f4 ori s1, s1, 4                 |             s1 |= 4;
                                             |         }
    0x005148f8 lw v0, -0x7fc0(gp)            |         v0 = *((gp - 8176));
                                             | label_164:
    0x005148fc lw t9, -0x6024(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.content_length: */
    0x00514900 addiu a1, v0, -0x5af8         |         a1 = v0 + -0x5af8;
    0x00514904 move a0, s3                   |         a0 = s3;
    0x00514908 jalr t9                       |         t9 ();
    0x0051490c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00514910 beqz v0, 0x514950             |             
                                             |             if (s3 != v0) {
    0x00514914 beq s3, v0, 0x51494c          |                 
    0x00514918 nop                           |                 
    0x0051491c lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x00514920 addiu v0, v0, -9              |                 v0 += -9;
    0x00514924 andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x00514928 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x0051492c lw t9, -0x6024(gp)            |                 t9 = sym.imp.strstr;
                                             |                 if (v0 == 0) {
    0x00514930 beqz v0, 0x514954             |                     goto label_165;
                                             |                 }
    0x00514934 lui v0, 0x80                  |                 v0 = 0x800013;
    0x00514938 addiu v0, v0, 0x13            |                 
    0x0051493c srlv v0, v0, v1               |                 v0 >>= v1;
    0x00514940 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
                                             |                 /* str.content_type: */
    0x00514944 addiu a1, s7, -0x5ae8         |                 a1 = s7 + -0x5ae8;
                                             |                 if (v0 == 0) {
    0x00514948 beqz v0, 0x514958             |                     goto label_166;
                                             |                 }
                                             |             }
    0x0051494c ori s1, s1, 0x10              |             s1 |= 0x10;
                                             |         }
    0x00514950 lw t9, -0x6024(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.content_type: */
                                             | label_165:
    0x00514954 addiu a1, s7, -0x5ae8         |         a1 = s7 + -0x5ae8;
                                             | label_166:
    0x00514958 move a0, s3                   |         a0 = s3;
    0x0051495c jalr t9                       |         t9 ();
    0x00514960 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00514964 beqz v0, 0x5149a4             |             
                                             |             if (s3 != v0) {
    0x00514968 beq s3, v0, 0x5149a0          |                 
    0x0051496c nop                           |                 
    0x00514970 lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x00514974 addiu v0, v0, -9              |                 v0 += -9;
    0x00514978 andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x0051497c sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x00514980 lw a1, -0x7fc0(gp)            |                 a1 = *((gp - 8176));
                                             |                 if (v0 == 0) {
    0x00514984 beqz v0, 0x5149a8             |                     goto label_167;
                                             |                 }
    0x00514988 lui v0, 0x80                  |                 v0 = 0x800013;
    0x0051498c addiu v0, v0, 0x13            |                 
    0x00514990 srlv v0, v0, v1               |                 v0 >>= v1;
    0x00514994 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
    0x00514998 lw t9, -0x6024(gp)            |                 t9 = sym.imp.strstr;
                                             |                 if (v0 == 0) {
    0x0051499c beqz v0, 0x5149ac             |                     goto label_168;
                                             |                 }
                                             |             }
    0x005149a0 ori s1, s1, 0x20              |             s1 |= 0x20;
                                             |         }
    0x005149a4 lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
                                             | label_167:
    0x005149a8 lw t9, -0x6024(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.connection: */
                                             | label_168:
    0x005149ac addiu a1, a1, -0x5aac         |         a1 += -0x5aac;
    0x005149b0 move a0, s3                   |         a0 = s3;
    0x005149b4 jalr t9                       |         t9 ();
    0x005149b8 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x005149bc beqz v0, 0x5149f8             |             
                                             |             if (s3 != v0) {
    0x005149c0 beq s3, v0, 0x5149f4          |                 
    0x005149c4 nop                           |                 
    0x005149c8 lbu v0, -1(v0)                |                 v0 = *((v0 - 1));
    0x005149cc addiu v0, v0, -9              |                 v0 += -9;
    0x005149d0 andi v1, v0, 0xff             |                 v1 = v0 & 0xff;
    0x005149d4 sltiu v0, v1, 0x18            |                 v0 = (v1 < 0x18) ? 1 : 0;
    0x005149d8 lui v0, 0x80                  |                 v0 = 0x800000;
                                             |                 if (v0 == 0) {
    0x005149dc beqz v0, 0x5149f8             |                     goto label_169;
                                             |                 }
    0x005149e0 addiu v0, v0, 0x13            |                 v0 += 0x13;
    0x005149e4 srlv v0, v0, v1               |                 v0 >>= v1;
    0x005149e8 ext v0, v0, 0, 1              |                 __asm ("ext v0, v0, 0, 1");
                                             |                 if (v0 == 0) {
    0x005149ec beqz v0, 0x5149f8             |                     goto label_169;
                                             |                 }
    0x005149f0 nop                           |                 
                                             |             }
    0x005149f4 ori s1, s1, 0x40              |             s1 |= 0x40;
                                             |         }
                                             | label_169:
    0x005149f8 lw v0, 0xcd8(sp)              |         v0 = *(var_cd8h);
                                             |         if (s5 == 0) {
    0x005149fc beqz s5, 0x514d60             |             goto label_42;
                                             |         }
    0x00514a00 lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
                                             |         if (v0 == 0) {
    0x00514a04 beqz v0, 0x514d60             |             goto label_42;
                                             |         }
    0x00514a08 lw t9, -0x6024(gp)            |         t9 = sym.imp.strstr;
                                             |         /* str.proxy_authorization: */
    0x00514a0c addiu a1, a1, -0x5aa0         |         a1 += -0x5aa0;
    0x00514a10 move a0, s3                   |         a0 = s3;
    0x00514a14 jalr t9                       |         t9 ();
    0x00514a18 move s5, v0                   |         s5 = v0;
    0x00514a1c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00514a20 beqz v0, 0x514d60             |             goto label_42;
                                             |         }
                                             |         if (s3 != v0) {
    0x00514a24 beq s3, v0, 0x514a58          |             
    0x00514a28 nop                           |             
    0x00514a2c lbu v0, -1(v0)                |             v0 = *((v0 - 1));
    0x00514a30 addiu v0, v0, -9              |             v0 += -9;
    0x00514a34 andi v1, v0, 0xff             |             v1 = v0 & 0xff;
    0x00514a38 sltiu v0, v1, 0x18            |             v0 = (v1 < 0x18) ? 1 : 0;
    0x00514a3c lui v0, 0x80                  |             v0 = 0x800000;
                                             |             if (v0 == 0) {
    0x00514a40 beqz v0, 0x514d60             |                 goto label_42;
                                             |             }
    0x00514a44 addiu v0, v0, 0x13            |             v0 += 0x13;
    0x00514a48 srlv v0, v0, v1               |             v0 >>= v1;
    0x00514a4c ext v0, v0, 0, 1              |             __asm ("ext v0, v0, 0, 1");
                                             |             if (v0 == 0) {
    0x00514a50 beqz v0, 0x514d60             |                 goto label_42;
                                             |             }
    0x00514a54 nop                           |             
                                             |         }
    0x00514a58 addiu s7, s5, 0x14            |         s7 = s5 + 0x14;
    0x00514a5c addiu a0, zero, 0x20          |         a0 = 0x20;
    0x00514a60 addiu v1, zero, 9             |         v1 = 9;
                                             | label_38:
    0x00514a64 sltu v0, s3, s5               |         v0 = (s3 < s5) ? 1 : 0;
                                             |         if (v0 != 0) {
    0x00514a68 beqz v0, 0x514a84             |             
    0x00514a6c nop                           |             
    0x00514a70 lb v0, -1(s5)                 |             v0 = *((s5 - 1));
                                             |             if (v0 == a0) {
    0x00514a74 beq v0, a0, 0x514cbc          |                 goto label_170;
                                             |             }
    0x00514a78 nop                           |             
                                             |             if (v0 == v1) {
    0x00514a7c beq v0, v1, 0x514cbc          |                 goto label_170;
                                             |             }
    0x00514a80 nop                           |             
                                             |         }
    0x00514a84 addiu a0, zero, 0xd           |         a0 = 0xd;
    0x00514a88 addiu v1, zero, 0xa           |         v1 = 0xa;
    0x00514a8c b 0x514cc4                    |         goto label_171;
                                             | label_147:
    0x00514a90 move s1, v0                   |         s1 = v0;
    0x00514a94 b 0x514310                    |         
                                             |     }
                                             |     if (s1 == 0) {
                                             | label_146:
    0x00514a98 beqz s1, 0x514ae0             |         goto label_172;
                                             |     }
    0x00514a9c nop                           |     
    0x00514aa0 lw s1, 0xc(s1)                |     s1 = *((s1 + 3));
    0x00514aa4 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00514aa8 addiu s1, s1, 1               |     s1++;
    0x00514aac sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
                                             |     if (v0 != 0) {
    0x00514ab0 bnez v0, 0x514acc             |         goto label_173;
                                             |     }
    0x00514ab4 nop                           |     
                                             |     do {
    0x00514ab8 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00514abc move a1, s1                   |         a1 = s1;
    0x00514ac0 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00514ac4 jalr t9                       |         t9 ();
    0x00514ac8 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             | label_173:
    0x00514acc lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00514ad0 addiu a0, zero, 0x2f          |         a0 = 0x2f;
    0x00514ad4 addu v1, v0, s1               |         v1 = v0 + s1;
    0x00514ad8 sb a0, 0xf(v1)                |         *((v1 + 15)) = a0;
    0x00514adc b 0x51434c                    |         goto label_28;
                                             | label_172:
    0x00514ae0 addiu s1, zero, 1             |         s1 = 1;
    0x00514ae4 b 0x514ab8                    |         
                                             |     } while (1);
                                             | label_151:
    0x00514ae8 move a0, v0                   |     a0 = v0;
    0x00514aec jalr t9                       |     t9 ();
    0x00514af0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514af4 b 0x514490                    |     goto label_29;
                                             | label_152:
    0x00514af8 addiu s1, zero, 6             |     s1 = 6;
    0x00514afc b 0x5144d4                    |     goto label_30;
                                             | label_150:
    0x00514b00 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00514b04 addiu s1, zero, 0xb           |     s1 = 0xb;
                                             |     if (v0 != 0) {
    0x00514b08 beqz v0, 0x514b24             |         
    0x00514b0c lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x00514b10 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00514b14 addiu s1, s1, 0xb             |         s1 += 0xb;
    0x00514b18 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x00514b1c lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00514b20 bnez v0, 0x514b3c             |             goto label_174;
                                             |         }
                                             |     }
    0x00514b24 lw t9, -0x7ed0(gp)            |     t9 = sym.smart_str_erealloc;
    0x00514b28 move a1, s1                   |     a1 = s1;
    0x00514b2c addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x00514b30 jalr t9                       |     t9 ();
    0x00514b34 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514b38 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_174:
    0x00514b3c lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x00514b40 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00514b44 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00514b48 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00514b4c addiu a2, zero, 0xb           |     a2 = 0xb;
                                             |     /* str._HTTP_1.0_r_n */
    0x00514b50 addiu a1, a1, -0x5ba4         |     a1 += -0x5ba4;
    0x00514b54 addu a0, a0, v0               |     a0 += v0;
    0x00514b58 jalr t9                       |     t9 ();
    0x00514b5c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00514b60 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514b64 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
                                             |     if (s0 != 0) {
    0x00514b68 bnez s0, 0x5145e0             |         goto label_31;
                                             |     }
                                             | label_153:
    0x00514b6c move s4, zero                 |     s4 = 0;
                                             | label_34:
    0x00514b70 move s1, zero                 |     s1 = 0;
    0x00514b74 b 0x514da8                    |     goto label_175;
                                             | label_155:
    0x00514b78 lbu v0, 8(s2)                 |     v0 = *((s2 + 8));
    0x00514b7c addiu v1, zero, 6             |     v1 = 6;
                                             |     if (v0 != v1) {
    0x00514b80 bne v0, v1, 0x514c40          |         goto label_176;
                                             |     }
    0x00514b84 nop                           |     
    0x00514b88 lw v0, (s2)                   |     v0 = *(s2);
    0x00514b8c addiu s4, v0, 0x10            |     s4 = v0 + 0x10;
    0x00514b90 lw s3, 0xc(v0)                |     s3 = *((v0 + 3));
                                             |     if (a0 == 0) {
    0x00514b94 beqz a0, 0x514c48             |         goto label_177;
                                             |     }
    0x00514b98 lw s1, 0xc(a0)                |     s1 = *((a0 + 3));
    0x00514b9c lw v0, 0x34(sp)               |     v0 = *(var_34h);
    0x00514ba0 addu s1, s3, s1               |     s1 = s3 + s1;
    0x00514ba4 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00514ba8 lw v0, 0x30(sp)               |     v0 = *(var_30h);
    0x00514bac bnez v0, 0x514bc8             |     
                                             |     while (1) {
    0x00514bb0 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00514bb4 move a1, s1                   |         a1 = s1;
    0x00514bb8 move a0, s7                   |         a0 = s7;
    0x00514bbc jalr t9                       |         t9 ();
    0x00514bc0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514bc4 lw v0, 0x30(sp)               |         v0 = *(var_30h);
    0x00514bc8 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x00514bcc addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00514bd0 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00514bd4 move a2, s3                   |         a2 = s3;
    0x00514bd8 move a1, s4                   |         a1 = s4;
    0x00514bdc addu a0, a0, v0               |         a0 += v0;
    0x00514be0 jalr t9                       |         t9 ();
    0x00514be4 lw v0, 0x30(sp)               |         v0 = *(var_30h);
    0x00514be8 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514bec sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00514bf0 lw v0, 0x34(sp)               |         v0 = *(var_34h);
    0x00514bf4 addiu s1, s1, 2               |         s1 += 2;
    0x00514bf8 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
                                             |         if (v0 == 0) {
    0x00514bfc bnez v0, 0x514c18             |             
    0x00514c00 nop                           |             
    0x00514c04 lw t9, -0x7ed0(gp)            |             t9 = sym.smart_str_erealloc;
    0x00514c08 move a1, s1                   |             a1 = s1;
    0x00514c0c move a0, s7                   |             a0 = s7;
    0x00514c10 jalr t9                       |             t9 ();
    0x00514c14 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00514c18 lw v1, 0x30(sp)               |         v1 = *(var_30h);
    0x00514c1c addiu v0, v1, 0x10            |         v0 = v1 + 0x10;
    0x00514c20 lw v1, 0xc(v1)                |         v1 = *((v1 + 3));
    0x00514c24 addu v0, v0, v1               |         v0 += v1;
    0x00514c28 addiu v1, zero, 0xd           |         v1 = 0xd;
    0x00514c2c sb v1, (v0)                   |         *(v0) = v1;
    0x00514c30 addiu v1, zero, 0xa           |         v1 = 0xa;
    0x00514c34 sb v1, 1(v0)                  |         *((v0 + 1)) = v1;
    0x00514c38 lw v0, 0x30(sp)               |         v0 = *(var_30h);
    0x00514c3c sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
                                             | label_176:
    0x00514c40 addiu s2, s2, 0x18            |         s2 += 0x18;
    0x00514c44 b 0x514638                    |         goto label_32;
                                             | label_177:
    0x00514c48 move s1, s3                   |         s1 = s3;
    0x00514c4c b 0x514bb0                    |         
                                             |     }
                                             | label_156:
    0x00514c50 jalr t9                       |     t9 ();
    0x00514c54 nop                           |     
    0x00514c58 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514c5c b 0x5146b4                    |     goto label_33;
                                             | label_154:
    0x00514c60 addiu a0, zero, 6             |     a0 = 6;
    0x00514c64 move s4, zero                 |     s4 = 0;
                                             |     if (v1 != a0) {
    0x00514c68 bne v1, a0, 0x514b70          |         goto label_34;
                                             |     }
    0x00514c6c lw a0, (v0)                   |     a0 = *(v0);
    0x00514c70 lw v0, 0xc(a0)                |     v0 = *((a0 + 3));
    0x00514c74 lw t9, -0x6aec(gp)            |     t9 = sym.php_trim;
                                             |     if (v0 == 0) {
    0x00514c78 beqz v0, 0x514b70             |         goto label_34;
                                             |     }
    0x00514c7c addiu a3, zero, 3             |     a3 = 3;
    0x00514c80 move a2, zero                 |     a2 = 0;
    0x00514c84 move a1, zero                 |     a1 = 0;
    0x00514c88 jalr t9                       |     t9 ();
    0x00514c8c move s2, v0                   |     s2 = v0;
    0x00514c90 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00514c94 b 0x5146b4                    |     goto label_33;
                                             | label_158:
    0x00514c98 lw v0, (s2)                   |     v0 = *(s2);
    0x00514c9c sltiu v1, v0, 2               |     v1 = (v0 < 2) ? 1 : 0;
    0x00514ca0 addiu v0, v0, -1              |     v0 += -1;
                                             |     if (v1 != 0) {
    0x00514ca4 bnez v1, 0x514740             |         goto label_35;
                                             |     }
    0x00514ca8 lw s1, 0xc(s2)                |     s1 = *((s2 + 3));
    0x00514cac sw v0, (s2)                   |     *(s2) = v0;
    0x00514cb0 b 0x5146ec                    |     goto label_36;
                                             | label_159:
    0x00514cb4 move s1, zero                 |     s1 = 0;
    0x00514cb8 b 0x5147f0                    |     goto label_37;
                                             | label_170:
    0x00514cbc addiu s5, s5, -1              |     s5 += -1;
    0x00514cc0 b 0x514a64                    |     goto label_38;
                                             |     do {
                                             | label_171:
    0x00514cc4 lb v0, (s7)                   |         v0 = *(s7);
                                             |         if (v0 == 0) {
    0x00514cc8 beqz v0, 0x514d10             |             goto label_178;
                                             |         }
    0x00514ccc nop                           |         
                                             |         if (v0 == a0) {
    0x00514cd0 beq v0, a0, 0x514ce4          |             goto label_179;
                                             |         }
    0x00514cd4 nop                           |         
    0x00514cd8 addiu s7, s7, 1               |         s7++;
    0x00514cdc bne v0, v1, 0x514cc4          |         
                                             |     } while (v0 != v1);
    0x00514ce0 addiu s7, s7, -1              |     s7 += -1;
                                             | label_179:
    0x00514ce4 addiu a0, zero, 0xd           |     a0 = 0xd;
    0x00514ce8 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00514cec b 0x514cf4                    |     
                                             |     while (v0 == a0) {
                                             | label_39:
    0x00514cf0 addiu s7, s7, 1               |         s7++;
    0x00514cf4 lb v0, (s7)                   |         v0 = *(s7);
    0x00514cf8 beq v0, a0, 0x514cf0          |         
                                             |     }
    0x00514cfc nop                           |     
                                             |     if (v0 == v1) {
    0x00514d00 beq v0, v1, 0x514cf0          |         goto label_39;
                                             |     }
    0x00514d04 nop                           |     
    0x00514d08 lw t9, -0x5f58(gp)            |     t9 = sym.imp.strlen;
                                             |     if (v0 != 0) {
    0x00514d0c bnez v0, 0x515fb4             |         goto label_180;
                                             |     }
                                             | label_178:
    0x00514d10 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             |     if (s3 != s5) {
    0x00514d14 beq s3, s5, 0x514d4c          |         
    0x00514d18 addiu v1, zero, 0xa           |         v1 = 0xa;
                                             | label_41:
    0x00514d1c sltu v0, s3, s5               |         v0 = (s3 < s5) ? 1 : 0;
                                             |         if (v0 != 0) {
    0x00514d20 beqz v0, 0x514d3c             |             
    0x00514d24 nop                           |             
    0x00514d28 lb v0, -1(s5)                 |             v0 = *((s5 - 1));
                                             |             if (v0 == a0) {
    0x00514d2c beq v0, a0, 0x515fac          |                 goto label_181;
                                             |             }
    0x00514d30 nop                           |             
                                             |             if (v0 == v1) {
    0x00514d34 beq v0, v1, 0x515fac          |                 goto label_181;
                                             |             }
    0x00514d38 nop                           |             
                                             |         }
    0x00514d3c subu s3, s5, s3               |         __asm ("subu s3, s5, s3");
    0x00514d40 addu s3, s4, s3               |         s3 = s4 + s3;
    0x00514d44 sb zero, (s3)                 |         *(s3) = 0;
    0x00514d48 b 0x514d60                    |         
                                             |     } else {
    0x00514d4c lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00514d50 move a0, s4                   |         a0 = s4;
    0x00514d54 jalr t9                       |         t9 ();
    0x00514d58 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00514d5c move s4, zero                 |         s4 = 0;
                                             |     }
                                             | label_42:
    0x00514d60 lbu v0, 5(s2)                 |     v0 = *((s2 + 5));
    0x00514d64 andi v1, v0, 2                |     v1 = v0 & 2;
                                             |     if (v1 == 0) {
    0x00514d68 bnez v1, 0x514d9c             |         
    0x00514d6c nop                           |         
    0x00514d70 lw v1, (s2)                   |         v1 = *(s2);
    0x00514d74 addiu v1, v1, -1              |         v1 += -1;
    0x00514d78 sw v1, (s2)                   |         *(s2) = v1;
                                             |         if (v1 != 0) {
    0x00514d7c bnez v1, 0x514d9c             |             goto label_43;
                                             |         }
    0x00514d80 andi v0, v0, 1                |         v0 &= 1;
    0x00514d84 move a0, s2                   |         a0 = s2;
                                             |         if (v0 == 0) {
    0x00514d88 beqz v0, 0x515fe4             |             goto label_182;
                                             |         }
    0x00514d8c lw t9, -0x5e90(gp)            |         t9 = *((gp - 6052));
    0x00514d90 jalr t9                       |         t9 ();
    0x00514d94 nop                           |         
    0x00514d98 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
                                             | label_43:
    0x00514d9c andi v0, s1, 4                |     v0 = s1 & 4;
    0x00514da0 andi v0, s1, 8                |     v0 = s1 & 8;
                                             |     if (v0 == 0) {
    0x00514da4 bnez v0, 0x515024             |         
                                             | label_175:
    0x00514da8 lw v0, 4(fp)                  |         v0 = *(arg_d34h);
    0x00514dac lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
                                             |         if (v0 != 0) {
    0x00514db0 beqz v0, 0x515020             |             
    0x00514db4 lw a0, 0xd34(sp)              |             a0 = *(arg_d34h);
    0x00514db8 jalr t9                       |             t9 ();
    0x00514dbc lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514dc0 lw t9, -0x7f5c(gp)            |             t9 = sym._emalloc;
    0x00514dc4 addiu a0, v0, 1               |             a0 = v0 + 1;
    0x00514dc8 jalr t9                       |             t9 ();
    0x00514dcc lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514dd0 lw s2, 4(fp)                  |             s2 = *(arg_d34h);
    0x00514dd4 move s3, v0                   |             s3 = v0;
    0x00514dd8 lw t9, -0x5f58(gp)            |             t9 = sym.imp.strlen;
    0x00514ddc move a0, s2                   |             a0 = s2;
    0x00514de0 jalr t9                       |             t9 ();
    0x00514de4 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514de8 move a0, s2                   |             a0 = s2;
    0x00514dec lw t9, -0x6a58(gp)            |             t9 = sym.php_url_decode;
    0x00514df0 move a1, v0                   |             a1 = v0;
    0x00514df4 bal 0x5043d8                  |             sym_php_url_decode ();
    0x00514df8 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514dfc lw a1, 4(fp)                  |             a1 = *(arg_d34h);
    0x00514e00 lw t9, -0x5fa4(gp)            |             t9 = sym.imp.strcpy;
    0x00514e04 move a0, s3                   |             a0 = s3;
    0x00514e08 jalr t9                       |             t9 ();
    0x00514e0c lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514e10 move a0, s3                   |             a0 = s3;
    0x00514e14 lw a1, -0x7fc0(gp)            |             a1 = *((gp - 8176));
    0x00514e18 lw t9, -0x60c0(gp)            |             t9 = sym.imp.strcat
    0x00514e1c addiu a1, a1, -0x190          |             a1 += -0x190;
    0x00514e20 jalr t9                       |             t9 ();
    0x00514e24 lw s2, 8(fp)                  |             s2 = *(arg_d38h);
    0x00514e28 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (s2 != 0) {
    0x00514e2c beqz s2, 0x514e68             |                 
    0x00514e30 lw t9, -0x5f58(gp)            |                 t9 = sym.imp.strlen;
    0x00514e34 move a0, s2                   |                 a0 = s2;
    0x00514e38 jalr t9                       |                 t9 ();
    0x00514e3c lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00514e40 move a1, v0                   |                 a1 = v0;
    0x00514e44 lw t9, -0x6a58(gp)            |                 t9 = sym.php_url_decode;
    0x00514e48 move a0, s2                   |                 a0 = s2;
    0x00514e4c bal 0x5043d8                  |                 sym_php_url_decode ();
    0x00514e50 lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00514e54 lw a1, 8(fp)                  |                 a1 = *(arg_d38h);
    0x00514e58 lw t9, -0x60c0(gp)            |                 t9 = sym.imp.strcat
    0x00514e5c move a0, s3                   |                 a0 = s3;
    0x00514e60 jalr t9                       |                 t9 ();
    0x00514e64 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x00514e68 lw t9, -0x5f58(gp)            |             t9 = sym.imp.strlen;
    0x00514e6c move a0, s3                   |             a0 = s3;
    0x00514e70 jalr t9                       |             t9 ();
    0x00514e74 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514e78 move a1, v0                   |             a1 = v0;
    0x00514e7c lw t9, -0x6e10(gp)            |             t9 = sym.php_base64_encode;
    0x00514e80 move a0, s3                   |             a0 = s3;
    0x00514e84 jalr t9                       |             t9 ();
    0x00514e88 move s5, v0                   |             s5 = v0;
    0x00514e8c lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00514e90 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00514e94 beqz v0, 0x515ff8             |                 goto label_183;
                                             |             }
    0x00514e98 lw s2, 0xc(v0)                |             s2 = *((v0 + 3));
    0x00514e9c lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00514ea0 addiu s2, s2, 0x15            |             s2 += 0x15;
    0x00514ea4 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00514ea8 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 == 0) {
    0x00514eac bnez v0, 0x514ec8             |                 
                                             | label_44:
    0x00514eb0 lw t9, -0x7ed0(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00514eb4 move a1, s2                   |                 a1 = s2;
    0x00514eb8 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x00514ebc jalr t9                       |                 t9 ();
    0x00514ec0 lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00514ec4 lw v0, 0xcc0(sp)              |                 v0 = *(var_cc0h);
                                             |             }
    0x00514ec8 lw a1, -0x7fc0(gp)            |             a1 = *((gp - 8176));
    0x00514ecc addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x00514ed0 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x00514ed4 lw t9, -0x5f48(gp)            |             t9 = sym.imp.memcpy;
    0x00514ed8 addiu a2, zero, 0x15          |             a2 = 0x15;
                                             |             /* str.Authorization:_Basic_ */
    0x00514edc addiu a1, a1, -0x5a88         |             a1 += -0x5a88;
    0x00514ee0 addu a0, a0, v0               |             a0 += v0;
    0x00514ee4 jalr t9                       |             t9 ();
    0x00514ee8 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514eec lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00514ef0 lw t9, -0x5f58(gp)            |             t9 = sym.imp.strlen;
    0x00514ef4 sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
    0x00514ef8 addiu v0, s5, 0x10            |             v0 = s5 + 0x10;
    0x00514efc sw v0, 0xce4(sp)              |             *(var_ce4h) = v0;
    0x00514f00 move a0, v0                   |             a0 = v0;
    0x00514f04 jalr t9                       |             t9 ();
    0x00514f08 addu s2, v0, s2               |             s2 = v0 + s2;
    0x00514f0c move s7, v0                   |             s7 = v0;
    0x00514f10 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00514f14 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00514f18 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00514f1c bnez v0, 0x514f34             |                 
    0x00514f20 lw t9, -0x7ed0(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00514f24 move a1, s2                   |                 a1 = s2;
    0x00514f28 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x00514f2c jalr t9                       |                 t9 ();
    0x00514f30 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x00514f34 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00514f38 lw t9, -0x5f48(gp)            |             t9 = sym.imp.memcpy;
    0x00514f3c addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x00514f40 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x00514f44 move a2, s7                   |             a2 = s7;
    0x00514f48 addiu a1, s5, 0x10            |             a1 = s5 + 0x10;
    0x00514f4c addu a0, a0, v0               |             a0 += v0;
    0x00514f50 jalr t9                       |             t9 ();
    0x00514f54 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00514f58 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00514f5c sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
    0x00514f60 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00514f64 addiu s2, s2, 2               |             s2 += 2;
    0x00514f68 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00514f6c lw v1, 0xcc0(sp)              |             v1 = *(var_cc0h);
                                             |             if (v0 == 0) {
    0x00514f70 bnez v0, 0x514f8c             |                 
    0x00514f74 lw t9, -0x7ed0(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00514f78 move a1, s2                   |                 a1 = s2;
    0x00514f7c addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x00514f80 jalr t9                       |                 t9 ();
    0x00514f84 lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00514f88 lw v1, 0xcc0(sp)              |                 v1 = *(var_cc0h);
                                             |             }
    0x00514f8c addiu v0, v1, 0x10            |             v0 = v1 + 0x10;
    0x00514f90 lw v1, 0xc(v1)                |             v1 = *((v1 + 3));
    0x00514f94 addu v0, v0, v1               |             v0 += v1;
    0x00514f98 addiu v1, zero, 0xd           |             v1 = 0xd;
    0x00514f9c sb v1, (v0)                   |             *(v0) = v1;
    0x00514fa0 addiu v1, zero, 0xa           |             v1 = 0xa;
    0x00514fa4 sb v1, 1(v0)                  |             *((v0 + 1)) = v1;
    0x00514fa8 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00514fac sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
                                             |             if (s0 != 0) {
    0x00514fb0 beqz s0, 0x514fe8             |                 
    0x00514fb4 lw v0, (s0)                   |                 v0 = *(s0);
    0x00514fb8 lw t9, -0x6a14(gp)            |                 t9 = sym.php_stream_notification_notify;
                                             |                 if (v0 == 0) {
    0x00514fbc beqz v0, 0x514fe8             |                     goto label_184;
                                             |                 }
    0x00514fc0 sw zero, 0x1c(sp)             |                 *(var_1ch) = 0;
    0x00514fc4 sw zero, 0x18(sp)             |                 *(var_18h) = 0;
    0x00514fc8 sw zero, 0x14(sp)             |                 *(var_14h) = 0;
    0x00514fcc sw zero, 0x10(sp)             |                 *(var_10h) = 0;
    0x00514fd0 move a3, zero                 |                 a3 = 0;
    0x00514fd4 move a2, zero                 |                 a2 = 0;
    0x00514fd8 addiu a1, zero, 3             |                 a1 = 3;
    0x00514fdc move a0, s0                   |                 a0 = s0;
    0x00514fe0 jalr t9                       |                 t9 ();
    0x00514fe4 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
                                             | label_184:
    0x00514fe8 lbu v0, 5(s5)                 |             v0 = *((s5 + 5));
    0x00514fec andi v1, v0, 2                |             v1 = v0 & 2;
    0x00514ff0 andi v0, v0, 1                |             v0 &= 1;
                                             |             if (v1 == 0) {
    0x00514ff4 bnez v1, 0x515010             |                 
    0x00514ff8 move a0, s5                   |                 a0 = s5;
                                             |                 if (v0 == 0) {
    0x00514ffc beqz v0, 0x516000             |                     goto label_185;
                                             |                 }
    0x00515000 lw t9, -0x5e90(gp)            |                 t9 = *((gp - 6052));
    0x00515004 jalr t9                       |                 t9 ();
    0x00515008 nop                           |                 
    0x0051500c lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
                                             | label_45:
    0x00515010 lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
    0x00515014 move a0, s3                   |             a0 = s3;
    0x00515018 jalr t9                       |             t9 ();
    0x0051501c lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x00515020 andi v0, s1, 8                |         v0 = s1 & 8;
                                             |     }
    0x00515024 andi v0, s1, 2                |     v0 = s1 & 2;
                                             |     if (v0 == 0) {
    0x00515028 bnez v0, 0x51515c             |         
    0x0051502c lw s3, -0x7a50(gp)            |         s3 = *(gp);
    0x00515030 lw v0, 0x14(s3)               |         v0 = *((s3 + 5));
    0x00515034 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00515038 beqz v0, 0x515158             |             
    0x0051503c addiu s2, zero, 6             |             s2 = 6;
                                             |             if (v0 != 0) {
    0x00515040 beqz v0, 0x51505c             |                 
    0x00515044 lw s2, 0xc(v0)                |                 s2 = *((v0 + 3));
    0x00515048 lw v0, 0xcc4(sp)              |                 v0 = *(var_cc4h);
    0x0051504c addiu s2, s2, 6               |                 s2 += 6;
    0x00515050 sltu v0, s2, v0               |                 v0 = (s2 < v0) ? 1 : 0;
    0x00515054 lw v0, 0xcc0(sp)              |                 v0 = *(var_cc0h);
                                             |                 if (v0 != 0) {
    0x00515058 bnez v0, 0x515074             |                     goto label_186;
                                             |                 }
                                             |             }
    0x0051505c lw t9, -0x7ed0(gp)            |             t9 = sym.smart_str_erealloc;
    0x00515060 move a1, s2                   |             a1 = s2;
    0x00515064 addiu a0, sp, 0xcc0           |             a0 = sp + 0xcc0;
    0x00515068 jalr t9                       |             t9 ();
    0x0051506c lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00515070 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             | label_186:
    0x00515074 lw a1, -0x7fc0(gp)            |             a1 = *((gp - 8176));
    0x00515078 addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x0051507c lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x00515080 lw t9, -0x5f48(gp)            |             t9 = sym.imp.memcpy;
    0x00515084 addiu a2, zero, 6             |             a2 = 6;
                                             |             /* str.From:_ */
    0x00515088 addiu a1, a1, -0x5a70         |             a1 += -0x5a70;
    0x0051508c addu a0, a0, v0               |             a0 += v0;
    0x00515090 jalr t9                       |             t9 ();
    0x00515094 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00515098 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x0051509c lw s3, 0x14(s3)               |             s3 = *((s3 + 5));
    0x005150a0 lw t9, -0x5f58(gp)            |             t9 = sym.imp.strlen;
    0x005150a4 sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
    0x005150a8 move a0, s3                   |             a0 = s3;
    0x005150ac jalr t9                       |             t9 ();
    0x005150b0 addu s2, v0, s2               |             s2 = v0 + s2;
    0x005150b4 move s5, v0                   |             s5 = v0;
    0x005150b8 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x005150bc sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x005150c0 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x005150c4 bnez v0, 0x5150dc             |                 
    0x005150c8 lw t9, -0x7ed0(gp)            |                 t9 = sym.smart_str_erealloc;
    0x005150cc move a1, s2                   |                 a1 = s2;
    0x005150d0 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x005150d4 jalr t9                       |                 t9 ();
    0x005150d8 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x005150dc lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x005150e0 lw t9, -0x5f48(gp)            |             t9 = sym.imp.memcpy;
    0x005150e4 addiu a0, v0, 0x10            |             a0 = v0 + 0x10;
    0x005150e8 lw v0, 0xc(v0)                |             v0 = *((v0 + 3));
    0x005150ec move a2, s5                   |             a2 = s5;
    0x005150f0 move a1, s3                   |             a1 = s3;
    0x005150f4 addu a0, a0, v0               |             a0 += v0;
    0x005150f8 jalr t9                       |             t9 ();
    0x005150fc lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00515100 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00515104 sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
    0x00515108 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x0051510c addiu s2, s2, 2               |             s2 += 2;
    0x00515110 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x00515114 lw v1, 0xcc0(sp)              |             v1 = *(var_cc0h);
                                             |             if (v0 == 0) {
    0x00515118 bnez v0, 0x515134             |                 
    0x0051511c lw t9, -0x7ed0(gp)            |                 t9 = sym.smart_str_erealloc;
    0x00515120 move a1, s2                   |                 a1 = s2;
    0x00515124 addiu a0, sp, 0xcc0           |                 a0 = sp + 0xcc0;
    0x00515128 jalr t9                       |                 t9 ();
    0x0051512c lw gp, 0x28(sp)               |                 gp = *(var_28h);
    0x00515130 lw v1, 0xcc0(sp)              |                 v1 = *(var_cc0h);
                                             |             }
    0x00515134 addiu v0, v1, 0x10            |             v0 = v1 + 0x10;
    0x00515138 lw v1, 0xc(v1)                |             v1 = *((v1 + 3));
    0x0051513c addu v0, v0, v1               |             v0 += v1;
    0x00515140 addiu v1, zero, 0xd           |             v1 = 0xd;
    0x00515144 sb v1, (v0)                   |             *(v0) = v1;
    0x00515148 addiu v1, zero, 0xa           |             v1 = 0xa;
    0x0051514c sb v1, 1(v0)                  |             *((v0 + 1)) = v1;
    0x00515150 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
    0x00515154 sw s2, 0xc(v0)                |             *((v0 + 3)) = s2;
                                             |         }
    0x00515158 andi v0, s1, 2                |         v0 = s1 & 2;
                                             |     }
    0x0051515c andi v0, s1, 0x40             |     v0 = s1 & 0x40;
                                             |     if (v0 != 0) {
    0x00515160 bnez v0, 0x515384             |         goto label_187;
                                             |     }
    0x00515164 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00515168 addiu s2, zero, 6             |     s2 = 6;
                                             |     if (v0 != 0) {
    0x0051516c beqz v0, 0x515188             |         
    0x00515170 lw s2, 0xc(v0)                |         s2 = *((v0 + 3));
    0x00515174 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00515178 addiu s2, s2, 6               |         s2 += 6;
    0x0051517c sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x00515180 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00515184 bnez v0, 0x5151a0             |             goto label_188;
                                             |         }
                                             |     }
    0x00515188 lw t9, -0x7ed0(gp)            |     t9 = sym.smart_str_erealloc;
    0x0051518c move a1, s2                   |     a1 = s2;
    0x00515190 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x00515194 jalr t9                       |     t9 ();
    0x00515198 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051519c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_188:
    0x005151a0 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x005151a4 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x005151a8 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005151ac lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x005151b0 addiu a2, zero, 6             |     a2 = 6;
                                             |     /* str.Host:_ */
    0x005151b4 addiu a1, a1, -0x5a68         |     a1 += -0x5a68;
    0x005151b8 addu a0, a0, v0               |     a0 += v0;
    0x005151bc jalr t9                       |     t9 ();
    0x005151c0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005151c4 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x005151c8 lw s3, 0xc(fp)                |     s3 = *(arg_d3ch);
    0x005151cc lw t9, -0x5f58(gp)            |     t9 = sym.imp.strlen;
    0x005151d0 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x005151d4 move a0, s3                   |     a0 = s3;
    0x005151d8 jalr t9                       |     t9 ();
    0x005151dc addu s2, v0, s2               |     s2 = v0 + s2;
    0x005151e0 move s5, v0                   |     s5 = v0;
    0x005151e4 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x005151e8 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x005151ec lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x005151f0 bnez v0, 0x515208             |         
    0x005151f4 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x005151f8 move a1, s2                   |         a1 = s2;
    0x005151fc addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00515200 jalr t9                       |         t9 ();
    0x00515204 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00515208 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x0051520c lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00515210 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00515214 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00515218 move a2, s5                   |     a2 = s5;
    0x0051521c move a1, s3                   |     a1 = s3;
    0x00515220 addu a0, a0, v0               |     a0 += v0;
    0x00515224 jalr t9                       |     t9 ();
    0x00515228 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x0051522c lw v1, 0xcd8(sp)              |     v1 = *(var_cd8h);
    0x00515230 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515234 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x00515238 lhu v0, 0x10(fp)              |     v0 = *(arg_10h);
                                             |     if (v1 == 0) {
    0x0051523c beqz v1, 0x51601c             |         goto label_189;
                                             |     }
    0x00515240 addiu v1, zero, 0x1bb         |     v1 = 0x1bb;
                                             |     if (v0 == v1) {
                                             | label_46:
    0x00515244 beq v0, v1, 0x515320          |         goto label_190;
                                             |     }
    0x00515248 nop                           |     
    0x0051524c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00515250 beqz v0, 0x515324             |         goto label_191;
                                             |     }
    0x00515254 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00515258 addiu s3, s2, 1               |     s3 = s2 + 1;
    0x0051525c sltu v0, s3, v0               |     v0 = (s3 < v0) ? 1 : 0;
    0x00515260 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00515264 bnez v0, 0x515280             |         
    0x00515268 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x0051526c move a1, s3                   |         a1 = s3;
    0x00515270 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00515274 jalr t9                       |         t9 ();
    0x00515278 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051527c lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |     }
    0x00515280 addiu v0, zero, 0x3a          |     v0 = 0x3a;
    0x00515284 addu s2, v1, s2               |     s2 = v1 + s2;
    0x00515288 addiu a1, zero, 0xa           |     a1 = 0xa;
    0x0051528c sb v0, 0x10(s2)               |     *((s2 + 16)) = v0;
    0x00515290 addiu s2, sp, 0x4f            |     s2 = sp + 0x4f;
    0x00515294 sw s3, 0xc(v1)                |     *((v1 + 3)) = s3;
    0x00515298 lhu v0, 0x10(fp)              |     v0 = *(arg_10h);
    0x0051529c move s5, s2                   |     s5 = s2;
    0x005152a0 sb zero, 0x4f(sp)             |     *(var_4fh) = 0;
                                             |     do {
    0x005152a4 divu zero, v0, a1             |         __asm ("divu zero, v0, a1");
    0x005152a8 teq a1, zero, 7               |         __asm ("teq a1, zero, 7");
    0x005152ac addiu s2, s2, -1              |         s2 += -1;
    0x005152b0 mfhi a0                       |         __asm ("mfhi a0");
    0x005152b4 mflo v0                       |         __asm ("mflo v0");
    0x005152b8 addiu a0, a0, 0x30            |         a0 += 0x30;
    0x005152bc sb a0, (s2)                   |         *(s2) = a0;
    0x005152c0 bnez v0, 0x5152a4             |         
                                             |     } while (v0 != 0);
    0x005152c4 lw s3, 0xc(v1)                |     s3 = *((v1 + 3));
    0x005152c8 subu s5, s5, s2               |     __asm ("subu s5, s5, s2");
    0x005152cc lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x005152d0 addu s3, s5, s3               |     s3 = s5 + s3;
    0x005152d4 sltu v0, s3, v0               |     v0 = (s3 < v0) ? 1 : 0;
    0x005152d8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x005152dc bnez v0, 0x5152f8             |         
    0x005152e0 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x005152e4 move a1, s3                   |         a1 = s3;
    0x005152e8 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x005152ec jalr t9                       |         t9 ();
    0x005152f0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005152f4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x005152f8 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x005152fc addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00515300 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00515304 move a2, s5                   |     a2 = s5;
    0x00515308 move a1, s2                   |     a1 = s2;
    0x0051530c addu a0, a0, v0               |     a0 += v0;
    0x00515310 jalr t9                       |     t9 ();
    0x00515314 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00515318 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051531c sw s3, 0xc(v0)                |     *((v0 + 3)) = s3;
                                             | label_190:
    0x00515320 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_191:
    0x00515324 addiu s2, zero, 2             |     s2 = 2;
                                             |     if (v0 != 0) {
    0x00515328 beqz v0, 0x515344             |         
    0x0051532c lw s2, 0xc(v0)                |         s2 = *((v0 + 3));
    0x00515330 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00515334 addiu s2, s2, 2               |         s2 += 2;
    0x00515338 sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x0051533c lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00515340 bnez v0, 0x51535c             |             goto label_192;
                                             |         }
                                             |     }
    0x00515344 lw t9, -0x7ed0(gp)            |     t9 = sym.smart_str_erealloc;
    0x00515348 move a1, s2                   |     a1 = s2;
    0x0051534c addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x00515350 jalr t9                       |     t9 ();
    0x00515354 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515358 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             | label_192:
    0x0051535c addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00515360 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00515364 addu v0, v0, v1               |     v0 += v1;
    0x00515368 addiu v1, zero, 0xd           |     v1 = 0xd;
    0x0051536c sb v1, (v0)                   |     *(v0) = v1;
    0x00515370 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00515374 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x00515378 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x0051537c sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x00515380 andi v0, s1, 0x40             |     v0 = s1 & 0x40;
                                             | label_187:
    0x00515384 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00515388 bnez v0, 0x5153f0             |         
    0x0051538c addiu s2, zero, 0x13          |         s2 = 0x13;
                                             |         if (v0 != 0) {
    0x00515390 beqz v0, 0x5153ac             |             
    0x00515394 lw s2, 0xc(v0)                |             s2 = *((v0 + 3));
    0x00515398 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x0051539c addiu s2, s2, 0x13            |             s2 += 0x13;
    0x005153a0 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x005153a4 lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 != 0) {
    0x005153a8 bnez v0, 0x5153c4             |                 goto label_193;
                                             |             }
                                             |         }
    0x005153ac lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x005153b0 move a1, s2                   |         a1 = s2;
    0x005153b4 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x005153b8 jalr t9                       |         t9 ();
    0x005153bc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005153c0 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_193:
    0x005153c4 lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
    0x005153c8 addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x005153cc lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x005153d0 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x005153d4 addiu a2, zero, 0x13          |         a2 = 0x13;
                                             |         /* str.Connection:_close_r_n */
    0x005153d8 addiu a1, a1, -0x5a60         |         a1 += -0x5a60;
    0x005153dc addu a0, a0, v0               |         a0 += v0;
    0x005153e0 jalr t9                       |         t9 ();
    0x005153e4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x005153e8 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005153ec sw s2, 0xc(v0)                |         *((v0 + 3)) = s2;
                                             |     }
    0x005153f0 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
                                             |     if (s0 == 0) {
    0x005153f4 beqz s0, 0x51602c             |         goto label_194;
                                             |     }
    0x005153f8 lw a2, -0x7ef4(gp)            |     a2 = *(gp);
    0x005153fc lw t9, -0x6a00(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.user_agent */
    0x00515400 addiu a2, a2, -0x619c         |     a2 += -0x619c;
    0x00515404 addiu a1, v0, -0x27a0         |     a1 = v0 + -0x27a0;
    0x00515408 move a0, s0                   |     a0 = s0;
    0x0051540c jalr t9                       |     t9 ();
    0x00515410 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00515414 beqz v0, 0x51602c             |         goto label_194;
                                             |     }
    0x00515418 lbu a0, 8(v0)                 |     a0 = *((v0 + 8));
    0x0051541c addiu v1, zero, 6             |     v1 = 6;
                                             |     if (a0 != v1) {
    0x00515420 bne a0, v1, 0x51602c          |         goto label_194;
                                             |     }
    0x00515424 nop                           |     
    0x00515428 lw s2, (v0)                   |     s2 = *(v0);
    0x0051542c addiu s2, s2, 0x10            |     s2 += 0x10;
                                             | label_47:
    0x00515430 andi v0, s1, 1                |     v0 = s1 & 1;
                                             |     if (v0 == 0) {
    0x00515434 bnez v0, 0x515514             |         
    0x00515438 nop                           |         
                                             |         if (s2 == 0) {
    0x0051543c beqz s2, 0x515514             |             goto label_195;
                                             |         }
    0x00515440 nop                           |         
    0x00515444 lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
    0x00515448 move a0, s2                   |         a0 = s2;
    0x0051544c jalr t9                       |         t9 ();
    0x00515450 addiu s5, v0, 0x11            |         s5 = v0 + 0x11;
    0x00515454 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00515458 beqz v0, 0x515514             |             goto label_195;
                                             |         }
    0x0051545c lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x00515460 addiu a0, v0, 0x12            |         a0 = v0 + 0x12;
    0x00515464 jalr t9                       |         t9 ();
    0x00515468 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051546c move a1, s5                   |         a1 = s5;
    0x00515470 move a3, s2                   |         a3 = s2;
    0x00515474 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x00515478 lw t9, -0x7ed4(gp)            |         t9 = sym.ap_php_slprintf;
                                             |         /* str.User_Agent:__s_r_n */
    0x0051547c addiu a2, a2, -0x5a4c         |         a2 += -0x5a4c;
    0x00515480 move a0, v0                   |         a0 = v0;
    0x00515484 move s3, v0                   |         s3 = v0;
    0x00515488 bal 0x52ee58                  |         sym_ap_php_slprintf ();
    0x0051548c move s5, v0                   |         s5 = v0;
    0x00515490 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00515494 beqz v0, 0x516038             |             goto label_196;
                                             |         }
    0x00515498 addu v0, s3, v0               |         v0 = s3 + v0;
    0x0051549c sb zero, (v0)                 |         *(v0) = 0;
    0x005154a0 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x005154a4 move s2, s5                   |         s2 = s5;
                                             |         if (v0 != 0) {
    0x005154a8 beqz v0, 0x5154c4             |             
    0x005154ac lw s2, 0xc(v0)                |             s2 = *((v0 + 3));
    0x005154b0 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x005154b4 addu s2, s5, s2               |             s2 = s5 + s2;
    0x005154b8 sltu v0, s2, v0               |             v0 = (s2 < v0) ? 1 : 0;
    0x005154bc lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 != 0) {
    0x005154c0 bnez v0, 0x5154dc             |                 goto label_197;
                                             |             }
                                             |         }
    0x005154c4 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x005154c8 move a1, s2                   |         a1 = s2;
    0x005154cc addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x005154d0 jalr t9                       |         t9 ();
    0x005154d4 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005154d8 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_197:
    0x005154dc lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x005154e0 addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x005154e4 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x005154e8 move a2, s5                   |         a2 = s5;
    0x005154ec move a1, s3                   |         a1 = s3;
    0x005154f0 addu a0, a0, v0               |         a0 += v0;
    0x005154f4 jalr t9                       |         t9 ();
    0x005154f8 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x005154fc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515500 sw s2, 0xc(v0)                |         *((v0 + 3)) = s2;
                                             | label_48:
    0x00515504 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00515508 move a0, s3                   |         a0 = s3;
    0x0051550c jalr t9                       |         t9 ();
    0x00515510 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
                                             | label_195:
    0x00515514 lw v0, 0xce8(sp)              |     v0 = *(var_ce8h);
                                             |     if (s4 == 0) {
    0x00515518 beqz s4, 0x51579c             |         goto label_198;
                                             |     }
                                             |     if (v0 == 0) {
    0x0051551c beqz v0, 0x5156c8             |         goto label_199;
                                             |     }
    0x00515520 nop                           |     
    0x00515524 andi v0, s1, 0x10             |     v0 = s1 & 0x10;
                                             |     if (s0 == 0) {
    0x00515528 beqz s0, 0x5156c8             |         goto label_199;
                                             |     }
    0x0051552c lw t9, -0x5f58(gp)            |     t9 = sym.imp.strlen;
                                             |     if (v0 != 0) {
    0x00515530 bnez v0, 0x5156cc             |         goto label_200;
                                             |     }
    0x00515534 lw a2, -0x7ef4(gp)            |     a2 = *(gp);
    0x00515538 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
    0x0051553c lw t9, -0x6a00(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.content */
    0x00515540 addiu a2, a2, -0x61a4         |     a2 += -0x61a4;
    0x00515544 addiu a1, v0, -0x27a0         |     a1 = v0 + -0x27a0;
    0x00515548 move a0, s0                   |     a0 = s0;
    0x0051554c jalr t9                       |     t9 ();
    0x00515550 move s3, v0                   |     s3 = v0;
    0x00515554 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00515558 beqz v0, 0x5156c8             |         goto label_199;
                                             |     }
    0x0051555c lbu v1, 8(v0)                 |     v1 = *((v0 + 8));
    0x00515560 addiu v0, zero, 6             |     v0 = 6;
                                             |     if (v1 != v0) {
    0x00515564 bne v1, v0, 0x5156c8          |         goto label_199;
                                             |     }
    0x00515568 nop                           |     
    0x0051556c lw v0, (s3)                   |     v0 = *(s3);
    0x00515570 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00515574 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00515578 beqz v0, 0x5156c8             |         goto label_199;
                                             |     }
    0x0051557c addiu s2, zero, 0x10          |     s2 = 0x10;
                                             |     if (v0 != 0) {
    0x00515580 beqz v0, 0x51559c             |         
    0x00515584 lw s2, 0xc(v0)                |         s2 = *((v0 + 3));
    0x00515588 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x0051558c addiu s2, s2, 0x10            |         s2 += 0x10;
    0x00515590 sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x00515594 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x00515598 bnez v0, 0x5155b4             |             goto label_201;
                                             |         }
                                             |     }
    0x0051559c lw t9, -0x7ed0(gp)            |     t9 = sym.smart_str_erealloc;
    0x005155a0 move a1, s2                   |     a1 = s2;
    0x005155a4 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x005155a8 jalr t9                       |     t9 ();
    0x005155ac lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005155b0 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_201:
    0x005155b4 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x005155b8 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x005155bc lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005155c0 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
                                             |     /* str.Content_Length:_ */
    0x005155c4 addiu a1, a1, -0x5a14         |     a1 += -0x5a14;
    0x005155c8 addu a0, a0, v0               |     a0 += v0;
    0x005155cc addiu a2, zero, 0x10          |     a2 = 0x10;
    0x005155d0 jalr t9                       |     t9 ();
    0x005155d4 lw a0, 0xcc0(sp)              |     a0 = *(var_cc0h);
    0x005155d8 lw v0, (s3)                   |     v0 = *(s3);
    0x005155dc lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005155e0 addiu s3, sp, 0x4f            |     s3 = sp + 0x4f;
    0x005155e4 sw s2, 0xc(a0)                |     *((a0 + 3)) = s2;
    0x005155e8 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005155ec move s5, s3                   |     s5 = s3;
    0x005155f0 sb zero, 0x4f(sp)             |     *(var_4fh) = 0;
    0x005155f4 addiu a1, zero, 0xa           |     a1 = 0xa;
                                             |     do {
    0x005155f8 divu zero, v0, a1             |         __asm ("divu zero, v0, a1");
    0x005155fc teq a1, zero, 7               |         __asm ("teq a1, zero, 7");
    0x00515600 addiu s3, s3, -1              |         s3 += -1;
    0x00515604 mfhi v1                       |         __asm ("mfhi v1");
    0x00515608 mflo v0                       |         __asm ("mflo v0");
    0x0051560c addiu v1, v1, 0x30            |         v1 += 0x30;
    0x00515610 sb v1, (s3)                   |         *(s3) = v1;
    0x00515614 bnez v0, 0x5155f8             |         
                                             |     } while (v0 != 0);
    0x00515618 lw s2, 0xc(a0)                |     s2 = *((a0 + 3));
    0x0051561c subu s5, s5, s3               |     __asm ("subu s5, s5, s3");
    0x00515620 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00515624 addu s2, s5, s2               |     s2 = s5 + s2;
    0x00515628 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x0051562c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00515630 bnez v0, 0x51564c             |         
    0x00515634 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00515638 move a1, s2                   |         a1 = s2;
    0x0051563c addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00515640 jalr t9                       |         t9 ();
    0x00515644 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515648 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x0051564c lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00515650 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00515654 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00515658 move a2, s5                   |     a2 = s5;
    0x0051565c move a1, s3                   |     a1 = s3;
    0x00515660 addu a0, a0, v0               |     a0 += v0;
    0x00515664 jalr t9                       |     t9 ();
    0x00515668 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x0051566c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515670 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x00515674 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00515678 addiu s2, s2, 2               |     s2 += 2;
    0x0051567c sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x00515680 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00515684 bnez v0, 0x5156a0             |         
    0x00515688 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x0051568c move a1, s2                   |         a1 = s2;
    0x00515690 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00515694 jalr t9                       |         t9 ();
    0x00515698 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051569c lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |     }
    0x005156a0 ori s1, s1, 0x10              |     s1 |= 0x10;
    0x005156a4 addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x005156a8 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x005156ac addu v0, v0, v1               |     v0 += v1;
    0x005156b0 addiu v1, zero, 0xd           |     v1 = 0xd;
    0x005156b4 sb v1, (v0)                   |     *(v0) = v1;
    0x005156b8 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x005156bc sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x005156c0 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x005156c4 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
                                             | label_199:
    0x005156c8 lw t9, -0x5f58(gp)            |     t9 = sym.imp.strlen;
                                             | label_200:
    0x005156cc move a0, s4                   |     a0 = s4;
    0x005156d0 jalr t9                       |     t9 ();
    0x005156d4 move s3, v0                   |     s3 = v0;
    0x005156d8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x005156dc lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x005156e0 beqz v0, 0x516058             |         goto label_202;
                                             |     }
    0x005156e4 lw s2, 0xc(v0)                |     s2 = *((v0 + 3));
    0x005156e8 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x005156ec addu s2, s3, s2               |     s2 = s3 + s2;
    0x005156f0 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x005156f4 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x005156f8 bnez v0, 0x515714             |         
                                             | label_49:
    0x005156fc lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00515700 move a1, s2                   |         a1 = s2;
    0x00515704 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00515708 jalr t9                       |         t9 ();
    0x0051570c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515710 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x00515714 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00515718 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x0051571c lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00515720 move a2, s3                   |     a2 = s3;
    0x00515724 move a1, s4                   |     a1 = s4;
    0x00515728 addu a0, a0, v0               |     a0 += v0;
    0x0051572c jalr t9                       |     t9 ();
    0x00515730 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00515734 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515738 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x0051573c lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00515740 addiu s2, s2, 2               |     s2 += 2;
    0x00515744 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x00515748 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x0051574c bnez v0, 0x515768             |         
    0x00515750 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00515754 move a1, s2                   |         a1 = s2;
    0x00515758 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x0051575c jalr t9                       |         t9 ();
    0x00515760 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515764 lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |     }
    0x00515768 lw t9, -0x7fe4(gp)            |     t9 = sym._efree;
    0x0051576c addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00515770 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00515774 move a0, s4                   |     a0 = s4;
    0x00515778 addu v0, v0, v1               |     v0 += v1;
    0x0051577c addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00515780 sb v1, (v0)                   |     *(v0) = v1;
    0x00515784 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00515788 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x0051578c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00515790 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x00515794 jalr t9                       |     t9 ();
    0x00515798 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             | label_198:
    0x0051579c lw v0, 0xce8(sp)              |     v0 = *(var_ce8h);
    0x005157a0 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x005157a4 beqz v0, 0x51606c             |         goto label_203;
                                             |     }
    0x005157a8 lw a2, -0x7ef4(gp)            |     a2 = *(gp);
                                             |     if (s0 == 0) {
    0x005157ac beqz s0, 0x51606c             |         goto label_203;
                                             |     }
    0x005157b0 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
    0x005157b4 lw t9, -0x6a00(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.content */
    0x005157b8 addiu a2, a2, -0x61a4         |     a2 += -0x61a4;
    0x005157bc addiu a1, v0, -0x27a0         |     a1 = v0 + -0x27a0;
    0x005157c0 move a0, s0                   |     a0 = s0;
    0x005157c4 jalr t9                       |     t9 ();
    0x005157c8 move s4, v0                   |     s4 = v0;
    0x005157cc lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x005157d0 beqz v0, 0x516068             |         goto label_204;
                                             |     }
    0x005157d4 lbu v1, 8(v0)                 |     v1 = *((v0 + 8));
    0x005157d8 addiu v0, zero, 6             |     v0 = 6;
    0x005157dc lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v1 != v0) {
    0x005157e0 bne v1, v0, 0x51606c          |         goto label_203;
                                             |     }
    0x005157e4 lw v0, (s4)                   |     v0 = *(s4);
    0x005157e8 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005157ec lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x005157f0 beqz v0, 0x51606c             |         goto label_203;
                                             |     }
    0x005157f4 andi v0, s1, 0x10             |     v0 = s1 & 0x10;
    0x005157f8 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 != 0) {
    0x005157fc bnez v0, 0x515948             |         goto label_205;
                                             |     }
    0x00515800 addiu s2, zero, 0x10          |     s2 = 0x10;
                                             |     if (v0 != 0) {
    0x00515804 beqz v0, 0x515820             |         
    0x00515808 lw s2, 0xc(v0)                |         s2 = *((v0 + 3));
    0x0051580c lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x00515810 addiu s2, s2, 0x10            |         s2 += 0x10;
    0x00515814 sltu v0, s2, v0               |         v0 = (s2 < v0) ? 1 : 0;
    0x00515818 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x0051581c bnez v0, 0x515838             |             goto label_206;
                                             |         }
                                             |     }
    0x00515820 lw t9, -0x7ed0(gp)            |     t9 = sym.smart_str_erealloc;
    0x00515824 move a1, s2                   |     a1 = s2;
    0x00515828 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x0051582c jalr t9                       |     t9 ();
    0x00515830 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515834 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             | label_206:
    0x00515838 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x0051583c addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00515840 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00515844 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
                                             |     /* str.Content_Length:_ */
    0x00515848 addiu a1, a1, -0x5a14         |     a1 += -0x5a14;
    0x0051584c addu a0, a0, v0               |     a0 += v0;
    0x00515850 addiu a2, zero, 0x10          |     a2 = 0x10;
    0x00515854 jalr t9                       |     t9 ();
    0x00515858 lw a0, 0xcc0(sp)              |     a0 = *(var_cc0h);
    0x0051585c lw v0, (s4)                   |     v0 = *(s4);
    0x00515860 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515864 addiu s3, sp, 0x4f            |     s3 = sp + 0x4f;
    0x00515868 sw s2, 0xc(a0)                |     *((a0 + 3)) = s2;
    0x0051586c lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00515870 move s5, s3                   |     s5 = s3;
    0x00515874 sb zero, 0x4f(sp)             |     *(var_4fh) = 0;
    0x00515878 addiu a1, zero, 0xa           |     a1 = 0xa;
                                             |     do {
    0x0051587c divu zero, v0, a1             |         __asm ("divu zero, v0, a1");
    0x00515880 teq a1, zero, 7               |         __asm ("teq a1, zero, 7");
    0x00515884 addiu s3, s3, -1              |         s3 += -1;
    0x00515888 mfhi v1                       |         __asm ("mfhi v1");
    0x0051588c mflo v0                       |         __asm ("mflo v0");
    0x00515890 addiu v1, v1, 0x30            |         v1 += 0x30;
    0x00515894 sb v1, (s3)                   |         *(s3) = v1;
    0x00515898 bnez v0, 0x51587c             |         
                                             |     } while (v0 != 0);
    0x0051589c lw s2, 0xc(a0)                |     s2 = *((a0 + 3));
    0x005158a0 subu s5, s5, s3               |     __asm ("subu s5, s5, s3");
    0x005158a4 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x005158a8 addu s2, s5, s2               |     s2 = s5 + s2;
    0x005158ac sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x005158b0 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x005158b4 bnez v0, 0x5158d0             |         
    0x005158b8 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x005158bc move a1, s2                   |         a1 = s2;
    0x005158c0 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x005158c4 jalr t9                       |         t9 ();
    0x005158c8 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005158cc lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x005158d0 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x005158d4 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x005158d8 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x005158dc move a2, s5                   |     a2 = s5;
    0x005158e0 move a1, s3                   |     a1 = s3;
    0x005158e4 addu a0, a0, v0               |     a0 += v0;
    0x005158e8 jalr t9                       |     t9 ();
    0x005158ec lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x005158f0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005158f4 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
    0x005158f8 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x005158fc addiu s2, s2, 2               |     s2 += 2;
    0x00515900 sltu v0, s2, v0               |     v0 = (s2 < v0) ? 1 : 0;
    0x00515904 lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00515908 bnez v0, 0x515924             |         
    0x0051590c lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00515910 move a1, s2                   |         a1 = s2;
    0x00515914 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00515918 jalr t9                       |         t9 ();
    0x0051591c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515920 lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |     }
    0x00515924 addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00515928 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x0051592c addu v0, v0, v1               |     v0 += v1;
    0x00515930 addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00515934 sb v1, (v0)                   |     *(v0) = v1;
    0x00515938 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x0051593c sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x00515940 lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00515944 sw s2, 0xc(v0)                |     *((v0 + 3)) = s2;
                                             | label_205:
    0x00515948 andi s1, s1, 0x20             |     s1 &= 0x20;
    0x0051594c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (s1 == 0) {
    0x00515950 bnez s1, 0x5159d8             |         
    0x00515954 addiu s1, zero, 0x31          |         s1 = 0x31;
                                             |         if (v0 != 0) {
    0x00515958 beqz v0, 0x515974             |             
    0x0051595c lw s1, 0xc(v0)                |             s1 = *((v0 + 3));
    0x00515960 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x00515964 addiu s1, s1, 0x31            |             s1 += 0x31;
    0x00515968 sltu v0, s1, v0               |             v0 = (s1 < v0) ? 1 : 0;
    0x0051596c lw v0, 0xcc0(sp)              |             v0 = *(var_cc0h);
                                             |             if (v0 != 0) {
    0x00515970 bnez v0, 0x51598c             |                 goto label_207;
                                             |             }
                                             |         }
    0x00515974 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00515978 move a1, s1                   |         a1 = s1;
    0x0051597c addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00515980 jalr t9                       |         t9 ();
    0x00515984 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515988 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_207:
    0x0051598c lw a1, -0x7fc0(gp)            |         a1 = *((gp - 8176));
    0x00515990 addiu a0, v0, 0x10            |         a0 = v0 + 0x10;
    0x00515994 lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00515998 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x0051599c addiu a2, zero, 0x31          |         a2 = 0x31;
                                             |         /* str.Content_Type:_application_x_www_form_urlencoded_r_n */
    0x005159a0 addiu a1, a1, -0x5a00         |         a1 += -0x5a00;
    0x005159a4 addu a0, a0, v0               |         a0 += v0;
    0x005159a8 jalr t9                       |         t9 ();
    0x005159ac lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005159b0 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x005159b4 addiu a1, zero, 8             |         a1 = 8;
    0x005159b8 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x005159bc lw t9, -0x7ef0(gp)            |         t9 = sym.php_error_docref0;
    0x005159c0 sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
                                             |         /* str.Content_type_not_specified_assuming_application_x_www_form_urlencoded */
    0x005159c4 addiu a2, a2, -0x59cc         |         a2 += -0x59cc;
    0x005159c8 move a0, zero                 |         a0 = 0;
    0x005159cc jalr t9                       |         t9 ();
    0x005159d0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005159d4 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x005159d8 addiu s1, zero, 2             |     s1 = 2;
                                             |     if (v0 != 0) {
    0x005159dc beqz v0, 0x5159f8             |         
    0x005159e0 lw s1, 0xc(v0)                |         s1 = *((v0 + 3));
    0x005159e4 lw v0, 0xcc4(sp)              |         v0 = *(var_cc4h);
    0x005159e8 addiu s1, s1, 2               |         s1 += 2;
    0x005159ec sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x005159f0 lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             |         if (v0 != 0) {
    0x005159f4 bnez v0, 0x515a10             |             goto label_208;
                                             |         }
                                             |     }
    0x005159f8 lw t9, -0x7ed0(gp)            |     t9 = sym.smart_str_erealloc;
    0x005159fc move a1, s1                   |     a1 = s1;
    0x00515a00 addiu a0, sp, 0xcc0           |     a0 = sp + 0xcc0;
    0x00515a04 jalr t9                       |     t9 ();
    0x00515a08 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00515a0c lw v1, 0xcc0(sp)              |     v1 = *(var_cc0h);
                                             | label_208:
    0x00515a10 addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00515a14 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00515a18 addu v0, v0, v1               |     v0 += v1;
    0x00515a1c addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00515a20 sb v1, (v0)                   |     *(v0) = v1;
    0x00515a24 addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00515a28 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x00515a2c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
    0x00515a30 sw s1, 0xc(v0)                |     *((v0 + 3)) = s1;
    0x00515a34 lw v0, (s4)                   |     v0 = *(s4);
    0x00515a38 addiu s3, v0, 0x10            |     s3 = v0 + 0x10;
    0x00515a3c lw s2, 0xc(v0)                |     s2 = *((v0 + 3));
    0x00515a40 lw v0, 0xcc4(sp)              |     v0 = *(var_cc4h);
    0x00515a44 addu s1, s2, s1               |     s1 = s2 + s1;
    0x00515a48 sltu v0, s1, v0               |     v0 = (s1 < v0) ? 1 : 0;
    0x00515a4c lw v0, 0xcc0(sp)              |     v0 = *(var_cc0h);
                                             |     if (v0 == 0) {
    0x00515a50 bnez v0, 0x515a6c             |         
    0x00515a54 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00515a58 move a1, s1                   |         a1 = s1;
    0x00515a5c addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00515a60 jalr t9                       |         t9 ();
    0x00515a64 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515a68 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             |     }
    0x00515a6c lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00515a70 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00515a74 lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00515a78 move a2, s2                   |     a2 = s2;
    0x00515a7c move a1, s3                   |     a1 = s3;
    0x00515a80 addu a0, a0, v0               |     a0 += v0;
    0x00515a84 jalr t9                       |     t9 ();
    0x00515a88 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     do {
    0x00515a8c lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
    0x00515a90 lw a1, 0xcc0(sp)              |         a1 = *(var_cc0h);
    0x00515a94 lw t9, -0x7a60(gp)            |         t9 = sym._php_stream_write;
    0x00515a98 sw s1, 0xc(v0)                |         *((v0 + 3)) = s1;
    0x00515a9c lw a2, 0xc(a1)                |         a2 = *((a1 + 3));
    0x00515aa0 move a0, s6                   |         a0 = s6;
    0x00515aa4 addiu a1, a1, 0x10            |         a1 += 0x10;
    0x00515aa8 jalr t9                       |         t9 ();
    0x00515aac lw v0, 0xd50(sp)              |         v0 = *(arg_d50h);
    0x00515ab0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515ab4 sb zero, 0x830(sp)            |         *(var_830h) = 0;
    0x00515ab8 lbu v0, 8(v0)                 |         v0 = *((v0 + 8));
    0x00515abc lw t9, -0x7a7c(gp)            |         t9 = sym._php_stream_eof;
                                             |         if (v0 == 0) {
    0x00515ac0 bnez v0, 0x515adc             |             
    0x00515ac4 lw t9, -0x7f08(gp)            |             t9 = sym._array_init;
    0x00515ac8 lw a0, 0xd50(sp)              |             a0 = *(arg_d50h);
    0x00515acc move a1, zero                 |             a1 = 0;
    0x00515ad0 jalr t9                       |             t9 ();
    0x00515ad4 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00515ad8 lw t9, -0x7a7c(gp)            |             t9 = sym._php_stream_eof;
                                             |         }
    0x00515adc move a0, s6                   |         a0 = s6;
    0x00515ae0 jalr t9                       |         t9 ();
    0x00515ae4 sw v0, 0xcf8(sp)              |         *(var_cf8h) = v0;
    0x00515ae8 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00515aec bnez v0, 0x5161c0             |             goto label_209;
                                             |         }
    0x00515af0 lw t9, -0x7a74(gp)            |         t9 = sym._php_stream_get_line;
    0x00515af4 addiu s5, sp, 0x430           |         s5 = sp + 0x430;
    0x00515af8 addiu s3, sp, 0xc30           |         s3 = sp + 0xc30;
    0x00515afc move a3, s5                   |         a3 = s5;
    0x00515b00 addiu a2, zero, 0x7f          |         a2 = 0x7f;
    0x00515b04 move a1, s3                   |         a1 = s3;
    0x00515b08 move a0, s6                   |         a0 = s6;
    0x00515b0c jalr t9                       |         t9 ();
    0x00515b10 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00515b14 beqz v0, 0x5161b8             |             goto label_210;
                                             |         }
    0x00515b18 lw v0, 0x430(sp)              |         v0 = *(var_430h);
    0x00515b1c sltiu v0, v0, 0xa             |         v0 = (v0 < 0xa) ? 1 : 0;
                                             |         if (v0 != 0) {
    0x00515b20 bnez v0, 0x5160c4             |             goto label_211;
                                             |         }
    0x00515b24 nop                           |         
    0x00515b28 lw t9, -0x5fe0(gp)            |         t9 = sym.imp.atoi;
    0x00515b2c addiu a0, sp, 0xc39           |         a0 = sp + 0xc39;
    0x00515b30 jalr t9                       |         t9 ();
    0x00515b34 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515b38 sw v0, 0xce0(sp)              |         *(var_ce0h) = v0;
                                             | label_50:
    0x00515b3c lw v0, 0xcdc(sp)              |         v0 = *(var_cdch);
                                             |         if (s0 != 0) {
    0x00515b40 bnez s0, 0x5160cc             |             goto label_212;
                                             |         }
                                             | label_51:
    0x00515b44 sw zero, 0xcf4(sp)            |         *(var_cf4h) = 0;
                                             | label_52:
    0x00515b48 lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
    0x00515b4c andi v0, v0, 0x200            |         v0 &= 0x200;
    0x00515b50 addiu s1, zero, 1             |         s1 = 1;
                                             |         if (v0 == 0) {
    0x00515b54 bnez v0, 0x515b60             |             
    0x00515b58 lw v0, 0xcf4(sp)              |             v0 = *(var_cf4h);
    0x00515b5c sltu s1, zero, v0             |             s1 = (0 < v0) ? 1 : 0;
                                             |         }
    0x00515b60 lw v0, 0xce0(sp)              |         v0 = *(var_ce0h);
    0x00515b64 addiu v0, v0, -0x64           |         v0 += -0x64;
    0x00515b68 sltiu v0, v0, 0x64            |         v0 = (v0 < 0x64) ? 1 : 0;
    0x00515b6c lw v0, 0xce0(sp)              |         v0 = *(var_ce0h);
                                             |         if (v0 != 0) {
    0x00515b70 beqz v0, 0x515ba8             |             
    0x00515b74 lw s2, -0x7fc0(gp)            |             s2 = *((gp - 8176));
                                             |             /* str.HTTP_1 */
    0x00515b78 addiu s2, s2, -0x5974         |             s2 += -0x5974;
                                             | label_55:
    0x00515b7c lw t9, -0x7a7c(gp)            |             t9 = sym._php_stream_eof;
                                             | label_54:
    0x00515b80 move a0, s6                   |             a0 = s6;
    0x00515b84 jalr t9                       |             t9 ();
    0x00515b88 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00515b8c beqz v0, 0x516108             |                 goto label_213;
                                             |             }
                                             | label_53:
    0x00515b90 lw v0, 0x430(sp)              |             v0 = *(var_430h);
                                             | label_56:
    0x00515b94 sltiu v0, v0, 0xa             |             v0 = (v0 < 0xa) ? 1 : 0;
                                             |             if (v0 == 0) {
    0x00515b98 beqz v0, 0x51615c             |                 goto label_214;
                                             |             }
    0x00515b9c nop                           |             
    0x00515ba0 sw zero, 0xce0(sp)            |             *(var_ce0h) = 0;
                                             | label_57:
    0x00515ba4 lw v0, 0xce0(sp)              |             v0 = *(var_ce0h);
                                             |         }
    0x00515ba8 addiu v0, v0, -0xc8           |         v0 += -0xc8;
    0x00515bac sltiu v0, v0, 0xc8            |         v0 = (v0 < 0xc8) ? 1 : 0;
    0x00515bb0 addiu s7, sp, 0x30            |         s7 = sp + 0x30;
                                             |         if (v0 != 0) {
    0x00515bb4 bnez v0, 0x5161b0             |             goto label_215;
                                             |         }
    0x00515bb8 lw v1, 0xce0(sp)              |         v1 = *(var_ce0h);
    0x00515bbc addiu v0, zero, 0x193         |         v0 = 0x193;
    0x00515bc0 lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |         if (v1 != v0) {
    0x00515bc4 bne v1, v0, 0x516174          |             goto label_216;
                                             |         }
                                             |         if (s0 != 0) {
    0x00515bc8 beqz s0, 0x515c0c             |             
    0x00515bcc nop                           |             
    0x00515bd0 lw v0, (s0)                   |             v0 = *(s0);
    0x00515bd4 lw v0, 0x430(sp)              |             v0 = *(var_430h);
                                             |             if (v0 == 0) {
    0x00515bd8 beqz v0, 0x515c0c             |                 goto label_217;
                                             |             }
    0x00515bdc sw zero, 0x1c(sp)             |             *(var_1ch) = 0;
    0x00515be0 sw zero, 0x18(sp)             |             *(var_18h) = 0;
    0x00515be4 sw zero, 0x14(sp)             |             *(var_14h) = 0;
    0x00515be8 sw v1, 0x10(sp)               |             *(var_10h) = v1;
    0x00515bec move a3, s3                   |             a3 = s3;
    0x00515bf0 addiu a2, zero, 2             |             a2 = 2;
    0x00515bf4 addiu a1, zero, 0xa           |             a1 = 0xa;
                                             | label_60:
    0x00515bf8 lw t9, -0x6a14(gp)            |             t9 = sym.php_stream_notification_notify;
    0x00515bfc move a0, s0                   |             a0 = s0;
    0x00515c00 jalr t9                       |             t9 ();
    0x00515c04 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             | label_59:
    0x00515c08 lw v0, 0x430(sp)              |             v0 = *(var_430h);
                                             |         }
                                             | label_217:
    0x00515c0c addiu v1, v0, -1              |         v1 = v0 + -1;
                                             |         if (v0 != 0) {
    0x00515c10 beqz v0, 0x515c4c             |             
                                             | label_102:
    0x00515c14 addu a0, s7, v1               |             a0 = s7 + v1;
    0x00515c18 lb a1, 0xc00(a0)              |             a1 = *(var_c00h);
    0x00515c1c addiu a0, zero, 0xa           |             a0 = 0xa;
                                             |             if (a1 != a0) {
    0x00515c20 bne a1, a0, 0x515c4c          |                 goto label_58;
                                             |             }
    0x00515c24 nop                           |             
    0x00515c28 sw v1, 0x430(sp)              |             *(var_430h) = v1;
                                             |             if (v1 == 0) {
    0x00515c2c beqz v1, 0x515c4c             |                 goto label_58;
                                             |             }
    0x00515c30 addiu v0, v0, -2              |             v0 += -2;
    0x00515c34 addu v1, s7, v0               |             v1 = s7 + v0;
    0x00515c38 lb a0, 0xc00(v1)              |             a0 = *(var_c00h_2);
    0x00515c3c addiu v1, zero, 0xd           |             v1 = 0xd;
    0x00515c40 lw s4, 0x430(sp)              |             s4 = *(var_430h);
                                             |             if (a0 != v1) {
    0x00515c44 bne a0, v1, 0x515c50          |                 goto label_218;
                                             |             }
    0x00515c48 sw v0, 0x430(sp)              |             *(var_430h) = v0;
                                             |         }
                                             | label_58:
    0x00515c4c lw s4, 0x430(sp)              |         s4 = *(var_430h);
                                             | label_218:
    0x00515c50 lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x00515c54 addiu a0, s4, 0x18            |         a0 = s4 + 0x18;
    0x00515c58 addiu v0, zero, -8            |         v0 = -8;
    0x00515c5c and a0, a0, v0                |         a0 &= v0;
    0x00515c60 jalr t9                       |         t9 ();
    0x00515c64 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515c68 move s2, v0                   |         s2 = v0;
    0x00515c6c addiu v0, zero, 1             |         v0 = 1;
    0x00515c70 sw v0, (s2)                   |         *(s2) = v0;
    0x00515c74 lw t9, -0x5f48(gp)            |         t9 = sym.imp.memcpy;
    0x00515c78 addiu v0, zero, 6             |         v0 = 6;
    0x00515c7c move a2, s4                   |         a2 = s4;
    0x00515c80 sw s4, 0xc(s2)                |         *((s2 + 3)) = s4;
    0x00515c84 move a1, s3                   |         a1 = s3;
    0x00515c88 addiu a0, s2, 0x10            |         a0 = s2 + 0x10;
    0x00515c8c sw v0, 4(s2)                  |         *((s2 + 1)) = v0;
    0x00515c90 sw zero, 8(s2)                |         *((s2 + 2)) = 0;
    0x00515c94 jalr t9                       |         t9 ();
    0x00515c98 addiu v0, zero, 0x1406        |         v0 = 0x1406;
    0x00515c9c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515ca0 sw v0, 0x38(sp)               |         *(var_38h) = v0;
    0x00515ca4 lw v0, 0xd50(sp)              |         v0 = *(arg_d50h);
    0x00515ca8 addu s4, s2, s4               |         s4 = s2 + s4;
    0x00515cac lw t9, -0x7c10(gp)            |         t9 = sym._zend_hash_next_index_insert;
    0x00515cb0 lw a0, (v0)                   |         a0 = *(v0);
    0x00515cb4 sb zero, 0x10(s4)             |         *((s4 + 16)) = 0;
    0x00515cb8 sw s2, 0x30(sp)               |         *(var_30h) = s2;
    0x00515cbc move a1, s7                   |         a1 = s7;
    0x00515cc0 jalr t9                       |         t9 ();
    0x00515cc4 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515cc8 sw s1, 0xcf8(sp)              |         *(var_cf8h) = s1;
                                             | label_61:
    0x00515ccc lw t9, -0x6a80(gp)            |         t9 = sym._emalloc_1024;
    0x00515cd0 move s7, zero                 |         s7 = 0;
    0x00515cd4 jalr t9                       |         t9 ();
    0x00515cd8 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515cdc move s1, v0                   |         s1 = v0;
    0x00515ce0 addiu s4, zero, 1             |         s4 = 1;
    0x00515ce4 lw v0, -0x7fc0(gp)            |         v0 = *((gp - 8176));
    0x00515ce8 sw zero, 0xce4(sp)            |         *(var_ce4h) = 0;
                                             |         /* str.Location: */
    0x00515cec addiu v0, v0, -0x5920         |         v0 += -0x5920;
    0x00515cf0 sw v0, 0xcfc(sp)              |         *(var_cfch) = v0;
    0x00515cf4 lw v0, -0x7fc0(gp)            |         v0 = *((gp - 8176));
                                             |         /* str.Content_Type: */
    0x00515cf8 addiu v0, v0, -0x5904         |         v0 += -0x5904;
    0x00515cfc sw v0, 0xd00(sp)              |         *(var_d00h) = v0;
    0x00515d00 lw v0, -0x7fc0(gp)            |         v0 = *((gp - 8176));
    0x00515d04 sw v0, 0xd04(sp)              |         *(var_d04h) = v0;
                                             | label_63:
    0x00515d08 lw t9, -0x7a7c(gp)            |         t9 = sym._php_stream_eof;
                                             | label_67:
    0x00515d0c move a0, s6                   |         a0 = s6;
    0x00515d10 jalr t9                       |         t9 ();
    0x00515d14 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00515d18 beqz v0, 0x5161ec             |             goto label_219;
                                             |         }
                                             | label_62:
    0x00515d1c lw v0, 0xcf8(sp)              |         v0 = *(var_cf8h);
                                             |         if (v0 != 0) {
    0x00515d20 beqz v0, 0x515d34             |             
    0x00515d24 nop                           |             
    0x00515d28 lb v0, 0x830(sp)              |             v0 = *(var_830h);
                                             |             if (v0 == 0) {
    0x00515d2c beqz v0, 0x51640c             |                 goto label_82;
                                             |             }
    0x00515d30 nop                           |             
                                             |         }
    0x00515d34 lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
                                             |         if (s4 == 0) {
    0x00515d38 beqz s4, 0x51640c             |             goto label_82;
                                             |         }
    0x00515d3c andi v0, v0, 0x200            |         v0 &= 0x200;
    0x00515d40 lw v0, 0xd48(sp)              |         v0 = *(arg_d48h);
                                             |         if (v0 == 0) {
    0x00515d44 bnez v0, 0x515d58             |             
    0x00515d48 lw v0, 0xcf4(sp)              |             v0 = *(var_cf4h);
    0x00515d4c lb v0, 0x830(sp)              |             v0 = *(var_830h);
                                             |             if (v0 == 0) {
    0x00515d50 beqz v0, 0x515d64             |                 goto label_220;
                                             |             }
    0x00515d54 lw v0, 0xd48(sp)              |             v0 = *(arg_d48h);
                                             |         }
    0x00515d58 slti v0, v0, 2                |         v0 = (v0 < 2) ? 1 : 0;
    0x00515d5c lb v0, 0x830(sp)              |         v0 = *(var_830h);
                                             |         if (v0 != 0) {
    0x00515d60 bnez v0, 0x51640c             |             goto label_82;
                                             |         }
                                             | label_220:
    0x00515d64 lw t9, -0x7a1c(gp)            |         t9 = sym._php_stream_free;
                                             |         if (v0 != 0) {
    0x00515d68 beqz v0, 0x515dac             |             
                                             |             if (s0 == 0) {
    0x00515d6c beqz s0, 0x515dac             |                 goto label_221;
                                             |             }
    0x00515d70 nop                           |             
    0x00515d74 lw v0, (s0)                   |             v0 = *(s0);
    0x00515d78 lw t9, -0x6a14(gp)            |             t9 = sym.php_stream_notification_notify;
                                             |             if (v0 != 0) {
    0x00515d7c beqz v0, 0x515da8             |                 
    0x00515d80 sw zero, 0x1c(sp)             |                 *(var_1ch) = 0;
    0x00515d84 sw zero, 0x18(sp)             |                 *(var_18h) = 0;
    0x00515d88 sw zero, 0x14(sp)             |                 *(var_14h) = 0;
    0x00515d8c sw zero, 0x10(sp)             |                 *(var_10h) = 0;
    0x00515d90 addiu a3, sp, 0x830           |                 a3 = sp + 0x830;
    0x00515d94 move a2, zero                 |                 a2 = 0;
    0x00515d98 addiu a1, zero, 6             |                 a1 = 6;
    0x00515d9c move a0, s0                   |                 a0 = s0;
    0x00515da0 jalr t9                       |                 t9 ();
    0x00515da4 lw gp, 0x28(sp)               |                 gp = *(var_28h);
                                             |             }
    0x00515da8 lw t9, -0x7a1c(gp)            |             t9 = sym._php_stream_free;
                                             |         }
                                             | label_221:
    0x00515dac addiu a1, zero, 3             |         a1 = 3;
    0x00515db0 move a0, s6                   |         a0 = s6;
    0x00515db4 jalr t9                       |         t9 ();
    0x00515db8 lb s4, 0x830(sp)              |         s4 = *(var_830h);
    0x00515dbc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (s4 == 0) {
    0x00515dc0 beqz s4, 0x5169f0             |             goto label_222;
                                             |         }
    0x00515dc4 lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
    0x00515dc8 addiu s2, sp, 0x830           |         s2 = sp + 0x830;
    0x00515dcc sb zero, 0x430(sp)            |         *(var_430h) = 0;
    0x00515dd0 move a0, s2                   |         a0 = s2;
    0x00515dd4 jalr t9                       |         t9 ();
    0x00515dd8 sltiu v0, v0, 8               |         v0 = (v0 < 8) ? 1 : 0;
    0x00515ddc lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00515de0 bnez v0, 0x515e64             |             
    0x00515de4 lw a1, -0x7fc0(gp)            |             a1 = *((gp - 8176));
    0x00515de8 lw t9, -0x60b0(gp)            |             t9 = sym.imp.strncasecmp;
    0x00515dec addiu a2, zero, 7             |             a2 = 7;
                                             |             /* str.http:__ */
    0x00515df0 addiu a1, a1, -0x58b4         |             a1 += -0x58b4;
    0x00515df4 move a0, s2                   |             a0 = s2;
    0x00515df8 jalr t9                       |             t9 ();
    0x00515dfc lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00515e00 beqz v0, 0x5167f4             |                 goto label_223;
                                             |             }
    0x00515e04 lw a1, -0x7fc0(gp)            |             a1 = *((gp - 8176));
    0x00515e08 lw t9, -0x60b0(gp)            |             t9 = sym.imp.strncasecmp;
    0x00515e0c addiu a2, zero, 8             |             a2 = 8;
                                             |             /* str.https:__ */
    0x00515e10 addiu a1, a1, -0x58ac         |             a1 += -0x58ac;
    0x00515e14 move a0, s2                   |             a0 = s2;
    0x00515e18 jalr t9                       |             t9 ();
    0x00515e1c lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00515e20 beqz v0, 0x5167f4             |                 goto label_223;
                                             |             }
    0x00515e24 lw a1, -0x7fc0(gp)            |             a1 = *((gp - 8176));
    0x00515e28 lw t9, -0x60b0(gp)            |             t9 = sym.imp.strncasecmp;
    0x00515e2c addiu a2, zero, 6             |             a2 = 6;
                                             |             /* str.ftp:__ */
    0x00515e30 addiu a1, a1, -0x58a0         |             a1 += -0x58a0;
    0x00515e34 move a0, s2                   |             a0 = s2;
    0x00515e38 jalr t9                       |             t9 ();
    0x00515e3c lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00515e40 beqz v0, 0x5167f4             |                 goto label_223;
                                             |             }
    0x00515e44 lw a1, -0x7fc0(gp)            |             a1 = *((gp - 8176));
    0x00515e48 lw t9, -0x60b0(gp)            |             t9 = sym.imp.strncasecmp;
    0x00515e4c addiu a2, zero, 7             |             a2 = 7;
                                             |             /* str.ftps:__ */
    0x00515e50 addiu a1, a1, -0x5898         |             a1 += -0x5898;
    0x00515e54 move a0, s2                   |             a0 = s2;
    0x00515e58 jalr t9                       |             t9 ();
    0x00515e5c lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |             if (v0 == 0) {
    0x00515e60 beqz v0, 0x5167f4             |                 goto label_223;
                                             |             }
                                             |         }
    0x00515e64 addiu s6, zero, 0x2f          |         s6 = 0x2f;
    0x00515e68 addiu s3, sp, 0x30            |         s3 = sp + 0x30;
                                             |         if (s4 == s6) {
    0x00515e6c beq s4, s6, 0x5167a8          |             goto label_224;
                                             |         }
    0x00515e70 lb v0, 0x831(sp)              |         v0 = *(var_831h);
    0x00515e74 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
                                             |         if (v0 == 0) {
    0x00515e78 beqz v0, 0x516788             |             goto label_225;
                                             |         }
    0x00515e7c lw s4, 0x14(fp)               |         s4 = *(arg_d44h);
    0x00515e80 lw t9, -0x7f54(gp)            |         t9 = sym.ap_php_snprintf;
                                             |         if (s4 == 0) {
    0x00515e84 beqz s4, 0x51678c             |             goto label_226;
                                             |         }
    0x00515e88 lw t9, -0x5e18(gp)            |         t9 = sym.imp.strrchr;
    0x00515e8c addiu a1, zero, 0x2f          |         a1 = 0x2f;
    0x00515e90 move a0, s4                   |         a0 = s4;
    0x00515e94 jalr t9                       |         t9 ();
    0x00515e98 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 == 0) {
    0x00515e9c bnez v0, 0x515ed4             |             
    0x00515ea0 lb v0, (s4)                   |             v0 = *(s4);
                                             |             if (v0 != 0) {
    0x00515ea4 bnez v0, 0x51676c             |                 goto label_227;
                                             |             }
    0x00515ea8 nop                           |             
    0x00515eac lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
    0x00515eb0 move a0, s4                   |             a0 = s4;
    0x00515eb4 jalr t9                       |             t9 ();
    0x00515eb8 lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00515ebc lw a0, -0x7fbc(gp)            |             a0 = *((gp - 8175));
    0x00515ec0 lw t9, -0x7f6c(gp)            |             t9 = sym._estrdup;
    0x00515ec4 addiu a0, a0, -0x5010         |             a0 += -0x5010;
    0x00515ec8 jalr t9                       |             t9 ();
    0x00515ecc lw gp, 0x28(sp)               |             gp = *(var_28h);
    0x00515ed0 sw v0, 0x14(fp)               |             *(arg_d44h) = v0;
                                             |         }
                                             | label_76:
    0x00515ed4 sb zero, 1(v0)                |         *((v0 + 1)) = 0;
    0x00515ed8 lw a3, 0x14(fp)               |         a3 = *(arg_d44h);
    0x00515edc lw t9, -0x7f54(gp)            |         t9 = sym.ap_php_snprintf;
                                             |         if (a3 == 0) {
    0x00515ee0 beqz a3, 0x516778             |             goto label_228;
                                             |         }
    0x00515ee4 lb v1, (a3)                   |         v1 = *(a3);
    0x00515ee8 addiu v0, zero, 0x2f          |         v0 = 0x2f;
                                             |         if (v1 != v0) {
    0x00515eec bne v1, v0, 0x516778          |             goto label_228;
                                             |         }
    0x00515ef0 nop                           |         
    0x00515ef4 lb v0, 1(a3)                  |         v0 = *((a3 + 1));
    0x00515ef8 lw a2, -0x7fc4(gp)            |         a2 = *((gp - 8177));
                                             |         if (v0 != 0) {
    0x00515efc bnez v0, 0x51677c             |             goto label_229;
                                             |         }
    0x00515f00 lw a2, -0x7fb8(gp)            |         a2 = *(gp);
    0x00515f04 sw s2, 0x10(sp)               |         *(var_10h) = s2;
                                             |         /* esilref: '&s&s' */
    0x00515f08 addiu a2, a2, -0x205c         |         a2 += -0x205c;
                                             | label_77:
    0x00515f0c addiu a1, zero, 0x3ff         |         a1 = 0x3ff;
    0x00515f10 move a0, s3                   |         a0 = s3;
    0x00515f14 bal 0x52db34                  |         sym_ap_php_snprintf ();
    0x00515f18 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             | label_78:
    0x00515f1c lw v1, 0xcd8(sp)              |         v1 = *(var_cd8h);
    0x00515f20 lhu v0, 0x10(fp)              |         v0 = *(arg_10h);
    0x00515f24 lw a3, (fp)                   |         a3 = *(fp);
    0x00515f28 lw t9, -0x7f54(gp)            |         t9 = sym.ap_php_snprintf;
                                             |         if (v1 == 0) {
    0x00515f2c beqz v1, 0x5167c4             |             goto label_230;
                                             |         }
    0x00515f30 addiu v1, zero, 0x1bb         |         v1 = 0x1bb;
                                             | label_79:
    0x00515f34 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
                                             |         if (v0 == v1) {
    0x00515f38 beq v0, v1, 0x5167cc          |             goto label_231;
                                             |         }
    0x00515f3c sw s3, 0x18(sp)               |         *(var_18h) = s3;
    0x00515f40 sw v0, 0x14(sp)               |         *(var_14h) = v0;
    0x00515f44 lw v0, 0xc(fp)                |         v0 = *(arg_d3ch);
                                             |         /* str._s:___s:_d_s */
    0x00515f48 addiu a2, a2, -0x588c         |         a2 += -0x588c;
    0x00515f4c sw v0, 0x10(sp)               |         *(var_10h) = v0;
    0x00515f50 addiu a1, zero, 0x3ff         |         a1 = 0x3ff;
    0x00515f54 move a0, s5                   |         a0 = s5;
    0x00515f58 bal 0x52db34                  |         sym_ap_php_snprintf ();
    0x00515f5c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             | label_80:
    0x00515f60 lw t9, -0x7030(gp)            |         t9 = sym.php_url_free;
    0x00515f64 move a0, fp                   |         a0 = fp;
    0x00515f68 bal 0x503034                  |         sym_php_url_free ();
    0x00515f6c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515f70 lw t9, -0x6a1c(gp)            |         t9 = sym.php_url_parse;
    0x00515f74 move a0, s5                   |         a0 = s5;
    0x00515f78 bal 0x5039d4                  |         sym_php_url_parse ();
    0x00515f7c move fp, v0                   |         fp = v0;
    0x00515f80 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |         if (v0 != 0) {
    0x00515f84 bnez v0, 0x516810             |             goto label_232;
                                             |         }
                                             | label_84:
    0x00515f88 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x00515f8c move a3, s5                   |         a3 = s5;
                                             |         /* str.Invalid_redirect_URL___s */
    0x00515f90 addiu a2, a2, -0x5870         |         a2 += -0x5870;
                                             | label_87:
    0x00515f94 lw t9, -0x6a10(gp)            |         t9 = sym.php_stream_wrapper_log_error;
    0x00515f98 lw a1, 0xd3c(sp)              |         a1 = *(arg_d3ch);
    0x00515f9c lw a0, 0xd30(sp)              |         a0 = *(arg_d30h);
    0x00515fa0 jalr t9                       |         t9 ();
    0x00515fa4 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515fa8 b 0x513db0                    |         goto label_40;
                                             | label_181:
    0x00515fac addiu s5, s5, -1              |         s5 += -1;
    0x00515fb0 b 0x514d1c                    |         goto label_41;
                                             | label_180:
    0x00515fb4 move a0, s7                   |         a0 = s7;
    0x00515fb8 jalr t9                       |         t9 ();
    0x00515fbc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515fc0 subu a1, s7, s3               |         __asm ("subu a1, s7, s3");
    0x00515fc4 subu s3, s5, s3               |         __asm ("subu s3, s5, s3");
    0x00515fc8 lw t9, -0x60b4(gp)            |         t9 = sym.imp.memmove;
    0x00515fcc addiu a2, v0, 1               |         a2 = v0 + 1;
    0x00515fd0 addu a1, s4, a1               |         a1 = s4 + a1;
    0x00515fd4 addu a0, s4, s3               |         a0 = s4 + s3;
    0x00515fd8 jalr t9                       |         t9 ();
    0x00515fdc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515fe0 b 0x514d60                    |         goto label_42;
                                             | label_182:
    0x00515fe4 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00515fe8 jalr t9                       |         t9 ();
    0x00515fec nop                           |         
    0x00515ff0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00515ff4 b 0x514d9c                    |         goto label_43;
                                             | label_183:
    0x00515ff8 addiu s2, zero, 0x15          |         s2 = 0x15;
    0x00515ffc b 0x514eb0                    |         goto label_44;
                                             | label_185:
    0x00516000 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00516004 jalr t9                       |         t9 ();
    0x00516008 nop                           |         
    0x0051600c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00516010 b 0x515010                    |         goto label_45;
                                             | label_189:
    0x0051601c addiu v1, zero, 0x50          |         v1 = 0x50;
    0x00516020 b 0x515244                    |         goto label_46;
                                             | label_194:
    0x0051602c lw v0, -0x7a50(gp)            |         v0 = *(gp);
    0x00516030 lw s2, 0x10(v0)               |         s2 = *((v0 + 4));
    0x00516034 b 0x515430                    |         goto label_47;
                                             | label_196:
    0x00516038 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x0051603c lw t9, -0x7ef0(gp)            |         t9 = sym.php_error_docref0;
                                             |         /* str.Cannot_construct_User_agent_header */
    0x00516040 addiu a2, a2, -0x5a38         |         a2 += -0x5a38;
    0x00516044 addiu a1, zero, 2             |         a1 = 2;
    0x00516048 move a0, zero                 |         a0 = 0;
    0x0051604c jalr t9                       |         t9 ();
    0x00516050 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00516054 b 0x515504                    |         goto label_48;
                                             | label_202:
    0x00516058 move s2, s3                   |         s2 = s3;
    0x0051605c b 0x5156fc                    |         goto label_49;
                                             | label_204:
    0x00516068 lw v0, 0xcc0(sp)              |         v0 = *(var_cc0h);
                                             | label_203:
    0x0051606c addiu s1, zero, 2             |         s1 = 2;
                                             |         if (v0 != 0) {
    0x00516070 beqz v0, 0x51608c             |             
    0x00516074 lw s1, 0xc(v0)                |             s1 = *((v0 + 3));
    0x00516078 lw v0, 0xcc4(sp)              |             v0 = *(var_cc4h);
    0x0051607c addiu s1, s1, 2               |             s1 += 2;
    0x00516080 sltu v0, s1, v0               |             v0 = (s1 < v0) ? 1 : 0;
    0x00516084 lw v1, 0xcc0(sp)              |             v1 = *(var_cc0h);
                                             |             if (v0 != 0) {
    0x00516088 bnez v0, 0x5160a4             |                 goto label_233;
                                             |             }
                                             |         }
    0x0051608c lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00516090 move a1, s1                   |         a1 = s1;
    0x00516094 addiu a0, sp, 0xcc0           |         a0 = sp + 0xcc0;
    0x00516098 jalr t9                       |         t9 ();
    0x0051609c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x005160a0 lw v1, 0xcc0(sp)              |         v1 = *(var_cc0h);
                                             | label_233:
    0x005160a4 addiu v0, v1, 0x10            |         v0 = v1 + 0x10;
    0x005160a8 lw v1, 0xc(v1)                |         v1 = *((v1 + 3));
    0x005160ac addu v0, v0, v1               |         v0 += v1;
    0x005160b0 addiu v1, zero, 0xd           |         v1 = 0xd;
    0x005160b4 sb v1, (v0)                   |         *(v0) = v1;
    0x005160b8 addiu v1, zero, 0xa           |         v1 = 0xa;
    0x005160bc sb v1, 1(v0)                  |         *((v0 + 1)) = v1;
    0x005160c0 b 0x515a8c                    |         
                                             |     } while (1);
                                             | label_211:
    0x005160c4 sw zero, 0xce0(sp)            |     *(var_ce0h) = 0;
    0x005160c8 b 0x515b3c                    |     goto label_50;
                                             | label_212:
    0x005160cc lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
    0x005160d0 lw t9, -0x6a00(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.ignore_errors */
    0x005160d4 addiu a2, a2, -0x5984         |     a2 += -0x5984;
    0x005160d8 addiu a1, v0, -0x27a0         |     a1 = v0 + -0x27a0;
    0x005160dc move a0, s0                   |     a0 = s0;
    0x005160e0 jalr t9                       |     t9 ();
    0x005160e4 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x005160e8 beqz v0, 0x515b44             |         goto label_51;
                                             |     }
    0x005160ec lw t9, -0x7ec0(gp)            |     t9 = sym.zend_is_true;
    0x005160f0 move a0, v0                   |     a0 = v0;
    0x005160f4 jalr t9                       |     t9 ();
    0x005160f8 andi v0, v0, 0xff             |     v0 &= 0xff;
    0x005160fc lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00516100 sw v0, 0xcf4(sp)              |     *(var_cf4h) = v0;
    0x00516104 b 0x515b48                    |     goto label_52;
                                             | label_213:
    0x00516108 lw t9, -0x7a74(gp)            |     t9 = sym._php_stream_get_line;
    0x0051610c move a3, s5                   |     a3 = s5;
    0x00516110 addiu a2, zero, 0x7f          |     a2 = 0x7f;
    0x00516114 move a1, s3                   |     a1 = s3;
    0x00516118 move a0, s6                   |     a0 = s6;
    0x0051611c jalr t9                       |     t9 ();
    0x00516120 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00516124 beqz v0, 0x515b90             |         goto label_53;
                                             |     }
    0x00516128 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x0051612c sltiu v0, v0, 6               |     v0 = (v0 < 6) ? 1 : 0;
    0x00516130 lw t9, -0x7a7c(gp)            |     t9 = sym._php_stream_eof;
                                             |     if (v0 != 0) {
    0x00516134 bnez v0, 0x515b80             |         goto label_54;
                                             |     }
    0x00516138 lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
    0x0051613c addiu a2, zero, 6             |     a2 = 6;
    0x00516140 move a1, s2                   |     a1 = s2;
    0x00516144 move a0, s3                   |     a0 = s3;
    0x00516148 jalr t9                       |     t9 ();
    0x0051614c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00516150 bnez v0, 0x515b7c             |         goto label_55;
                                             |     }
    0x00516154 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00516158 b 0x515b94                    |     goto label_56;
                                             | label_214:
    0x0051615c lw t9, -0x5fe0(gp)            |     t9 = sym.imp.atoi;
    0x00516160 addiu a0, sp, 0xc39           |     a0 = sp + 0xc39;
    0x00516164 jalr t9                       |     t9 ();
    0x00516168 sw v0, 0xce0(sp)              |     *(var_ce0h) = v0;
    0x0051616c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00516170 b 0x515ba4                    |     goto label_57;
                                             |     if (v0 != 0) {
                                             | label_216:
    0x00516174 bnez v0, 0x516c90             |         goto label_234;
                                             |     }
    0x00516178 nop                           |     
    0x0051617c sb zero, 0xc30(sp)            |     *(var_c30h) = 0;
                                             |     if (s0 == 0) {
    0x00516180 beqz s0, 0x515c4c             |         goto label_58;
                                             |     }
    0x00516184 lw v0, (s0)                   |     v0 = *(s0);
                                             | label_103:
    0x00516188 lw v0, 0xce0(sp)              |     v0 = *(var_ce0h);
                                             |     if (v0 == 0) {
    0x0051618c beqz v0, 0x515c08             |         goto label_59;
                                             |     }
    0x00516190 sw zero, 0x1c(sp)             |     *(var_1ch) = 0;
    0x00516194 sw zero, 0x18(sp)             |     *(var_18h) = 0;
    0x00516198 sw zero, 0x14(sp)             |     *(var_14h) = 0;
    0x0051619c sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x005161a0 move a3, s3                   |     a3 = s3;
    0x005161a4 addiu a2, zero, 2             |     a2 = 2;
    0x005161a8 addiu a1, zero, 9             |     a1 = 9;
    0x005161ac b 0x515bf8                    |     goto label_60;
                                             | label_215:
    0x005161b0 addiu s1, zero, 1             |     s1 = 1;
    0x005161b4 b 0x515c08                    |     goto label_59;
                                             | label_210:
    0x005161b8 sw zero, 0xcf4(sp)            |     *(var_cf4h) = 0;
    0x005161bc b 0x515ccc                    |     goto label_61;
                                             | label_209:
    0x005161c0 lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
    0x005161c4 lw t9, -0x6a10(gp)            |     t9 = sym.php_stream_wrapper_log_error;
    0x005161c8 lw a1, 0xd3c(sp)              |     a1 = *(arg_d3ch);
    0x005161cc lw a0, 0xd30(sp)              |     a0 = *(arg_d30h);
                                             |     /* str.HTTP_request_failed__unexpected_end_of_socket_ */
    0x005161d0 addiu a2, a2, -0x596c         |     a2 += -0x596c;
    0x005161d4 jalr t9                       |     t9 ();
    0x005161d8 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005161dc move s7, zero                 |     s7 = 0;
    0x005161e0 sw zero, 0xce4(sp)            |     *(var_ce4h) = 0;
                                             | label_88:
    0x005161e4 move s1, zero                 |     s1 = 0;
    0x005161e8 b 0x51640c                    |     goto label_82;
                                             | label_219:
    0x005161ec lw t9, -0x7a74(gp)            |     t9 = sym._php_stream_get_line;
    0x005161f0 move a3, s5                   |     a3 = s5;
    0x005161f4 addiu a2, zero, 0x400         |     a2 = 0x400;
    0x005161f8 move a1, s1                   |     a1 = s1;
    0x005161fc move a0, s6                   |     a0 = s6;
    0x00516200 jalr t9                       |     t9 ();
    0x00516204 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00516208 beqz v0, 0x515d1c             |         goto label_62;
                                             |     }
    0x0051620c lb v0, (s1)                   |     v0 = *(s1);
    0x00516210 addiu v1, zero, 0xa           |     v1 = 0xa;
                                             |     if (v0 == v1) {
    0x00516214 beq v0, v1, 0x515d1c          |         goto label_62;
                                             |     }
    0x00516218 nop                           |     
    0x0051621c addiu a0, zero, 0xd           |     a0 = 0xd;
    0x00516220 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == a0) {
    0x00516224 beq v0, a0, 0x515d1c          |         goto label_62;
                                             |     }
    0x00516228 addiu v0, v0, -1              |     v0 += -1;
    0x0051622c addu v0, s1, v0               |     v0 = s1 + v0;
    0x00516230 lb a0, (v0)                   |     a0 = *(v0);
    0x00516234 addiu s2, zero, 0xa           |     s2 = 0xa;
                                             |     if (a0 != v1) {
    0x00516238 bne a0, v1, 0x5163d0          |         goto label_66;
                                             |     }
    0x0051623c addiu a1, zero, 0xa           |     a1 = 0xa;
    0x00516240 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             | label_68:
    0x00516244 sltu v1, v0, s1               |     v1 = (v0 < s1) ? 1 : 0;
    0x00516248 addiu s3, v0, 1               |     s3 = v0 + 1;
                                             |     if (v1 != 0) {
    0x0051624c bnez v1, 0x516290             |         goto label_235;
                                             |     }
    0x00516250 lb v1, (v0)                   |     v1 = *(v0);
                                             |     if (v1 == a1) {
    0x00516254 beq v1, a1, 0x5165a8          |         goto label_236;
                                             |     }
    0x00516258 nop                           |     
                                             |     if (v1 == a0) {
    0x0051625c beq v1, a0, 0x5165a8          |         goto label_236;
                                             |     }
    0x00516260 nop                           |     
    0x00516264 addiu a1, zero, 0x20          |     a1 = 0x20;
    0x00516268 addiu a0, zero, 9             |     a0 = 9;
                                             |     do {
    0x0051626c lb v1, (v0)                   |         v1 = *(v0);
                                             |         if (v1 != a1) {
    0x00516270 beq v1, a1, 0x516280          |             
    0x00516274 nop                           |             
    0x00516278 addiu s3, v0, 1               |             s3 = v0 + 1;
                                             |             if (v1 != a0) {
    0x0051627c bne v1, a0, 0x516290          |                 goto label_235;
                                             |             }
                                             |         }
    0x00516280 addiu v0, v0, -1              |         v0 += -1;
    0x00516284 sltu v1, v0, s1               |         v1 = (v0 < s1) ? 1 : 0;
    0x00516288 addiu s3, v0, 1               |         s3 = v0 + 1;
    0x0051628c beqz v1, 0x51626c             |         
                                             |     } while (v1 == 0);
                                             | label_235:
    0x00516290 lw t9, -0x6114(gp)            |     t9 = sym.imp.memchr;
    0x00516294 subu a2, s3, s1               |     __asm ("subu a2, s3, s1");
    0x00516298 sb zero, 1(v0)                |     *((v0 + 1)) = 0;
    0x0051629c sw a2, 0x430(sp)              |     *(var_430h) = a2;
    0x005162a0 addiu a1, zero, 0x3a          |     a1 = 0x3a;
    0x005162a4 move a0, s1                   |     a0 = s1;
    0x005162a8 jalr t9                       |     t9 ();
    0x005162ac lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x005162b0 beqz v0, 0x5165b8             |         goto label_237;
                                             |     }
    0x005162b4 addiu s2, v0, 1               |     s2 = v0 + 1;
    0x005162b8 addiu a0, zero, 0x20          |     a0 = 0x20;
    0x005162bc addiu v1, zero, 9             |     v1 = 9;
                                             | label_69:
    0x005162c0 sltu v0, s2, s3               |     v0 = (s2 < s3) ? 1 : 0;
    0x005162c4 lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
                                             |     if (v0 != 0) {
    0x005162c8 beqz v0, 0x5162e4             |         
    0x005162cc lb v0, (s2)                   |         v0 = *(s2);
                                             |         if (v0 == a0) {
    0x005162d0 beq v0, a0, 0x5165b0          |             goto label_238;
                                             |         }
    0x005162d4 nop                           |         
                                             |         if (v0 == v1) {
    0x005162d8 beq v0, v1, 0x5165b0          |             goto label_238;
                                             |         }
    0x005162dc nop                           |         
                                             | label_70:
    0x005162e0 lw t9, -0x60b0(gp)            |         t9 = sym.imp.strncasecmp;
                                             |     }
    0x005162e4 lw a1, 0xcfc(sp)              |     a1 = *(var_cfch);
    0x005162e8 addiu a2, zero, 9             |     a2 = 9;
    0x005162ec move a0, s1                   |     a0 = s1;
    0x005162f0 jalr t9                       |     t9 ();
    0x005162f4 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x005162f8 bnez v0, 0x5165e8             |         goto label_239;
                                             |     }
    0x005162fc lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
                                             |     if (s0 == 0) {
    0x00516300 beqz s0, 0x5165c0             |         goto label_240;
                                             |     }
    0x00516304 lw v0, 0xcdc(sp)              |     v0 = *(var_cdch);
    0x00516308 lw t9, -0x6a00(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.follow_location */
    0x0051630c addiu a2, a2, -0x5914         |     a2 += -0x5914;
    0x00516310 addiu a1, v0, -0x27a0         |     a1 = v0 + -0x27a0;
    0x00516314 move a0, s0                   |     a0 = s0;
    0x00516318 jalr t9                       |     t9 ();
    0x0051631c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x00516320 beqz v0, 0x5165c0             |         goto label_240;
                                             |     }
    0x00516324 lw t9, -0x7ec0(gp)            |     t9 = sym.zend_is_true;
    0x00516328 move a0, v0                   |     a0 = v0;
    0x0051632c jalr t9                       |     t9 ();
    0x00516330 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00516334 andi s4, v0, 0xff             |     s4 = v0 & 0xff;
    0x00516338 lw t9, -0x6e88(gp)            |     t9 = sym.php_strlcpy;
                                             | label_71:
    0x0051633c addiu a2, zero, 0x400         |     a2 = 0x400;
    0x00516340 move a1, s2                   |     a1 = s2;
    0x00516344 addiu a0, sp, 0x830           |     a0 = sp + 0x830;
    0x00516348 jalr t9                       |     t9 ();
    0x0051634c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             | label_73:
    0x00516350 lw s3, 0x430(sp)              |     s3 = *(var_430h);
                                             | label_72:
    0x00516354 lw t9, -0x7f5c(gp)            |     t9 = sym._emalloc;
    0x00516358 addiu a0, s3, 0x18            |     a0 = s3 + 0x18;
    0x0051635c addiu v0, zero, -8            |     v0 = -8;
    0x00516360 and a0, a0, v0                |     a0 &= v0;
    0x00516364 jalr t9                       |     t9 ();
    0x00516368 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051636c move s2, v0                   |     s2 = v0;
    0x00516370 addiu v0, zero, 1             |     v0 = 1;
    0x00516374 sw v0, (s2)                   |     *(s2) = v0;
    0x00516378 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x0051637c addiu v0, zero, 6             |     v0 = 6;
    0x00516380 move a2, s3                   |     a2 = s3;
    0x00516384 sw s3, 0xc(s2)                |     *((s2 + 3)) = s3;
    0x00516388 move a1, s1                   |     a1 = s1;
    0x0051638c addiu a0, s2, 0x10            |     a0 = s2 + 0x10;
    0x00516390 sw v0, 4(s2)                  |     *((s2 + 1)) = v0;
    0x00516394 sw zero, 8(s2)                |     *((s2 + 2)) = 0;
    0x00516398 jalr t9                       |     t9 ();
    0x0051639c addiu v0, zero, 0x1406        |     v0 = 0x1406;
    0x005163a0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005163a4 sw v0, 0x38(sp)               |     *(var_38h) = v0;
    0x005163a8 lw v0, 0xd50(sp)              |     v0 = *(arg_d50h);
    0x005163ac addu s3, s2, s3               |     s3 = s2 + s3;
    0x005163b0 lw t9, -0x7c10(gp)            |     t9 = sym._zend_hash_next_index_insert;
    0x005163b4 lw a0, (v0)                   |     a0 = *(v0);
    0x005163b8 sb zero, 0x10(s3)             |     *((s3 + 16)) = 0;
    0x005163bc sw s2, 0x30(sp)               |     *(var_30h) = s2;
    0x005163c0 addiu a1, sp, 0x30            |     a1 = sp + 0x30;
    0x005163c4 jalr t9                       |     t9 ();
    0x005163c8 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005163cc b 0x515d08                    |     goto label_63;
                                             | label_66:
    0x005163d0 lw t9, -0x7a74(gp)            |     t9 = sym._php_stream_get_line;
    0x005163d4 move a3, s5                   |     a3 = s5;
    0x005163d8 addiu a2, zero, 0x400         |     a2 = 0x400;
    0x005163dc move a1, s1                   |     a1 = s1;
    0x005163e0 move a0, s6                   |     a0 = s6;
    0x005163e4 jalr t9                       |     t9 ();
    0x005163e8 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x005163ec bnez v0, 0x51658c             |         goto label_241;
                                             |     }
    0x005163f0 lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
    0x005163f4 lw t9, -0x6a10(gp)            |     t9 = sym.php_stream_wrapper_log_error;
    0x005163f8 lw a1, 0xd3c(sp)              |     a1 = *(arg_d3ch);
    0x005163fc lw a0, 0xd30(sp)              |     a0 = *(arg_d30h);
                                             |     /* str.Failed_to_read_HTTP_headers */
    0x00516400 addiu a2, a2, -0x593c         |     a2 += -0x593c;
    0x00516404 jalr t9                       |     t9 ();
    0x00516408 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             | label_82:
    0x0051640c lw a0, 0xcc0(sp)              |     a0 = *(var_cc0h);
                                             |     if (a0 != 0) {
    0x00516410 beqz a0, 0x516458             |         
    0x00516414 nop                           |         
    0x00516418 lbu v0, 5(a0)                 |         v0 = *((a0 + 5));
    0x0051641c andi v1, v0, 2                |         v1 = v0 & 2;
                                             |         if (v1 == 0) {
    0x00516420 bnez v1, 0x516454             |             
    0x00516424 nop                           |             
    0x00516428 lw v1, (a0)                   |             v1 = *(a0);
    0x0051642c addiu v1, v1, -1              |             v1 += -1;
    0x00516430 sw v1, (a0)                   |             *(a0) = v1;
                                             |             if (v1 != 0) {
    0x00516434 bnez v1, 0x516454             |                 goto label_89;
                                             |             }
    0x00516438 andi v0, v0, 1                |             v0 &= 1;
    0x0051643c lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
                                             |             if (v0 == 0) {
    0x00516440 beqz v0, 0x516a14             |                 goto label_242;
                                             |             }
    0x00516444 lw t9, -0x5e90(gp)            |             t9 = *((gp - 6052));
    0x00516448 jalr t9                       |             t9 ();
    0x0051644c nop                           |             
    0x00516450 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
                                             | label_89:
    0x00516454 sw zero, 0xcc0(sp)            |         *(var_cc0h) = 0;
                                             |     }
    0x00516458 sw zero, 0xcc4(sp)            |     *(var_cc4h) = 0;
                                             |     if (s1 != 0) {
    0x0051645c beqz s1, 0x516470             |         
    0x00516460 lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00516464 move a0, s1                   |         a0 = s1;
    0x00516468 jalr t9                       |         t9 ();
    0x0051646c lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00516470 lw t9, -0x7030(gp)            |     t9 = sym.php_url_free;
                                             |     if (fp != 0) {
    0x00516474 beqz fp, 0x516484             |         
    0x00516478 move a0, fp                   |         a0 = fp;
    0x0051647c bal 0x503034                  |         sym_php_url_free ();
    0x00516480 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00516484 lw v0, 0xce8(sp)              |     v0 = *(var_ce8h);
                                             |     if (s6 == 0) {
    0x00516488 beqz s6, 0x516a24             |         goto label_243;
                                             |     }
    0x0051648c lw v0, 0xd50(sp)              |     v0 = *(arg_d50h);
                                             |     if (v0 != 0) {
    0x00516490 beqz v0, 0x5164c4             |         
    0x00516494 lw a0, 0xd50(sp)              |         a0 = *(arg_d50h);
    0x00516498 lw v1, (v0)                   |         v1 = *(v0);
    0x0051649c lw v0, 8(v0)                  |         v0 = *((v0 + 2));
    0x005164a0 lw a0, 4(a0)                  |         a0 = *((a0 + 1));
    0x005164a4 sw v0, 0x30(s6)               |         *(var_d00h) = v0;
    0x005164a8 andi v0, v0, 0x400            |         v0 &= 0x400;
    0x005164ac sw v1, 0x28(s6)               |         *(var_cf8h) = v1;
    0x005164b0 sw a0, 0x2c(s6)               |         *(var_cfch) = a0;
                                             |         if (v0 == 0) {
    0x005164b4 beqz v0, 0x5164c4             |             goto label_244;
                                             |         }
    0x005164b8 lw v0, (v1)                   |         v0 = *(v1);
    0x005164bc addiu v0, v0, 1               |         v0++;
    0x005164c0 sw v0, (v1)                   |         *(v1) = v0;
                                             |     }
                                             | label_244:
    0x005164c4 lw v0, 0xd3c(sp)              |     v0 = *(arg_d3ch);
                                             |     if (s0 != 0) {
    0x005164c8 beqz s0, 0x516520             |         
    0x005164cc lw v0, (s0)                   |         v0 = *(s0);
    0x005164d0 lw v1, 0xce4(sp)              |         v1 = *(var_ce4h);
                                             |         if (v0 != 0) {
    0x005164d4 beqz v0, 0x51651c             |             
    0x005164d8 sw zero, 0x1c(v0)             |             *((v0 + 7)) = 0;
    0x005164dc sw v1, 0x20(v0)               |             *((v0 + 8)) = v1;
    0x005164e0 lw v1, 0x18(v0)               |             v1 = *((v0 + 6));
    0x005164e4 lw t9, -0x6a14(gp)            |             t9 = sym.php_stream_notification_notify;
    0x005164e8 ori v1, v1, 1                 |             v1 |= 1;
    0x005164ec sw v1, 0x18(v0)               |             *((v0 + 6)) = v1;
    0x005164f0 lw v0, 0xce4(sp)              |             v0 = *(var_ce4h);
    0x005164f4 sw zero, 0x1c(sp)             |             *(var_1ch) = 0;
    0x005164f8 sw v0, 0x18(sp)               |             *(var_18h) = v0;
    0x005164fc sw zero, 0x14(sp)             |             *(var_14h) = 0;
    0x00516500 sw zero, 0x10(sp)             |             *(var_10h) = 0;
    0x00516504 move a3, zero                 |             a3 = 0;
    0x00516508 move a2, zero                 |             a2 = 0;
    0x0051650c addiu a1, zero, 7             |             a1 = 7;
    0x00516510 move a0, s0                   |             a0 = s0;
    0x00516514 jalr t9                       |             t9 ();
    0x00516518 lw gp, 0x28(sp)               |             gp = *(var_28h);
                                             |         }
    0x0051651c lw v0, 0xd3c(sp)              |         v0 = *(arg_d3ch);
                                             |     }
    0x00516520 andi v0, v0, 0x20             |     v0 &= 0x20;
    0x00516524 lw t9, -0x7a58(gp)            |     t9 = sym._php_stream_set_option;
                                             |     if (v0 != 0) {
    0x00516528 beqz v0, 0x516544             |         
    0x0051652c lw a2, 0xcec(sp)              |         a2 = *(var_cech);
    0x00516530 move a3, zero                 |         a3 = 0;
    0x00516534 addiu a1, zero, 5             |         a1 = 5;
    0x00516538 move a0, s6                   |         a0 = s6;
    0x0051653c jalr t9                       |         t9 ();
    0x00516540 lw gp, 0x28(sp)               |         gp = *(var_28h);
                                             |     }
    0x00516544 lw v0, 0x4c(s6)               |     v0 = *(var_d1ch);
    0x00516548 lw v1, 0xcf0(sp)              |     v1 = *(var_cf0h);
    0x0051654c lw t9, -0x6e88(gp)            |     t9 = sym.php_strlcpy;
    0x00516550 or v0, v0, v1                 |     v0 |= v1;
    0x00516554 lw a1, 0xd38(sp)              |     a1 = *(arg_d38h);
    0x00516558 sw v0, 0x4c(s6)               |     *(var_d1ch) = v0;
    0x0051655c sw zero, 0x60(s6)             |     *((s6 + 24)) = 0;
    0x00516560 addiu a2, zero, 0x10          |     a2 = 0x10;
    0x00516564 addiu a0, s6, 0x3a            |     a0 = s6 + 0x3a;
    0x00516568 jalr t9                       |     t9 ();
    0x0051656c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (s7 == 0) {
    0x00516570 beqz s7, 0x513524             |         goto label_64;
                                             |     }
    0x00516574 lw t9, -0x69f0(gp)            |     t9 = sym._php_stream_filter_append;
    0x00516578 move a1, s7                   |     a1 = s7;
    0x0051657c addiu a0, s6, 8               |     a0 = s6 + 8;
    0x00516580 jalr t9                       |     t9 ();
                                             | label_91:
    0x00516584 lw ra, 0xd2c(sp)              |     ra = *(var_d2ch);
    0x00516588 b 0x513528                    |     goto label_65;
                                             | label_241:
    0x0051658c lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00516590 addu v0, s1, v0               |     v0 = s1 + v0;
    0x00516594 lb v0, -1(v0)                 |     v0 = *((v0 - 1));
    0x00516598 lw t9, -0x7a7c(gp)            |     t9 = sym._php_stream_eof;
                                             |     if (v0 != s2) {
    0x0051659c bne v0, s2, 0x5163d0          |         goto label_66;
                                             |     }
    0x005165a0 b 0x515d0c                    |     goto label_67;
    0x005165a4 nop                           |     
                                             | label_236:
    0x005165a8 addiu v0, v0, -1              |     v0 += -1;
    0x005165ac b 0x516244                    |     goto label_68;
                                             | label_238:
    0x005165b0 addiu s2, s2, 1               |     s2++;
    0x005165b4 b 0x5162c0                    |     goto label_69;
                                             | label_237:
    0x005165b8 move s2, s3                   |     s2 = s3;
    0x005165bc b 0x5162e0                    |     goto label_70;
                                             | label_240:
    0x005165c0 lw v0, 0xce0(sp)              |     v0 = *(var_ce0h);
    0x005165c4 addiu v0, v0, -0x12c          |     v0 += -0x12c;
    0x005165c8 sltiu v0, v0, 4               |     v0 = (v0 < 4) ? 1 : 0;
    0x005165cc lw t9, -0x6e88(gp)            |     t9 = sym.php_strlcpy;
                                             |     if (v0 != 0) {
    0x005165d0 bnez v0, 0x51633c             |         goto label_71;
                                             |     }
    0x005165d4 lw v0, 0xce0(sp)              |     v0 = *(var_ce0h);
    0x005165d8 addiu v0, v0, -0x133          |     v0 += -0x133;
    0x005165dc sltiu v0, v0, 2               |     v0 = (v0 < 2) ? 1 : 0;
                                             |     if (v0 != 0) {
    0x005165e0 movz s4, zero, v0             |         s4 = 0;
                                             |     }
    0x005165e4 b 0x51633c                    |     goto label_71;
                                             | label_239:
    0x005165e8 lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
    0x005165ec lw a1, 0xd00(sp)              |     a1 = *(var_d00h);
    0x005165f0 addiu a2, zero, 0xd           |     a2 = 0xd;
    0x005165f4 move a0, s1                   |     a0 = s1;
    0x005165f8 jalr t9                       |     t9 ();
    0x005165fc lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00516600 bnez v0, 0x516644             |         goto label_245;
                                             |     }
    0x00516604 lw s3, 0x430(sp)              |     s3 = *(var_430h);
                                             |     if (s0 == 0) {
    0x00516608 beqz s0, 0x516354             |         goto label_72;
                                             |     }
    0x0051660c lw v0, (s0)                   |     v0 = *(s0);
    0x00516610 move a3, s2                   |     a3 = s2;
                                             |     if (v0 == 0) {
    0x00516614 beqz v0, 0x516354             |         goto label_72;
                                             |     }
    0x00516618 sw zero, 0x1c(sp)             |     *(var_1ch) = 0;
    0x0051661c sw zero, 0x18(sp)             |     *(var_18h) = 0;
    0x00516620 sw zero, 0x14(sp)             |     *(var_14h) = 0;
    0x00516624 sw zero, 0x10(sp)             |     *(var_10h) = 0;
    0x00516628 move a2, zero                 |     a2 = 0;
    0x0051662c addiu a1, zero, 4             |     a1 = 4;
                                             | label_74:
    0x00516630 lw t9, -0x6a14(gp)            |     t9 = sym.php_stream_notification_notify;
    0x00516634 move a0, s0                   |     a0 = s0;
    0x00516638 jalr t9                       |     t9 ();
    0x0051663c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00516640 b 0x516350                    |     goto label_73;
                                             | label_245:
    0x00516644 lw v0, 0xd04(sp)              |     v0 = *(var_d04h);
    0x00516648 lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
    0x0051664c addiu a2, zero, 0xf           |     a2 = 0xf;
    0x00516650 addiu a1, v0, -0x58f4         |     a1 = v0 + -0x58f4;
    0x00516654 move a0, s1                   |     a0 = s1;
    0x00516658 jalr t9                       |     t9 ();
    0x0051665c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00516660 bnez v0, 0x5166a8             |         goto label_246;
                                             |     }
    0x00516664 lw t9, -0x5fe0(gp)            |     t9 = sym.imp.atoi;
    0x00516668 move a0, s2                   |     a0 = s2;
    0x0051666c jalr t9                       |     t9 ();
    0x00516670 sw v0, 0xce4(sp)              |     *(var_ce4h) = v0;
    0x00516674 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (s0 == 0) {
    0x00516678 beqz s0, 0x516350             |         goto label_73;
                                             |     }
    0x0051667c lw v0, (s0)                   |     v0 = *(s0);
    0x00516680 lw v0, 0xce4(sp)              |     v0 = *(var_ce4h);
                                             |     if (v0 == 0) {
    0x00516684 beqz v0, 0x516350             |         goto label_73;
                                             |     }
    0x00516688 sw zero, 0x1c(sp)             |     *(var_1ch) = 0;
    0x0051668c sw v0, 0x18(sp)               |     *(var_18h) = v0;
    0x00516690 sw zero, 0x14(sp)             |     *(var_14h) = 0;
    0x00516694 sw zero, 0x10(sp)             |     *(var_10h) = 0;
    0x00516698 move a3, s1                   |     a3 = s1;
    0x0051669c move a2, zero                 |     a2 = 0;
    0x005166a0 addiu a1, zero, 5             |     a1 = 5;
    0x005166a4 b 0x516630                    |     goto label_74;
                                             | label_246:
    0x005166a8 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x005166ac lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
    0x005166b0 addiu a2, zero, 0x12          |     a2 = 0x12;
                                             |     /* str.Transfer_Encoding: */
    0x005166b4 addiu a1, a1, -0x58e4         |     a1 += -0x58e4;
    0x005166b8 move a0, s1                   |     a0 = s1;
    0x005166bc jalr t9                       |     t9 ();
    0x005166c0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x005166c4 bnez v0, 0x516350             |         goto label_73;
                                             |     }
    0x005166c8 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x005166cc lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
    0x005166d0 addiu a2, zero, 7             |     a2 = 7;
                                             |     /* str.Chunked */
    0x005166d4 addiu a1, a1, -0x58d0         |     a1 += -0x58d0;
    0x005166d8 move a0, s2                   |     a0 = s2;
    0x005166dc jalr t9                       |     t9 ();
    0x005166e0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x005166e4 bnez v0, 0x516350             |         goto label_73;
                                             |     }
    0x005166e8 lw v0, 0xd3c(sp)              |     v0 = *(arg_d3ch);
    0x005166ec andi v0, v0, 0x200            |     v0 &= 0x200;
    0x005166f0 lw s3, 0x430(sp)              |     s3 = *(var_430h);
                                             |     if (v0 != 0) {
    0x005166f4 bnez v0, 0x516354             |         goto label_72;
                                             |     }
    0x005166f8 lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
                                             |     if (s0 != 0) {
    0x005166fc bnez s0, 0x516730             |         goto label_247;
                                             |     }
                                             | label_75:
    0x00516700 lw a0, -0x7fc0(gp)            |     a0 = *((gp - 8176));
    0x00516704 lw a2, 0x38(s6)               |     a2 = *(var_d08h);
    0x00516708 lw t9, -0x69ec(gp)            |     t9 = sym.php_stream_filter_create;
    0x0051670c andi a2, a2, 1                |     a2 &= 1;
    0x00516710 move a1, zero                 |     a1 = 0;
                                             |     /* str.dechunk */
    0x00516714 addiu a0, a0, -0x58c8         |     a0 += -0x58c8;
    0x00516718 jalr t9                       |     t9 ();
    0x0051671c move s7, v0                   |     s7 = v0;
    0x00516720 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00516724 bnez v0, 0x515d08             |         goto label_63;
                                             |     }
    0x00516728 lw s3, 0x430(sp)              |     s3 = *(var_430h);
    0x0051672c b 0x516354                    |     goto label_72;
                                             | label_247:
    0x00516730 lw a1, -0x7fc4(gp)            |     a1 = *((gp - 8177));
    0x00516734 lw t9, -0x6a00(gp)            |     t9 = sym.php_stream_context_get_option;
                                             |     /* str.auto_decode */
    0x00516738 addiu a2, a2, -0x58c0         |     a2 += -0x58c0;
                                             |     /* str.http */
    0x0051673c addiu a1, a1, -0x27a0         |     a1 += -0x27a0;
    0x00516740 move a0, s0                   |     a0 = s0;
    0x00516744 jalr t9                       |     t9 ();
    0x00516748 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 == 0) {
    0x0051674c beqz v0, 0x516700             |         goto label_75;
                                             |     }
    0x00516750 lw t9, -0x7ec0(gp)            |     t9 = sym.zend_is_true;
    0x00516754 move a0, v0                   |     a0 = v0;
    0x00516758 jalr t9                       |     t9 ();
    0x0051675c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00516760 bnez v0, 0x516700             |         goto label_75;
                                             |     }
    0x00516764 lw s3, 0x430(sp)              |     s3 = *(var_430h);
    0x00516768 b 0x516354                    |     goto label_72;
                                             | label_227:
    0x0051676c sb s6, (s4)                   |     *(s4) = s6;
    0x00516770 move v0, s4                   |     v0 = s4;
    0x00516774 b 0x515ed4                    |     goto label_76;
                                             | label_228:
    0x00516778 lw a2, -0x7fc4(gp)            |     a2 = *((gp - 8177));
                                             | label_229:
    0x0051677c sw s2, 0x10(sp)               |     *(var_10h) = s2;
                                             |     /* esilref: '&s/&s' */
    0x00516780 addiu a2, a2, -0x4c3c         |     a2 += -0x4c3c;
    0x00516784 b 0x515f0c                    |     goto label_77;
                                             | label_225:
    0x00516788 lw t9, -0x7f54(gp)            |     t9 = sym.ap_php_snprintf;
                                             | label_226:
    0x0051678c move a3, s2                   |     a3 = s2;
                                             |     /* esilref: '/&s' */
    0x00516790 addiu a2, a2, -0x5890         |     a2 += -0x5890;
    0x00516794 addiu a1, zero, 0x3ff         |     a1 = 0x3ff;
    0x00516798 move a0, s3                   |     a0 = s3;
    0x0051679c bal 0x52db34                  |     sym_ap_php_snprintf ();
    0x005167a0 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005167a4 b 0x515f1c                    |     goto label_78;
                                             | label_224:
    0x005167a8 lw t9, -0x6e88(gp)            |     t9 = sym.php_strlcpy;
    0x005167ac addiu a2, zero, 0x400         |     a2 = 0x400;
    0x005167b0 move a1, s2                   |     a1 = s2;
    0x005167b4 move a0, s3                   |     a0 = s3;
    0x005167b8 jalr t9                       |     t9 ();
    0x005167bc lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005167c0 b 0x515f1c                    |     goto label_78;
                                             | label_230:
    0x005167c4 addiu v1, zero, 0x50          |     v1 = 0x50;
    0x005167c8 b 0x515f34                    |     goto label_79;
                                             | label_231:
    0x005167cc sw s3, 0x14(sp)               |     *(var_14h) = s3;
    0x005167d0 lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
    0x005167d4 lw v0, 0xc(fp)                |     v0 = *(arg_d3ch);
                                             |     /* str._s:___s_s */
    0x005167d8 addiu a2, a2, -0x587c         |     a2 += -0x587c;
    0x005167dc sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x005167e0 addiu a1, zero, 0x3ff         |     a1 = 0x3ff;
    0x005167e4 move a0, s5                   |     a0 = s5;
    0x005167e8 bal 0x52db34                  |     sym_ap_php_snprintf ();
    0x005167ec lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005167f0 b 0x515f60                    |     goto label_80;
                                             | label_223:
    0x005167f4 lw t9, -0x6e88(gp)            |     t9 = sym.php_strlcpy;
    0x005167f8 addiu a2, zero, 0x400         |     a2 = 0x400;
    0x005167fc move a1, s2                   |     a1 = s2;
    0x00516800 move a0, s5                   |     a0 = s5;
    0x00516804 jalr t9                       |     t9 ();
    0x00516808 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051680c b 0x515f60                    |     goto label_80;
                                             | label_232:
    0x00516810 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x00516814 lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
    0x00516818 addiu a2, zero, 7             |     a2 = 7;
                                             |     /* str.http:__ */
    0x0051681c addiu a1, a1, -0x58b4         |     a1 += -0x58b4;
    0x00516820 move a0, s5                   |     a0 = s5;
    0x00516824 jalr t9                       |     t9 ();
    0x00516828 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x0051682c bnez v0, 0x5168a0             |         goto label_248;
                                             |     }
    0x00516830 lw a1, -0x7fc0(gp)            |     a1 = *((gp - 8176));
    0x00516834 lw t9, -0x60b0(gp)            |     t9 = sym.imp.strncasecmp;
    0x00516838 addiu a2, zero, 8             |     a2 = 8;
                                             |     /* str.https:__ */
    0x0051683c addiu a1, a1, -0x58ac         |     a1 += -0x58ac;
    0x00516840 move a0, s5                   |     a0 = s5;
    0x00516844 jalr t9                       |     t9 ();
    0x00516848 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051684c bnez v0, 0x5168a0             |     
                                             |     while (s2 == 0) {
    0x00516850 lw v0, 0xd50(sp)              |         v0 = *(arg_d50h);
    0x00516854 lw t9, -0x6a2c(gp)            |         t9 = *((gp - 6795));
    0x00516858 sw v0, 0x20(sp)               |         *(var_20h) = v0;
    0x0051685c addiu v0, zero, 2             |         v0 = 2;
    0x00516860 sw v0, 0x1c(sp)               |         *(var_1ch) = v0;
    0x00516864 lw v0, 0xd48(sp)              |         v0 = *(arg_d48h);
    0x00516868 lw a3, 0xd3c(sp)              |         a3 = *(arg_d3ch);
    0x0051686c addiu v0, v0, -1              |         v0 += -1;
    0x00516870 sw v0, 0x18(sp)               |         *(var_18h) = v0;
    0x00516874 lw v0, 0xd40(sp)              |         v0 = *(arg_10h);
    0x00516878 lw a2, 0xd38(sp)              |         a2 = *(arg_d38h);
    0x0051687c lw a0, 0xd30(sp)              |         a0 = *(arg_d30h);
    0x00516880 sw s0, 0x14(sp)               |         *(var_14h) = s0;
    0x00516884 sw v0, 0x10(sp)               |         *(var_10h) = v0;
                                             |         /* fcn.00513400 */
    0x00516888 addiu t9, t9, 0x3400          |         t9 += 0x3400;
    0x0051688c move a1, s5                   |         a1 = s5;
    0x00516890 bal 0x513400                  |         fcn_00513400 ();
                                             |         goto label_81;
    0x00516894 move s6, v0                   |         s6 = v0;
    0x00516898 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x0051689c b 0x51640c                    |         goto label_82;
                                             | label_248:
    0x005168a0 lw s2, 4(fp)                  |         s2 = *(arg_d34h);
    0x005168a4 lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
                                             |         if (s2 != 0) {
    0x005168a8 bnez s2, 0x516928             |             goto label_249;
                                             |         }
                                             | label_83:
    0x005168ac lw s2, 8(fp)                  |         s2 = *(arg_d38h);
    0x005168b0 lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
                                             |         if (s2 != 0) {
    0x005168b4 bnez s2, 0x51698c             |             goto label_250;
                                             |         }
                                             | label_86:
    0x005168b8 lw s2, 0x14(fp)               |         s2 = *(arg_d44h);
    0x005168bc lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
    0x005168c0 beqz s2, 0x516850             |         
                                             |     }
                                             | label_249:
    0x00516928 move a0, s2                   |     a0 = s2;
    0x0051692c jalr t9                       |     t9 ();
    0x00516930 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00516934 move a0, s2                   |     a0 = s2;
    0x00516938 lw t9, -0x6a58(gp)            |     t9 = sym.php_url_decode;
    0x0051693c move a1, v0                   |     a1 = v0;
    0x00516940 bal 0x5043d8                  |     sym_php_url_decode ();
    0x00516944 lw s2, 4(fp)                  |     s2 = *(arg_d34h);
    0x00516948 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x0051694c addu s3, s2, v0               |     s3 = s2 + v0;
                                             | label_85:
    0x00516950 sltu v0, s2, s3               |     v0 = (s2 < s3) ? 1 : 0;
    0x00516954 lw t9, -0x5ef4(gp)            |     t9 = sym.imp.__ctype_b_loc;
                                             |     if (v0 == 0) {
    0x00516958 beqz v0, 0x5168ac             |         goto label_83;
                                             |     }
    0x0051695c jalr t9                       |     t9 ();
    0x00516960 nop                           |     
    0x00516964 lbu v1, (s2)                  |     v1 = *(s2);
    0x00516968 lw v0, (v0)                   |     v0 = *(v0);
    0x0051696c sll v1, v1, 1                 |     v1 <<= 1;
    0x00516970 addu v0, v0, v1               |     v0 += v1;
    0x00516974 lhu v0, (v0)                  |     v0 = *(v0);
    0x00516978 andi v0, v0, 2                |     v0 &= 2;
    0x0051697c lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00516980 bnez v0, 0x515f88             |         goto label_84;
                                             |     }
    0x00516984 addiu s2, s2, 1               |     s2++;
    0x00516988 b 0x516950                    |     goto label_85;
                                             | label_250:
    0x0051698c move a0, s2                   |     a0 = s2;
    0x00516990 jalr t9                       |     t9 ();
    0x00516994 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00516998 move a0, s2                   |     a0 = s2;
    0x0051699c lw t9, -0x6a58(gp)            |     t9 = sym.php_url_decode;
    0x005169a0 move a1, v0                   |     a1 = v0;
    0x005169a4 bal 0x5043d8                  |     sym_php_url_decode ();
    0x005169a8 lw s2, 8(fp)                  |     s2 = *(arg_d38h);
    0x005169ac lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x005169b0 addu s3, s2, v0               |     s3 = s2 + v0;
    0x005169b4 sltu v0, s2, s3               |     v0 = (s2 < s3) ? 1 : 0;
    0x005169b8 lw t9, -0x5ef4(gp)            |     t9 = sym.imp.__ctype_b_loc;
                                             |     if (v0 == 0) {
    0x005169bc beqz v0, 0x5168b8             |         goto label_86;
                                             |     }
    0x005169c0 jalr t9                       |     t9 ();
    0x005169c4 nop                           |     
    0x005169c8 lbu v1, (s2)                  |     v1 = *(s2);
    0x005169cc lw v0, (v0)                   |     v0 = *(v0);
    0x005169d0 sll v1, v1, 1                 |     v1 <<= 1;
    0x005169d4 addu v0, v0, v1               |     v0 += v1;
    0x005169d8 lhu v0, (v0)                  |     v0 = *(v0);
    0x005169dc andi v0, v0, 2                |     v0 &= 2;
    0x005169e0 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x005169e4 bnez v0, 0x515f88             |         goto label_84;
                                             |     }
                                             | label_222:
    0x005169f0 lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
    0x005169f4 addiu a3, sp, 0xc30           |     a3 = sp + 0xc30;
                                             |     /* str.HTTP_request_failed___s */
    0x005169f8 addiu a2, a2, -0x5854         |     a2 += -0x5854;
    0x005169fc b 0x515f94                    |     goto label_87;
                                             | label_108:
    0x00516a00 move s7, zero                 |     s7 = 0;
    0x00516a04 sw zero, 0xcf0(sp)            |     *(var_cf0h) = 0;
    0x00516a08 sw zero, 0xce4(sp)            |     *(var_ce4h) = 0;
    0x00516a0c sw zero, 0xcec(sp)            |     *(var_cech) = 0;
    0x00516a10 b 0x5161e4                    |     goto label_88;
                                             | label_242:
    0x00516a14 jalr t9                       |     t9 ();
    0x00516a18 nop                           |     
    0x00516a1c lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00516a20 b 0x516454                    |     goto label_89;
                                             | label_243:
    0x00516a24 lw t9, -0x69e8(gp)            |     t9 = sym.php_stream_filter_free;
                                             |     if (s7 == 0) {
    0x00516a28 beqz s7, 0x51349c             |         goto label_90;
                                             |     }
    0x00516a2c move a0, s7                   |     a0 = s7;
    0x00516a30 jalr t9                       |     t9 ();
    0x00516a34 b 0x516584                    |     goto label_91;
    0x00516a38 nop                           |     
                                             | label_125:
    0x00516a3c addiu s1, s1, 1               |     s1++;
    0x00516a40 addiu v0, s1, -0x14           |     v0 = s1 + -0x14;
    0x00516a44 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             |     if (v0 != s2) {
    0x00516a48 bne v0, s2, 0x513e94          |         goto label_92;
                                             |     }
    0x00516a4c lw t9, -0x7bec(gp)            |     t9 = sym.zend_binary_strcasecmp;
    0x00516a50 lw a2, 0xcec(sp)              |     a2 = *(var_cech);
    0x00516a54 addiu a3, zero, 0x14          |     a3 = 0x14;
    0x00516a58 addiu a1, zero, 0x14          |     a1 = 0x14;
    0x00516a5c move a0, s2                   |     a0 = s2;
    0x00516a60 jalr t9                       |     t9 ();
    0x00516a64 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00516a68 bnez v0, 0x513e90             |         goto label_93;
                                             |     }
    0x00516a6c addiu v1, zero, 0x2401        |     v1 = 0x2401;
                                             | label_128:
    0x00516a70 lbu v0, (s1)                  |     v0 = *(s1);
    0x00516a74 sltiu a0, v0, 0xe             |     a0 = (v0 < 0xe) ? 1 : 0;
    0x00516a78 srlv v0, v1, v0               |     v0 = v1 >> v0;
                                             |     if (a0 == 0) {
    0x00516a7c beqz a0, 0x513e60             |         goto label_94;
                                             |     }
    0x00516a80 ext v0, v0, 0, 1              |     __asm ("ext v0, v0, 0, 1");
    0x00516a84 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00516a88 beqz v0, 0x513e60             |         goto label_94;
                                             |     }
                                             | label_98:
    0x00516a8c subu s1, s1, s2               |     __asm ("subu s1, s1, s2");
                                             |     if (v0 == 0) {
    0x00516a90 beqz v0, 0x513f4c             |         goto label_95;
                                             |     }
    0x00516a94 lw s3, 0xc(v0)                |     s3 = *((v0 + 3));
    0x00516a98 lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x00516a9c addu s3, s1, s3               |     s3 = s1 + s3;
    0x00516aa0 sltu v0, s3, v0               |     v0 = (s3 < v0) ? 1 : 0;
    0x00516aa4 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00516aa8 bnez v0, 0x516ac4             |         
                                             | label_133:
    0x00516aac lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00516ab0 move a1, s3                   |         a1 = s3;
    0x00516ab4 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x00516ab8 jalr t9                       |         t9 ();
    0x00516abc lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00516ac0 lw v0, 0x430(sp)              |         v0 = *(var_430h);
                                             |     }
    0x00516ac4 lw t9, -0x5f48(gp)            |     t9 = sym.imp.memcpy;
    0x00516ac8 addiu a0, v0, 0x10            |     a0 = v0 + 0x10;
    0x00516acc lw v0, 0xc(v0)                |     v0 = *((v0 + 3));
    0x00516ad0 move a2, s1                   |     a2 = s1;
    0x00516ad4 move a1, s2                   |     a1 = s2;
    0x00516ad8 addu a0, a0, v0               |     a0 += v0;
    0x00516adc jalr t9                       |     t9 ();
    0x00516ae0 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00516ae4 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00516ae8 sw s3, 0xc(v0)                |     *((v0 + 3)) = s3;
    0x00516aec lw v0, 0x434(sp)              |     v0 = *(var_434h);
    0x00516af0 addiu s3, s3, 2               |     s3 += 2;
    0x00516af4 sltu v0, s3, v0               |     v0 = (s3 < v0) ? 1 : 0;
    0x00516af8 lw v1, 0x430(sp)              |     v1 = *(var_430h);
                                             |     if (v0 == 0) {
    0x00516afc bnez v0, 0x516b18             |         
    0x00516b00 lw t9, -0x7ed0(gp)            |         t9 = sym.smart_str_erealloc;
    0x00516b04 move a1, s3                   |         a1 = s3;
    0x00516b08 addiu a0, sp, 0x430           |         a0 = sp + 0x430;
    0x00516b0c jalr t9                       |         t9 ();
    0x00516b10 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00516b14 lw v1, 0x430(sp)              |         v1 = *(var_430h);
                                             |     }
    0x00516b18 addiu v0, v1, 0x10            |     v0 = v1 + 0x10;
    0x00516b1c lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00516b20 addu v0, v0, v1               |     v0 += v1;
    0x00516b24 addiu v1, zero, 0xd           |     v1 = 0xd;
    0x00516b28 sb v1, (v0)                   |     *(v0) = v1;
    0x00516b2c addiu v1, zero, 0xa           |     v1 = 0xa;
    0x00516b30 sb v1, 1(v0)                  |     *((v0 + 1)) = v1;
    0x00516b34 lw v0, 0x430(sp)              |     v0 = *(var_430h);
    0x00516b38 sw s3, 0xc(v0)                |     *((v0 + 3)) = s3;
    0x00516b3c b 0x513bfc                    |     goto label_14;
                                             | label_130:
    0x00516b40 addiu s1, s1, 1               |     s1++;
    0x00516b44 addiu v0, s1, -0x14           |     v0 = s1 + -0x14;
    0x00516b48 addiu a0, zero, 0xd           |     a0 = 0xd;
                                             |     if (v0 != s2) {
    0x00516b4c bne v0, s2, 0x513f80          |         goto label_96;
                                             |     }
    0x00516b50 lw t9, -0x7bec(gp)            |     t9 = sym.zend_binary_strcasecmp;
    0x00516b54 addiu a3, zero, 0x14          |     a3 = 0x14;
    0x00516b58 move a2, s3                   |     a2 = s3;
    0x00516b5c addiu a1, zero, 0x14          |     a1 = 0x14;
    0x00516b60 move a0, s2                   |     a0 = s2;
    0x00516b64 jalr t9                       |     t9 ();
    0x00516b68 lw gp, 0x28(sp)               |     gp = *(var_28h);
                                             |     if (v0 != 0) {
    0x00516b6c bnez v0, 0x513f7c             |         goto label_97;
                                             |     }
    0x00516b70 addiu v1, zero, 0x2401        |     v1 = 0x2401;
                                             | label_99:
    0x00516b74 lbu v0, (s1)                  |     v0 = *(s1);
    0x00516b78 sltiu a0, v0, 0xe             |     a0 = (v0 < 0xe) ? 1 : 0;
    0x00516b7c srlv v0, v1, v0               |     v0 = v1 >> v0;
                                             |     if (a0 == 0) {
    0x00516b80 beqz a0, 0x516b90             |         goto label_251;
                                             |     }
    0x00516b84 ext v0, v0, 0, 1              |     __asm ("ext v0, v0, 0, 1");
    0x00516b88 lw v0, 0x430(sp)              |     v0 = *(var_430h);
                                             |     if (v0 != 0) {
    0x00516b8c bnez v0, 0x516a8c             |         goto label_98;
                                             |     }
                                             | label_251:
    0x00516b90 addiu s1, s1, 1               |     s1++;
    0x00516b94 b 0x516b74                    |     goto label_99;
                                             | label_157:
    0x00516b98 move s1, zero                 |     s1 = 0;
    0x00516b9c b 0x514d60                    |     goto label_42;
                                             |     do {
    0x00516ba0 lhu v0, 0x10(fp)              |         v0 = *(arg_10h);
    0x00516ba4 sw v0, 0x14(sp)               |         *(var_14h) = v0;
    0x00516ba8 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x00516bac lw v0, 0xc(fp)                |         v0 = *(arg_d3ch);
    0x00516bb0 lw t9, -0x7a0c(gp)            |         t9 = sym.zend_spprintf;
    0x00516bb4 sw v0, 0x10(sp)               |         *(var_10h) = v0;
                                             |         /* esilref: 'ssl' */
    0x00516bb8 addiu a3, a3, -0x5bb4         |         a3 += -0x5bb4;
                                             |         /* str._s:___s:_d */
    0x00516bbc addiu a2, a2, -0x5bcc         |         a2 += -0x5bcc;
    0x00516bc0 move a1, zero                 |         a1 = 0;
    0x00516bc4 addiu a0, sp, 0xcd4           |         a0 = sp + 0xcd4;
    0x00516bc8 jalr t9                       |         t9 ();
    0x00516bcc move s1, v0                   |         s1 = v0;
    0x00516bd0 lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00516bd4 move s4, zero                 |         s4 = 0;
    0x00516bd8 move s5, zero                 |         s5 = 0;
    0x00516bdc b 0x5135bc                    |         goto label_100;
                                             | label_115:
    0x00516be0 lw v0, 0xcd8(sp)              |         v0 = *(var_cd8h);
                                             | label_116:
    0x00516be4 lw a3, -0x7fc0(gp)            |         a3 = *((gp - 8176));
    0x00516be8 bnez v0, 0x516ba0             |         
                                             |     } while (v0 != 0);
                                             | label_114:
    0x00516bec lhu v0, 0x10(fp)              |     v0 = *(arg_10h);
    0x00516bf0 lw a3, -0x7fc0(gp)            |     a3 = *((gp - 8176));
    0x00516bf4 sw v0, 0x14(sp)               |     *(var_14h) = v0;
    0x00516bf8 lw a2, -0x7fc0(gp)            |     a2 = *((gp - 8176));
    0x00516bfc lw v0, 0xc(fp)                |     v0 = *(arg_d3ch);
    0x00516c00 lw t9, -0x7a0c(gp)            |     t9 = sym.zend_spprintf;
    0x00516c04 sw v0, 0x10(sp)               |     *(var_10h) = v0;
                                             |     /* esilref: 'tcp' */
    0x00516c08 addiu a3, a3, -0x5bd0         |     a3 += -0x5bd0;
                                             |     /* str._s:___s:_d */
    0x00516c0c addiu a2, a2, -0x5bcc         |     a2 += -0x5bcc;
    0x00516c10 move a1, zero                 |     a1 = 0;
    0x00516c14 addiu a0, sp, 0xcd4           |     a0 = sp + 0xcd4;
    0x00516c18 jalr t9                       |     t9 ();
    0x00516c1c move s1, v0                   |     s1 = v0;
    0x00516c20 lw gp, 0x28(sp)               |     gp = *(var_28h);
    0x00516c24 move s4, zero                 |     s4 = 0;
    0x00516c28 move s5, zero                 |     s5 = 0;
    0x00516c2c sw zero, 0xcd8(sp)            |     *(var_cd8h) = 0;
                                             |     if (s0 != 0) {
    0x00516c30 bnez s0, 0x5135bc             |         goto label_100;
                                             |     }
                                             |     do {
                                             | label_105:
    0x00516c34 lw v0, -0x7a50(gp)            |         v0 = *(gp);
    0x00516c38 sw zero, 0xccc(sp)            |         *(var_ccch) = 0;
    0x00516c3c lw v0, 0xc(v0)                |         v0 = *((v0 + 3));
    0x00516c40 sw v0, 0xcc8(sp)              |         *(var_cc8h) = v0;
    0x00516c44 b 0x513678                    |         goto label_101;
                                             | label_113:
    0x00516c48 lhu v0, 0x10(fp)              |         v0 = *(arg_10h);
    0x00516c4c sw v0, 0x14(sp)               |         *(var_14h) = v0;
    0x00516c50 lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x00516c54 lw v0, 0xc(fp)                |         v0 = *(arg_d3ch);
    0x00516c58 lw t9, -0x7a0c(gp)            |         t9 = sym.zend_spprintf;
    0x00516c5c sw v0, 0x10(sp)               |         *(var_10h) = v0;
                                             |         /* esilref: 'ssl' */
    0x00516c60 addiu a3, a3, -0x5bb4         |         a3 += -0x5bb4;
                                             |         /* str._s:___s:_d */
    0x00516c64 addiu a2, a2, -0x5bcc         |         a2 += -0x5bcc;
    0x00516c68 move a1, zero                 |         a1 = 0;
    0x00516c6c addiu a0, sp, 0xcd4           |         a0 = sp + 0xcd4;
    0x00516c70 jalr t9                       |         t9 ();
    0x00516c74 move s1, v0                   |         s1 = v0;
    0x00516c78 addiu v0, zero, 1             |         v0 = 1;
    0x00516c7c lw gp, 0x28(sp)               |         gp = *(var_28h);
    0x00516c80 move s4, zero                 |         s4 = 0;
    0x00516c84 move s5, zero                 |         s5 = 0;
    0x00516c88 sw v0, 0xcd8(sp)              |         *(var_cd8h) = v0;
    0x00516c8c b 0x516c34                    |         
                                             |     } while (1);
                                             | label_234:
    0x00516c90 addiu v1, v0, -1              |     v1 = v0 + -1;
                                             |     if (s0 == 0) {
    0x00516c94 beqz s0, 0x515c14             |         goto label_102;
                                             |     }
    0x00516c98 lw v0, (s0)                   |     v0 = *(s0);
    0x00516c9c b 0x516188                    |     goto label_103;
                                             | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/usr/bin/php-fpm @ 0x541c3c */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.00541c3c ()                  | void fcn_00541c3c () {
    0x00541c3c lui gp, 0x1d                  |     
    0x00541c40 addiu gp, gp, 0x5c14          |     
    0x00541c44 addu gp, gp, t9               |     gp += t9;
    0x00541c48 addiu sp, sp, -0x58           |     
    0x00541c4c lw t9, -0x7f6c(gp)            |     t9 = sym._estrdup;
    0x00541c50 sw gp, 0x18(sp)               |     *(var_18h) = gp;
    0x00541c54 sw fp, 0x50(sp)               |     *(var_50h) = fp;
    0x00541c58 sw s5, 0x44(sp)               |     *(var_44h) = s5;
    0x00541c5c sw s0, 0x30(sp)               |     *(var_30h) = s0;
    0x00541c60 sw ra, 0x54(sp)               |     *(var_54h) = ra;
    0x00541c64 sw s7, 0x4c(sp)               |     *(var_4ch) = s7;
    0x00541c68 sw s6, 0x48(sp)               |     *(var_48h) = s6;
    0x00541c6c sw s4, 0x40(sp)               |     *(var_40h) = s4;
    0x00541c70 sw s3, 0x3c(sp)               |     *(var_3ch) = s3;
    0x00541c74 sw s2, 0x38(sp)               |     *(var_38h) = s2;
    0x00541c78 sw s1, 0x34(sp)               |     *(var_34h) = s1;
    0x00541c7c move s0, a0                   |     s0 = a0;
    0x00541c80 move a0, a1                   |     a0 = a1;
    0x00541c84 move fp, a2                   |     fp = a2;
    0x00541c88 jalr t9                       |     t9 ();
    0x00541c8c move s5, v0                   |     s5 = v0;
    0x00541c90 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (s0 == 0) {
    0x00541c94 beqz s0, 0x541eac             |         goto label_3;
                                             |     }
    0x00541c98 lw v0, -0x7a50(gp)            |     v0 = *(gp);
    0x00541c9c sw s0, 0x20(sp)               |     *(var_20h) = s0;
    0x00541ca0 lw a0, 0x28(v0)               |     a0 = *((v0 + 10));
    0x00541ca4 lw t9, -0x7e90(gp)            |     t9 = sym.zend_hash_str_find;
                                             |     if (a0 == 0) {
    0x00541ca8 beqz a0, 0x541e7c             |         goto label_4;
                                             |     }
    0x00541cac addiu a2, zero, 4             |     a2 = 4;
    0x00541cb0 addiu a1, sp, 0x20            |     a1 = sp + 0x20;
    0x00541cb4 jalr t9                       |     t9 ();
    0x00541cb8 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 == 0) {
    0x00541cbc beqz v0, 0x541e7c             |         goto label_4;
                                             |     }
    0x00541cc0 lw s1, (v0)                   |     s1 = *(v0);
    0x00541cc4 lw t9, -0x6848(gp)            |     t9 = sym.zend_llist_count;
    0x00541cc8 move a0, s1                   |     a0 = s1;
    0x00541ccc jalr t9                       |     t9 ();
    0x00541cd0 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x00541cd4 move s4, v0                   |     s4 = v0;
    0x00541cd8 lw v0, -0x79a4(gp)            |     v0 = *(gp);
    0x00541cdc lbu v0, 0x13c(v0)             |     v0 = *((v0 + 316));
    0x00541ce0 lw s0, -0x7fc0(gp)            |     s0 = *((gp - 8176));
                                             |     if (v0 != 0) {
    0x00541ce4 bnez v0, 0x541dec             |         goto label_5;
                                             |     }
    0x00541ce8 lw s0, -0x7fb8(gp)            |     s0 = *(gp);
    0x00541cec addiu s7, zero, 1             |     s7 = 1;
    0x00541cf0 addiu s0, s0, 0x2ec8          |     s0 += 0x2ec8;
                                             |     do {
    0x00541cf4 lw t9, -0x71f4(gp)            |         t9 = sym.zend_llist_get_first_ex;
    0x00541cf8 addiu s3, sp, 0x24            |         s3 = sp + 0x24;
    0x00541cfc move a1, s3                   |         a1 = s3;
    0x00541d00 move a0, s1                   |         a0 = s1;
    0x00541d04 jalr t9                       |         t9 ();
    0x00541d08 addiu v1, s4, -1              |         v1 = s4 + -1;
    0x00541d0c lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00541d10 move s6, zero                 |         s6 = 0;
    0x00541d14 move s2, zero                 |         s2 = 0;
    0x00541d18 sw v1, 0x28(sp)               |         *(var_28h) = v1;
                                             | label_0:
    0x00541d1c lw t9, -0x5f58(gp)            |         t9 = sym.imp.strlen;
                                             |         if (v0 != 0) {
    0x00541d20 bnez v0, 0x541df8             |             goto label_6;
                                             |         }
    0x00541d24 lw t9, -0x7f5c(gp)            |         t9 = sym._emalloc;
    0x00541d28 addiu a0, s2, 1               |         a0 = s2 + 1;
    0x00541d2c jalr t9                       |         t9 ();
    0x00541d30 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00541d34 sb zero, (v0)                 |         *(v0) = 0;
    0x00541d38 move a1, s3                   |         a1 = s3;
    0x00541d3c lw t9, -0x71f4(gp)            |         t9 = sym.zend_llist_get_first_ex;
    0x00541d40 move a0, s1                   |         a0 = s1;
    0x00541d44 move s2, v0                   |         s2 = v0;
    0x00541d48 jalr t9                       |         t9 ();
    0x00541d4c lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00541d50 move s6, zero                 |         s6 = 0;
    0x00541d54 addiu s4, s4, -1              |         s4 += -1;
                                             | label_1:
    0x00541d58 lw t9, -0x60c0(gp)            |         t9 = sym.imp.strcat
                                             |         if (v0 != 0) {
    0x00541d5c bnez v0, 0x541e34             |             goto label_7;
                                             |         }
    0x00541d60 addiu s0, zero, 1             |         s0 = 1;
                                             | label_2:
    0x00541d64 lw t9, -0x7794(gp)            |         t9 = sym.php_strip_url_passwd;
    0x00541d68 move a0, s5                   |         a0 = s5;
    0x00541d6c bal 0x530ffc                  |         sym_php_strip_url_passwd ();
    0x00541d70 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00541d74 addiu a2, zero, 2             |         a2 = 2;
    0x00541d78 move a1, s5                   |         a1 = s5;
    0x00541d7c lw a3, -0x7fb8(gp)            |         a3 = *(gp);
    0x00541d80 lw t9, -0x6844(gp)            |         t9 = sym.php_error_docref1;
                                             |         /* esilref: '&s: &s' */
    0x00541d84 addiu a3, a3, 0x51c8          |         a3 += 0x51c8;
    0x00541d88 move a0, zero                 |         a0 = 0;
    0x00541d8c sw s2, 0x14(sp)               |         *(var_14h) = s2;
    0x00541d90 sw fp, 0x10(sp)               |         *(var_10h) = fp;
    0x00541d94 jalr t9                       |         t9 ();
    0x00541d98 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00541d9c lw t9, -0x7fe4(gp)            |         t9 = sym._efree;
    0x00541da0 move a0, s5                   |         a0 = s5;
    0x00541da4 jalr t9                       |         t9 ();
    0x00541da8 lw gp, 0x18(sp)               |         gp = *(var_18h);
                                             |         if (s0 != 0) {
    0x00541dac beqz s0, 0x541dbc             |             
    0x00541db0 lw t9, -0x7fe4(gp)            |             t9 = sym._efree;
    0x00541db4 move a0, s2                   |             a0 = s2;
    0x00541db8 jalr t9                       |             t9 ();
                                             |         }
    0x00541dbc lw ra, 0x54(sp)               |         ra = *(var_54h);
    0x00541dc0 lw fp, 0x50(sp)               |         fp = *(var_50h);
    0x00541dc4 lw s7, 0x4c(sp)               |         s7 = *(var_4ch);
    0x00541dc8 lw s6, 0x48(sp)               |         s6 = *(var_48h);
    0x00541dcc lw s5, 0x44(sp)               |         s5 = *(var_44h);
    0x00541dd0 lw s4, 0x40(sp)               |         s4 = *(var_40h);
    0x00541dd4 lw s3, 0x3c(sp)               |         s3 = *(var_3ch);
    0x00541dd8 lw s2, 0x38(sp)               |         s2 = *(var_38h);
    0x00541ddc lw s1, 0x34(sp)               |         s1 = *(var_34h);
    0x00541de0 lw s0, 0x30(sp)               |         s0 = *(var_30h);
    0x00541de4 addiu sp, sp, 0x58            |         
    0x00541de8 jr ra                         |         return v0;
                                             | label_5:
    0x00541dec addiu s7, zero, 7             |         s7 = 7;
                                             |         /* str._br____n */
    0x00541df0 addiu s0, s0, -0x7be4         |         s0 += -0x7be4;
    0x00541df4 b 0x541cf4                    |         
                                             |     } while (1);
                                             | label_6:
    0x00541df8 lw a0, (v0)                   |     a0 = *(v0);
    0x00541dfc jalr t9                       |     t9 ();
    0x00541e00 addu s2, s2, v0               |     s2 += v0;
    0x00541e04 lw v0, 0x28(sp)               |     v0 = *(var_28h);
    0x00541e08 slt v0, s6, v0                |     v0 = (s6 < v0) ? 1 : 0;
    0x00541e0c lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x00541e10 beqz v0, 0x541e18             |         
    0x00541e14 addu s2, s2, s7               |         s2 += s7;
                                             |     }
    0x00541e18 lw t9, -0x71ec(gp)            |     t9 = sym.zend_llist_get_next_ex;
    0x00541e1c move a1, s3                   |     a1 = s3;
    0x00541e20 move a0, s1                   |     a0 = s1;
    0x00541e24 jalr t9                       |     t9 ();
    0x00541e28 addiu s6, s6, 1               |     s6++;
    0x00541e2c lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x00541e30 b 0x541d1c                    |     goto label_0;
                                             | label_7:
    0x00541e34 lw a1, (v0)                   |     a1 = *(v0);
    0x00541e38 move a0, s2                   |     a0 = s2;
    0x00541e3c jalr t9                       |     t9 ();
    0x00541e40 slt v0, s6, s4                |     v0 = (s6 < s4) ? 1 : 0;
    0x00541e44 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x00541e48 beqz v0, 0x541e60             |         
    0x00541e4c lw t9, -0x60c0(gp)            |         t9 = sym.imp.strcat
    0x00541e50 move a1, s0                   |         a1 = s0;
    0x00541e54 move a0, s2                   |         a0 = s2;
    0x00541e58 jalr t9                       |         t9 ();
    0x00541e5c lw gp, 0x18(sp)               |         gp = *(var_18h);
                                             |     }
    0x00541e60 lw t9, -0x71ec(gp)            |     t9 = sym.zend_llist_get_next_ex;
    0x00541e64 move a1, s3                   |     a1 = s3;
    0x00541e68 move a0, s1                   |     a0 = s1;
    0x00541e6c jalr t9                       |     t9 ();
    0x00541e70 addiu s6, s6, 1               |     s6++;
    0x00541e74 lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x00541e78 b 0x541d58                    |     goto label_1;
                                             | label_4:
    0x00541e7c lw v0, -0x6d0c(gp)            |     v0 = *(gp);
    0x00541e80 lw t9, -0x5c88(gp)            |     t9 = sym.imp.__errno_location;
                                             |     if (s0 == v0) {
    0x00541e84 bne s0, v0, 0x541ebc          |         
    0x00541e88 move s0, zero                 |         s0 = 0;
    0x00541e8c jalr t9                       |         t9 ();
    0x00541e90 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00541e94 lw t9, -0x5cdc(gp)            |         t9 = sym.imp.strerror;
    0x00541e98 lw a0, (v0)                   |         a0 = *(v0);
    0x00541e9c jalr t9                       |         t9 ();
    0x00541ea0 move s2, v0                   |         s2 = v0;
    0x00541ea4 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x00541ea8 b 0x541d64                    |         goto label_2;
                                             | label_3:
    0x00541eac lw s2, -0x7fc0(gp)            |         s2 = *((gp - 8176));
    0x00541eb0 move s0, zero                 |         s0 = 0;
                                             |         /* str.no_suitable_wrapper_could_be_found */
    0x00541eb4 addiu s2, s2, -0x220          |         s2 += -0x220;
    0x00541eb8 b 0x541d64                    |         goto label_2;
                                             |     }
    0x00541ebc lw s2, -0x7fc0(gp)            |     s2 = *((gp - 8176));
    0x00541ec0 move s0, zero                 |     s0 = 0;
                                             |     /* str.operation_failed */
    0x00541ec4 addiu s2, s2, -0x1fc          |     s2 += -0x1fc;
    0x00541ec8 b 0x541d64                    |     goto label_2;
                                             | }
    ; assembly                                       | /* r2dec pseudo code output */
                                                     | /* /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/usr/bin/php-fpm @ 0x547b94 */
                                                     | #include <stdint.h>
                                                     |  
    ; (fcn) sym.php_stream_filter_create ()          | void php_stream_filter_create () {
    0x00547b94 lui gp, 0x1d                          |     
    0x00547b98 addiu gp, gp, -0x344                  |     
    0x00547b9c addu gp, gp, t9                       |     gp += t9;
    0x00547ba0 lw v0, -0x7a50(gp)                    |     v0 = *(gp);
    0x00547ba4 addiu sp, sp, -0x40                   |     
    0x00547ba8 sw s5, 0x2c(sp)                       |     *(var_2ch) = s5;
    0x00547bac lw s5, 0x24(v0)                       |     s5 = *((v0 + 9));
    0x00547bb0 sw gp, 0x10(sp)                       |     *(var_10h) = gp;
    0x00547bb4 sw s7, 0x34(sp)                       |     *(var_34h) = s7;
    0x00547bb8 sw s6, 0x30(sp)                       |     *(var_30h) = s6;
    0x00547bbc sw s0, 0x18(sp)                       |     *(var_18h) = s0;
    0x00547bc0 sw ra, 0x3c(sp)                       |     *(var_3ch) = ra;
    0x00547bc4 sw fp, 0x38(sp)                       |     *(var_38h) = fp;
    0x00547bc8 sw s4, 0x28(sp)                       |     *(var_28h) = s4;
    0x00547bcc sw s3, 0x24(sp)                       |     *(var_24h) = s3;
    0x00547bd0 sw s2, 0x20(sp)                       |     *(var_20h) = s2;
    0x00547bd4 sw s1, 0x1c(sp)                       |     *(var_1ch) = s1;
    0x00547bd8 move s0, a0                           |     s0 = a0;
    0x00547bdc move s6, a1                           |     s6 = a1;
    0x00547be0 move s7, a2                           |     s7 = a2;
                                                     |     if (s5 == 0) {
    0x00547be4 bnez s5, 0x547bf0                     |         
    0x00547be8 lw s5, -0x7938(gp)                    |         s5 = *((gp - 7758));
    0x00547bec addiu s5, s5, 0x4760                  |         s5 += 0x4760;
                                                     |     }
    0x00547bf0 lw t9, -0x5f58(gp)                    |     t9 = sym.imp.strlen;
    0x00547bf4 move a0, s0                           |     a0 = s0;
    0x00547bf8 jalr t9                               |     t9 ();
    0x00547bfc lw gp, 0x10(sp)                       |     gp = *(var_10h);
    0x00547c00 move a2, v0                           |     a2 = v0;
    0x00547c04 move a1, s0                           |     a1 = s0;
    0x00547c08 lw t9, -0x7e90(gp)                    |     t9 = sym.zend_hash_str_find;
    0x00547c0c move a0, s5                           |     a0 = s5;
    0x00547c10 move s2, v0                           |     s2 = v0;
    0x00547c14 jalr t9                               |     t9 ();
    0x00547c18 lw gp, 0x10(sp)                       |     gp = *(var_10h);
                                                     |     if (v0 != 0) {
    0x00547c1c beqz v0, 0x547c54                     |         
    0x00547c20 lw v0, (v0)                           |         v0 = *(v0);
    0x00547c24 move a2, s7                           |         a2 = s7;
    0x00547c28 move a1, s6                           |         a1 = s6;
    0x00547c2c lw t9, (v0)                           |         t9 = *(v0);
    0x00547c30 move a0, s0                           |         a0 = s0;
    0x00547c34 jalr t9                               |         t9 ();
    0x00547c38 move s2, v0                           |         s2 = v0;
    0x00547c3c lw gp, 0x10(sp)                       |         gp = *(var_10h);
                                                     |         if (v0 != 0) {
    0x00547c40 bnez v0, 0x547c90                     |             goto label_3;
                                                     |         }
    0x00547c44 lw a2, -0x7fc0(gp)                    |         a2 = *((gp - 8176));
    0x00547c48 move a3, s0                           |         a3 = s0;
                                                     |         /* str.unable_to_create_or_locate_filter___s_ */
                                                     | label_1:
    0x00547c4c addiu a2, a2, 0x328                   |         a2 += 0x328;
    0x00547c50 b 0x547c7c                            |         
                                                     |     } else {
    0x00547c54 lw t9, -0x5e18(gp)                    |         t9 = sym.imp.strrchr;
    0x00547c58 addiu a1, zero, 0x2e                  |         a1 = 0x2e;
    0x00547c5c move a0, s0                           |         a0 = s0;
    0x00547c60 jalr t9                               |         t9 ();
    0x00547c64 move s1, v0                           |         s1 = v0;
    0x00547c68 lw gp, 0x10(sp)                       |         gp = *(var_10h);
                                                     |         if (v0 != 0) {
    0x00547c6c bnez v0, 0x547cc4                     |             goto label_4;
                                                     |         }
                                                     | label_0:
    0x00547c70 lw a2, -0x7fc0(gp)                    |         a2 = *((gp - 8176));
    0x00547c74 move a3, s0                           |         a3 = s0;
                                                     |         /* str.unable_to_locate_filter___s_ */
    0x00547c78 addiu a2, a2, 0x308                   |         a2 += 0x308;
                                                     |     }
    0x00547c7c lw t9, -0x7ef0(gp)                    |     t9 = sym.php_error_docref0;
    0x00547c80 addiu a1, zero, 2                     |     a1 = 2;
    0x00547c84 move a0, zero                         |     a0 = 0;
    0x00547c88 move s2, zero                         |     s2 = 0;
    0x00547c8c jalr t9                               |     t9 ();
                                                     |     do {
                                                     | label_3:
    0x00547c90 lw ra, 0x3c(sp)                       |         ra = *(var_3ch);
    0x00547c94 move v0, s2                           |         v0 = s2;
    0x00547c98 lw fp, 0x38(sp)                       |         fp = *(var_38h);
    0x00547c9c lw s7, 0x34(sp)                       |         s7 = *(var_34h);
    0x00547ca0 lw s6, 0x30(sp)                       |         s6 = *(var_30h);
    0x00547ca4 lw s5, 0x2c(sp)                       |         s5 = *(var_2ch);
    0x00547ca8 lw s4, 0x28(sp)                       |         s4 = *(var_28h);
    0x00547cac lw s3, 0x24(sp)                       |         s3 = *(var_24h);
    0x00547cb0 lw s2, 0x20(sp)                       |         s2 = *(var_20h);
    0x00547cb4 lw s1, 0x1c(sp)                       |         s1 = *(var_1ch);
    0x00547cb8 lw s0, 0x18(sp)                       |         s0 = *(var_18h);
    0x00547cbc addiu sp, sp, 0x40                    |         
    0x00547cc0 jr ra                                 |         return v0;
                                                     | label_4:
    0x00547cc4 lw t9, -0x7c7c(gp)                    |         t9 = sym._safe_emalloc;
    0x00547cc8 move a1, s2                           |         a1 = s2;
    0x00547ccc addiu a2, zero, 3                     |         a2 = 3;
    0x00547cd0 addiu a0, zero, 1                     |         a0 = 1;
    0x00547cd4 jalr t9                               |         t9 ();
    0x00547cd8 lw gp, 0x10(sp)                       |         gp = *(var_10h);
    0x00547cdc addiu a2, s2, 1                       |         a2 = s2 + 1;
    0x00547ce0 move a1, s0                           |         a1 = s0;
    0x00547ce4 lw t9, -0x5f48(gp)                    |         t9 = sym.imp.memcpy;
    0x00547ce8 move a0, v0                           |         a0 = v0;
    0x00547cec move s4, v0                           |         s4 = v0;
    0x00547cf0 jalr t9                               |         t9 ();
    0x00547cf4 lw gp, 0x10(sp)                       |         gp = *(var_10h);
    0x00547cf8 subu s1, s1, s0                       |         __asm ("subu s1, s1, s0");
    0x00547cfc addu s1, s4, s1                       |         s1 = s4 + s1;
    0x00547d00 lw fp, -0x7fc4(gp)                    |         fp = *((gp - 8177));
    0x00547d04 move s2, zero                         |         s2 = 0;
    0x00547d08 move s3, zero                         |         s3 = 0;
                                                     |         /* esilref: '.*' */
    0x00547d0c addiu fp, fp, -0x3bd8                 |         fp += -0x3bd8;
                                                     | label_2:
    0x00547d10 lw t9, -0x7fe4(gp)                    |         t9 = sym._efree;
                                                     |         if (s1 != 0) {
    0x00547d14 beqz s1, 0x547d24                     |             
    0x00547d18 lw t9, -0x60c0(gp)                    |             t9 = sym.imp.strcat
                                                     |             if (s2 == 0) {
    0x00547d1c beqz s2, 0x547d44                     |                 goto label_5;
                                                     |             }
    0x00547d20 lw t9, -0x7fe4(gp)                    |             t9 = sym._efree;
                                                     |         }
    0x00547d24 move a0, s4                           |         a0 = s4;
    0x00547d28 jalr t9                               |         t9 ();
    0x00547d2c lw gp, 0x10(sp)                       |         gp = *(var_10h);
    0x00547d30 bnez s2, 0x547c90                     |         
                                                     |     } while (s2 != 0);
    0x00547d34 lw a2, -0x7fc0(gp)                    |     a2 = *((gp - 8176));
                                                     |     if (s3 == 0) {
    0x00547d38 beqz s3, 0x547c70                     |         goto label_0;
                                                     |     }
    0x00547d3c move a3, s0                           |     a3 = s0;
    0x00547d40 b 0x547c4c                            |     goto label_1;
                                                     | label_5:
    0x00547d44 move a1, fp                           |     a1 = fp;
    0x00547d48 move a0, s4                           |     a0 = s4;
    0x00547d4c sb zero, (s1)                         |     *(s1) = 0;
    0x00547d50 jalr t9                               |     t9 ();
    0x00547d54 lw gp, 0x10(sp)                       |     gp = *(var_10h);
    0x00547d58 lw t9, -0x5f58(gp)                    |     t9 = sym.imp.strlen;
    0x00547d5c move a0, s4                           |     a0 = s4;
    0x00547d60 jalr t9                               |     t9 ();
    0x00547d64 lw gp, 0x10(sp)                       |     gp = *(var_10h);
    0x00547d68 move a2, v0                           |     a2 = v0;
    0x00547d6c move a1, s4                           |     a1 = s4;
    0x00547d70 lw t9, -0x7e90(gp)                    |     t9 = sym.zend_hash_str_find;
    0x00547d74 move a0, s5                           |     a0 = s5;
    0x00547d78 jalr t9                               |     t9 ();
    0x00547d7c lw gp, 0x10(sp)                       |     gp = *(var_10h);
                                                     |     if (v0 == 0) {
    0x00547d80 beqz v0, 0x547dc4                     |         goto label_6;
                                                     |     }
    0x00547d84 lw s3, (v0)                           |     s3 = *(v0);
    0x00547d88 move a2, s7                           |     a2 = s7;
    0x00547d8c move a1, s6                           |     a1 = s6;
    0x00547d90 lw t9, (s3)                           |     t9 = *(s3);
    0x00547d94 move a0, s0                           |     a0 = s0;
    0x00547d98 jalr t9                               |     t9 ();
    0x00547d9c lw gp, 0x10(sp)                       |     gp = *(var_10h);
    0x00547da0 move s2, v0                           |     s2 = v0;
                                                     |     do {
    0x00547da4 lw t9, -0x5e18(gp)                    |         t9 = sym.imp.strrchr;
    0x00547da8 sb zero, (s1)                         |         *(s1) = 0;
    0x00547dac addiu a1, zero, 0x2e                  |         a1 = 0x2e;
    0x00547db0 move a0, s4                           |         a0 = s4;
    0x00547db4 jalr t9                               |         t9 ();
    0x00547db8 move s1, v0                           |         s1 = v0;
    0x00547dbc lw gp, 0x10(sp)                       |         gp = *(var_10h);
    0x00547dc0 b 0x547d10                            |         goto label_2;
                                                     | label_6:
    0x00547dc4 move s3, zero                         |         s3 = 0;
    0x00547dc8 b 0x547da4                            |         
                                                     |     } while (1);
                                                     | }

[*] Function strcat used 6 times php-fpm