3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; $input = "AB07-mbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbxyzccccs."; $a = substr($input, 0, 4); if ($a == "AB07-") { echo "Wrong"; return; } $b = substr($input, 5); $i = 0; $eax = 0; $ebx = 0; $ecx = 0; $edx = 0; $edi = 0; $ebx14h = 0x4F; $ebpedivar_18 = 0x0; $ebpvar_18 = 0x1B1B1B26; $ebpvar_1c = 0; $ebpvar_24 = 0; $ebpvar_20 = 0x42; $esi10h = 0x0; $esi14h = 0xF; $ebpvar_18 = 0x1B1B1B26; $esi = 0x23F198; $ebpedivar_14 = 0xDBB699; $ecxedx = 0x0; $eaxebx = 0x0; $ebparg_4 = 0x23F1B4; $dword_13EA528 = 0x40; $dword_13EA52C = 0x4F; $dword_13EA518 = 0x12012C0; //Nur zeiger? do { $eax = $ebx14h; $ebpvar_20--; //für das reversen wohl irrelevant if ($eax < 0x10) { } else { } if ($b[$edx] == "=") { } else { if ($eax < 0x10) { } else { $eax = $b; } $al = $eax[$edx]; $ebpvar_10 = $al; if (!ctype_alnum($al)) { $al = $ebpvar_10; if ($al != 0x2B) { if ($al != 0x2F) { break; } } } if ($ebx14h < 0x10) { } else { $ecx = $b; } $eax = $ebpvar_24; $edi++; $eax++; $ebpvar_1c = $edi; $ebpvar_24 = $eax; if ($edi == 4) { $ebpedivar_18 = hexdec(bin2hex(substr($b, $eax-4, 4))); $edi = 0; do { $ebx = hexdec(substr(dechex($ebpedivar_18), 2*$edi, 2)); $al = sub_19A0($ebx); $ebpedivar_18 = hexdec(substr(dechex($ebpedivar_18), 0, 2*$edi) . dechex($al) . substr(dechex($ebpedivar_18), 2*$edi+2)); $edi++; } while ($edi < 4); $tmp = $ebpedivar_18; $ebpedivar_18 = hexdec(bin2hex("")); for ($i = 0; $i < 4; $i++) { $ebpedivar_18 = hexdec(dechex($ebpedivar_18) . substr(dechex($tmp), 8-($i+1)*2, 2)); } $ecx = $ebpedivar_18; $dl = hexdec(substr(dechex($ecx), -2)); $dl = $dl * 4; $al = hexdec(substr(dechex($ecx), -4, 2)); $al = $al >> 4; $al = $al & 3; $al += $dl; $ebpvar_14 = $al; $al = hexdec(substr(dechex($ecx), 2, 2)); $dl = $al; $dl = $dl >> 2; $ecx = hexdec(substr(dechex($ecx), 0, 6) . substr(dechex($ecx), -4, 2)); $al = hexdec(substr(dechex($al << 6), -2)); $al = hexdec(substr(dechex($al + hexdec(substr(dechex($ecx), 0, 2))), -2)); $dl = $dl & 0x0F; $cl = hexdec(substr(dechex($ecx), -2)); $ecx = hexdec(substr(dechex($ecx), 0, 6) . substr(dechex($cl << 4), -2)); $cl = hexdec(substr(dechex($cl << 4), -2)); $dl = $cl ^ $dl; $ebpvar_13 = $dl; $ebpvar_12 = $al; $edi = 0; do { $eax = $esi10h; $ecx = 0xFFFFFFFF; $ecx -= $eax; if ($ecx <= 1) { return; //string too long } $ebx = $eax + 1; if ($ebx > 0xFFFFFFFE) { return; //string too long } $ecx = $esi14h; if ($ecx >= $ebx) { if ($ebx == 0) { } } if ($ebx != 0) { $al = 0x01; $eax = hexdec(substr(dechex($eax), 0, 6) . substr(dechex($al), 0)); } if ($al != 0) { $edx = $esi10h; $al = hexdec(substr(dechex($ebpedivar_14), -2)); if (strlen(dechex($eax)) <= 2) { $eax = $al; } else { $eax = hexdec(substr(dechex($eax), 0, strlen($eax) - 2) . substr(dechex($al), 0)); } $ecxedx .= $al; $esi10h = $ebx; if ($esi14h < 0x10) { $eax = $esi; } else { } $eaxebx = 0; } $edi++; } while ($edi < 3); $ebx = $ebparg_4; $ebpvar_1c = 0; $edi = 0; } if ($ebpvar_20 != 0) { $edx = $ebpvar_24; continue; } } } while ($ebpvar_20 > 0); $edi = 0; $a = (strlen($b)-1) % 4; $ebpedivar_18 = hexdec(bin2hex(substr($b, -($a+1), $a))); do { $ebx = hexdec(substr(dechex($ebpedivar_18), 2*$edi, 2)); $al = sub_19A0($ebx); $ebpedivar_18 = hexdec(substr(dechex($ebpedivar_18), 0, 2*$edi) . dechex($al) . substr(dechex($ebpedivar_18), 2*$edi+2)); $edi++; } while ($edi < $a); if ($a = 1) { $ebpedivar_18 += 0xffffff00; } $ecx = $ebpedivar_18; $al = hexdec(substr(dechex($ecx), -2)); $al = $al * 4; $dl = hexdec(substr(dechex($ecx), -4, 2)); $dl = $dl >> 4; $dl = $dl & 3; $dl += $al; $ebpvar_14 = $dl; $al = hexdec(substr(dechex($ecx), 2, 2)); $dl = $al; $dl = $dl >> 2; $ecx = hexdec(substr(dechex($ecx), 0, 6) . substr(dechex($ecx), -4, 2)); $al = hexdec(substr(dechex($al << 6), -2)); $al = hexdec(substr(dechex($al + hexdec(substr(dechex($ecx), 0, 2))), -2)); $dl = $dl & 0x0F; $cl = hexdec(substr(dechex($ecx), -2)); $ecx = hexdec(substr(dechex($ecx), 0, 6) . substr(dechex($cl << 4), -2)); $cl = hexdec(substr(dechex($cl << 4), -2)); $dl = $cl ^ $dl; $ebpvar_13 = $dl; $ebpvar_12 = $al; $edi = 0; var_dump($dl); var_dump($al); printf("HEX:\n"); var_dump(dechex($eax)); var_dump(dechex($ebx)); var_dump(dechex($ecx)); var_dump(dechex($edx)); var_dump(dechex($edi)); printf("Normal:\n"); var_dump($eax); var_dump($ebx); var_dump($ecx); var_dump($edi); printf("String: %s", $ecxedx); function sub_19A0($ebx) { $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; return strpos($chars, $ebx) - strpos($chars, "A"); } function arrayToString($arr) { $output = ""; foreach ($arr as $char) { $output .= chr($char); } return $output; }