/*
   G e n e r a t e d  by ex4-to-mq4 decompiler FREEWARE 4.0.509.5
   Website:  h t T p:// ww W. ME t aQU oT e s. N E T
   E-mail : S UP p oR t @me TAQ U O tES.nET
*/
#property copyright "Copyright © 2010, MqlRobots.com"
#property link      "http://www.4xTrader.net"

#include <WinUser32.mqh>
//#include <stdlib.mqh>
#import "stdlib.ex4"
   string ErrorDescription(int a0); // DA69CBAFF4D38B87377667EEC549DE5A
#import "wininet.dll"
   int InternetAttemptConnect(int a0);
   int InternetOpenA(string a0, int a1, string a2, string a3, int a4);
   int InternetOpenUrlA(int a0, string a1, string a2, int a3, int a4, int a5);
   int InternetReadFile(int a0, int& a1[], int a2, int& a3[]);
   int InternetCloseHandle(int a0);
#import "advapi32.dll"
   int RegOpenKeyA(int a0, string a1, int& a2[]);
   int RegCloseKey(int a0);
   int RegQueryValueExA(int a0, string a1, int a2, int& a3[], string a4, int& a5[]);
#import "shell32.dll"
   int ShellExecuteA(int a0, int a1, string a2, string a3, int a4, int a5);
#import "kernel32.dll"
   int _lopen(string a0, int a1);
   int _lcreat(string a0, int a1);
   int _llseek(int a0, int a1, int a2);
   int _lread(int a0, string a1, int a2);
   int _lwrite(int a0, string a1, int a2);
   int _lclose(int a0);
   void OutputDebugStringA(string a0);
#import

double Gd_76 = 9.1;
string G_text_84 = "4xGuardian";
extern string Transaction_ID = "";
string Gs_100 = "";
string Gs_108 = "";
bool Gi_116 = FALSE;
bool Gi_120 = FALSE;
int Gi_unused_124 = 0;
bool Gi_unused_128 = FALSE;
string Gsa_unused_132[256];
bool Gi_unused_136 = TRUE;
int Gia_140[100];
string Gs_144;
int G_str2int_152;
string G_text_156;
string G_text_164;
string Gs_172;
string Gs_180;
string Gs_dummy_188;
string Gs_dummy_196;
string Gs_dummy_204;
bool Gi_unused_220 = FALSE;
int Gi_unused_224 = 0;
int Gi_unused_228 = 0;
bool Gi_unused_232 = FALSE;
int Gi_236 = 1;
int Gi_240 = 0;
int Gi_248;
string Gs_dummy_252;
string Gs_none_260 = "none";
bool Gi_268 = FALSE;
int Gi_unused_272;
int Gi_unused_276;
bool Gi_280 = FALSE;
string Gs_284;
string Gs_292;
int G_datetime_300;
int Gi_unused_320 = 0;
bool Gi_unused_324 = FALSE;
bool Gi_unused_328 = FALSE;
double G_str2dbl_332 = 0.0;
string Gs_dummy_340;
string Gs_348;
bool Gi_unused_356 = FALSE;
bool Gi_360 = FALSE;
string Gs_364;
string Gs_372;
string Gs_dummy_380;
bool Gi_unused_388 = FALSE;
string Gsa_392[];
string Gsa_unused_396[];
string Gsa_unused_400[];
string Gs_dummy_404;
int Gia_412[];
string G_str_concat_416;
bool Gi_unused_424 = FALSE;
string Gs_dummy_428;
string Gs_436 = "";
string Gsa_444[100];
string Gsa_448[100];
string Gs_452;
string G_text_460;
string Gs_468;
string Gs_476;
string Gs_484;
color G_color_492 = Lime;
color G_color_496 = Silver;
int Gi_500 = 120;
int Gi_504 = 60;
int Gi_508 = 190;
int Gi_512 = 0;
string G_text_516;
int Gi_unused_524;
int Gi_528 = 0;
int Gi_532 = 0;
int Gi_unused_536 = 16711680;
int Gi_unused_540 = 255;
int Gi_unused_544 = 16711935;
int Gi_unused_548 = 8421504;
int Gi_unused_552 = 0;
int Gi_unused_556 = 1;
int Gi_unused_560 = 1;
int Gi_unused_564 = 1;
bool Gi_unused_568 = FALSE;
string Gsa_unused_572[20];
int Gi_unused_576 = 0;
int Gi_unused_580 = 0;

void aa(string As_0, string As_8 = "", string As_16 = "") {
   G_str_concat_416 = StringConcatenate(G_str_concat_416, TimeToStr(TimeCurrent(), TIME_SECONDS), " - | ", StringTrimLeft(StringTrimRight(As_0)), StringTrimLeft(StringTrimRight(As_8)),
      StringTrimLeft(StringTrimRight(As_16)), " | \r\n");
}

void aaa() {
   string Ls_0 = "Dear " + AccountName() + " \r\n \r\nIt appears that the installer fail to install correctly.\r\nTo resolve the problem please open a support ticket at http://4xtrader.net/support/ and send us the following information with your support request: \r\n ";
   Ls_0 = Ls_0 + "\r\n- All the text on this file.";
   Ls_0 = Ls_0 + "\r\n- A screen shoot ( right click on the Chart and choose SAVE AS PICTURE ) of MT4 with the Terminal open ( Control+T) on the EXPERTS Tab .";
   Ls_0 = Ls_0 + "\r\n- Copy of the Expert Logs from MT4 where you are running the expert ( right click on the Expert logs and choose open) .";
   Ls_0 = Ls_0 + "\r\n- Copy of the Journal logs from  MT4 where you are running the expert ( right click on the Journal and choose open) .";
   Ls_0 = Ls_0 + "\r\n\r\n\r\n\r\n-------------------------------- SEND TEXT BELOW THIS LINE TO SUPPORT -----------------------------------------------------\r\n";
   Ls_0 = Ls_0 + "MT4 ID: " + Transaction_ID + "\r\n";
   Ls_0 = Ls_0 + "MT4 Inst. Ver.: " + Gd_76 + "\r\n";
   Ls_0 = Ls_0 + "MT4 Tool: " + G_text_84 + "\r\n";
   Ls_0 = Ls_0 + "MT4 Path: " + TerminalPath() + "\r\n";
   Ls_0 = Ls_0 + "MT4 Name: " + AccountName() + "\r\n";
   Ls_0 = Ls_0 + "MT4 Company: " + AccountCompany() + " \\ Server: " + AccountServer() + " \\Terminal Company: " + TerminalCompany() + "\r\n";
   Ls_0 = Ls_0 + "MT4 Number " + AccountNumber() + "\r\n";
   Ls_0 = Ls_0 + "MT4 Demo " + IsDemo() + "\r\n";
   Ls_0 = Ls_0 + "\r\r\n\n";
   string Ls_8 = StringSubstr(TerminalPath(), 0, 1) + ":\\Temp";
   string Ls_16 = "InstallerLog_" + WindowExpertName() + Symbol() + ".txt";
   aaaaaaaaaaa(Ls_8 + "\\" + Ls_16, Ls_0 + G_str_concat_416);
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c notepad.exe " + CharToStr(34) + Ls_8 + "\\" + Ls_16 + CharToStr(34), 0, 0);
   Print("Instller logs save at : " + Ls_8 + "\\" + Ls_16);
   G_str_concat_416 = "";
}

int init() {
   string Ls_8;
   string Ls_16;
   int mb_code_24;
   string Ls_28;
   string Ls_36;
   ArrayResize(Gsa_392, 9);
   Gsa_392[0] = "http://livelicenseserver.servehttp.com/cgi-bin/";
   Gsa_392[2] = "http://46.251.237.203/cgi-bin/";
   Gsa_392[1] = "http://licenseserver2.servehttp.com/cgi-bin/";
   Gsa_392[3] = "http://licenseserver1.servehttp.com/cgi-bin/";
   Gsa_392[4] = "http://209.222.27.189/cgi-bin/";
   Gsa_392[5] = "http://www.moldtestingflorida.com/forex/";
   Gsa_392[6] = "http://216.14.117.110/cgi-bin/";
   Gsa_392[7] = "http://4xtrader.net/cgi-bin/";
   Gsa_392[8] = "http://backlicenseserver.servehttp.com/cgi-bin/";
   ArrayResize(Gia_412, 10);
   Gia_412[0] = 1938898;
   Gia_412[1] = 6062;
   Gia_412[2] = 1113418;
   Gia_412[3] = 36350;
   Gia_412[4] = 36351;
   Gia_412[5] = 1938898;
   Gia_412[6] = 1938898;
   Gia_412[7] = 1938898;
   Gia_412[8] = 1938898;
   Gia_412[9] = 1938898;
   ObjectsDeleteAll();
   Gi_280 = FALSE;
   if (Transaction_ID == "98765418") Transaction_ID = "Demo";
   if (Transaction_ID == "demo") Transaction_ID = "Demo";
   if (Transaction_ID == "DEMO") Transaction_ID = "Demo";
   if (Transaction_ID == "dEMO") Transaction_ID = "Demo";
   if (Transaction_ID == "DEmo") Transaction_ID = "Demo";
   Gs_436 = Transaction_ID;
   if (StringGetChar(Gs_436, 0) == ':') Gs_436 = StringSubstr(Gs_436, 2);
   if (StringGetChar(Gs_436, 0) == ' ') Gs_436 = StringSubstr(Gs_436, 1);
   int global_var_0 = 0;
   global_var_0 = GlobalVariableGet(WindowExpertName() + "4xInstaller" + Gs_436);
   Gi_unused_524 = 0;
   int Li_4 = TimeLocal() - global_var_0;
   if (Li_4 < 86400 && global_var_0 > 0) {
      Ls_8 = Li_4 / 3600;
      Ls_16 = Li_4 / 60;
      if (Li_4 > 3600) mb_code_24 = MessageBox("You have run the _Installer  " + Ls_8 + " hours ago \nYould like to run it again now ", "WARNING !", MB_YESNO|MB_ICONHAND);
      else mb_code_24 = MessageBox("You have run the _Installer  " + Ls_16 + " minutes ago \nYould like to run it again now ", "WARNING !", MB_YESNO|MB_ICONHAND);
      if (mb_code_24 == IDNO) {
         Gs_452 = "Removed";
         bbbbbbbbbbbbbbbbbb();
         return;
      }
   }
   G_text_516 = Gs_436;
   Gi_500 = 120;
   if (G_text_516 == "") {
      bbbbbbbbbbbbbbbbb();
      return;
   }
   G_text_460 = "";
   ObjectsDeleteAll();
   Comment("Please Wait while the Installer Loads....");
   aaaaaaaa();
   if (Gi_120 == FALSE) {
      if (StringLen(Gs_180) < 15) {
         Gi_280 = TRUE;
         Sleep(2000);
         aaaaaaaa();
      }
      if (StringLen(Gs_180) < 5) {
         Print("SERIAL ERROR:", Gs_180, "-", G_text_156);
         G_text_460 = "PERMISIONERROR";
         Ls_28 = "http://mqlrobots.com/cgi-bin/_installer.py?Id=" + G_text_516 + "&MachineID=" + Gs_180 + "&User=" + Gs_172 + "&OSVersion=" + G_text_164 + "&Expert=" + G_text_84 +
            "&Path=" + TerminalPath() + "&Name=" + Gs_100 + "&Email=" + Gs_108 + "&ComputerName=" + G_text_156 + "&MT4Name=" + AccountName() + "&MachineUserName=" + Gs_172 + "&MT4ID=" + Gs_348 + "&MT4Email=" + Gs_364 + "&MT4City=" + Gs_372 + "&InstVer=" + Gd_76;
         Ls_36 = aaaaaaaaaaaaaaaaa(Ls_28);
         return (Ls_36);
      }
      if (Gs_100 == "" && Transaction_ID == "Demo") {
         G_text_460 = "NAMEERROR";
         c();
         aaa();
      } else {
         if (StringFind(Gs_108, "@", 0) == -1 || StringFind(Gs_108, ".", 0) == -1 && Transaction_ID == "Demo") {
            G_text_460 = "EMAILERROR";
            cc();
         } else bbbbbbbbbbbbbbbb();
      }
   }
   return (0);
}

int deinit() {
   ObjectsDeleteAll();
   Sleep(2000);
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c del " + CharToStr(34) + TerminalPath() + "\\experts\\files\\*.vbs*" + CharToStr(34), 0, 0);
   aaaaaaaaaaaaaaaaaa();
   return (0);
}

int start() {
   string Ls_8;
   int mb_code_16;
   string Ls_0 = "";
   if (Gi_528 <= 1) {
      if (G_text_460 == "NAMEERROR") {
         c();
         Gi_528++;
      } else {
         if (G_text_460 == "EMAILERROR") {
            cc();
            Gi_528++;
         } else {
            if (G_text_460 == "PERMISIONERROR") {
               ObjectSetText("BoxLabelT", "    Installation permission error ", 12, "Tahoma", Red);
               Gi_500 = 130;
               aaaaa();
               Ls_8 = TerminalPath();
               Ls_0 = "Reeinstall MetaTrader on this folder";
               aaaa("Memo0", Gi_504, Gi_500, Ls_0, 12, "Tahoma", Red);
               Gi_500 += 20;
               Ls_0 = "C:\\MetaTrader\\MT4";
               aaaa("Memo-1", Gi_504, Gi_500, Ls_0, 12, "Tahoma", Red);
               Gi_500 += 40;
               Ls_0 = "Or follow these steps:";
               aaaa("Memo1", Gi_504, Gi_500, Ls_0, 12, "Tahoma", Red);
               Gi_500 += 20;
               Ls_0 = "1 - Press the Win keyboard key or click on Start button.";
               Gi_500 += 20;
               aaaa("Memo2", Gi_504, Gi_500, Ls_0, 12, "Tahoma", Red);
               Gi_500 += 20;
               Ls_0 = "2 - Type cmd into the Start Search textbox.";
               aaaa("Memo3", Gi_504, Gi_500, Ls_0, 12, "Tahoma", Red);
               Gi_500 += 20;
               Ls_0 = "3 - Press Ctrl+Shift+Enter keyboard shortcut.";
               aaaa("Memo4", Gi_504, Gi_500, Ls_0, 12, "Tahoma", Red);
               Gi_500 += 20;
               Ls_0 = "4 - Press Alt+C or press Continue to confirm the UAC elevation warning prompt.";
               aaaa("Memo5", Gi_504, Gi_500, Ls_0, 12, "Tahoma", Red);
               Gi_500 += 20;
               Ls_0 = "5 - Type the text below on the command prompt window";
               aaaa("Memo6", Gi_504, Gi_500, Ls_0, 12, "Tahoma", Red);
               Gi_500 += 30;
               Ls_0 = "icacls \"" + TerminalPath() + "\" /t /grant %UserDomain%\\%UserName%:(OI)(CI)F";
               aaaa("Memo7", Gi_504, Gi_500, Ls_0, 12, "Tahoma", White);
               bbbbbbbbbbbbbb(Red);
               PlaySound("timeout.wav");
               mb_code_16 = MessageBox(" Folder Permissions Error  . \n Goto www.4xtrader.net/tools/errorsecurity ", "WARNING !", 0);
               Sleep(90000);
            } else {
               if (Gi_528 <= 0) {
                  Gi_528++;
                  if (Gs_452 != "Removed") {
                     if (Gi_120) aaaaaaaa();
                     else {
                        if (G_text_460 == "Completed") {
                           Sleep(10000);
                           mb_code_16 = MessageBox(" Installation/Update completed. \n Please close this chart and restart your MT4 ", "WARNING !", 0);
                           return (0);
                        }
                        if (G_text_460 == "Wrong ID") mb_code_16 = MessageBox(" Installation/Update failed . \n Please press F7 and try again ", "WARNING !", 0);
                        if (G_text_460 == "Communication Failed") mb_code_16 = MessageBox(" Installation/Update failed . \n Please press F7 and try again ", "WARNING !", 0);
                        else mb_code_16 = MessageBox(" Installation/Update failed . \n Please restart your MT4 and try again. ", "WARNING !", 0);
                        if (G_text_460 != "") return (0);
                        aaaaaaaa();
                        bbbbbbbbbbbbbbbb();
                     }
                  }
               }
            }
         }
      }
   }
   return (0);
}

void aaaa(string A_name_0, int A_x_8, int A_y_12, string A_text_16, int A_fontsize_24, string A_fontname_28, color A_color_36) {
   ObjectCreate(A_name_0, OBJ_LABEL, 0, 0, 0);
   ObjectSet(A_name_0, OBJPROP_CORNER, 0);
   ObjectSet(A_name_0, OBJPROP_COLOR, A_color_36);
   ObjectSet(A_name_0, OBJPROP_XDISTANCE, A_x_8);
   ObjectSet(A_name_0, OBJPROP_YDISTANCE, A_y_12);
   ObjectSetText(A_name_0, A_text_16, A_fontsize_24, A_fontname_28, A_color_36);
}

void aaaaa() {
   Comment("Please Wait...  ");
   aaaaaa();
   string Ls_0 = StringSubstr(Gs_452, 0, 58);
   string Ls_8 = StringSubstr(Gs_452, 58, 0);
   if (Ls_0 == "") Ls_0 = "Folder Permissions Error";
   aaaaaaaaaaaaa("dll1", 130, 10, Ls_0, 13, "Tahoma", Red);
   aaaaaaaaaaaaa("dll2", 70, 40, "Please visit the fallowing page for instructions", 12, "Tahoma", CornflowerBlue);
   aaaaaaaaaaaaa("dll3", 78, 65, "www.4xtrader.net/tools/errorsecurity ", 12, "Tahoma", CornflowerBlue);
}

void aaaaaa() {
   ObjectsDeleteAll();
   int Li_0 = 525;
   for (int Li_4 = 0; Li_4 < Li_0; Li_4 += 8) for (int Li_8 = 0; Li_8 < 699; Li_8 += 8) aaaa(". box" + Li_4 + "-" + Li_8, Li_8, Li_4, CharToStr(110), 11, "Wingdings", Black);
   Comment(" ");
}

void aaaaaaa() {
   if (Gs_none_260 == "none") Gs_none_260 = TerminalPath();
   Comment("GP_R3.1");
   aaaaaaaaaaaaaaaaaa();
   if (Gi_280) aa("Query_Wmic0:", Gs_none_260);
   Sleep(1000);
   string Ls_0 = CharToStr(34) + Gs_none_260 + "\\experts\\files";
   string Ls_8 = "wmic /output:" + Ls_0 + "\\" + "Pid\\" + Symbol() + WindowExpertName() + "pid.bin" + CharToStr(34) + " process where name=\'terminal.exe\' get  processid,commandline /format:csv";
   string Ls_16 = "wmic /output:" + Ls_0 + "\\" + "Pid\\" + Symbol() + WindowExpertName() + "id.bin" + CharToStr(34) + " os get caption, serialnumber, CSname, RegisteredUser /format:list";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_8, 0, 0);
   if (Gi_280) aa("Query_Wmic1:", Ls_8);
   Sleep(500);
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_16, 0, 0);
   Sleep(89 * Gi_236);
}

void aaaaaaaa() {
   string Lsa_0[];
   string Ls_80;
   int Li_144;
   int Li_148;
   Comment("GP1");
   GlobalVariableDel("QueryRegisty");
   if (Gi_280) aa(" aaaaaaaa()");
   Gi_248 = TimeCurrent() + 300;
   if (bbbb(Lsa_0, 0) > 0) {
      for (int Li_4 = 0; Li_4 < ArraySize(Lsa_0); Li_4++) {
         if (Symbol() == Lsa_0[Li_4]) {
            Gi_236 = Li_4;
            break;
         }
      }
   }
   Comment("GP2");
   while (GlobalVariableGet("xGosth detection") == TimeLocal()) Sleep(500);
   GlobalVariableSet("xGosth detection", TimeLocal());
   int error_16 = GetLastError();
   MathSrand(TimeLocal() * Bid);
   string str_concat_20 = StringConcatenate(MathRand(), Symbol());
   string name_28 = "Pid\\" + WindowExpertName() + Symbol() + str_concat_20 + ".txt";
   Comment("GP3");
   int file_36 = FileOpen(name_28, FILE_CSV|FILE_WRITE|FILE_READ);
   if (file_36 == -1) file_36 = FileOpen("Pid\\text.txt", FILE_CSV|FILE_WRITE|FILE_READ);
   error_16 = GetLastError();
   if (error_16 != 0/* NO_ERROR */) {
      Print(error_16, "- Error Creating PID Directory -", ErrorDescription(error_16));
      if (Gi_280) aa(error_16, "- Error Creating PID Directory -", ErrorDescription(error_16));
   }
   Comment("GP4");
   FileSeek(file_36, 0, SEEK_SET);
   FileWrite(file_36, "111");
   Comment("GP5");
   FileClose(file_36);
   FileDelete(name_28);
   Comment("GP6");
   if (error_16 != 0/* NO_ERROR */) {
      Print(error_16, "- Error Deleting PID File -", ErrorDescription(error_16));
      if (Gi_280) aa(error_16, "- Error Deleting PID File -", ErrorDescription(error_16));
   }
   if (StringLen(Gs_180) > 15 && Gi_280 == FALSE) return;
   string Ls_8 = TerminalPath();
   Ls_8 = StringSubstr(Ls_8, 2, 0);
   string Ls_40 = "%LOCALAPPDATA%\\VirtualStore" + Ls_8;
   string Ls_48 = TerminalPath() + "\\experts\\files\\Pid\\" + Symbol() + WindowExpertName() + "UAC.OFF";
   string Ls_56 = Ls_40 + "\\experts\\files\\Pid\\" + Symbol() + WindowExpertName() + "UAC.ON";
   string Ls_64 = "echo 1 > " + CharToStr(34) + Ls_48 + CharToStr(34);
   Comment("GP7");
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_64, 0, 0);
   Comment("GP8");
   Ls_64 = "echo 2 > " + CharToStr(34) + Ls_56 + CharToStr(34);
   Comment("GP9");
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_64, 0, 0);
   Comment("GP10");
   Sleep(1000);
   string Ls_72 = bbbbbbbbb(-2147483646, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "CurrentVersion");
   if (Gi_280) aa("Reg. Win. Ver.:", Ls_72);
   G_str2dbl_332 = StrToDouble(Ls_72);
   Comment("GP11");
   if (G_str2dbl_332 > 0.0 && G_str2dbl_332 < 6.0) {
      Gi_unused_356 = FALSE;
      if (Gi_280) aa("VistaMode = false");
   } else {
      Gi_unused_356 = TRUE;
      if (Gi_280) aa("VistaMode = true");
   }
   Comment("GP12");
   file_36 = FileOpen("Pid\\" + Symbol() + WindowExpertName() + "UAC.OFF", FILE_CSV|FILE_READ);
   Comment("GP13");
   if (file_36 < 1) {
      if (Gi_280) aa(NULL, 9);
   } else {
      Ls_80 = FileReadString(file_36);
      Gi_268 = FALSE;
      Gs_none_260 = TerminalPath();
      FileClose(file_36);
      Sleep(400);
   }
   file_36 = FileOpen("Pid\\" + Symbol() + WindowExpertName() + "UAC.ON", FILE_CSV|FILE_READ);
   Comment("GP14");
   if (file_36 < 1) {
      if (Gi_280) aa("Pid\\" + Symbol() + WindowExpertName() + "UAC.ON", 9);
   } else {
      Ls_80 = FileReadString(file_36);
      Gi_268 = TRUE;
      Ls_8 = TerminalPath();
      Ls_8 = StringSubstr(Ls_8, 2, 0);
      Gs_none_260 = "%LOCALAPPDATA%\\VirtualStore" + Ls_8;
      Comment("GP15");
      FileClose(file_36);
   }
   Comment("GP15.1");
   string Ls_88 = bbbbbbbb();
   bbbbbbb(Ls_88);
   Comment("GP15.2");
   if (Gi_360) Print(G_text_164, "    -   UAC: ", Gi_268, "   -     64 Bit mode: On");
   else Print(G_text_164, "   -   UAC: ", Gi_268);
   if (Gi_280) aa(G_text_164, "   -   UAC: ", Gi_268);
   Comment("GP16");
   if (StringLen(Gs_180) > 5 && StringFind(WindowExpertName(), "4xWatch", 0) == -1 && StringFind(WindowExpertName(), "4xGhost", 0) == -1 && StringFind(WindowExpertName(),
      "Alive", 0) == -1) {
      aaaaaaaaaaaaaaaaaaa();
      return;
   }
   Print("Runnig Detection again:  ", Gs_180, " / ", StringFind(WindowExpertName(), "4xWatch", 0), " / ", StringFind(WindowExpertName(), "4xGhost", 0));
   Comment("GP17");
   G_datetime_300 = TimeLocal();
   if (Gi_280) aa("Runnig Detection again:  ", Gs_180);
   if (!IsDllsAllowed()) {
      Gi_120 = TRUE;
      aaaaaaaaaaaaaa();
      return;
   }
   Comment("GP18");
   Gi_120 = FALSE;
   if (Gi_240 == 0) {
      Gi_248 = TimeLocal() + 300;
      if (bbbb(Lsa_0, 0) > 0) {
         for (Li_4 = 0; Li_4 < ArraySize(Lsa_0); Li_4++) {
            if (Symbol() == Lsa_0[Li_4]) {
               Gi_236 = Li_4;
               break;
            }
            Comment("GP19 " + Li_4);
         }
      }
      if (Gi_236 < 100) Sleep(101 * Gi_236);
      else Sleep(89 * Gi_236);
      Gi_240 = 1;
   }
   Comment("GP20");
   Gi_240++;
   aaaaaaa();
   Comment("GP21");
   string Ls_96 = TerminalPath() + "\\experts\\files\\" + "Pid\\" + Symbol() + WindowExpertName() + "pid.bin";
   string Ls_104 = TerminalPath() + "\\experts\\files\\" + "Pid\\" + Symbol() + WindowExpertName() + "id.bin";
   Sleep(1000);
   Gs_284 = aaaaaaaaaa(Ls_96);
   Sleep(500);
   Gs_292 = aaaaaaaaaa(Ls_104);
   if (Gs_284 == "File Not Found !") {
      if (Gi_280) aa("Normal Win Test Faild, goint to try %LOCALAPPDATA% test ");
      Ls_8 = TerminalPath();
      Ls_8 = StringSubstr(Ls_8, 2, 0);
      Comment("GP22");
      Gs_none_260 = "%LOCALAPPDATA%\\VirtualStore" + Ls_8;
      aaaaaaa();
      Gs_284 = aaaaaaaaaa(Ls_96);
      Gs_292 = aaaaaaaaaa(Ls_104);
      if (Gs_284 != "File Not Found !") Gi_268 = TRUE;
   }
   if (Gs_284 == "File Not Found !") {
      if (Gi_280) aa("Normal Win Test Faild again, goint to try ", TerminalPath(), " test ");
      Gs_none_260 = "none";
      aaaaaaa();
      Sleep(800);
      Gs_284 = aaaaaaaaaa(Ls_96);
      Sleep(500);
      Gs_292 = aaaaaaaaaa(Ls_104);
      if (Gs_284 != "File Not Found !") Gi_268 = FALSE;
      Gi_240 = 1;
   }
   if (Gi_280) aa("DataPID =", Gs_284);
   if (Gi_280) aa("DataID =", Gs_292);
   int str_len_112 = StringLen(Gs_284);
   string Ls_124 = TerminalPath() + "\\terminal.exe";
   int Li_132 = StringFind(Gs_284, Ls_124, 0);
   Li_132 = StringFind(Gs_284, ",", Li_132);
   Li_132++;
   int Li_136 = StringFind(Gs_284, CharToStr(13), Li_132);
   int Li_140 = Li_136 - Li_132;
   if (Li_136 == -1) Li_140 = StringLen(Gs_284) - Li_132;
   string Ls_116 = StringSubstr(Gs_284, Li_132, Li_140);
   G_str2int_152 = StrToInteger(Ls_116);
   Li_132 = StringFind(Gs_284, TerminalPath(), 0);
   for (Li_4 = Li_132; Li_4 > Li_132 - 30; Li_4--) {
      if (StringSubstr(Gs_284, Li_4, 1) == ",") Li_144 = Li_4;
      if (StringGetChar(Gs_284, Li_4) == 10) {
         Li_148 = Li_4;
         break;
      }
   }
   G_text_156 = StringSubstr(Gs_284, Li_148, Li_144 - Li_148);
   G_text_156 = aaaaaaaaaaaa(G_text_156);
   string Ls_152 = Gs_284;
   int index_160 = 0;
   int str_len_164 = StringLen(Ls_124);
   ArrayInitialize(Gia_140, 0);
   while (StringFind(Ls_152, Ls_124, 0) != -1) {
      index_160++;
      Li_132 = StringFind(Ls_152, Ls_124, 0);
      Li_132 = StringFind(Ls_152, ",", Li_132);
      Li_132++;
      Li_136 = StringFind(Ls_152, CharToStr(13), Li_132);
      Li_140 = Li_136 - Li_132;
      if (Li_136 == -1) Li_140 = StringLen(Ls_152) - Li_132;
      Ls_116 = StringSubstr(Ls_152, Li_132, Li_140);
      Gia_140[index_160] = StrToInteger(Ls_116);
      Ls_152 = StringSubstr(Ls_152, Li_132 + Li_140);
      if (WindowExpertName() != "4xGhost") Print(Gi_236 + " --- ProcessID  " + Gia_140[index_160] + " PIDs " + index_160 + " - " + Gs_none_260);
      Gi_unused_272 = Gia_140[index_160];
   }
   Gi_unused_276 = index_160;
   if (Gi_280) aa("Ghost_instances =", index_160);
   if (index_160 > 1) {
      Print(Gs_284);
      aaaaaaaaa(index_160);
   }
   int Li_168 = StringFind(Gs_292, "Caption=", 0);
   int Li_172 = StringFind(Gs_292, CharToStr(10), Li_168);
   Li_140 = Li_172 - (Li_168 + 8);
   G_text_164 = StringSubstr(Gs_292, Li_168 + 8, Li_140);
   Li_168 = StringFind(Gs_292, "RegisteredUser=", 0);
   Li_172 = StringFind(Gs_292, CharToStr(13), Li_168);
   Li_140 = Li_172 - (Li_168 + 15);
   Gs_172 = StringSubstr(Gs_292, Li_168 + 15, Li_140);
   Li_168 = StringFind(Gs_292, "SerialNumber=", 0);
   Li_172 = StringFind(Gs_292, CharToStr(13), Li_168 + 13);
   Li_140 = Li_172 - (Li_168 + 13);
   Gs_180 = StringSubstr(Gs_292, Li_168 + 13, Li_140);
   if (Gi_280) aa("Type 2 ID is : ", Gs_180);
   if (StringLen(Gs_180) > 5) aaaaaaaaaaaaaaaaaa();
   Print(" Detection System information using Type 2 ");
}

void aaaaaaaaa(int Ai_0) {
   int mb_code_4;
   if (StringFind(WindowExpertName(), "Alive", 0) == -1) {
      mb_code_4 = MessageBox(Ai_0 + " Instances of the same MT4 Detected. \n Would You like to Reset it Now ", "WARNING !", MB_YESNO|MB_ICONHAND);
      if (mb_code_4 == IDNO) {
         Print("WARNING " + Ai_0 + " instance on the same MT4 Runnig ");
         return;
      }
   }
   string name_12 = "Kill";
   string Ls_unused_20 = "echo on ";
   string Ls_unused_28 = "echo on ";
   string Ls_unused_36 = "set count= ";
   FileDelete("\\Pid\\" + Symbol() + WindowExpertName() + "pid.txt");
   Sleep(100);
   FileDelete("\\Pid\\" + Symbol() + WindowExpertName() + "id.txt");
   Sleep(200);
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c del " + CharToStr(34) + Gs_none_260 + "\\experts\\files\\Kill.bat" + CharToStr(34), 0, 0);
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c del " + CharToStr(34) + Gs_none_260 + "\\experts\\files\\Kill" + CharToStr(34), 0, 0);
   Sleep(1000);
   int file_8 = FileOpen(name_12, FILE_CSV|FILE_WRITE, ';');
   if (file_8 > 0) {
      for (int Li_44 = 1; Li_44 <= Ai_0; Li_44++) {
         FileWrite(file_8, "echo about to kill process Terminal.exe   Pid " + Gia_140[Li_44]);
         FileWrite(file_8, "TASKKILL /PID " + Gia_140[Li_44] + " /F   ");
      }
      FileWrite(file_8, "start " + CharToStr(34) + "1" + CharToStr(34) + " " + CharToStr(34) + TerminalPath() + "\\terminal.exe" + CharToStr(34));
   }
   FileClose(file_8);
   Sleep(1000);
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c ren " + CharToStr(34) + Gs_none_260 + "\\experts\\files\\Kill" + CharToStr(34) + " Kill.bat", 0, 0);
   Sleep(1000);
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + CharToStr(34) + Gs_none_260 + "\\experts\\files\\Kill.bat" + CharToStr(34), 0, 1);
   Sleep(5000);
   string Ls_48 = StringSubstr(TerminalPath(), 0, 1) + ":\\Temp";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c MD " + Ls_48, 0, 0);
   Sleep(5000);
   string Ls_56 = Symbol() + MathRand() + Gi_236 + ".bat";
   string Ls_64 = "";
   for (Li_44 = 1; Li_44 <= Ai_0; Li_44++) {
      Ls_64 = Ls_64 + "echo about to kill process Terminal.exe   Pid " + Gia_140[Li_44] 
      + "\n";
      Ls_64 = Ls_64 + "echo " + Gs_none_260 
      + "\n";
      Ls_64 = Ls_64 + "TASKKILL /PID " + Gia_140[Li_44] + " /F   " 
      + "\n";
   }
   Ls_64 = Ls_64 + "start " + CharToStr(34) + "1" + CharToStr(34) + " " + CharToStr(34) + TerminalPath() + "\\terminal.exe" + CharToStr(34) 
   + "\n";
   Ls_64 = Ls_64 + "del " + CharToStr(34) + Ls_48 + "\\" + Ls_56 + CharToStr(34) 
   + "\n";
   Print("restarting MT4 - Log: " + Ls_48 + "\\" + Ls_56);
   aaaaaaaaaaa(Ls_48 + "\\" + Ls_56, Ls_64);
   Sleep(1000);
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + CharToStr(34) + Ls_48 + "\\" + Ls_56 + CharToStr(34), 0, 0);
}

string aaaaaaaaaa(string As_0) {
   int Li_8 = _lopen(As_0, 0);
   if (Li_8 < 0) return ("File Not Found !");
   int Li_12 = _llseek(Li_8, 0, 0);
   if (Li_12 < 0) {
      Print("Error 2");
      return ("");
   }
   string Ls_ret_16 = "";
   string Ls_24 = "x";
   int count_32 = 0;
   for (Li_12 = _lread(Li_8, Ls_24, 1); Li_12 > 0; Li_12 = _lread(Li_8, Ls_24, 1)) {
      Ls_ret_16 = Ls_ret_16 + Ls_24;
      Ls_24 = "x";
      count_32++;
   }
   Li_12 = _lclose(Li_8);
   if (Li_12 < 0) Print("Error 3 ", As_0);
   return (Ls_ret_16);
}

void aaaaaaaaaaa(string As_0, string As_8) {
   int Li_20;
   int str_len_16 = StringLen(As_8);
   int Li_24 = _lopen(As_0, 1);
   if (Li_24 < 0) {
      Li_24 = _lcreat(As_0, 0);
      if (Li_24 < 0) {
         Print("1 - Error ", As_0);
         return;
      }
      Li_20 = _lclose(Li_24);
   }
   Li_24 = _lopen(As_0, 1);
   if (Li_24 < 0) {
      Print("2 ", As_0);
      return;
   }
   Li_20 = _llseek(Li_24, 0, 0);
   if (Li_20 < 0) {
      Print("3");
      return;
   }
   Li_20 = _lwrite(Li_24, As_8, str_len_16);
   if (Li_20 < 0) Print("4 ", As_0, " ", str_len_16, " ????");
   Li_20 = _lclose(Li_24);
   if (Li_20 < 0) Print("5 ", As_0);
}

string aaaaaaaaaaaa(string As_0) {
   As_0 = StringTrimLeft(As_0);
   return (StringTrimRight(As_0));
}

void aaaaaaaaaaaaa(string A_name_0, int A_x_8, int A_y_12, string A_text_16, int A_fontsize_24, string A_fontname_28, color A_color_36) {
   ObjectCreate(A_name_0, OBJ_LABEL, 0, 0, 0);
   ObjectSet(A_name_0, OBJPROP_CORNER, 0);
   ObjectSet(A_name_0, OBJPROP_COLOR, A_color_36);
   ObjectSet(A_name_0, OBJPROP_XDISTANCE, A_x_8);
   ObjectSet(A_name_0, OBJPROP_YDISTANCE, A_y_12);
   ObjectSetText(A_name_0, A_text_16, A_fontsize_24, A_fontname_28, A_color_36);
}

void aaaaaaaaaaaaaa() {
   Comment("Please Wait...  ");
   ObjectsDeleteAll();
   int Li_0 = 525;
   for (int Li_4 = 0; Li_4 < Li_0; Li_4 += 8) for (int Li_8 = 0; Li_8 < 699; Li_8 += 8) aaaa(". box" + Li_4 + "-" + Li_8, Li_8, Li_4, CharToStr(110), 11, "Wingdings", Black);
   Comment(" ");
   WindowRedraw();
   aaaaaaaaaaaaa("dll1", 120, 10, "- ERROR :  DLL IMPORTS ARE NOT ENABLED -", 12, "Tahoma", Red);
   aaaaaaaaaaaaa("dll2", 65, 35, "Please Press F7 and navigate to the Common Tab Under \'Safety\'  ", 12, "Tahoma", CornflowerBlue);
   aaaaaaaaaaaaa("dll3", 80, 60, "check ONLY  \'Allow DLL Imports\' and Press the OK button.", 12, "Tahoma", CornflowerBlue);
   int Li_12 = 100;
   Li_12 = 50;
   for (int count_16 = 0; count_16 < 50; count_16++) {
      Li_12 += 9;
      aaaaaaaaaaaaa(count_16 + "TopBorder", Li_12, 90, CharToStr(110), 12, "Wingdings", Gray);
   }
   Li_12 = 50;
   for (count_16 = 0; count_16 < 51; count_16++) {
      aaaaaaaaaaaaa(count_16 + "BottonBorder", Li_12, 390, CharToStr(110), 12, "Wingdings", Gray);
      Li_12 += 9;
   }
   for (count_16 = 90; count_16 < 390; count_16 += 9) {
      aaaaaaaaaaaaa(count_16 + "RSide", 50, count_16, CharToStr(110), 12, "Wingdings", Gray);
      aaaaaaaaaaaaa(count_16 + "LeftSide", Li_12, count_16, CharToStr(110), 12, "Wingdings", Gray);
   }
   WindowRedraw();
   aaaaaaaaaaaaa("Common", 70, 105, "Common |________________________________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common0", 150, 103, "  imputs ", 10, "Ariel", Gray);
   aaaaaaaaaaaaa("Common1", 300, 105, "_______________________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common2", 270, 130, "Safety", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common3", 270, 150, CharToStr(111), 15, "Wingdings", White);
   aaaaaaaaaaaaa("Common4", 290, 150, " Allow DLL Imports", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common5", 290, 175, CharToStr(111), 15, "Wingdings", White);
   aaaaaaaaaaaaa("Common6", 310, 175, " Confirm DLL function calls", 11, "Ariel", White);
   aaaaaaaaaaaaa("Buttom1", 290, 350, "___________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom2", 290, 367, "|        OK         |", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom3", 290, 370, "___________", 12, "Ariel", White);
   WindowRedraw();
   for (int count_20 = 0; count_20 < 2; count_20++) {
      WindowRedraw();
      aaaaaaaaaaaaa("Common3b", 274, 152, CharToStr(252), 12, "Wingdings", Red);
      aaaaaaaaaaaaa("Common4", 290, 150, " Allow DLL Imports", 12, "Ariel", CornflowerBlue);
      Sleep(2000);
      WindowRedraw();
      ObjectDelete("Common3b");
      aaaaaaaaaaaaa("Common4", 290, 150, " Allow DLL Imports", 12, "Ariel", White);
      Sleep(2000);
   }
   aaaaaaaaaaaaa("Common3b", 274, 152, CharToStr(252), 12, "Wingdings", Red);
   aaaaaaaaaaaaa("Common4", 290, 150, " Allow DLL Imports", 12, "Ariel", CornflowerBlue);
}

void aaaaaaaaaaaaaaa(string A_name_0, int A_x_8, int A_y_12, string A_text_16, int A_fontsize_24, string A_fontname_28, color A_color_36) {
   ObjectCreate(A_name_0, OBJ_LABEL, 0, 0, 0);
   ObjectSet(A_name_0, OBJPROP_CORNER, 1);
   ObjectSet(A_name_0, OBJPROP_COLOR, A_color_36);
   ObjectSet(A_name_0, OBJPROP_XDISTANCE, A_x_8);
   ObjectSet(A_name_0, OBJPROP_YDISTANCE, A_y_12);
   ObjectSetText(A_name_0, A_text_16, A_fontsize_24, A_fontname_28, A_color_36);
}

string aaaaaaaaaaaaaaaaa(string As_0) {
   int Lia_20[256];
   int Lia_24[1];
   int Li_40;
   string Ls_44;
   if (!IsDllsAllowed()) return ("");
   int Li_8 = InternetAttemptConnect(0);
   if (Li_8 != 0) return ("");
   int Li_12 = InternetOpenA("Microsoft Internet Explorer", 0, "", "", 0);
   if (Li_12 <= 0) return ("");
   int Li_16 = InternetOpenUrlA(Li_12, As_0, "", 0, -2080374528, 0);
   if (Li_16 <= 0) {
      InternetCloseHandle(Li_12);
      return (-1);
   }
   string Ls_ret_28 = "";
   while (!IsStopped()) {
      for (int index_36 = 0; index_36 < 256; index_36++) Lia_20[index_36] = 0;
      Li_40 = InternetReadFile(Li_16, Lia_20, 1024, Lia_24);
      if (Lia_24[0] == FALSE) break;
      Ls_44 = "";
      for (index_36 = 0; index_36 < 256; index_36++) {
         Ls_44 = Ls_44 + CharToStr(Lia_20[index_36] & 255);
         if (StringLen(Ls_44) == Lia_24[0]) break;
         Ls_44 = Ls_44 + CharToStr(Lia_20[index_36] >> 8 & 255);
         if (StringLen(Ls_44) == Lia_24[0]) break;
         Ls_44 = Ls_44 + CharToStr(Lia_20[index_36] >> 16 & 255);
         if (StringLen(Ls_44) == Lia_24[0]) break;
         Ls_44 = Ls_44 + CharToStr(Lia_20[index_36] >> 24 & 255);
      }
      Ls_ret_28 = Ls_ret_28 + Ls_44;
      Sleep(1);
   }
   InternetCloseHandle(Li_12);
   return (Ls_ret_28);
}

void aaaaaaaaaaaaaaaaaa() {
   string Ls_0 = aaaaaaaaaa("\\Pid\\" + Symbol() + WindowExpertName() + "pid.bin");
   if (Ls_0 == "File Not Found !") {
      FileDelete("\\Pid\\" + Symbol() + WindowExpertName() + "pid.bin");
      FileDelete("\\Pid\\" + Symbol() + WindowExpertName() + "id.bin");
   }
}

void aaaaaaaaaaaaaaaaaaa() {
   if (!Gi_268) FileDelete("Pid\\" + Symbol() + WindowExpertName() + "UAC.OFF");
   if (Gi_268) FileDelete("Pid\\" + Symbol() + WindowExpertName() + "UAC.ON");
}

int aaaaaaaaaaaaaaaaaaaa() {
   int Li_12;
   string Ls_0 = TerminalPath() + TerminalName();
   int Li_16 = 0;
   if (IsTesting()) Ls_0 = "_" + Ls_0;
   for (int Li_8 = 0; Li_8 < StringLen(Ls_0); Li_8++) {
      Li_12 = StringGetChar(Ls_0, Li_8);
      Li_16 += Li_12;
      Li_16 = b(Li_16, 5);
   }
   for (Li_8 = 0; Li_8 < StringLen(Ls_0); Li_8++) {
      Li_12 = StringGetChar(Ls_0, Li_8);
      Li_16 += Li_12;
      Li_16 = b(Li_16, Li_12 & 15);
   }
   for (Li_8 = StringLen(Ls_0); Li_8 > 0; Li_8--) {
      Li_12 = StringGetChar(Ls_0, Li_8 - 1);
      Li_16 += Li_12;
      Li_16 = b(Li_16, Li_16 & 15);
   }
   return (Li_16 & EMPTY_VALUE);
}

int b(int Ai_0, int Ai_4) {
   int Li_16 = 1 << Ai_4 - 1;
   int Li_12 = Ai_0 & Li_16;
   Ai_0 >>= Ai_4;
   Ai_0 |= Li_12 << (32 - Ai_4);
   return (Ai_0);
}

int bbbb(string &Asa_0[], bool Ai_4) {
   string name_8;
   int Li_16;
   int Li_ret_20;
   if (Ai_4) name_8 = "symbols.sel";
   else name_8 = "symbols.raw";
   int file_24 = FileOpenHistory(name_8, FILE_BIN|FILE_READ);
   if (file_24 < 0) return (-1);
   if (Ai_4) {
      Li_ret_20 = (FileSize(file_24) - 4) / 128;
      Li_16 = 116;
   } else {
      Li_ret_20 = FileSize(file_24) / 1936;
      Li_16 = 1924;
   }
   ArrayResize(Asa_0, Li_ret_20);
   if (Ai_4) FileSeek(file_24, 4, SEEK_SET);
   for (int index_28 = 0; index_28 < Li_ret_20; index_28++) {
      Asa_0[index_28] = FileReadString(file_24, 12);
      FileSeek(file_24, Li_16, SEEK_CUR);
   }
   FileClose(file_24);
   return (Li_ret_20);
}

string bbbbbbb(string As_0) {
   int Li_24;
   int Li_28;
   int Li_32;
   Comment("GP_R2.1");
   string name_16 = "\\Pid\\" + As_0 + "ID.bin";
   string Ls_8 = bbbbbbbbbb(name_16);
   if (Gi_280) aa("Raw Serial info:\n", Ls_8);
   FileDelete(name_16);
   if (StringFind(Ls_8, "SerialNumber=", 0) > -1) {
      Li_24 = StringFind(Ls_8, "SerialNumber=", 0);
      Li_28 = StringFind(Ls_8, CharToStr(13), Li_24 + 13);
      Li_32 = Li_28 - (Li_24 + 13);
      Gs_180 = StringSubstr(Ls_8, Li_24 + 13, Li_32);
   } else {
      if (StringFind(Ls_8, "SerialNumber", 0) > -1) {
         Li_24 = StringFind(Ls_8, "SerialNumber", 0);
         Li_28 = StringFind(Ls_8, CharToStr(13), Li_24 + 12);
         Li_32 = Li_28 - (Li_24 + 12);
         Gs_180 = StringSubstr(Ls_8, Li_24 + 12, Li_32);
      } else Gs_180 = Ls_8;
   }
   Gs_180 = StringTrimLeft(StringTrimRight(Gs_180));
   string name_36 = "\\Pid\\" + As_0 + "ID1.bin";
   FileDelete(name_36);
   Ls_8 = "";
   name_16 = "Pid\\" + As_0 + "user.bin";
   Ls_8 = bbbbbbbbbb(name_16);
   if (Gi_280) aa("Raw user info:\n", Ls_8);
   FileDelete(name_16);
   Gs_172 = Ls_8;
   Comment("GP_R2.2");
   Ls_8 = "";
   name_16 = "Pid\\" + As_0 + "CName.bin";
   Ls_8 = bbbbbbbbbb(name_16);
   if (Gi_280) aa("Raw CName info:\n", Ls_8);
   FileDelete(name_16);
   G_text_156 = Ls_8;
   Ls_8 = "";
   name_16 = "Pid\\" + As_0 + "mt4ID.bin";
   Ls_8 = bbbbbbbbbb(name_16);
   if (Gi_280) aa("Raw mt4ID info:\n", Ls_8);
   FileDelete(name_16);
   Gs_348 = Ls_8;
   Ls_8 = "";
   name_16 = "Pid\\" + As_0 + "winID.bin";
   Ls_8 = bbbbbbbbbb(name_16);
   if (Gi_280) aa("Raw mt4ID winID:\n", Ls_8);
   FileDelete(name_16);
   Ls_8 = ccccc(Ls_8, 
   "\n", "");
   Ls_8 = ccccc(Ls_8, "\\f", "");
   G_text_164 = Ls_8;
   Ls_8 = "";
   name_16 = "Pid\\" + As_0 + "mt4Em.bin";
   Ls_8 = bbbbbbbbbb(name_16);
   if (Gi_280) aa("Raw mt4Em Uniq:\n", Ls_8);
   FileDelete(name_16);
   Ls_8 = ccccc(Ls_8, 
   "\n", "");
   Ls_8 = ccccc(Ls_8, "\\f", "");
   Gs_364 = Ls_8;
   Ls_8 = "";
   name_16 = "Pid\\" + As_0 + "mt4City.bin";
   Ls_8 = bbbbbbbbbb(name_16);
   if (Gi_280) aa("Raw mt4Em Uniqmt4City:\n", Ls_8);
   FileDelete(name_16);
   Gs_372 = Ls_8;
   Comment("GP_R2.4");
   GlobalVariableDel("QueryRegisty");
   return ("");
}

string bbbbbbbb() {
   string Ls_40;
   string Ls_48;
   string Ls_56;
   if (GlobalVariableCheck("QueryRegisty")) {
      while (GlobalVariableGet("QueryRegisty") + 2.0 > TimeLocal()) {
         Sleep(500);
         Comment("GP_R1.1");
      }
   }
   GlobalVariableSet("QueryRegisty", TimeLocal());
   string Ls_8 = CharToStr(34) + Gs_none_260 + "\\experts\\files\\Pid";
   Comment("GP_R1.2");
   MathSrand(TimeLocal());
   string str_concat_16 = StringConcatenate(MathRand(), Symbol(), WindowExpertName(), "-");
   if (Gi_280) aa("Uniq=", str_concat_16);
   string Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" /v ProductId\') do ECHO %a>" +
      Ls_8 + "\\" + str_concat_16 + "ID.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "\n" 
   + "for /f \"Skip=2 Tokens=3 delims=REG_SZ\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKCU\\Volatile Environment\" /v USERDOMAIN\') do ECHO %a>" + Ls_8 + "\\" +
      str_concat_16 + "CName.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKCU\\Volatile Environment\" /v USERNAME\') do ECHO %a>" + Ls_8 + "\\" + str_concat_16 +
      "user.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=2 delims=REG_SZ\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" /v ProductName\') do ECHO %a>" +
      Ls_8 + "\\" + str_concat_16 + "winID.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" /v CurrentVersion\') do ECHO %a>>" +
      Ls_8 + "\\" + str_concat_16 + "winID.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" /v CurrentBuildNumber\') do ECHO %a>>" +
      Ls_8 + "\\" + str_concat_16 + "winID.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" /v CSDVersion\') do ECHO %a>>" +
      Ls_8 + "\\" + str_concat_16 + "winID.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKCU\\Software\\MetaQuotes Software\\MetaTrader 4\\Settings\" /v Id\') do ECHO %a>" +
      Ls_8 + "\\" + str_concat_16 + "mt4ID.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKCU\\Software\\MetaQuotes Software\\MetaTrader 4\\Settings\" /v Email\') do ECHO %a>" +
      Ls_8 + "\\" + str_concat_16 + "mt4Em.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKCU\\Software\\MetaQuotes Software\\MetaTrader 4\\Settings\" /v City\') do ECHO %a>" +
      Ls_8 + "\\" + str_concat_16 + "mt4City.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKCU\\Software\\MetaQuotes Software\\MetaTrader 4\\Settings\" /v State\') do ECHO %a>>" +
      Ls_8 + "\\" + str_concat_16 + "mt4City.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Ls_0 = "for /f \"Skip=2 Tokens=3\" %a in (\'%SystemRoot%\\System32\\Reg.exe QUERY \"HKCU\\Software\\MetaQuotes Software\\MetaTrader 4\\Settings\" /v Zip\') do ECHO %a>>" +
      Ls_8 + "\\" + str_concat_16 + "mt4City.bin\" ";
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_0, 0, 0);
   Sleep(1000);
   string Ls_24 = "\\Pid\\" + str_concat_16 + "ID.bin";
   string Ls_32 = bbbbbbbbbb(Ls_24);
   if (StringLen(Ls_32) < 4) {
      Ls_40 = Ls_8 + "\\" + str_concat_16 + "ID1.bin" + CharToStr(34);
      Ls_48 = Ls_8 + "\\" + str_concat_16 + "ID.bin" + CharToStr(34);
      Ls_56 = "wmic os get serialnumber > " + Ls_40 + " && TYPE " + Ls_40 + " > " + Ls_48;
      if (Gi_280) aa("Uniq wmic=\n", Ls_56);
      Gi_360 = TRUE;
      ShellExecuteA(0, Gs_144, "CMD.exe", " /c " + Ls_56, 0, 0);
      Comment("GP_R1.3");
      Sleep(1000);
   }
   Comment("GP_R1.4");
   return (str_concat_16);
}

string bbbbbbbbb(int Ai_0, string As_4, string As_12) {
   int Lia_20[1];
   int Lia_36[1];
   int Lia_40[1];
   int Li_32 = RegOpenKeyA(Ai_0, As_4, Lia_20);
   if (Li_32 != 0) return ("");
   string Ls_ret_24 = "                                                                                                                       ";
   Lia_40[0] = StringLen(Ls_ret_24);
   Li_32 = RegQueryValueExA(Lia_20[0], As_12, 0, Lia_36, Ls_ret_24, Lia_40);
   if (Li_32 != 0) return ("");
   if (Lia_36[0] == 1 || Lia_36[0] == 2) return (StringSubstr(Ls_ret_24, 0, Lia_40[0] - 1));
   if (Lia_36[0] == 7) {
      for (int Li_44 = Lia_40[0]; Li_44 > 0; Li_44--)
         if (StringGetChar(Ls_ret_24, Li_44) != 0) break;
      Ls_ret_24 = StringSubstr(Ls_ret_24, 0, Li_44);
      for (Li_44 = StringLen(Ls_ret_24); Li_44 > 0; Li_44--)
         if (StringGetChar(Ls_ret_24, Li_44) == 0) StringSetChar(Ls_ret_24, Li_44, 10);
      return (Ls_ret_24);
   }
   return ("");
}

string bbbbbbbbbb(string A_name_0) {
   string Ls_8;
   string str_concat_16;
   int file_24 = FileOpen(A_name_0, FILE_CSV|FILE_READ);
   if (file_24 < 1) return ("");
   while (!FileIsEnding(file_24)) {
      Ls_8 = FileReadString(file_24);
      Ls_8 = StringTrimLeft(StringTrimRight(Ls_8));
      Ls_8 = ccccc(Ls_8, 
      "\n", "");
      Ls_8 = ccccc(Ls_8, "\\f", "");
      str_concat_16 = StringConcatenate(str_concat_16, Ls_8, " ");
   }
   FileClose(file_24);
   return (str_concat_16);
}

string bbbbbbbbbbb(string As_0) {
   As_0 = ccccc(As_0, "&", "%26");
   As_0 = ccccc(As_0, "#", "%23");
   As_0 = ccccc(As_0, "ñ", "%F1");
   As_0 = ccccc(As_0, "Ñ", "%D1");
   As_0 = ccccc(As_0, "ª", "%AA");
   As_0 = ccccc(As_0, "Ç", "%C7");
   As_0 = ccccc(As_0, "?", "%3F");
   As_0 = ccccc(As_0, "@", "%40");
   As_0 = ccccc(As_0, ":", "%3A");
   As_0 = ccccc(As_0, "+", "%2B");
   As_0 = ccccc(As_0, "ç", "%E7");
   As_0 = ccccc(As_0, "ö", "%F6");
   As_0 = ccccc(As_0, "Ö", "%D6");
   As_0 = ccccc(As_0, "$", "%24");
   As_0 = ccccc(As_0, "£", "%A3");
   As_0 = ccccc(As_0, "¥", "%A5");
   As_0 = ccccc(As_0, 
   "\n", "");
   return (ccccc(As_0, " ", "%20"));
}

string bbbbbbbbbbbb(string As_0, string As_8) {
   string Ls_16 = "<" + As_0 + ">";
   string Ls_24 = "</" + As_0 + ">";
   string Ls_ret_32 = "";
   int Li_40 = StringFind(As_8, Ls_16, 0);
   Li_40 += StringLen(Ls_16);
   int Li_44 = StringFind(As_8, Ls_24, 0);
   int Li_48 = Li_44 - Li_40;
   Ls_ret_32 = StringSubstr(As_8, Li_40, Li_48);
   if (Li_44 == -1) return ("None");
   return (Ls_ret_32);
}

void bbbbbbbbbbbbb() {
   aaaaaaaaaaaaaaa("Version", 4, 14, "Build: " + DoubleToStr(Gd_76, 5), 8, "Tahoma", CornflowerBlue);
   int Li_0 = 15570276;
   int Li_4 = 100;
   for (int count_8 = 0; count_8 < 12; count_8++) {
      Li_4 += 20;
      aaaa(count_8 + "Bar", Li_4, 72, CharToStr(158), 12, "Wingdings", Gray);
   }
   Li_4 = 50;
   for (count_8 = 0; count_8 < 40; count_8++) {
      Li_4 += 9;
      aaaa(count_8 + "TopBorder", Li_4, 20, CharToStr(110), 12, "Wingdings", Li_0);
   }
   Li_4 = 50;
   for (count_8 = 0; count_8 < 41; count_8++) {
      aaaa(count_8 + "BottonBorder", Li_4, 100, CharToStr(110), 12, "Wingdings", Li_0);
      Li_4 += 9;
   }
   WindowRedraw();
   for (count_8 = 20; count_8 < 100; count_8 += 9) {
      aaaa(count_8 + "RSide", 50, count_8, CharToStr(110), 12, "Wingdings", Li_0);
      aaaa(count_8 + "LeftSide", 410, count_8, CharToStr(110), 12, "Wingdings", Li_0);
   }
   aaaa("BoxLabelT", 120, 44, "Collecting Computer Information ", 12, "Tahoma", White);
   Gi_500 = 120;
   aaaa("Machine", Gi_504, Gi_500, "Computer Info: ", 12, "Tahoma", G_color_492);
   aaaa("Machine_0", Gi_508, Gi_500, "", 12, "Tahoma", G_color_496);
   Gi_500 += 20;
   aaaa("Machine_1", Gi_508, Gi_500, "", 12, "Tahoma", G_color_496);
   Gi_500 += 30;
   aaaa("TransID", Gi_504, Gi_500, "", 12, "Tahoma", G_color_492);
   aaaa("TransID_", Gi_508, Gi_500, "", 12, "Tahoma", G_color_496);
   Gi_500 += 20;
   aaaa("Install", Gi_504, Gi_500, "", 12, "Tahoma", G_color_492);
   aaaa("Install_", Gi_508, Gi_500, "", 12, "Tahoma", G_color_496);
   Gi_500 += 20;
   aaaa("Paypal", Gi_504, Gi_500, "", 12, "Tahoma", G_color_492);
   aaaa("Paypal_", Gi_508, Gi_500, "", 12, "Tahoma", G_color_496);
   Gi_500 += 30;
   aaaa("Done", Gi_504, Gi_500, " ", 12, "Tahoma", G_color_492);
   aaaa("Done_", Gi_508, Gi_500, " ", 12, "Tahoma", G_color_496);
   Gi_500 += 30;
   aaaa("Log", Gi_504, Gi_500, " ", 12, "Tahoma", G_color_492);
   Gi_500 += 10;
}

void bbbbbbbbbbbbbb(color A_color_0) {
   if (Gi_512 > 1) ObjectSetText((Gi_512 - 2) + "Bar", CharToStr(158), 12, "Wingdings", Lime);
   ObjectSetText((Gi_512 - 1) + "Bar", CharToStr(159), 12, "Wingdings", Lime);
   ObjectSetText(Gi_512 + "Bar", CharToStr(108), 13, "Wingdings", A_color_0);
   Gi_512++;
   WindowRedraw();
   Sleep(1000);
   if (Gi_512 > 11) Gi_512 = 11;
}

void bbbbbbbbbbbbbbb(color A_color_0) {
   while (Gi_512 < 12) {
      if (Gi_512 > 1) ObjectSetText((Gi_512 - 2) + "Bar", CharToStr(158), 12, "Wingdings", Lime);
      ObjectSetText((Gi_512 - 1) + "Bar", CharToStr(159), 12, "Wingdings", Lime);
      ObjectSetText(Gi_512 + "Bar", CharToStr(108), 13, "Wingdings", A_color_0);
      Gi_512++;
      Sleep(100);
   }
}

void bbbbbbbbbbbbbbbb() {
   string Ls_12;
   string name_48;
   string Ls_56;
   string Ls_64;
   string Ls_unused_72;
   string Ls_80;
   string Ls_unused_88;
   string Ls_100;
   string Ls_108;
   int mb_code_116;
   string Ls_120;
   string Ls_128;
   string Ls_136;
   ObjectsDeleteAll();
   int Li_0 = 925;
   for (int Li_4 = 0; Li_4 < Li_0; Li_4 += 8) for (int Li_8 = 0; Li_8 < 800; Li_8 += 8) aaaa(". box" + Li_4 + "-" + Li_8, Li_8, Li_4, CharToStr(110), 11, "Wingdings", Black);
   Comment("");
   bbbbbbbbbbbbb();
   bbbbbbbbbbbbbb(Lime);
   Comment("");
   ObjectSetText("BoxLabelT", " Checking purchase with Server", 12, "Tahoma", G_color_496);
   ObjectSetText("Machine_0", G_text_164, 12, "Tahoma", G_color_496);
   ObjectSetText("Machine_1", G_text_156, 12, "Tahoma", G_color_496);
   ObjectSetText("TransID", "Transaction ID: ", 12, "Tahoma", G_color_492);
   ObjectSetText("TransID_", G_text_516, 12, "Tahoma", G_color_496);
   bbbbbbbbbbbbbb(Lime);
   Sleep(2500);
   string Ls_20 = aaaaaaaaaaaaaaaaaaaa();
   if (AccountNumber() == 0) Sleep(1000);
   if (Gi_116) Ls_12 = Gsa_392[0] + "_installerV2.py?Id=" + G_text_516 + "&IsSA=" + Gi_116 + " &AccType=" + IsDemo() + "&Acc=" + AccountNumber() + "&MachineID=" + Gs_180 + "&hash=" + Ls_20 + "&User=" + bbbbbbbbbbb(Gs_172) + "&OSVersion=" + bbbbbbbbbbb(G_text_164) + "&Expert=" + G_text_84 + "&Path=" + bbbbbbbbbbb(TerminalPath()) + "&Name=" + bbbbbbbbbbb(Gs_100) + "&Email=" + bbbbbbbbbbb(Gs_108) + "&ComputerName=" + bbbbbbbbbbb(G_text_156) + "&MT4Name=" + bbbbbbbbbbb(AccountName()) + "&MachineUserName=" + bbbbbbbbbbb(Gs_172) + "&MT4ID=" + Gs_348 + "&MT4Email=" + bbbbbbbbbbb(Gs_364) + "&MT4City=" + bbbbbbbbbbb(Gs_372) + "&InstVer=" + Gd_76 + "&OS64=" + Gi_360 + "&UAC=" + Gi_268;
   else Ls_12 = Gsa_392[0] + "_installerV2.py?Id=" + G_text_516 + "&MachineID=" + Gs_180 + "&hash=" + Ls_20 + "&User=" + bbbbbbbbbbb(Gs_172) + "&OSVersion=" + bbbbbbbbbbb(G_text_164) + "&Expert=" + G_text_84 + "&Path=" + bbbbbbbbbbb(TerminalPath()) + "&Name=" + bbbbbbbbbbb(Gs_100) + "&Email=" + bbbbbbbbbbb(Gs_108) + "&ComputerName=" + bbbbbbbbbbb(G_text_156) + "&MT4Name=" + bbbbbbbbbbb(AccountName()) + "&MachineUserName=" + bbbbbbbbbbb(Gs_172) + "&MT4ID=" + Gs_348 + "&MT4Email=" + bbbbbbbbbbb(Gs_364) + "&MT4City=" + bbbbbbbbbbb(Gs_372) + "&InstVer=" + Gd_76 + "&OS64=" + Gi_360 + "&UAC=" + Gi_268 + " &AccType=" + IsDemo() + "&Acc=" + AccountNumber();
   if (Gi_280) aa("Query  :", Ls_12);
   string Ls_28 = "";
   string Ls_36 = aaaaaaaaaaaaaaaaa("http://www.google.com");
   Ls_28 = aaaaaaaaaaaaaaaaa(Ls_12);
   if (Gi_280) aa("Response :", Ls_28);
   if (StringFind(Ls_28, "</Installer>", 0) == -1) {
      Gi_280 = TRUE;
      for (int Li_44 = 1; Li_44 < ArraySize(Gsa_392); Li_44++) {
         Sleep(500);
         if (Gi_280) aa(Li_44, " Changing from server  ", (Gsa_392[Li_44 - 1]) + " to " + Gsa_392[Li_44]);
         aa("Main Server Down, changing to ", Li_44);
         Ls_12 = ccccc(Ls_12, Gsa_392[Li_44 - 1], Gsa_392[Li_44]);
         Ls_28 = aaaaaaaaaaaaaaaaa(Ls_12);
         if (StringFind(Ls_28, "</Installer>", 0) > -1) break;
      }
   }
   if (Gi_280) aa("--------------------------------------------------------------------------------------------------");
   if (Transaction_ID == "Test") Print(Ls_28);
   G_text_460 = bbbbbbbbbbbb("STATUS", Ls_28);
   if (StringFind(Ls_28, "Invalid Transaction ID, try again.", 0) > -1) G_text_460 = "Wrong ID";
   Gs_452 = bbbbbbbbbbbb("MESSAGE", Ls_28);
   Gs_468 = bbbbbbbbbbbb("ORDERTIME", Ls_28);
   Gs_476 = bbbbbbbbbbbb("NAME", Ls_28);
   ObjectSetText("Install", "Install Software: ", 12, "Tahoma", G_color_492);
   ObjectSetText("Install_", G_text_84, 12, "Tahoma", G_color_496);
   ObjectSetText("Paypal", "Payment Status: ", 12, "Tahoma", G_color_492);
   ObjectSetText("Paypal_", G_text_460, 12, "Tahoma", G_color_496);
   if (G_text_460 == "Completed") {
      if (G_text_84 == "4xGuardian") {
         name_48 = "\\4xGuardian\\data\\MQL.txt";
         FileDelete(name_48);
      }
      ObjectSetText("BoxLabelT", " Sending/Reading Data from Server ", 12, "Tahoma", White);
      if (Gi_268) {
         Ls_56 = CharToStr(34) + Gs_none_260 + "\\experts" + CharToStr(34);
         Sleep(1000);
         if (Gi_280) aa("Creat Directory:", Gs_none_260);
         if (Transaction_ID != "Test") ShellExecuteA(0, Gs_144, "CMD.exe", " /c MD " + Ls_56, 0, 0);
         if (Transaction_ID != "Test") Ls_56 = CharToStr(34) + Gs_none_260 + "\\experts\\libraries";
         Sleep(1000);
         if (Transaction_ID != "Test") ShellExecuteA(0, Gs_144, "CMD.exe", " /c MD " + Ls_56, 0, 0);
         if (Transaction_ID != "Test") Ls_56 = CharToStr(34) + Gs_none_260 + "\\templates";
         Sleep(1000);
         if (Transaction_ID != "Test") ShellExecuteA(0, Gs_144, "CMD.exe", " /c MD " + Ls_56, 0, 0);
         if (Transaction_ID != "Test") Ls_56 = CharToStr(34) + Gs_none_260 + "\\experts\\indicators";
         Sleep(1000);
         if (Transaction_ID != "Test") ShellExecuteA(0, Gs_144, "CMD.exe", " /c MD " + Ls_56, 0, 0);
      }
      bbbbbbbbbbbbbb(Lime);
      Sleep(2500);
      GlobalVariableDel(WindowExpertName() + "4xInstaller" + Gs_436);
      ObjectSetText("Log", "    -  -  -  -     Activity Log     -  -  -  - ", 12, "Tahoma", Gray);
      ObjectSetText("BoxLabelT", " Compiling Custom Software on Server ", 12, "Tahoma", White);
      bbbbbbbbbbbbbb(Lime);
      Gi_500 += 20;
      for (int index_96 = 0; index_96 < 100; index_96++) {
         Ls_80 = "PRODUCTFOLDER" + index_96;
         Ls_64 = "PRODUCTLINK" + index_96;
         Ls_100 = bbbbbbbbbbbb(Ls_64, Ls_28);
         Ls_108 = bbbbbbbbbbbb(Ls_80, Ls_28);
         if (Ls_100 != "None") {
            if (Gi_280) aa("Link :", Ls_100);
            if (Gi_280) aa("Link :", Ls_108);
            ObjectSetText("BoxLabelT", "Downloading file " + ((index_96 + 1)) + " from Server ", 12, "Tahoma", White);
            aaaa("Instaling" + index_96, Gi_504, Gi_500, "Downloading:", 11, "Tahoma", CornflowerBlue);
            aaaa("Instaling_" + index_96, Gi_508, Gi_500, Ls_108, 11, "Tahoma", G_color_496);
            Gs_484 = Gs_484 + Ls_108 
            + "\n";
            Gsa_444[index_96] = Ls_100;
            Gsa_448[index_96] = Ls_108;
            bbbbbbbbbbbbbbbbbbb(Ls_100, Ls_108, index_96);
            ObjectSetText("BoxLabelT", "Installing file on " + StringSubstr(Ls_108, 0, 33), 10, "Tahoma", White);
            aaaa("Instaling" + index_96, Gi_504, Gi_500, "Installing:", 11, "Tahoma", Lime);
            bbbbbbbbbbbbbb(Lime);
            aaaa("Instaling" + index_96, Gi_504, Gi_500, "Done:", 11, "Tahoma", Gray);
            bbbbbbbbbbbbbbbbbbbb(Ls_100, Ls_108, index_96);
            Gi_500 += 20;
         }
      }
      ObjectSetText("BoxLabelT", "Installation completed successfully", 12, "Tahoma", Lime);
      Gi_500 += 20;
      ObjectSetText("Done", "Process:", 12, "Tahoma", CornflowerBlue);
      ObjectSetText("Done_", Gs_452, 12, "Tahoma", Lime);
      bbbbbbbbbbbbbbb(Lime);
      Sleep(1000);
      PlaySound("news.wav");
      GlobalVariableSet(WindowExpertName() + "4xInstaller" + Gs_436, TimeLocal());
      mb_code_116 = MessageBox(" Installation/Update completed. \n Please close this chart and restart your MT4 ", "WARNING !", 0);
      Gi_500 += 20;
      aaaa("Done1", Gi_504, Gi_500, "Installation/Update Completed", 11, "Tahoma", CornflowerBlue);
      Gi_500 += 20;
      aaaa("Done1", Gi_504, Gi_500, "WARNING: Please close this chart and restart your MT4.", 14, "Tahoma", Yellow);
      return;
   }
   if (G_text_460 == "Wrong ID" && StringFind(Transaction_ID, "-", 0) == -1) {
      Gi_532++;
      Gi_280 = TRUE;
      if (Gi_532 == 1) {
         aa("Wrong ID 1 StatusFail STATUS: ", G_text_460);
         aaaaaaaa();
         bbbbbbbbbbbbbbbb();
         aaa();
      }
      ObjectSetText("BoxLabelT", "          Transaction ID Fail", 12, "Tahoma", Red);
      Gi_500 += 20;
      Ls_120 = StringSubstr(Gs_452, 0, 58);
      Ls_128 = StringSubstr(Gs_452, 58, 0);
      aaaa("Memo1", Gi_504, Gi_500, Ls_120, 12, "Tahoma", Red);
      Gi_500 += 20;
      aaaa("Memo2", Gi_504, Gi_500, Ls_128, 12, "Tahoma", Red);
      bbbbbbbbbbbbbb(Red);
      PlaySound("timeout.wav");
      Sleep(10000);
      bbbbbbbbbbbbbbbbb();
      return;
   }
   if (G_text_460 == "Wrong ID" && StringFind(Transaction_ID, "-", 0) > -1) {
      ObjectSetText("BoxLabelT", "          Transaction ID Fail", 12, "Tahoma", Red);
      Gi_500 += 20;
      Ls_120 = "   PayPal did not generate a proper Transaction ID ";
      Ls_128 = "   please contact us at www.4xtrader.net/support/ ";
      Ls_136 = "   so we can provide a proper ID.";
      aaaa("Memo1", Gi_504, Gi_500 - 50, Ls_120, 12, "Tahoma", Red);
      Gi_500 += 20;
      aaaa("Memo2", Gi_504, Gi_500 - 50, Ls_128, 12, "Tahoma", Red);
      Gi_500 += 20;
      aaaa("Memo3", Gi_504, Gi_500 - 50, Ls_136, 12, "Tahoma", Red);
      bbbbbbbbbbbbbb(Red);
      PlaySound("timeout.wav");
      Sleep(10000);
      Sleep(10000);
      Sleep(10000);
      return;
   }
   if (G_text_460 == "Communication Failed") {
      Gi_532++;
      Gi_280 = TRUE;
      if (Gi_532 == 1) {
         aa(" STATUS: ", G_text_460);
         aaaaaaaa();
         bbbbbbbbbbbbbbbb();
         aaa();
      }
      ObjectSetText("BoxLabelT", " Communication with Server fail", 12, "Tahoma", Red);
      Gi_500 += 20;
      Ls_120 = "    Try again later, if the error persist ";
      Ls_128 = "   please contact us at www.4xtrader.net/support/";
      aaaa("Memo1", Gi_504, Gi_500, Ls_120, 12, "Tahoma", Red);
      Gi_500 += 20;
      aaaa("Memo2", Gi_504, Gi_500, Ls_128, 12, "Tahoma", Red);
      bbbbbbbbbbbbbb(Red);
      PlaySound("timeout.wav");
      return;
   }
   if (G_text_460 == "This ID is for another tool") {
      ObjectSetText("BoxLabelT", "This ID is for another tool. ", 12, "Tahoma", Red);
      Gi_500 += 20;
      Ls_120 = "Try again later with the correct installer. If you can find the";
      Ls_128 = "correct isntaller, please contact us at 4xtrader.net/support/";
      aaaa("Memo1", Gi_504, Gi_500, Ls_120, 12, "Tahoma", Red);
      Gi_500 += 20;
      aaaa("Memo2", Gi_504, Gi_500, Ls_128, 12, "Tahoma", Red);
      bbbbbbbbbbbbbb(Red);
      PlaySound("timeout.wav");
      return;
   }
   Gi_532++;
   Gi_280 = TRUE;
   if (Gi_532 == 1) {
      aa(" STATUS: ", "Communication with our Server Fail");
      aaaaaaaa();
      bbbbbbbbbbbbbbbb();
      aaa();
   }
   ObjectSetText("BoxLabelT", "Communication with our Server Fail", 12, "Tahoma", Red);
   Gi_500 += 20;
   Ls_120 = "Try again later, if the error persists ";
   Ls_128 = "please contact us at www.4xtrader.net/support/";
   aaaa("Memo1", Gi_504, Gi_500, Ls_120, 12, "Tahoma", Red);
   Gi_500 += 20;
   aaaa("Memo2", Gi_504, Gi_500, Ls_128, 12, "Tahoma", Red);
   bbbbbbbbbbbbbb(Red);
   PlaySound("timeout.wav");
}

void bbbbbbbbbbbbbbbbb() {
   Comment("Please Wait...  ");
   ObjectsDeleteAll();
   int Li_0 = 525;
   for (int Li_4 = 0; Li_4 < Li_0; Li_4 += 8) for (int Li_8 = 0; Li_8 < 699; Li_8 += 8) aaaa(". box" + Li_4 + "-" + Li_8, Li_8, Li_4, CharToStr(110), 11, "Wingdings", Black);
   Comment(" ");
   string Ls_12 = StringSubstr(Gs_452, 0, 58);
   string Ls_20 = StringSubstr(Gs_452, 58, 0);
   if (Ls_12 == "") Ls_12 = "No Server Transaction ID Value found";
   aaaaaaaaaaaaa("dll1", 130, 10, Ls_12, 13, "Tahoma", Red);
   aaaaaaaaaaaaa("dll2", 70, 40, "Press F7 and navigate to the Inputs Tab Under \'PayPal Value\'  ", 12, "Tahoma", CornflowerBlue);
   aaaaaaaaaaaaa("dll3", 78, 65, "enter your Transaction ID and Press the OK button.  ", 12, "Tahoma", CornflowerBlue);
   int Li_28 = 100;
   Li_28 = 50;
   for (int count_32 = 0; count_32 < 50; count_32++) {
      Li_28 += 9;
      aaaaaaaaaaaaa(count_32 + "TopBorder", Li_28, 90, CharToStr(110), 12, "Wingdings", Gray);
   }
   Li_28 = 50;
   for (count_32 = 0; count_32 < 51; count_32++) {
      aaaaaaaaaaaaa(count_32 + "BottonBorder", Li_28, 390, CharToStr(110), 12, "Wingdings", Gray);
      Li_28 += 9;
   }
   for (count_32 = 90; count_32 < 390; count_32 += 9) {
      aaaaaaaaaaaaa(count_32 + "RSide", 50, count_32, CharToStr(110), 12, "Wingdings", Gray);
      aaaaaaaaaaaaa(count_32 + "LeftSide", Li_28, count_32, CharToStr(110), 12, "Wingdings", Gray);
   }
   aaaaaaaaaaaaa("Common", 70, 105, "______| Imputs |________________________________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common0", 70, 103, "Common ", 10, "Ariel", Gray);
   aaaaaaaaaaaaa("Common1", 300, 105, "_______________________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common2", 70, 130, "Variable", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common3", 270, 130, "Value", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common4", 70, 155, "Transaction ID", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common4a", 70, 175, "Name ", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common4b", 70, 195, "Email", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common6", 270, 155, "X", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom1", 290, 350, "___________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom2", 290, 367, "|        OK         |", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom3", 290, 370, "___________", 12, "Ariel", White);
   string Ls_36 = "X";
   WindowRedraw();
   for (int count_44 = 0; count_44 < 15; count_44++) {
      Ls_36 = Ls_36 + "X";
      aaaaaaaaaaaaa("Common6", 270, 155, Ls_36, 11, "Ariel", CornflowerBlue);
      Sleep(100);
      aaaaaaaaaaaaa("Common6", 270, 155, Ls_36, 11, "Ariel", White);
      WindowRedraw();
      Sleep(100);
      WindowRedraw();
   }
   aaaaaaaaaaaaa("Common6", 270, 155, Ls_36, 11, "Ariel", CornflowerBlue);
}

void bbbbbbbbbbbbbbbbbb() {
   Comment("");
   ObjectsDeleteAll();
   int Li_0 = 525;
   for (int Li_4 = 0; Li_4 < Li_0; Li_4 += 8) for (int Li_8 = 0; Li_8 < 699; Li_8 += 8) aaaa(". box" + Li_4 + "-" + Li_8, Li_8, Li_4, CharToStr(110), 11, "Wingdings", Black);
   aaaaaaaaaaaaa("dll2", 70, 40, "Installation completed on " + TimeToStr(GlobalVariableGet(WindowExpertName() + "4xInstaller" + Gs_436), TIME_DATE), 14, "Tahoma", CornflowerBlue);
   aaaaaaaaaaaaa("dll3", 110, 65, "Please close this chart  ", 14, "Tahoma", Red);
   WindowRedraw();
}

void bbbbbbbbbbbbbbbbbbb(string As_0, string As_8, int Ai_16) {
   string Ls_unused_24;
   int Lia_32[256];
   int Lia_36[1];
   int file_44;
   int count_48;
   int Li_52;
   if (Gi_280) aa(Ai_16 + " Goint to get ..." + As_0);
   int Li_20 = InternetOpenA("Microsoft Internet Explorer", 0, "", "", 0);
   if (Li_20 <= 0) {
      Print("Opening Internet FAILED...");
      return;
   }
   int Li_40 = InternetOpenUrlA(Li_20, As_0, "", 0, -2147483648, 0);
   if (Li_40 > 0) {
      file_44 = FileOpen("TEMP" + Ai_16, FILE_BIN|FILE_WRITE);
      if (file_44 >= 0) {
         while (true) {
            if (!InternetReadFile(Li_40, Lia_32, ArraySize(Lia_32) * 4, Lia_36)) {
               Print("InternetReadFile Error!");
               break;
            }
            if (Lia_36[0] == 0) break;
            count_48 = 0;
            if (count_48 >= Lia_36[0]) continue;
            while (true) {
               Li_52 = (Lia_32[count_48 / 4]) >> (count_48 & 3 * 8) & 255;
               FileWriteInteger(file_44, Li_52, CHAR_VALUE);
               count_48++;
               if (count_48 < Lia_36[0]) continue;
               break;
            }
         }
         FileClose(file_44);
      } else Print("Error opening file ", As_8);
      InternetCloseHandle(Li_40);
   }
   InternetCloseHandle(Li_20);
   Sleep(1000);
   string Ls_56 = CharToStr(34) + TerminalPath() + "\\experts\\files\\" + "TEMP" + Ai_16 + CharToStr(34);
   string Ls_64 = CharToStr(34) + TerminalPath() + "\\" + As_8 + CharToStr(34);
   Sleep(2000);
}

void bbbbbbbbbbbbbbbbbbbb(string As_unused_0, string As_8, int Ai_16) {
   string Ls_20 = CharToStr(34) + Gs_none_260 + "\\experts\\files\\" + "TEMP" + Ai_16 + CharToStr(34);
   string Ls_28 = CharToStr(34) + Gs_none_260 + As_8 + CharToStr(34);
   if (Gi_280) aa(" Going to Move file " + Ai_16);
   if (Gi_280) aa(" Going to Move from " + Ls_20);
   if (Gi_280) aa(" Going to Move to " + Ls_28);
   ShellExecuteA(0, Gs_144, "CMD.exe", " /c MOVE " + Ls_20 + " " + Ls_28, 0, 0);
   Sleep(2000);
}

void c() {
   Comment("Please Wait...  ");
   ObjectsDeleteAll();
   int Li_0 = 525;
   for (int Li_4 = 0; Li_4 < Li_0; Li_4 += 8) for (int Li_8 = 0; Li_8 < 699; Li_8 += 8) aaaa(". box" + Li_4 + "-" + Li_8, Li_8, Li_4, CharToStr(110), 11, "Wingdings", Black);
   Comment(" ");
   string Ls_12 = StringSubstr(Gs_452, 0, 58);
   string Ls_20 = StringSubstr(Gs_452, 58, 0);
   if (Ls_12 == "") Ls_12 = "No NAME value found ";
   aaaaaaaaaaaaa("dll1", 130, 10, Ls_12, 13, "Tahoma", Red);
   aaaaaaaaaaaaa("dll2", 70, 40, "Press F7 and navigate to the Inputs Tab Under \'Name\'  ", 12, "Tahoma", CornflowerBlue);
   aaaaaaaaaaaaa("dll3", 78, 65, "enter your Name and Press the OK button.  ", 12, "Tahoma", CornflowerBlue);
   int Li_28 = 100;
   Li_28 = 50;
   for (int count_32 = 0; count_32 < 50; count_32++) {
      Li_28 += 9;
      aaaaaaaaaaaaa(count_32 + "TopBorder", Li_28, 90, CharToStr(110), 12, "Wingdings", Gray);
   }
   Li_28 = 50;
   for (count_32 = 0; count_32 < 51; count_32++) {
      aaaaaaaaaaaaa(count_32 + "BottonBorder", Li_28, 390, CharToStr(110), 12, "Wingdings", Gray);
      Li_28 += 9;
   }
   for (count_32 = 90; count_32 < 390; count_32 += 9) {
      aaaaaaaaaaaaa(count_32 + "RSide", 50, count_32, CharToStr(110), 12, "Wingdings", Gray);
      aaaaaaaaaaaaa(count_32 + "LeftSide", Li_28, count_32, CharToStr(110), 12, "Wingdings", Gray);
   }
   aaaaaaaaaaaaa("Common", 70, 105, "______| Imputs |________________________________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common0", 70, 103, "Common ", 10, "Ariel", Gray);
   aaaaaaaaaaaaa("Common1", 300, 105, "_______________________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common2", 70, 130, "Variable", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common3", 270, 130, "Value", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common4", 70, 155, "Transaction ID", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common4a", 70, 175, "Name ", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common6", 270, 155, "X", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom1", 290, 350, "___________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom2", 290, 367, "|        OK         |", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom3", 290, 370, "___________", 12, "Ariel", White);
   string Ls_36 = "X";
   WindowRedraw();
   for (int count_44 = 0; count_44 < 15; count_44++) {
      Ls_36 = Ls_36 + "X";
      aaaaaaaaaaaaa("Common6", 270, 175, Ls_36, 11, "Ariel", CornflowerBlue);
      Sleep(100);
      aaaaaaaaaaaaa("Common6", 270, 175, Ls_36, 11, "Ariel", White);
      WindowRedraw();
      Sleep(100);
      WindowRedraw();
   }
   aaaaaaaaaaaaa("Common6", 270, 175, Ls_36, 11, "Ariel", CornflowerBlue);
}

void cc() {
   Comment("Please Wait...  ");
   ObjectsDeleteAll();
   int Li_0 = 525;
   for (int Li_4 = 0; Li_4 < Li_0; Li_4 += 8) for (int Li_8 = 0; Li_8 < 699; Li_8 += 8) aaaa(". box" + Li_4 + "-" + Li_8, Li_8, Li_4, CharToStr(110), 11, "Wingdings", Black);
   Comment(" ");
   string Ls_12 = StringSubstr(Gs_452, 0, 58);
   string Ls_20 = StringSubstr(Gs_452, 58, 0);
   if (Ls_12 == "") Ls_12 = "No valid EMAIL address  value found ";
   aaaaaaaaaaaaa("dll1", 130, 10, Ls_12, 13, "Tahoma", Red);
   aaaaaaaaaaaaa("dll2", 70, 40, "Press F7 and navigate to the Inputs Tab Under \'Email\'  ", 12, "Tahoma", CornflowerBlue);
   aaaaaaaaaaaaa("dll3", 78, 65, "enter your Email address and Press the OK button.  ", 12, "Tahoma", CornflowerBlue);
   int Li_28 = 100;
   Li_28 = 50;
   for (int count_32 = 0; count_32 < 50; count_32++) {
      Li_28 += 9;
      aaaaaaaaaaaaa(count_32 + "TopBorder", Li_28, 90, CharToStr(110), 12, "Wingdings", Gray);
   }
   Li_28 = 50;
   for (count_32 = 0; count_32 < 51; count_32++) {
      aaaaaaaaaaaaa(count_32 + "BottonBorder", Li_28, 390, CharToStr(110), 12, "Wingdings", Gray);
      Li_28 += 9;
   }
   for (count_32 = 90; count_32 < 390; count_32 += 9) {
      aaaaaaaaaaaaa(count_32 + "RSide", 50, count_32, CharToStr(110), 12, "Wingdings", Gray);
      aaaaaaaaaaaaa(count_32 + "LeftSide", Li_28, count_32, CharToStr(110), 12, "Wingdings", Gray);
   }
   aaaaaaaaaaaaa("Common", 70, 105, "______| Imputs |________________________________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common0", 70, 103, "Common ", 10, "Ariel", Gray);
   aaaaaaaaaaaaa("Common1", 300, 105, "_______________________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common2", 70, 130, "Variable", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common3", 270, 130, "Value", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common4", 70, 155, "Transaction ID", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common4a", 70, 175, "Name ", 12, "Ariel", Gray);
   aaaaaaaaaaaaa("Common4b", 70, 195, "Email", 12, "Ariel", White);
   aaaaaaaaaaaaa("Common6", 270, 155, "X", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom1", 290, 350, "___________", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom2", 290, 367, "|        OK         |", 12, "Ariel", White);
   aaaaaaaaaaaaa("Buttom3", 290, 370, "___________", 12, "Ariel", White);
   string Ls_36 = "X";
   WindowRedraw();
   for (int count_44 = 0; count_44 < 15; count_44++) {
      Ls_36 = Ls_36 + "X";
      aaaaaaaaaaaaa("Common6", 270, 195, Ls_36, 11, "Ariel", CornflowerBlue);
      Sleep(100);
      aaaaaaaaaaaaa("Common6", 270, 195, Ls_36, 11, "Ariel", White);
      WindowRedraw();
      Sleep(100);
      WindowRedraw();
   }
   aaaaaaaaaaaaa("Common6", 270, 195, Ls_36, 11, "Ariel", CornflowerBlue);
}

string ccccc(string As_0, string As_8, string As_16 = "") {
   string Ls_24;
   string Ls_32;
   int Li_40 = 0;
   int str_len_44 = StringLen(As_16);
   int str_len_48 = StringLen(As_8);
   while (Li_40 > -1) {
      Li_40 = StringFind(As_0, As_8, Li_40);
      if (Li_40 > -1) {
         if (Li_40 > 0) Ls_24 = StringSubstr(As_0, 0, Li_40);
         else Ls_24 = "";
         Ls_32 = StringSubstr(As_0, Li_40 + str_len_48);
         As_0 = Ls_24 + As_16 + Ls_32;
         Li_40 += str_len_44;
      }
   }
   return (As_0);
}
