Advertisement
nanpuhaha

Untitled

Jan 25th, 2019
711
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void __cdecl -[StartupViewController viewDidLoad](StartupViewController *self, SEL a2)
  2. {
  3.   StartupViewController *v2; // x19
  4.   void *v3; // x0
  5.   void *v4; // x0
  6.   float v5; // s0
  7.   void *v6; // x0
  8.   void *v7; // x21
  9.   void *v8; // x0
  10.   void *v9; // x0
  11.   double v10; // d0
  12.   void *v11; // x0
  13.   void *v12; // x0
  14.   void *v13; // x0
  15.   void *v14; // x0
  16.   void *v15; // x0
  17.   void *v16; // x0
  18.   void *v17; // x0
  19.   void *v18; // x0
  20.   void *v19; // x0
  21.   void *v20; // x0
  22.   OHttpClient *v21; // x20
  23.   void *v22; // x0
  24.   void *v23; // x19
  25.   void *v24; // x0
  26.   double v25; // d2
  27.   void *v26; // x19
  28.   void *v27; // x19
  29.   void *v28; // x0
  30.   double v29; // d2
  31.   void *v30; // x0
  32.   void *v31; // x0
  33.   void *v32; // x0
  34.   void *v33; // x0
  35.   void *v34; // x0
  36.   void *v35; // x0
  37.   StartupViewController *v36; // [xsp+10h] [xbp-60h]
  38.   __objc2_class *v37; // [xsp+18h] [xbp-58h]
  39.  
  40.   v2 = self;
  41.   v36 = self;
  42.   v37 = &OBJC_CLASS___StartupViewController;
  43.   objc_msgSendSuper2(&v36, "viewDidLoad");
  44.   v3 = objc_msgSend(&OBJC_CLASS___UIDevice, "currentDevice");
  45.   v4 = objc_msgSend(v3, "systemVersion");
  46.   objc_msgSend(v4, "floatValue");
  47.   if ( v5 >= 7.0 )
  48.   {
  49.     v6 = objc_msgSend(&OBJC_CLASS___UIApplication, "sharedApplication");
  50.     objc_msgSend(v6, "setStatusBarStyle:animated:", 0LL, 0LL);
  51.     if ( (unsigned int)objc_msgSend(v2, "respondsToSelector:", "edgesForExtendedLayout") )
  52.       objc_msgSend(v2, "setEdgesForExtendedLayout:", 0LL);
  53.   }
  54.   v7 = objc_msgSend(&OBJC_CLASS___UIColor, "blackColor");
  55.   v8 = objc_msgSend(v2, "view");
  56.   objc_msgSend(v8, "setBackgroundColor:", v7);
  57.   v9 = objc_msgSend((void *)v2->_imageView, "layer");
  58.   LODWORD(v10) = 0;
  59.   objc_msgSend(v9, "setOpacity:", v10);
  60.   v11 = objc_msgSend(&OBJC_CLASS___UIApplication, "sharedApplication");
  61.   v12 = objc_msgSend(v11, "delegate");
  62.   v13 = objc_msgSend(v12, "settings");
  63.   objc_msgSend(v13, "userId");
  64.   v14 = objc_msgSend(&OBJC_CLASS___UIApplication, "sharedApplication");
  65.   v15 = objc_msgSend(v14, "delegate");
  66.   v16 = objc_msgSend(v15, "settings");
  67.   v17 = objc_msgSend(v16, "isCorporateUser");
  68.   if ( (_DWORD)v17 )
  69.   {
  70.     v18 = objc_msgSend(&OBJC_CLASS___UIApplication, "sharedApplication");
  71.     v19 = objc_msgSend(v18, "delegate");
  72.     v20 = objc_msgSend(v19, "settings");
  73.     v17 = objc_msgSend(v20, "companyId");
  74.   }
  75.  
  76.   if ( (unsigned int)sub_100037950(v17) )   // <-------------------------- HERE IS THE JAILBREAK DETECTION
  77.   {
  78.     +[OAlertView showWithTag:title:message:delegate:buttonTitle:](
  79.       &OBJC_CLASS___OAlertView,
  80.       "showWithTag:title:message:delegate:buttonTitle:",
  81.       444LL,
  82.       CFSTR("Jailbreak Detected"),
  83.       CFSTR("This app is not supported on jailbroken devices."),
  84.       v2,
  85.       CFSTR("Exit"));   // <--------------- The ONLY button on the AlertView will terminate/exit app.
  86.   }
  87.  
  88.   else
  89.   {
  90.     v21 = v2->_httpClient1;
  91.     v22 = objc_msgSend(
  92.             CFSTR("http://smtpush.doortodoor.co.kr"),
  93.             "stringByAppendingString:",
  94.             CFSTR("/NPLUS_emergency.htm"));
  95.     -[OHttpClient requestWithUrl:screenId:params:httpMethod:delegate:](
  96.       v21,
  97.       "requestWithUrl:screenId:params:httpMethod:delegate:",
  98.       v22,
  99.       0LL,
  100.       0LL,
  101.       CFSTR("GET"),
  102.       v2);
  103.   }
  104.   v23 = objc_msgSend(&OBJC_CLASS___UILabel, "alloc");
  105.   v24 = objc_msgSend(&OBJC_CLASS___UIScreen, "mainScreen");
  106.   objc_msgSend(v24, "bounds");
  107.   v26 = objc_msgSend(v23, "initWithFrame:", 0.0, 22.0, v25 + -3.0, 10.0);
  108.   if ( (unsigned int)+[OUtils isIPhoneX](&OBJC_CLASS___OUtils, "isIPhoneX") )
  109.   {
  110.     NSLog(CFSTR("x x x"));
  111.     v27 = objc_msgSend(&OBJC_CLASS___UILabel, "alloc");
  112.     v28 = objc_msgSend(&OBJC_CLASS___UIScreen, "mainScreen");
  113.     objc_msgSend(v28, "bounds");
  114.     v26 = objc_msgSend(v27, "initWithFrame:", 0.0, 66.0, v29 + -3.0, 10.0);
  115.   }
  116.   v30 = objc_msgSend(&OBJC_CLASS___NSBundle, "mainBundle");
  117.   v31 = objc_msgSend(v30, "infoDictionary");
  118.   v32 = objc_msgSend(v31, "objectForKey:", CFSTR("CFBundleShortVersionString"));
  119.   v33 = objc_msgSend(&OBJC_CLASS___NSString, "stringWithFormat:", CFSTR("v%@ "), v32);
  120.   objc_msgSend(v26, "setText:", v33);
  121.   v34 = objc_msgSend(&OBJC_CLASS___UIFont, "systemFontOfSize:", 11.0);
  122.   objc_msgSend(v26, "setFont:", v34);
  123.   objc_msgSend(v26, "setNumberOfLines:", 1LL);
  124.   v35 = objc_msgSend(&OBJC_CLASS___UIColor, "darkGrayColor");
  125.   objc_msgSend(v26, "setTextColor:", v35);
  126.   objc_msgSend(v26, "setTextAlignment:", 2LL);
  127. }
  128.  
  129.  
  130.  
  131. bool sub_100037950()
  132. {
  133.   void *v0; // x0
  134.   void *v1; // x0
  135.   void *v2; // x0
  136.   void *v3; // x0
  137.   void *v4; // x0
  138.   void *v5; // x0
  139.   void *v6; // x20
  140.   void *v7; // x0
  141.   FILE *v8; // x0
  142.   void *v10; // x0
  143.   __int64 v11; // [xsp+8h] [xbp-28h]
  144.  
  145.   v0 = objc_msgSend(&OBJC_CLASS___NSFileManager, "defaultManager");
  146.   if ( (unsigned __int64)objc_msgSend(v0, "fileExistsAtPath:", CFSTR("/Applications/Cydia.app")) & 1 )
  147.     return 1LL;
  148.   v1 = objc_msgSend(&OBJC_CLASS___NSFileManager, "defaultManager");
  149.   if ( (unsigned __int64)objc_msgSend(v1, "fileExistsAtPath:", CFSTR("/Library/MobileSubstrate/MobileSubstrate.dylib")) & 1 )
  150.     return 1LL;
  151.   v2 = objc_msgSend(&OBJC_CLASS___NSFileManager, "defaultManager");
  152.   if ( (unsigned __int64)objc_msgSend(v2, "fileExistsAtPath:", CFSTR("/bin/bash")) & 1 )
  153.     return 1LL;
  154.   v3 = objc_msgSend(&OBJC_CLASS___NSFileManager, "defaultManager");
  155.   if ( (unsigned __int64)objc_msgSend(v3, "fileExistsAtPath:", CFSTR("/usr/sbin/sshd")) & 1 )
  156.     return 1LL;
  157.   v4 = objc_msgSend(&OBJC_CLASS___NSFileManager, "defaultManager");
  158.   if ( (unsigned __int64)objc_msgSend(v4, "fileExistsAtPath:", CFSTR("/etc/apt")) & 1 )
  159.     return 1LL;
  160.   v5 = objc_msgSend(&OBJC_CLASS___NSFileManager, "defaultManager");
  161.   if ( (unsigned __int64)objc_msgSend(v5, "fileExistsAtPath:", CFSTR("/private/var/lib/apt/")) & 1 )
  162.     return 1LL;
  163.   v6 = objc_msgSend(&OBJC_CLASS___UIApplication, "sharedApplication");
  164.   v7 = objc_msgSend(&OBJC_CLASS___NSURL, "URLWithString:", CFSTR("cydia://package/com.example.package"));
  165.   if ( (unsigned __int64)objc_msgSend(v6, "canOpenURL:", v7) & 1 )
  166.     return 1LL;
  167.   v8 = fopen("/bin/bash", "r");
  168.   if ( v8
  169.     || (v8 = fopen("/Applications/Cydia.app", "r")) != 0LL
  170.     || (v8 = fopen("/Library/MobileSubstrate/MobileSubstrate.dylib", "r")) != 0LL
  171.     || (v8 = fopen("/usr/sbin/sshd", "r")) != 0LL
  172.     || (v8 = fopen("/etc/apt", "r")) != 0LL )
  173.   {
  174.     fclose(v8);
  175.     return 1LL;
  176.   }
  177.   fclose(0LL);
  178.   objc_msgSend(
  179.     CFSTR("This is a test."),
  180.     "writeToFile:atomically:encoding:error:",
  181.     CFSTR("/private/jailbreak.txt"),
  182.     1LL,
  183.     4LL,
  184.     &v11);
  185.   v10 = objc_msgSend(&OBJC_CLASS___NSFileManager, "defaultManager");
  186.   objc_msgSend(v10, "removeItemAtPath:error:", CFSTR("/private/jailbreak.txt"), 0LL);
  187.   return v11 == 0;
  188. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement