Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function meth_MTMessageBroker_onSocket_didReadData_withTag_linkedData_ {
- esi = arg_C;
- ebx = arg_0;
- if (arg_10 == 0x5c) goto loc_16687;
- goto loc_1656b;
- loc_16687:
- eax = [ebx delegate];
- if (eax != 0x0) {
- eax = [ebx delegate];
- eax = [eax respondsToSelector:*objc_msg_messageBroker_didReceiveMirroringFrame_withHeader_];
- if (eax != 0x0) {
- eax = [ebx delegate];
- eax = [eax messageBroker:ebx didReceiveMirroringFrame:esi withHeader:arg_14];
- }
- }
- loc_172c8:
- return eax;
- loc_1656b:
- if (eax != 0x28) goto loc_1670c;
- goto loc_16574;
- loc_1670c:
- if (eax != 0x0) goto loc_168ac;
- goto loc_16714;
- loc_168ac:
- eax = NSLog(@"Unknown tag in read of socket data %ld", eax);
- goto loc_172c8;
- loc_16714:
- eax = [NSString alloc];
- eax = [eax initWithData:esi encoding:0x4];
- esi = eax;
- [ebx setHeader:esi];
- [esi release];
- esi = *cls_Utils;
- eax = [ebx header];
- eax = [esi parseHeaders:eax];
- [ebx setHeaders:eax];
- eax = [ebx headers];
- eax = [eax objectForKey:@"CONTENT-LENGTH"];
- eax = [eax intValue];
- esi = eax;
- if (esi <= 0x0) goto loc_16b00;
- goto loc_167fb;
- loc_16b00:
- eax = [ebx delegate];
- if (eax == 0x0) goto loc_172b7;
- goto loc_16b19;
- loc_172b7:
- eax = *objc_msg_readHeaderEnd;
- loc_172bc:
- eax = [ebx readHeaderEnd];
- goto loc_172c8;
- loc_16b19:
- [ebx parseGlobalHeaders];
- loc_172b2:
- objc_msgSend();
- goto loc_172b7;
- loc_167fb:
- eax = [ebx headers];
- eax = [eax objectForKey:@"CONTENT-TYPE"];
- eax = [ebx getAttachmentType:eax];
- [ebx setExpectedAttachmentType:eax];
- eax = [ebx header];
- eax = [eax hasPrefix:@"ANNOUNCE"];
- if (eax == 0x0) goto loc_16b43;
- goto loc_16885;
- loc_16b43:
- eax = [ebx header];
- eax = [eax hasPrefix:@"POST /fp-setup2"];
- if (eax == 0x0) goto loc_16c67;
- goto loc_16b76;
- loc_16c67:
- eax = [ebx header];
- eax = [eax hasPrefix:@"POST /fp-setup"];
- if (eax == 0x0) goto loc_16d9b;
- goto loc_16c9a;
- loc_16d9b:
- eax = [ebx header];
- eax = [eax hasPrefix:@"SET_PARAMETER"];
- if (eax == 0x0) goto loc_16de3;
- goto loc_16dca;
- loc_16de3:
- eax = [ebx header];
- eax = [eax hasPrefix:@"GET_PARAMETER"];
- if (eax == 0x0) goto loc_16e2b;
- goto loc_16e12;
- loc_16e2b:
- eax = [ebx header];
- eax = [eax hasPrefix:@"POST /play"];
- if (eax == 0x0) goto loc_16e73;
- goto loc_16e5a;
- loc_16e73:
- eax = [ebx header];
- eax = [eax hasPrefix:@"PUT /photo"];
- if (eax != 0x0) goto loc_16ed1;
- goto loc_16ea2;
- loc_16ed1:
- [ebx setExpectedAttachmentType:0x0];
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x4;
- loc_1725a:
- objc_msgSend();
- eax = [ebx socket];
- [eax readDataToLength:esi withTimeout:0x0 tag:0xbff00000 linkedData:0x28];
- goto loc_172b2;
- loc_16ea2:
- eax = [ebx header];
- eax = [eax hasPrefix:@"POST /photo"];
- if (eax == 0x0) goto loc_16f03;
- goto loc_16ed1;
- loc_16f03:
- eax = [ebx header];
- eax = [eax hasPrefix:@"PUT /slideshows/"];
- if (eax != 0x0) goto loc_16f61;
- goto loc_16f32;
- loc_16f61:
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x2;
- goto loc_1725a;
- loc_16f32:
- eax = [ebx header];
- eax = [eax hasPrefix:@"POST /slideshows/"];
- if (eax == 0x0) goto loc_16f7a;
- goto loc_16f61;
- loc_16f7a:
- eax = [ebx header];
- eax = [eax hasPrefix:@"HTTP/1.1 200 OK"];
- if (eax == 0x0) goto loc_16fd8;
- goto loc_16fa9;
- loc_16fd8:
- eax = [ebx header];
- eax = [eax hasPrefix:@"POST /authorize"];
- if (eax == 0x0) goto loc_17039;
- goto loc_17007;
- loc_17039:
- eax = [ebx header];
- eax = [eax hasPrefix:@"POST /stop"];
- if (eax != 0x0) goto loc_17097;
- goto loc_17068;
- loc_17097:
- [ebx setExpectedAttachmentType:0x1];
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x7;
- goto loc_1725a;
- loc_17068:
- eax = [ebx header];
- eax = [eax hasPrefix:@"POST /rate"];
- if (eax == 0x0) goto loc_170c9;
- goto loc_17097;
- loc_170c9:
- eax = [ebx header];
- eax = [eax hasPrefix:@"PUT /setProperty"];
- if (eax == 0x0) goto loc_1712a;
- goto loc_170f8;
- loc_1712a:
- eax = [ebx header];
- eax = [eax hasPrefix:@"POST /stream"];
- if (eax == 0x0) goto loc_1724b;
- goto loc_17163;
- loc_1724b:
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x0;
- goto loc_1725a;
- loc_17163:
- [ebx setExpectedAttachmentKind:0xb];
- [ebx setExpectedAttachmentType:0x3];
- eax = [ebx socket];
- [eax readDataToLength:esi withTimeout:0x0 tag:0xbff00000 linkedData:0x28];
- eax = [ebx delegate];
- if (eax != 0x0) {
- eax = [ebx delegate];
- eax = [eax respondsToSelector:*objc_msg_messageBrokerDidStartMirroring_];
- if (eax != 0x0) {
- eax = [ebx delegate];
- [eax messageBrokerDidStartMirroring:ebx];
- }
- }
- eax = *objc_msg_readMirroringPacketHeader;
- goto loc_172bc;
- loc_170f8:
- [ebx setExpectedAttachmentType:0x3];
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0xf;
- goto loc_1725a;
- loc_17007:
- [ebx setExpectedAttachmentType:0x1];
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x5;
- goto loc_1725a;
- loc_16fa9:
- eax = [ebx brokerType];
- if (eax != 0x3) goto loc_16fd8;
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x3;
- goto loc_1725a;
- loc_16e5a:
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x1;
- goto loc_1725a;
- loc_16e12:
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0xa;
- goto loc_1725a;
- loc_16dca:
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x9;
- goto loc_1725a;
- loc_16c9a:
- [ebx setExpectedAttachmentType:0x0];
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x6;
- goto loc_1725a;
- loc_16b76:
- [ebx setExpectedAttachmentType:0x0];
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0xe;
- goto loc_1725a;
- loc_16885:
- STK30 = *objc_msg_setExpectedAttachmentKind_;
- STK31 = ebx;
- STK29 = 0x8;
- goto loc_1725a;
- loc_16574:
- eax = [ebx parseAttachmentData:esi];
- esi = eax;
- eax = [ebx expectedAttachmentKind];
- if (eax != 0x6) goto loc_1689e;
- goto loc_165a5;
- loc_1689e:
- eax = *objc_msg_notifyMessageReceivedWithAttachment_;
- goto loc_172bc;
- loc_165a5:
- ptrace(0x1f, 0x0, 0x0, 0x0);
- eax = [esi bytes];
- edi = ebx;
- ebx = *(int8_t *)(eax + 0x4);
- eax = [esi bytes];
- var_42 = *(int8_t *)(eax + 0x6);
- eax = [edi header];
- [eax rangeOfString:@"X-Apple-ET"];
- if (edx != 0x0) {
- var_44 = esi;
- eax = [edi header];
- eax = [Utils parseMessage:eax forKey:@"X-Apple-ET"];
- eax = [eax intValue];
- ecx = 0x3;
- if (eax != 0x20) {
- ecx = ebx;
- }
- var_43 = ecx;
- var_48 = eax;
- }
- else {
- var_44 = esi;
- var_48 = 0x20;
- var_43 = ebx;
- }
- eax = [edi encryptionContext];
- eax = [eax fpInfo];
- esi = eax;
- eax = [edi encryptionContext];
- eax = [eax sapInfo];
- ebx = eax;
- if (var_42 != 0x3) goto loc_169eb;
- goto loc_16923;
- loc_169eb:
- edi = esi;
- esi = arg_0;
- if (eax != 0x1) goto loc_172c8;
- eax = [esi encryptionContext];
- eax = [eax hasSapInitialized];
- esi = edi;
- if (eax == 0x0) {
- eax = time(0x0);
- srand(eax);
- sub_42ec0(esi, ebx);
- }
- var_75 = 0x0;
- var_68 = 0x0;
- var_64 = 0x0;
- eax = [var_44 bytes];
- sub_42f80(SIGN_EXTEND(var_43), esi, *ebx, eax, &var_64, &var_68, &var_75);
- if (var_75 == 0x1) {
- ebx = var_68;
- if (*(arg_0 + 0x14) == 0x4) {
- eax = [ecx CSeq];
- ebx = ecx;
- STK28 = var_48;
- STK30 = *objc_msg_stringWithFormat_;
- STK31 = *cls_NSString;
- STK29 = @"RTSP/1.0 200 OK\\r\\nContent-Type: application/octet-stream\\r\\nX-Apple-ET: %i\\r\\nContent-Length: %u\\r\\nServer: AirTunes/%@\\r\\nCSeq: %u\\r\\n\\r\\n";
- }
- else {
- STK28 = var_48;
- STK30 = *objc_msg_stringWithFormat_;
- STK31 = *cls_NSString;
- STK29 = @"HTTP/1.0 200 OK\\r\\nContent-Type: application/octet-stream\\r\\nX-Apple-ET: %i\\r\\nContent-Length: %u\\r\\nServer: AirTunes/%@\\r\\n\\r\\n";
- ebx = ecx;
- }
- eax = objc_msgSend();
- esi = eax;
- eax = [NSMutableData alloc];
- edi = eax;
- eax = [esi dataUsingEncoding:0x1];
- eax = [edi initWithData:eax];
- esi = eax;
- [esi appendBytes:var_64 length:var_68];
- [ebx sendData:esi];
- [esi release];
- }
- eax = var_64;
- loc_16d8e:
- eax = free(eax);
- goto loc_172c8;
- loc_16923:
- edi = var_44;
- [edi length];
- var_63 = 0x1;
- var_56 = 0x8e;
- var_52 = 0x0;
- eax = [edi bytes];
- sub_42f80(SIGN_EXTEND(var_43), esi, *ebx, eax, &var_52, &var_56, &var_63);
- if (var_63 == 0x0) {
- ebx = var_56;
- if (*(arg_0 + 0x14) == 0x4) {
- eax = [ecx CSeq];
- ebx = ecx;
- STK28 = var_48;
- STK30 = *objc_msg_stringWithFormat_;
- STK31 = *cls_NSString;
- STK29 = @"RTSP/1.0 200 OK\\r\\nContent-Type: application/octet-stream\\r\\nX-Apple-ET: %i\\r\\nContent-Length: %u\\r\\nCSeq: %u\\r\\n\\r\\n";
- }
- else {
- ebx = ecx;
- STK28 = var_48;
- STK30 = *objc_msg_stringWithFormat_;
- STK31 = *cls_NSString;
- STK29 = @"HTTP/1.0 200 OK\\r\\nContent-Type: application/octet-stream\\r\\nX-Apple-ET: %i\\r\\nContent-Length: %u\\r\\n\\r\\n";
- }
- eax = objc_msgSend();
- esi = eax;
- eax = [NSMutableData alloc];
- edi = eax;
- eax = [esi dataUsingEncoding:0x1];
- eax = [edi initWithData:eax];
- esi = eax;
- [esi appendBytes:var_52 length:var_56];
- [ebx sendData:esi];
- [esi release];
- }
- eax = var_52;
- goto loc_16d8e;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement