Skip to content

Instantly share code, notes, and snippets.

@ridiculousfish
Created August 15, 2020 19:38
Show Gist options
  • Save ridiculousfish/8c586e51a345d9c50e259fb3ac121949 to your computer and use it in GitHub Desktop.
Save ridiculousfish/8c586e51a345d9c50e259fb3ac121949 to your computer and use it in GitHub Desktop.
CoreFoundation`CFStringGetCharacters:
-> 0x7fff37861e27 <+0>: pushq %rbp
0x7fff37861e28 <+1>: movq %rsp, %rbp
0x7fff37861e2b <+4>: movq %rdx, %r8
0x7fff37861e2e <+7>: movq %rsi, %rax
0x7fff37861e31 <+10>: testb $0x1, %dil
0x7fff37861e35 <+14>: jne 0x7fff37861e7e ; <+87>
0x7fff37861e37 <+16>: movq (%rdi), %rdx
0x7fff37861e3a <+19>: testq %rdx, %rdx
0x7fff37861e3d <+22>: je 0x7fff37861e6b ; <+68>
0x7fff37861e3f <+24>: leaq 0x57cf7b62(%rip), %rsi ; __CFConstantStringClassReferencePtr
0x7fff37861e46 <+31>: cmpq (%rsi), %rdx
0x7fff37861e49 <+34>: je 0x7fff37861e6b ; <+68>
0x7fff37861e4b <+36>: movq 0x57cf49e6(%rip), %r9 ; __CFRuntimeClassTable + 8248
0x7fff37861e52 <+43>: cmpq %r9, %rdx
0x7fff37861e55 <+46>: je 0x7fff37861e6b ; <+68>
0x7fff37861e57 <+48>: testb $0x1, %dl
0x7fff37861e5a <+51>: je 0x7fff37861e7e ; <+87>
0x7fff37861e5c <+53>: movq 0x57bb62c5(%rip), %rsi ; (void *)0x00007fff706db448: objc_debug_isa_class_mask
0x7fff37861e63 <+60>: andq (%rsi), %rdx
0x7fff37861e66 <+63>: cmpq %r9, %rdx
0x7fff37861e69 <+66>: jne 0x7fff37861e7e ; <+87>
0x7fff37861e6b <+68>: movq 0x8(%rdi), %rsi
0x7fff37861e6f <+72>: leaq 0x10(%rdi), %r9
0x7fff37861e73 <+76>: testb $0x60, %sil
0x7fff37861e77 <+80>: je 0x7fff37861e92 ; <+107>
0x7fff37861e79 <+82>: movq (%r9), %rdx
0x7fff37861e7c <+85>: jmp 0x7fff37861ea6 ; <+127>
0x7fff37861e7e <+87>: movq 0x57ceab1b(%rip), %rsi ; "getCharacters:range:"
0x7fff37861e85 <+94>: movq %rcx, %rdx
0x7fff37861e88 <+97>: movq %rax, %rcx
0x7fff37861e8b <+100>: popq %rbp
0x7fff37861e8c <+101>: jmpq *0x57bb62ae(%rip) ; (void *)0x00007fff706b7800: objc_msgSend
0x7fff37861e92 <+107>: movq 0x8(%rdi), %rsi
0x7fff37861e96 <+111>: andl $0x5, %esi
0x7fff37861e99 <+114>: xorl %edx, %edx
0x7fff37861e9b <+116>: cmpq $0x4, %rsi
0x7fff37861e9f <+120>: setne %dl
0x7fff37861ea2 <+123>: leaq (%r9,%rdx,8), %rdx
0x7fff37861ea6 <+127>: movq 0x8(%rdi), %rsi
0x7fff37861eaa <+131>: testb $0x10, %sil
0x7fff37861eae <+135>: jne 0x7fff37861ecf ; <+168>
0x7fff37861eb0 <+137>: movq 0x8(%rdi), %rsi
0x7fff37861eb4 <+141>: shrl $0x2, %esi
0x7fff37861eb7 <+144>: andl $0x1, %esi
0x7fff37861eba <+147>: addq %rax, %rsi
0x7fff37861ebd <+150>: addq %rsi, %rdx
0x7fff37861ec0 <+153>: movq %rdx, %rdi
0x7fff37861ec3 <+156>: movq %rcx, %rsi
0x7fff37861ec6 <+159>: movq %r8, %rdx
0x7fff37861ec9 <+162>: popq %rbp
0x7fff37861eca <+163>: jmp 0x7fff37861ee4 ; __CFStrConvertBytesToUnicode
0x7fff37861ecf <+168>: leaq (%rdx,%rax,2), %rsi
0x7fff37861ed3 <+172>: addq %r8, %r8
0x7fff37861ed6 <+175>: movq %rcx, %rdi
0x7fff37861ed9 <+178>: movq %r8, %rdx
0x7fff37861edc <+181>: callq 0x7fff37a0c3f4 ; symbol stub for: memmove
0x7fff37861ee1 <+186>: popq %rbp
0x7fff37861ee2 <+187>: retq
0x7fff37861ee3 <+188>: nop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment