Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function meth_static_Utils_parseHeaders_ {
- var_152 = **stack_chk_guard;
- eax = [arg_8 stringByReplacingOccurrencesOfString:@"\\r" withString:@""];
- esi = eax;
- eax = [NSMutableDictionary alloc];
- eax = [eax init];
- var_32 = eax;
- [eax setObject:esi forKey:@"RAW_REQUEST"];
- eax = [esi componentsSeparatedByString:@"\\n"];
- var_40 = eax;
- eax = [eax count];
- if (eax == 0x0) goto loc_2d23b;
- goto loc_2d09f;
- loc_2d23b:
- eax = [var_40 countByEnumeratingWithState:&var_112 objects:&var_48 count:0x10];
- var_36 = eax;
- if (eax != 0x0) {
- var_28 = *var_120;
- do {
- ebx = 0x0;
- do {
- if (*var_120 != var_28) {
- objc_enumerationMutation(var_40);
- }
- eax = [*(var_116 + ebx * 0x4) rangeOfString:@": "];
- esi = eax;
- if (edx == 0x0) {
- eax = [edi rangeOfString:@":"];
- esi = eax;
- }
- if ((edx != 0x0) && (esi != 0x0)) {
- edx = edx + esi;
- var_44 = edi;
- eax = [edi substringFromIndex:edx];
- edi = eax;
- eax = [edi hasPrefix:@"\\\""];
- if (eax != 0x0) {
- eax = [edi hasSuffix:@"\\\""];
- if (eax != 0x0) {
- eax = [edi length];
- eax = [edi substringWithRange:0x1];
- edi = eax;
- }
- }
- eax = [var_44 substringToIndex:esi];
- eax = [eax uppercaseString];
- [var_32 setObject:edi forKey:eax];
- }
- ebx = ebx + 0x1;
- } while (ebx < var_36);
- eax = [var_40 countByEnumeratingWithState:&var_112 objects:&var_48 count:0x10];
- var_36 = eax;
- } while (eax != 0x0);
- }
- eax = [var_32 autorelease];
- if (**stack_chk_guard != var_152) goto loc_2d454;
- goto loc_2d449;
- loc_2d454:
- __stack_chk_fail();
- ebp = esp;
- esp = esp - 0x1c;
- eax = objc_msgSend(*objc_msg_sharedInstance, ebx, ebp);
- ebx = arg_0;
- objc_msgSend(*objc_msg_setMirroringHeader2_, ebx);
- eax = objc_msgSend(*objc_msg_alloc);
- eax = objc_msgSend(*objc_msg_init);
- esi = eax;
- objc_msgSend(*objc_msg_appendString_, @"A863F9314B917F665980FA0532623B77EAF32D58B6E8D870A3A9F92B1A342E346B5CADE0AB2181BFDD305D07");
- objc_msgSend(*objc_msg_appendString_, @"3254DC0BEE5C53C96C1006AE8166E5E373BC76B7A54D5DB2FB1832CD16B35833DCF8A324DAB9");
- objc_msgSend(*objc_msg_appendString_, @"FAA8F7277BF2EE40D7D6F323B2C9F3F9");
- objc_msgSend(*objc_msg_appendString_, @"E2FA7BF12D60D3022BA7A613848FDC3EB963EA10C4264A00E77FF35D5E04AE53523F36089402A9A15D3799FCD42BB659D8108CA96A6731B383");
- objc_msgSend(*objc_msg_appendString_, @"51A13F15457A62E3413BF32EB");
- objc_msgSend(*objc_msg_appendString_, @"4BA8F5D0234617A28D3B01E354463B56DDF4F13361E6E229E3");
- objc_msgSend(*objc_msg_appendString_, @"E2CF772054DFCF2B22CA455FAF9509D5603656E78F38476B6633A39A2D38F56F5333A82E79A5A5DDCB6");
- objc_msgSend(*objc_msg_appendString_, @"CE3001B2A9AC70F6978615363BC4708CB9F1354BFFDB");
- eax = objc_msgSend(*objc_msg_alloc);
- eax = objc_msgSend(*objc_msg_initWithPublicKey_privateKey_, esi, 0x0);
- edi = eax;
- objc_msgSend(*objc_msg_release);
- eax = objc_msgSend(*objc_msg_hexToData_, ebx);
- eax = objc_msgSend(*objc_msg_decryptData_, eax);
- esi = eax;
- objc_msgSend(*objc_msg_release);
- eax = objc_msgSend(*objc_msg_componentsSeparatedByString_, @"\\t");
- esi = eax;
- eax = objc_msgSend(*objc_msg_objectAtIndex_, 0x3);
- edi = eax;
- eax = objc_msgSend(*objc_msg_count);
- eax = objc_msgSend(*objc_msg_objectAtIndex_, eax - 0x1);
- ebx = arg_4;
- eax = objc_msgSend(*objc_msg_isEqualToString_, eax);
- if (eax == 0x0) goto loc_2d858;
- goto loc_2d697;
- loc_2d858:
- eax = [esi count];
- eax = [esi objectAtIndex:eax - 0x1];
- NSLog(@"nonce match: %@ vs %@", ebx, eax);
- eax = [AppState sharedInstance];
- eax = [eax setMirroringHeader2:0x0];
- loc_2d9c7:
- return eax;
- loc_2d697:
- eax = [edi intValue];
- if (eax > 0x1) goto loc_2d9c7;
- eax = [NSBundle mainBundle];
- eax = [eax bundleIdentifier];
- var_152 = eax;
- eax = [NSUserDefaults standardUserDefaults];
- edi = eax;
- eax = [NSBundle mainBundle];
- eax = [eax infoDictionary];
- eax = [eax objectForKey:@"CFBundleVersion"];
- [edi setObject:eax forKey:@"CFBundleActivatedVersion"];
- eax = [AppState sharedInstance];
- eax = [eax mirroringHeader2];
- ebx = @"com.pratikkumar.airserver-mac";
- if (var_152 != 0x0) {
- ebx = **imp___nl_symbol_ptr__kCFPreferencesCurrentApplication;
- }
- CFPreferencesSetValue(STK33, STK32, @"activation4", eax, ebx);
- CFPreferencesSetValue(@"code", arg_8, ebx, esi, edi);
- eax = CFPreferencesSynchronize(ebx, esi, edi);
- if (eax == 0x0) goto loc_2d8ca;
- goto loc_2d7f5;
- loc_2d8ca:
- CFPreferencesSetValue(@"activation4", 0x0, ebx, esi, edi);
- CFPreferencesSetValue(@"code", 0x0, ebx, esi, edi);
- esi = **imp___nl_symbol_ptr__kCFPreferencesCurrentUser;
- CFPreferencesSetValue(@"code", arg_8, ebx, esi, edi);
- eax = [AppState sharedInstance];
- eax = [eax mirroringHeader2];
- CFPreferencesSetValue(@"activation4", eax, ebx, esi, edi);
- eax = CFPreferencesSynchronize(ebx, esi, edi);
- if (eax == 0x0) goto loc_2d99e;
- goto loc_2d989;
- loc_2d99e:
- eax = [NSUserDefaults standardUserDefaults];
- eax = [eax synchronize];
- goto loc_2d9c7;
- loc_2d989:
- eax = NSUserName();
- STK30 = eax;
- STK31 = @"Activation succeeded for %@";
- loc_2d999:
- NSLog();
- goto loc_2d99e;
- loc_2d7f5:
- esi = **imp___nl_symbol_ptr__kCFPreferencesCurrentUser;
- CFPreferencesSetValue(@"activation4", 0x0, ebx, esi, edi);
- CFPreferencesSetValue(@"code", 0x0, ebx, esi, edi);
- CFPreferencesSynchronize(ebx, esi, edi);
- STK31 = @"Activation succeeded for all users on current machine";
- goto loc_2d999;
- loc_2d449:
- return eax;
- loc_2d09f:
- eax = [var_40 objectAtIndex:0x0];
- eax = [eax hasSuffix:@"HTTP/1.1"];
- if (eax != 0x0) {
- STK30 = *objc_msg_numberWithBool_;
- STK31 = *cls_NSNumber;
- STK29 = 0x1;
- }
- else {
- STK30 = *objc_msg_numberWithBool_;
- STK31 = *cls_NSNumber;
- STK29 = 0x0;
- }
- eax = objc_msgSend();
- [var_32 setObject:eax forKey:@"IS_HTTP11"];
- eax = [ebx rangeOfString:@" "];
- esi = eax;
- if (*objc_msg_numberWithBool_ != 0x0) {
- eax = [ebx substringToIndex:esi];
- eax = [eax uppercaseString];
- [var_32 setObject:eax forKey:@"REQUEST_METHOD"];
- }
- eax = [ebx hasSuffix:@"HTTP/1.0"];
- if (eax != 0x0) goto loc_2d1d5;
- goto loc_2d1b8;
- loc_2d1d5:
- eax = [ebx rangeOfString:@" HTTP/1"];
- if ((edi != 0x0) && (*objc_msg_numberWithBool_ != 0x0)) {
- esi = esi + 0x1;
- eax = [ebx substringWithRange:esi];
- [var_32 setObject:eax forKey:@"REQUEST_URI"];
- }
- goto loc_2d23b;
- loc_2d1b8:
- eax = [ebx hasSuffix:@"HTTP/1.1"];
- if (eax == 0x0) goto loc_2d23b;
- goto loc_2d1d5;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement