Skip to content

Instantly share code, notes, and snippets.

@macmade
Created March 7, 2017 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macmade/d127dd0cc1c1753250a66a1f556de810 to your computer and use it in GitHub Desktop.
Save macmade/d127dd0cc1c1753250a66a1f556de810 to your computer and use it in GitHub Desktop.
Xcode - DTDeviceKitBase - MonotonicCopy
int __ZL34DTDKCircularBufferGetMonotonicCopyP18DTDKCircularBuffer(void * arg0) {
rbx = arg0;
rcx = *(rbx + 0x10);
if (rcx == 0x0) goto loc_3a18d;
loc_3a16b:
if (rcx >= *rbx) goto loc_3a1ae;
loc_3a170:
rax = [NSData dataWithBytes:rbx + 0x18 length:rcx];
goto loc_3a1a1;
loc_3a1a1:
r14 = [rax retain];
goto loc_3a210;
loc_3a210:
rax = [r14 autorelease];
return rax;
loc_3a1ae:
r14 = [[NSMutableData alloc] initWithCapacity:*(rbx + 0x10)];
[r14 appendBytes:rbx + *(rbx + 0x8) + 0x18 length:*rbx - *(rbx + 0x8)];
[r14 appendBytes:rbx + 0x18 length:*(rbx + 0x8)];
goto loc_3a210;
loc_3a18d:
rax = [NSData data];
goto loc_3a1a1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment