经过一个阶段5次迭代之后,本逆向分析工具功能基本成形。工具的基本功能介绍请参看前面的posts。

现在就和hopper的逆向函数伪代码的功能对比一下效果。在这里并非定胜劣,因为差异可以拿来对比参照,通过比较发现有参考的东西。

下面是hopper的输出的伪代码:

void _CABackingStoreUpdate_(int arg0, int arg1, int arg2, int arg3) {
var_148 = r9;
r12 = arg3;
r13 = arg2;
var_D8 = arg1;
r14 = arg0;
r15 = r14 + 0x10;
pthread_mutex_lock(r15);
rbx = *(r14 + 0x168);
if (rbx == 0x0) goto loc_ca71; loc_ca40:
if (rbx == pthread_self()) goto loc_d554; loc_ca4e:
if (*(r14 + 0x168) != 0x0) {
rbx = r14 + 0x50;
do {
pthread_cond_wait(rbx, r15);
} while (*(r14 + 0x168) != 0x0);
}
goto loc_ca71; loc_ca71:
rcx = *(int16_t *)(r14 + 0x174);
if ((*(r14 + 0x80) != var_D8) || (*(r14 + 0x88) != r13)) goto loc_cb16; loc_ca9e:
var_F8 = r13;
rbx = rcx >> 0xa & 0x1;
COND = rbx != 0x0;
if (COND) goto loc_cb34; loc_cab3:
rax = 0x0;
rbx = 0x0;
if ((rcx & 0x2) == 0x0) {
rdi = *(r14 + 0x150);
rax = 0x0;
rbx = 0x0;
if (rdi != 0x0) {
CGSBoundingShapeGetRegion();
if ((r12 & 0x80) == 0x0) {
rbx = var_F8;
xmm2 = intrinsic_punpckldq(zero_extend_64(rbx), *(int128_t *)0x150860);
xmm2 = intrinsic_subpd(xmm2, *(int128_t *)0x150870);
xmm2 = intrinsic_haddpd(xmm2, xmm2);
}
else {
var_70 = 0x3ff0000000000000;
var_58 = 0xbff0000000000000;
rbx = var_F8;
xmm0 = intrinsic_punpckldq(zero_extend_64(rbx), *(int128_t *)0x150860);
xmm0 = intrinsic_subpd(xmm0, *(int128_t *)0x150870);
xmm0 = intrinsic_haddpd(xmm0, xmm0);
var_F0 = intrinsic_movapd(var_F0, xmm0);
intrinsic_movlpd(var_48, xmm0);
intrinsic_movss(xmm0, *(int32_t *)0x1508a0);
CGSTransformRegion();
CGSReleaseRegion(var_38);
xmm2 = intrinsic_movapd(xmm2, var_F0);
var_38 = var_40;
}
var_F8 = rbx;
xmm0 = intrinsic_punpckldq(zero_extend_64(var_D8), *(int128_t *)0x150860);
xmm0 = intrinsic_subpd(xmm0, *(int128_t *)0x150870);
xmm0 = intrinsic_haddpd(xmm0, xmm0);
xmm1 = intrinsic_pxor(xmm1, xmm1);
var_90 = intrinsic_movdqa(var_90, xmm1);
intrinsic_movlpd(var_80, xmm0);
intrinsic_movsd(var_78, xmm2);
rbx = CGSRectInRegion();
if (rbx == 0x0) {
CGSIntersectRegionWithRect(var_38, var_90, 0x0);
if (CGSRegionIsEmpty(0x0) != 0x0) {
CGSReleaseRegion(0x0);
}
}
CGSReleaseRegion(var_38);
rax = 0x0;
}
}
if ((rbx != 0x0) || (rax != 0x0)) goto loc_cb34; loc_d554:
pthread_mutex_unlock(r15);
return; loc_cb34:
var_110 = rbx;
var_138 = r15;
var_104 = (r12 & 0x1) + (r12 & 0x1) + 0x1;
r15 = r14 + 0x138;
rcx = *(r14 + 0x138);
var_130 = r14;
rax = rcx + 0x10;
rdi = *(rcx + 0x10);
if (rdi == 0x0) goto loc_ccae; loc_cb78:
var_F0 = r12;
r14 = r12 & 0x4;
r13 = rax;
var_118 = rax;
rbx = rcx;
var_100 = rcx;
r12 = r15;
goto loc_cb9d; loc_cb9d:
if (CA::Render::Shmem::set_volatile(rdi, 0x0) == 0x0) goto loc_ccd8; loc_cbae:
rax = *r13;
if (rax == 0x0) goto loc_ccf8; loc_cbbb:
rax = *(rax + 0x18);
if ((((*(int32_t *)(rax + 0x10) != var_104) || (*(int32_t *)(rax + 0x14) != var_D8)) || (*(int32_t *)(rax + 0x18) != var_F8)) || (((r14 != 0x0 ? 0x1 : 0x0) & 0xff) != ((*(int32_t *)(rax + 0x1c) > 0x1 ? 0x1 : 0x0) & 0xff))) goto loc_ccd8; loc_cc09:
COND = *(int32_t *)rax == 0x0;
rax = COND_BYTE_SET(NE);
rdx = rbx;
if (!COND) {
if (*rdx == 0x0) {
rax = rdx;
rdx = *(int32_t *)(rax + 0x20);
rbx = rax;
CABackingStoreSynchronize(var_130, arg_8, rdx + 0x1, 0x1e);
rcx = *r13;
rax = 0x1;
if (rcx != 0x0) {
rax = *(int32_t *)*(rcx + 0x18) == 0x0 ? 0x1 : 0x0;
}
rax = rax ^ 0x1;
rdx = rbx;
}
}
else {
if ((rdx != var_100) && (*rdx != 0x0)) {
rax = CABackingStoreSynchronize(var_130, arg_8, *(int32_t *)(rdx + 0x20), 0x0);
rdx = rdx;
rax = rax ^ 0x1;
}
}
if (rax == 0x0) goto loc_cccc; loc_cc86:
rcx = *rdx;
if (rcx == 0x0) goto loc_cd04; loc_cc8e:
if (rax == 0x0) goto loc_cccc; loc_cc92:
r12 = rdx;
r13 = rcx + 0x10;
rdi = *(rcx + 0x10);
rbx = rcx;
if (rdi != 0x0) goto loc_cb9d; loc_cca9:
rdx = rcx;
goto loc_cccc; loc_cccc:
r14 = var_110;
goto loc_cd47; loc_cd47:
if (rdx == *r15) goto loc_cd6c; loc_cd4c:
*r12 = *rdx;
*rdx = *r15;
*r15 = rdx;
r15 = var_138;
r12 = var_130;
goto loc_cd83; loc_cd83:
rax = *r13;
if (rax == 0x0) goto loc_cd98; loc_cd8c:
var_110 = rax;
goto loc_ce38; loc_ce38:
r13 = r14;
rdi = *(rdx + 0x8);
if (rdi != *(r12 + 0x90)) {
CGColorSpaceRelease(rdi);
rax = CGColorSpaceRetain(*(r12 + 0x90));
rdx = rdx;
*(rdx + 0x8) = rax;
if ((rax != *(var_100 + 0x8)) && (*(rdx + 0x18) != 0x0)) {
CGSReleaseRegion();
rdx = rdx;
*(rdx + 0x18) = 0x0;
}
}
var_138 = r15;
if (*(r12 + 0x150) != 0x0) {
CGSBoundingShapeReset();
rdx = rdx;
}
*(int16_t *)(r12 + 0x174) = *(int16_t *)(r12 + 0x174) & 0xffff & 0xf8ff | 0x200;
var_178 = *(rdx + 0x18);
rbx = *(r12 + 0x138);
var_120 = r13;
r12 = r13 & 0x1;
if (rbx == 0x0) goto loc_cf5d; loc_ceef:
r15 = var_98;
goto loc_cef6; loc_cef6:
r13 = rbx + 0x18;
if (rbx == rdx) goto loc_cf35; loc_ceff:
rax = *r13;
if (rax == 0x0) goto loc_cf55; loc_cf08:
r14 = rdx;
if (r12 == 0x0) {
CGSUnionRegion(0x0, rax, r15);
CGSReleaseRegion(*r13);
*r13 = var_98;
}
else {
CGSReleaseRegion(rax);
*r13 = 0x0;
}
goto loc_cf52; loc_cf52:
rdx = r14;
goto loc_cf55; loc_cf55:
rbx = *rbx;
if (rbx != 0x0) goto loc_cef6; loc_cf5d:
var_140 = rdx;
rax = var_F8;
r13 = var_178;
if ((rdx != var_100) && (r12 == 0x0)) {
if (r13 != 0x0) {
CGSDiffRegion(r13, 0x0, 0x0);
}
else {
xmm1 = intrinsic_movdqa(xmm1, *(int128_t *)0x150860);
xmm0 = intrinsic_punpckldq(zero_extend_64(var_D8), xmm1);
xmm2 = intrinsic_movapd(xmm2, *(int128_t *)0x150870);
xmm0 = intrinsic_subpd(xmm0, xmm2);
xmm0 = intrinsic_haddpd(xmm0, xmm0);
xmm3 = intrinsic_punpckldq(zero_extend_64(rax), xmm1);
xmm3 = intrinsic_subpd(xmm3, xmm2);
xmm3 = intrinsic_haddpd(xmm3, xmm3);
xmm1 = intrinsic_pxor(xmm1, xmm1);
var_C0 = intrinsic_movdqa(var_C0, xmm1);
intrinsic_movlpd(var_B0, xmm0);
intrinsic_movlpd(var_A8, xmm3);
CGSNewRegionWithRect(var_C0, var_C8);
CGSDiffRegion(var_C8, 0x0, 0x0);
CGSReleaseRegion(var_C8);
}
if (CGSRegionIsEmpty(0x0) != 0x0) {
CGSReleaseRegion(0x0);
}
}
rcx = var_110;
if (rcx == 0x0) goto loc_d0ae; loc_d06a:
r15 = *(rcx + 0x18);
if (0x0 != 0x0) {
rax = *var_118;
r13 = 0x1;
r12 = var_130;
if (rax != 0x0) {
CA::Render::ShmemBitmap::copy_pixels(r15, *(rax + 0x18));
rcx = rcx;
r13 = var_120;
}
}
else {
r13 = var_120;
r12 = var_130;
}
r13 = r13 & 0x1;
rbx = var_F0;
if ((rbx & 0x2) != 0x0) {
CA::Render::ShmemBitmap::fill_pixels(r15, 0x0);
rcx = rcx;
rbx = rbx & 0xfffffffd;
}
r14 = rbx;
r15 = 0x0;
var_149 = r13;
rax = 0x0;
if (r13 != 0x0) {
r15 = 0x0;
rax = r15;
}
*(r12 + 0x158) = rax;
rax = *(rcx + 0x18);
var_100 = rax;
rax = *(int32_t *)(rax + 0x1c);
var_110 = rax;
if (rax == 0x0) goto loc_d4af; loc_d14e:
xmm0 = intrinsic_movdqa(xmm0, *(int128_t *)0x150860);
xmm2 = intrinsic_punpckldq(zero_extend_64(var_D8), xmm0);
xmm1 = intrinsic_movapd(xmm1, *(int128_t *)0x150870);
xmm2 = intrinsic_subpd(xmm2, xmm1);
var_160 = intrinsic_movapd(var_160, intrinsic_haddpd(xmm2, xmm2));
xmm2 = intrinsic_punpckldq(zero_extend_64(var_F8), xmm0);
xmm2 = intrinsic_subpd(xmm2, xmm1);
xmm2 = intrinsic_haddpd(xmm2, xmm2);
var_170 = intrinsic_movapd(var_170, xmm2);
goto loc_d196; loc_d196:
var_D8 = CA::Render::ShmemBitmap::lod_width(var_100);
r12 = CA::Render::ShmemBitmap::lod_height(var_100);
var_F8 = CA::Render::ShmemBitmap::lod_data(var_100);
rbx = CA::Render::ShmemBitmap::lod_rowbytes(var_100);
if (r15 == 0x0) goto loc_d2b3; loc_d1e5:
if ((r14 & 0x28) != 0x0) goto loc_d203; loc_d1eb:
CMP(var_D8, r12);
asm{ cmova eax, ecx };
if (r12 > 0x7) goto loc_d2b3; loc_d203:
var_F0 = r14;
var_118 = rbx;
rax = CA::Render::ShmemBitmap::lod_width(var_100);
var_124 = r12;
r12 = rax;
rbx = CA::Render::ShmemBitmap::lod_height(var_100);
var_120 = CA::Render::ShmemBitmap::lod_data(var_100);
rax = CA::Render::ShmemBitmap::lod_rowbytes(var_100);
xmm2 = intrinsic_cvtsi2sd(xmm2, var_D8);
xmm3 = intrinsic_cvtsi2sd(xmm3, var_124);
xmm0 = intrinsic_pxor(xmm0, xmm0);
xmm1 = intrinsic_xorpd(xmm1, xmm1);
CA::downsample_image(var_104, var_120, rax, r12, rbx, var_F8, var_118, xmm0, xmm1, xmm2, xmm3, 0x0);
goto loc_d498; loc_d498:
r15 = r15 + 0x1;
r14 = var_F0;
if (r15 < var_110) goto loc_d196; loc_d4af:
rbx = var_130;
rax = rbx + 0x158;
*(int32_t *)(var_100 + 0x4) = *(int32_t *)(var_100 + 0x4) + 0x1;
rdi = 0x0;
r13 = var_178;
goto loc_d4d3; loc_d4d3:
*rax = 0x0;
r15 = var_138;
if (rdi != 0x0) {
CGSReleaseRegion();
}
if (r13 != 0x0) {
CGSReleaseRegion(r13);
}
if (0x0 != 0x0) {
CGSReleaseRegion();
}
CABackingStoreReleaseImages(rbx);
rax = 0x0;
rdi = arg_8;
if (rdi != 0x0) {
rax = *rdi;
rax = (*(rax + 0x48))();
rax = rax + 0x1;
}
*(int32_t *)(var_140 + 0x20) = rax;
*(var_140 + 0x28) = 0x0;
*(rbx + 0x160) = 0x0;
*(int8_t *)(rbx + 0x174) = 0x6;
pthread_cond_broadcast(rbx + 0x50);
goto loc_d554; loc_d2b3:
if ((r14 & 0x20) != 0x0) goto loc_d6a1; loc_d2bd:
r9 = *(var_140 + 0x8);
rsi = var_D8;
rdx = r12;
r13 = _CAGetCachedCGBitmapContext(var_F8, rsi, rdx, var_104, rbx, r9);
if (r13 != 0x0) {
xmm0 = intrinsic_movsd(xmm0, *0x150850);
xmm1 = intrinsic_movapd(xmm1, xmm0);
if (r15 != 0x0) {
xmm0 = intrinsic_cvtsi2sd(0x0, var_D8);
xmm0 = intrinsic_divsd(xmm0, var_160);
xmm1 = intrinsic_cvtsi2sd(0x0, r12);
xmm1 = intrinsic_divsd(xmm1, var_170);
}
if (var_149 == 0x0) {
if (r15 != 0x0) {
var_70 = intrinsic_movsd(var_70, xmm0);
var_D8 = intrinsic_movsd(var_D8, xmm0);
var_58 = intrinsic_movsd(var_58, xmm1);
var_F0 = intrinsic_movsd(var_F0, xmm1);
*(0x8) = 0x0;
*0x0 = 0x0;
*(0x8) = 0x0;
*0x0 = 0x0;
xmm0 = intrinsic_movss(xmm0, *(int32_t *)0x1508a0);
rdx = var_D0;
CGSTransformRegion();
rsi = var_D0;
CGContextReplacePathWithShapePath(r13, rsi);
CGSReleaseRegion(var_D0);
}
else {
var_F0 = intrinsic_movsd(var_F0, xmm1);
var_D8 = intrinsic_movsd(var_D8, xmm0);
rsi = 0x0;
CGContextReplacePathWithShapePath(r13, rsi);
}
CGContextClip(r13);
xmm0 = intrinsic_movsd(xmm0, var_D8);
xmm1 = intrinsic_movsd(xmm1, var_F0);
}
if (r15 != 0x0) {
CGContextScaleCTM(r13, rsi, rdx);
}
if ((r14 & 0x2) != 0x0) {
rax = *_CGRectInfinite;
CGContextClearRect(r13, rsi);
r14 = r14 & 0xfffffffd;
}
var_F0 = r14;
*(var_130 + 0x168) = pthread_self();
pthread_mutex_unlock(var_138);
(var_148)(r13, arg_0);
pthread_mutex_lock(var_138);
*(var_130 + 0x168) = 0x0;
_CAReleaseCachedCGContext(r13);
}
else {
var_F0 = r14;
}
goto loc_d498; loc_d6a1:
abort();
return; loc_d0ae:
rcx = 0x0;
rdi = 0x0;
if (r12 == 0x0) {
rcx = rdi;
}
rbx = var_130;
rax = rbx + 0x158;
*(rbx + 0x158) = rcx;
goto loc_d4d3; loc_cf35:
r14 = rdx;
CGSNewEmptyRegion(r13);
goto loc_cf52; loc_cd98:
rax = 0x1;
r14 = 0x1;
if (rdx != var_100) {
r14 = rax;
}
rbx = rdx;
CABackingStoreDeleteBuffer(rdx);
rcx = 0x1;
if ((var_F0 & 0x4) != 0x0) {
rax = CA::Render::format_mipmap_min_size(var_104);
rsi = var_F8;
rcx = 0x1;
if (rsi <= rax) {
rdx = var_D8;
if (rdx > rax) {
do {
do {
rcx = rcx + 0x1;
rdx = rdx >> 0x1;
rsi = rsi >> 0x1;
} while (rsi > rax);
} while (rdx > rax);
}
}
else {
rdx = var_D8;
do {
do {
rcx = rcx + 0x1;
rdx = rdx >> 0x1;
rsi = rsi >> 0x1;
} while (rsi > rax);
} while (rdx > rax);
}
}
rax = CA::Render::Shmem::new_bitmap(var_104, var_D8, var_F8, rcx);
*r13 = rax;
rdx = rbx;
if (rax == 0x0) goto loc_d554; loc_ce2a:
var_110 = rax;
var_F0 = var_F0 & 0xfffffffd;
goto loc_ce38; loc_cd6c:
r15 = var_138;
r12 = var_130;
if (rdx == 0x0) goto loc_d554;
goto loc_cd83; loc_cd04:
r14 = 0x1;
if (rdx != var_100) {
r14 = var_110;
}
rbx = rdx;
CABackingStoreDeleteBuffer(rdx);
if ((_CAGetDebugFlags() & 0x20) != 0x0) {
_x_log("CoreAnimation: triple buffered backing store %p\n", var_130, rdx, rcx, r8, r9, stack[]);
}
goto loc_cd44; loc_cd44:
rdx = rbx;
goto loc_cd47; loc_ccd8:
r14 = 0x1;
if (rbx != var_100) {
r14 = var_110;
}
CABackingStoreDeleteBuffer(rbx);
goto loc_cd44; loc_ccf8:
r14 = var_110;
goto loc_cd44; loc_ccae:
var_F0 = r12;
r13 = rax;
var_118 = rax;
var_100 = rcx;
rdx = rcx;
r12 = r15;
goto loc_cccc; loc_cb16:
*(r14 + 0x80) = var_D8;
*(r14 + 0x88) = r13;
var_F8 = r13;
rbx = 0x1;
goto loc_cb34;
}

by hopper

下面是本工具输出的分支结构代码:

void CABackingStoreUpdate_(CABackingStore*, unsigned int, unsigned int, unsigned int, unsigned int, void(*)(CGContext*, void*), CA::Layer*, CA::GenericContext*)
{
// 50 call
pthread_mutex_lock;
//
if () {
// gen jmp 116
goto _f116;
}
else { // 65 next
// 67 call
pthread_self;
//
if ()
// gen jmp 2903
goto _f2903;
//
if (!) {
_b95: // from 114
// 101 call
pthread_cond_wait;
//
if ()
goto _b95;
_f116: // from 65
} //
} // 116
//
if (!) {
//
if () {
// gen jmp 281
goto _f281;
} //
else if () {
// gen jmp 311
goto _f311;
}
else { // 176 next
//
if ()
goto _f3214;
//
if ()
goto _f3214;
// 225 call
CGSBoundingShapeGetRegion;
//
if ()
goto _f2929;
//
goto _f3076;
_f281: // from 159
// 225 call
CGSBoundingShapeGetRegion;
} //
} //
_b311: // from 3231
_b311: // from 3216
_f311: // from 176
//
if () {
// gen jmp 689
goto _f689;
}
else { // 373 next
_b416: // from 678
// 420 call
CA::Render::Shmem::set_volatile(bool, int);
//
if ()
// gen jmp 731
goto _f731;
//
if ()
// gen jmp 763
goto _f763;
//
if ()
// gen jmp 731
goto _f731;
//
if ()
// gen jmp 731
goto _f731;
//
if ()
// gen jmp 731
goto _f731;
//
if ()
// gen jmp 731
goto _f731;
//
if () {
// gen jmp 601
goto _f601;
}
else { // 533 next
//
if ()
// gen jmp 645
goto _f645;
// 568 call
CABackingStoreSynchronize(CABackingStore*, CA::GenericContext*, unsigned int, int);
//
if (!) {
} // 594
//
goto _f645;
_f601: // from 533
} // 601
//
if (!) {
//
if (!) {
// 635 call
CABackingStoreSynchronize(CABackingStore*, CA::GenericContext*, unsigned int, int);
_f645: // from 599
_f645: // from 539
} //
} // 645
//
if ()
// gen jmp 719
goto _f719;
//
if ()
// gen jmp 775
goto _f775;
//
if ()
// gen jmp 719
goto _f719;
//
if ()
goto _b416;
//
goto _f719;
_f689: // from 373
} //
_f719: // from 687
_f719: // from 659
_f719: // from 647
//
goto _f842;
_f731: // from 518
_f731: // from 491
_f731: // from 475
_f731: // from 459
_f731: // from 427
//
if (!) {
} // 753
// 756 call
CABackingStoreDeleteBuffer(CABackingStoreBuffer*);
//
goto _f839;
_f763: // from 440
//
goto _f839;
_f775: // from 655
//
if (!) {
} // 797
// 803 call
CABackingStoreDeleteBuffer(CABackingStoreBuffer*);
// 808 call
CAGetDebugFlags;
//
if (!) {
// 834 call
// %rdi = "CoreAnimation: triple buffered backing store %p\n"
x_log;
_f839: // from 773
_f839: // from 761
} //
_f842: // from 729
//
if (!) {
//
goto _f902;
} // 879
//
if (!) {
_f902: // from 877
//
if (!) {
//
goto _f1083;
} // 923
//
if (!) {
} // 941
// 947 call
CABackingStoreDeleteBuffer(CABackingStoreBuffer*);
//
if (!) {
// 973 call
CA::Render::format_mipmap_min_size(unsigned int);
//
if (!) {
//
goto _f1014;
} //
_b1014: // from 1026
_b1014: // from 1022
_f1014: // from 1005
//
if ()
goto _b1014;
//
if ()
goto _b1014;
} // 1028
// 1048 call
CA::Render::Shmem::new_bitmap(unsigned int, unsigned int, unsigned int, unsigned int);
//
if (!) {
_f1083: // from 918
//
if (!) {
// 1103 call
CGColorSpaceRelease;
// 1116 call
CGColorSpaceRetain;
//
if (!) {
//
if (!) {
// 1153 call
CGSReleaseRegion;
} //
} //
} // 1169
//
if (!) {
// 1192 call
CGSBoundingShapeReset;
} // 1200
//
if (!) {
_b1273: // from 1374
//
if () {
// gen jmp 1336
goto _f1336;
} //
else if () {
// gen jmp 1368
goto _f1368;
} //
else if () {
// gen jmp 1349
goto _f1349;
}
else { // 1297 next
// 1309 call
CGSUnionRegion;
// 1318 call
CGSReleaseRegion;
//
goto _f1365;
_f1336: // from 1280
// 1309 call
CGSUnionRegion;
// 1318 call
CGSReleaseRegion;
} // 1336
// 1342 call
CGSNewEmptyRegion;
//
goto _f1365;
_f1349: // from 1297
// 1352 call
CGSReleaseRegion;
_f1365: // from 1347
_f1365: // from 1334
_f1368: // from 1289
//
if ()
goto _b1273;
} // 1376
//
if (!) {
//
if (!) {
//
if (!) {
// 1449 call
CGSDiffRegion;
//
goto _f1594;
} // 1459
// 1554 call
CGSNewRegionWithRect;
// 1577 call
CGSDiffRegion;
// 1589 call
CGSReleaseRegion;
_f1594: // from 1454
// 1601 call
CGSRegionIsEmpty;
//
if (!) {
// 1617 call
CGSReleaseRegion;
} //
} //
} // 1633
//
if () {
// gen jmp 1713
goto _f1713;
} //
else if () {
// gen jmp 1752
goto _f1752;
} //
else if () {
// gen jmp 1766
goto _f1766;
}
else { // 1684 next
// 1696 call
CA::Render::ShmemBitmap::copy_pixels(CA::Render::ShmemBitmap const*, CGSRegionObject*);
//
goto _f1766;
_f1713: // from 1643
// 1696 call
CA::Render::ShmemBitmap::copy_pixels(CA::Render::ShmemBitmap const*, CGSRegionObject*);
} // 1713
//
goto _f2774;
_f1752: // from 1659
_f1766: // from 1711
_f1766: // from 1684
//
if (!) {
// 1802 call
CA::Render::ShmemBitmap::fill_pixels(unsigned int, CGSRegionObject*);
} // 1813
//
if (!) {
_b1945: // from 2732
// 1958 call
CA::Render::ShmemBitmap::lod_width(unsigned int) const;
// 1975 call
CA::Render::ShmemBitmap::lod_height(unsigned int) const;
// 1989 call
CA::Render::ShmemBitmap::lod_data(unsigned int);
// 2007 call
CA::Render::ShmemBitmap::lod_rowbytes(unsigned int) const;
//
if (!) {
//
if () {
// gen jmp 2054
goto _f2054;
} //
else if () {
// gen jmp 2230
goto _f2230;
}
else { // 2048 next
_f2054: // from 2028
} // 2054
// 2085 call
CA::Render::ShmemBitmap::lod_width(unsigned int) const;
// 2106 call
CA::Render::ShmemBitmap::lod_height(unsigned int) const;
// 2119 call
CA::Render::ShmemBitmap::lod_data(unsigned int);
// 2137 call
CA::Render::ShmemBitmap::lod_rowbytes(unsigned int) const;
// 2220 call
CA::downsample_image(unsigned int, void const*, unsigned long, unsigned long, unsigned long, void*, unsigned long, double, double, double, double, unsigned int);
//
goto _f2715;
_f2230: // from 2048
} // 2230
//
if ()
goto _f3236;
// 2276 call
CAGetCachedCGBitmapContext;
//
if () {
// gen jmp 2495
goto _f2495;
}
else { // 2287 next
//
if (!) {
} // 2351
//
if ()
// gen jmp 2559
goto _f2559;
//
if ()
// gen jmp 2507
goto _f2507;
// 2461 call
CGSTransformRegion;
// 2476 call
CGContextReplacePathWithShapePath;
// 2488 call
CGSReleaseRegion;
//
goto _f2535;
_f2495: // from 2287
// 2461 call
CGSTransformRegion;
// 2476 call
CGContextReplacePathWithShapePath;
// 2488 call
CGSReleaseRegion;
} // 2495
//
goto _f2715;
_f2507: // from 2368
// 2530 call
CGContextReplacePathWithShapePath;
_f2535: // from 2493
// 2538 call
CGContextClip;
_f2559: // from 2359
//
if (!) {
// 2567 call
CGContextScaleCTM;
} // 2572
//
if (!) {
// 2625 call
CGContextClearRect;
} // 2634
// 2641 call
pthread_self;
// 2670 call
pthread_mutex_unlock;
// 2682 call
*-0x148(%rbp);
// 2691 call
pthread_mutex_lock;
// 2710 call
CAReleaseCachedCGContext;
_f2715: // from 2502
_f2715: // from 2225
//
if ()
goto _b1945;
} //
_f2774: // from 1747
//
if (!) {
// 2793 call
CGSReleaseRegion;
} // 2798
//
if (!) {
// 2806 call
CGSReleaseRegion;
} // 2811
//
if (!) {
// 2823 call
CGSReleaseRegion;
} // 2828
// 2831 call
CABackingStoreReleaseImages(CABackingStore*);
//
if (!) {
// 2850 call
*0x48(%rax);
} // 2855
// 2898 call
pthread_cond_broadcast;
_b2903: // from 3225
_f2903: // from 75
} //
} // 2903
// 2906 call
pthread_mutex_unlock;
_f2929: // from 234
// 3046 call
CGSTransformRegion;
// 3055 call
CGSReleaseRegion;
_f3076: // from 276
// 3140 call
CGSRectInRegion;
//
if (!) {
// 3166 call
CGSIntersectRegionWithRect;
// 3175 call
CGSRegionIsEmpty;
//
if (!) {
// 3188 call
CGSReleaseRegion;
} //
} //
_f3214: // from 215
_f3214: // from 192
//
if ()
goto _b311;
//
if ()
goto _b2903;
//
goto _b311;
// 3236 call
abort;
_f3236: // from 2234 }

by my tool

下面是lldb反汇编出来的代码:

QuartzCore`CABackingStoreUpdate_:
<+>: pushq %rbp
<+>: movq %rsp, %rbp
<+>: pushq %r15
<+>: pushq %r14
<+>: pushq %r13
<+>: pushq %r12
<+>: pushq %rbx
<+>: subq $0x198, %rsp
<+>: movq %r9, -0x148(%rbp)
<+>: movl %ecx, %r12d
<+>: movq %rdx, %r13
<+>: movq %rsi, -0xd8(%rbp)
<+>: movq %rdi, %r14
<+>: leaq 0x10(%r14), %r15
<+>: movq %r15, %rdi
<+>: callq 0x1096a9eb4 ; symbol stub for: pthread_mutex_lock
<+>: movq 0x168(%r14), %rbx
<+>: testq %rbx, %rbx
<+>: je 0x109567a71 ; <+116>
<+>: callq 0x1096a9ed8 ; symbol stub for: pthread_self
<+>: cmpq %rax, %rbx
<+>: je 0x109568554 ; <+2903>
<+>: cmpq $0x0, 0x168(%r14)
<+>: je 0x109567a71 ; <+116>
<+>: leaq 0x50(%r14), %rbx
<+>: movq %rbx, %rdi
<+>: movq %r15, %rsi
<+>: callq 0x1096a9e84 ; symbol stub for: pthread_cond_wait
<+>: cmpq $0x0, 0x168(%r14)
<+>: jne 0x109567a5c ; <+95>
<+>: movw 0x174(%r14), %cx
<+>: movq $0x0, -0x30(%rbp)
<+>: movq -0xd8(%rbp), %rax
<+>: cmpq %rax, 0x80(%r14)
<+>: jne 0x109567b16 ; <+281>
<+>: cmpq %r13, 0x88(%r14)
<+>: jne 0x109567b16 ; <+281>
<+>: movq %r13, -0xf8(%rbp)
<+>: movl %ecx, %ebx
<+>: shrl $0xa, %ebx
<+>: andb $0x1, %bl
<+>: jne 0x109567b34 ; <+311>
<+>: xorl %eax, %eax
<+>: testb $0x2, %ch
<+>: movl $0x0, %ebx
<+>: jne 0x10956868b ; <+3214>
<+>: movq 0x150(%r14), %rdi
<+>: xorl %eax, %eax
<+>: testq %rdi, %rdi
<+>: movl $0x0, %ebx
<+>: je 0x10956868b ; <+3214>
<+>: leaq -0x38(%rbp), %rsi
<+>: callq 0x1096a96e0 ; symbol stub for: CGSBoundingShapeGetRegion
<+>: testb $-0x80, %r12b
<+>: jne 0x10956856e ; <+2929>
<+>: movq -0x38(%rbp), %rdi
<+>: movq -0xf8(%rbp), %rbx
<+>: movd %rbx, %xmm2
<+>: punpckldq 0x143d5b(%rip), %xmm2
<+>: subpd 0x143d63(%rip), %xmm2
<+>: haddpd %xmm2, %xmm2
<+>: jmp 0x109568601 ; <+3076>
<+>: movq -0xd8(%rbp), %rax
<+>: movq %rax, 0x80(%r14)
<+>: movq %r13, 0x88(%r14)
<+>: movq %r13, -0xf8(%rbp)
<+>: movb $0x1, %bl
<+>: movq %rbx, -0x110(%rbp)
<+>: movq %r15, -0x138(%rbp)
<+>: movl %r12d, %eax
<+>: andl $0x1, %eax
<+>: leal 0x1(%rax,%rax), %eax
<+>: movl %eax, -0x104(%rbp)
<+>: leaq 0x138(%r14), %r15
<+>: movq 0x138(%r14), %rcx
<+>: movq %r14, -0x130(%rbp)
<+>: leaq 0x10(%rcx), %rax
<+>: movq 0x10(%rcx), %rdi
<+>: testq %rdi, %rdi
<+>: je 0x109567cae ; <+689>
<+>: movl %r12d, %r14d
<+>: movl %r12d, -0xf0(%rbp)
<+>: andl $0x4, %r14d
<+>: movq %rax, %r13
<+>: movq %rax, -0x118(%rbp)
<+>: movq %rcx, %rbx
<+>: movq %rcx, -0x100(%rbp)
<+>: movq %r15, %r12
<+>: xorl %esi, %esi
<+>: xorl %edx, %edx
<+>: callq 0x1095bc8c8 ; CA::Render::Shmem::set_volatile(bool, int)
<+>: testb %al, %al
<+>: je 0x109567cd8 ; <+731>
<+>: movq (%r13), %rax
<+>: testq %rax, %rax
<+>: je 0x109567cf8 ; <+763>
<+>: movq 0x18(%rax), %rax
<+>: movl -0x104(%rbp), %ecx
<+>: cmpl %ecx, 0x10(%rax)
<+>: jne 0x109567cd8 ; <+731>
<+>: movl 0x14(%rax), %ecx
<+>: cmpq -0xd8(%rbp), %rcx
<+>: jne 0x109567cd8 ; <+731>
<+>: movl 0x18(%rax), %ecx
<+>: cmpq -0xf8(%rbp), %rcx
<+>: jne 0x109567cd8 ; <+731>
<+>: testl %r14d, %r14d
<+>: setne %cl
<+>: cmpl $0x1, 0x1c(%rax)
<+>: seta %dl
<+>: movzbl %cl, %ecx
<+>: movzbl %dl, %edx
<+>: cmpl %edx, %ecx
<+>: jne 0x109567cd8 ; <+731>
<+>: cmpl $0x0, (%rax)
<+>: setne %al
<+>: movq %rbx, %rdx
<+>: je 0x109567c56 ; <+601>
<+>: cmpq $0x0, (%rdx)
<+>: jne 0x109567c82 ; <+645>
<+>: movq %rdx, %rax
<+>: movl 0x20(%rax), %edx
<+>: movq %rax, %rbx
<+>: incl %edx
<+>: movl $0x1e, %ecx
<+>: movq -0x130(%rbp), %rdi
<+>: movq 0x18(%rbp), %rsi
<+>: callq 0x1095686a6 ; CABackingStoreSynchronize(CABackingStore*, CA::GenericContext*, unsigned int, int)
<+>: movq (%r13), %rcx
<+>: movb $0x1, %al
<+>: testq %rcx, %rcx
<+>: je 0x109567c4f ; <+594>
<+>: movq 0x18(%rcx), %rax
<+>: cmpl $0x0, (%rax)
<+>: sete %al
<+>: xorb $0x1, %al
<+>: movq %rbx, %rdx
<+>: jmp 0x109567c82 ; <+645>
<+>: cmpq -0x100(%rbp), %rdx
<+>: je 0x109567c82 ; <+645>
<+>: cmpq $0x0, (%rdx)
<+>: je 0x109567c82 ; <+645>
<+>: movq %rdx, %rbx
<+>: movl 0x20(%rbx), %edx
<+>: xorl %ecx, %ecx
<+>: movq -0x130(%rbp), %rdi
<+>: movq 0x18(%rbp), %rsi
<+>: callq 0x1095686a6 ; CABackingStoreSynchronize(CABackingStore*, CA::GenericContext*, unsigned int, int)
<+>: movq %rbx, %rdx
<+>: xorb $0x1, %al
<+>: testb %al, %al
<+>: je 0x109567ccc ; <+719>
<+>: movq (%rdx), %rcx
<+>: testq %rcx, %rcx
<+>: je 0x109567d04 ; <+775>
<+>: testb %al, %al
<+>: je 0x109567ccc ; <+719>
<+>: movq %rdx, %r12
<+>: leaq 0x10(%rcx), %r13
<+>: movq 0x10(%rcx), %rdi
<+>: testq %rdi, %rdi
<+>: movq %rcx, %rbx
<+>: jne 0x109567b9d ; <+416>
<+>: movq %rcx, %rdx
<+>: jmp 0x109567ccc ; <+719>
<+>: movl %r12d, -0xf0(%rbp)
<+>: movq %rax, %r13
<+>: movq %rax, -0x118(%rbp)
<+>: movq %rcx, -0x100(%rbp)
<+>: movq %rcx, %rdx
<+>: movq %r15, %r12
<+>: movq -0x110(%rbp), %rax
<+>: movb %al, %r14b
<+>: jmp 0x109567d47 ; <+842>
<+>: cmpq -0x100(%rbp), %rbx
<+>: movb $0x1, %r14b
<+>: je 0x109567cee ; <+753>
<+>: movq -0x110(%rbp), %rax
<+>: movb %al, %r14b
<+>: movq %rbx, %rdi
<+>: callq 0x10956795f ; CABackingStoreDeleteBuffer(CABackingStoreBuffer*)
<+>: jmp 0x109567d44 ; <+839>
<+>: movq -0x110(%rbp), %rax
<+>: movb %al, %r14b
<+>: jmp 0x109567d44 ; <+839>
<+>: cmpq -0x100(%rbp), %rdx
<+>: movb $0x1, %r14b
<+>: je 0x109567d1a ; <+797>
<+>: movq -0x110(%rbp), %rax
<+>: movb %al, %r14b
<+>: movq %rdx, %rdi
<+>: movq %rdx, %rbx
<+>: callq 0x10956795f ; CABackingStoreDeleteBuffer(CABackingStoreBuffer*)
<+>: callq 0x10955cf14 ; CAGetDebugFlags
<+>: testb $0x20, %ah
<+>: je 0x109567d44 ; <+839>
<+>: leaq 0x156592(%rip), %rdi ; "CoreAnimation: triple buffered backing store %p\n"
<+>: xorl %eax, %eax
<+>: movq -0x130(%rbp), %rsi
<+>: callq 0x1096a70ef ; x_log
<+>: movq %rbx, %rdx
<+>: cmpq (%r15), %rdx
<+>: je 0x109567d6c ; <+879>
<+>: movq (%rdx), %rax
<+>: movq %rax, (%r12)
<+>: movq (%r15), %rax
<+>: movq %rax, (%rdx)
<+>: movq %rdx, (%r15)
<+>: movq -0x138(%rbp), %r15
<+>: movq -0x130(%rbp), %r12
<+>: jmp 0x109567d83 ; <+902>
<+>: testq %rdx, %rdx
<+>: movq -0x138(%rbp), %r15
<+>: movq -0x130(%rbp), %r12
<+>: je 0x109568554 ; <+2903>
<+>: movq (%r13), %rax
<+>: testq %rax, %rax
<+>: je 0x109567d98 ; <+923>
<+>: movq %rax, -0x110(%rbp)
<+>: jmp 0x109567e38 ; <+1083>
<+>: movb %r14b, %al
<+>: cmpq -0x100(%rbp), %rdx
<+>: movb $0x1, %r14b
<+>: je 0x109567daa ; <+941>
<+>: movb %al, %r14b
<+>: movq %rdx, %rdi
<+>: movq %rdx, %rbx
<+>: callq 0x10956795f ; CABackingStoreDeleteBuffer(CABackingStoreBuffer*)
<+>: movl -0xf0(%rbp), %eax
<+>: testb $0x4, %al
<+>: movl $0x1, %ecx
<+>: je 0x109567e01 ; <+1028>
<+>: movl -0x104(%rbp), %edi
<+>: callq 0x109598be2 ; CA::Render::format_mipmap_min_size(unsigned int)
<+>: movq -0xf8(%rbp), %rsi
<+>: cmpl %eax, %esi
<+>: movl $0x1, %ecx
<+>: ja 0x109567dec ; <+1007>
<+>: movq -0xd8(%rbp), %rdx
<+>: cmpl %eax, %edx
<+>: jbe 0x109567e01 ; <+1028>
<+>: jmp 0x109567df3 ; <+1014>
<+>: movq -0xd8(%rbp), %rdx
<+>: incl %ecx
<+>: shrl %edx
<+>: shrl %esi
<+>: cmpl %eax, %esi
<+>: ja 0x109567df3 ; <+1014>
<+>: cmpl %eax, %edx
<+>: ja 0x109567df3 ; <+1014>
<+>: movl -0x104(%rbp), %edi
<+>: movq -0xd8(%rbp), %rsi
<+>: movq -0xf8(%rbp), %rdx
<+>: callq 0x1095bcd16 ; CA::Render::Shmem::new_bitmap(unsigned int, unsigned int, unsigned int, unsigned int)
<+>: movq %rax, (%r13)
<+>: testq %rax, %rax
<+>: movq %rbx, %rdx
<+>: je 0x109568554 ; <+2903>
<+>: movq %rax, -0x110(%rbp)
<+>: andl $-0x3, -0xf0(%rbp)
<+>: movb %r14b, %r13b
<+>: movq 0x8(%rdx), %rdi
<+>: cmpq 0x90(%r12), %rdi
<+>: je 0x109567e8e ; <+1169>
<+>: movq %rdx, %r14
<+>: callq 0x1096a931a ; symbol stub for: CGColorSpaceRelease
<+>: movq 0x90(%r12), %rdi
<+>: callq 0x1096a9320 ; symbol stub for: CGColorSpaceRetain
<+>: movq %r14, %rdx
<+>: movq %rax, 0x8(%rdx)
<+>: movq -0x100(%rbp), %rcx
<+>: cmpq 0x8(%rcx), %rax
<+>: je 0x109567e8e ; <+1169>
<+>: movq 0x18(%rdx), %rdi
<+>: testq %rdi, %rdi
<+>: je 0x109567e8e ; <+1169>
<+>: movq %rdx, %r14
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movq %r14, %rdx
<+>: movq $0x0, 0x18(%rdx)
<+>: movq %r15, -0x138(%rbp)
<+>: movq 0x150(%r12), %rdi
<+>: testq %rdi, %rdi
<+>: je 0x109567ead ; <+1200>
<+>: movq %rdx, %rbx
<+>: callq 0x1096a96ec ; symbol stub for: CGSBoundingShapeReset
<+>: movq %rbx, %rdx
<+>: movzwl 0x174(%r12), %eax
<+>: andl $0xf8ff, %eax
<+>: orl $0x200, %eax
<+>: movw %ax, 0x174(%r12)
<+>: movq 0x18(%rdx), %rax
<+>: movq %rax, -0x178(%rbp)
<+>: movq 0x138(%r12), %rbx
<+>: movb %r13b, %r12b
<+>: movb %r13b, -0x120(%rbp)
<+>: andb $0x1, %r12b
<+>: testq %rbx, %rbx
<+>: je 0x109567f5d ; <+1376>
<+>: leaq -0x98(%rbp), %r15
<+>: leaq 0x18(%rbx), %r13
<+>: cmpq %rdx, %rbx
<+>: je 0x109567f35 ; <+1336>
<+>: movq (%r13), %rax
<+>: testq %rax, %rax
<+>: je 0x109567f55 ; <+1368>
<+>: movq %rdx, %r14
<+>: testb %r12b, %r12b
<+>: jne 0x109567f42 ; <+1349>
<+>: movq -0x30(%rbp), %rdi
<+>: movq %rax, %rsi
<+>: movq %r15, %rdx
<+>: callq 0x1096a9734 ; symbol stub for: CGSUnionRegion
<+>: movq (%r13), %rdi
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movq -0x98(%rbp), %rax
<+>: movq %rax, (%r13)
<+>: jmp 0x109567f52 ; <+1365>
<+>: movq %r13, %rdi
<+>: movq %rdx, %r14
<+>: callq 0x1096a96fe ; symbol stub for: CGSNewEmptyRegion
<+>: jmp 0x109567f52 ; <+1365>
<+>: movq %rax, %rdi
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movq $0x0, (%r13)
<+>: movq %r14, %rdx
<+>: movq (%rbx), %rbx
<+>: testq %rbx, %rbx
<+>: jne 0x109567ef6 ; <+1273>
<+>: movq %rdx, -0x140(%rbp)
<+>: movq $0x0, -0xa0(%rbp)
<+>: cmpq -0x100(%rbp), %rdx
<+>: movq -0xf8(%rbp), %rax
<+>: movq -0x178(%rbp), %r13
<+>: je 0x10956805e ; <+1633>
<+>: testb %r12b, %r12b
<+>: jne 0x10956805e ; <+1633>
<+>: testq %r13, %r13
<+>: je 0x109567fb0 ; <+1459>
<+>: movq -0x30(%rbp), %rsi
<+>: leaq -0xa0(%rbp), %rdx
<+>: movq %r13, %rdi
<+>: callq 0x1096a96f2 ; symbol stub for: CGSDiffRegion
<+>: jmp 0x109568037 ; <+1594>
<+>: movq -0xd8(%rbp), %xmm0
<+>: movdqa 0x1438a0(%rip), %xmm1
<+>: punpckldq %xmm1, %xmm0
<+>: movapd 0x1438a4(%rip), %xmm2
<+>: subpd %xmm2, %xmm0
<+>: haddpd %xmm0, %xmm0
<+>: movd %rax, %xmm3
<+>: punpckldq %xmm1, %xmm3
<+>: subpd %xmm2, %xmm3
<+>: haddpd %xmm3, %xmm3
<+>: pxor %xmm1, %xmm1
<+>: movdqa %xmm1, -0xc0(%rbp)
<+>: movlpd %xmm0, -0xb0(%rbp)
<+>: movlpd %xmm3, -0xa8(%rbp)
<+>: leaq -0xc0(%rbp), %rdi
<+>: leaq -0xc8(%rbp), %rsi
<+>: callq 0x1096a9704 ; symbol stub for: CGSNewRegionWithRect
<+>: movq -0xc8(%rbp), %rdi
<+>: movq -0x30(%rbp), %rsi
<+>: leaq -0xa0(%rbp), %rdx
<+>: callq 0x1096a96f2 ; symbol stub for: CGSDiffRegion
<+>: movq -0xc8(%rbp), %rdi
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movq -0xa0(%rbp), %rdi
<+>: callq 0x1096a971c ; symbol stub for: CGSRegionIsEmpty
<+>: testb %al, %al
<+>: je 0x10956805e ; <+1633>
<+>: movq -0xa0(%rbp), %rdi
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movq $0x0, -0xa0(%rbp)
<+>: movq -0x110(%rbp), %rcx
<+>: testq %rcx, %rcx
<+>: je 0x1095680ae ; <+1713>
<+>: movq 0x18(%rcx), %r15
<+>: movq -0xa0(%rbp), %rdx
<+>: testq %rdx, %rdx
<+>: je 0x1095680d5 ; <+1752>
<+>: movq -0x118(%rbp), %rax
<+>: movq (%rax), %rax
<+>: movb $0x1, %r13b
<+>: testq %rax, %rax
<+>: movq -0x130(%rbp), %r12
<+>: je 0x1095680e3 ; <+1766>
<+>: movq 0x18(%rax), %rsi
<+>: movq %r15, %rdi
<+>: movq %rcx, %rbx
<+>: callq 0x1095bd09e ; CA::Render::ShmemBitmap::copy_pixels(CA::Render::ShmemBitmap const*, CGSRegionObject*)
<+>: movq %rbx, %rcx
<+>: movb -0x120(%rbp), %r13b
<+>: jmp 0x1095680e3 ; <+1766>
<+>: xorl %ecx, %ecx
<+>: testb %r12b, %r12b
<+>: movq -0x30(%rbp), %rdi
<+>: cmoveq %rdi, %rcx
<+>: movq -0x130(%rbp), %rbx
<+>: leaq 0x158(%rbx), %rax
<+>: movq %rcx, 0x158(%rbx)
<+>: jmp 0x1095684d3 ; <+2774>
<+>: movb -0x120(%rbp), %r13b
<+>: movq -0x130(%rbp), %r12
<+>: andb $0x1, %r13b
<+>: movl -0xf0(%rbp), %ebx
<+>: testb $0x2, %bl
<+>: je 0x109568112 ; <+1813>
<+>: xorl %eax, %eax
<+>: testb %r13b, %r13b
<+>: movq -0x30(%rbp), %rdx
<+>: cmovneq %rax, %rdx
<+>: xorl %esi, %esi
<+>: movq %r15, %rdi
<+>: movq %rcx, %r14
<+>: callq 0x1095bd350 ; CA::Render::ShmemBitmap::fill_pixels(unsigned int, CGSRegionObject*)
<+>: movq %r14, %rcx
<+>: andl $-0x3, %ebx
<+>: movl %ebx, %r14d
<+>: xorl %r15d, %r15d
<+>: testb %r13b, %r13b
<+>: movb %r13b, -0x149(%rbp)
<+>: movq -0x30(%rbp), %rax
<+>: cmovneq %r15, %rax
<+>: movq %rax, 0x158(%r12)
<+>: movq 0x18(%rcx), %rax
<+>: movq %rax, -0x100(%rbp)
<+>: movl 0x1c(%rax), %eax
<+>: movl %eax, -0x110(%rbp)
<+>: testl %eax, %eax
<+>: je 0x1095684af ; <+2738>
<+>: movq -0xd8(%rbp), %xmm2
<+>: movdqa 0x143702(%rip), %xmm0
<+>: punpckldq %xmm0, %xmm2
<+>: movapd 0x143706(%rip), %xmm1
<+>: subpd %xmm1, %xmm2
<+>: haddpd %xmm2, %xmm2
<+>: movapd %xmm2, -0x160(%rbp)
<+>: movq -0xf8(%rbp), %xmm2
<+>: punpckldq %xmm0, %xmm2
<+>: subpd %xmm1, %xmm2
<+>: haddpd %xmm2, %xmm2
<+>: movapd %xmm2, -0x170(%rbp)
<+>: movq -0x100(%rbp), %rbx
<+>: movq %rbx, %rdi
<+>: movl %r15d, %esi
<+>: callq 0x1095bd4fa ; CA::Render::ShmemBitmap::lod_width(unsigned int) const
<+>: movl %eax, -0xd8(%rbp)
<+>: movq %rbx, %rdi
<+>: movl %r15d, %esi
<+>: callq 0x1095bd338 ; CA::Render::ShmemBitmap::lod_height(unsigned int) const
<+>: movl %eax, %r12d
<+>: movq %rbx, %rdi
<+>: movl %r15d, %esi
<+>: callq 0x1095bd2ba ; CA::Render::ShmemBitmap::lod_data(unsigned int)
<+>: movq %rax, -0xf8(%rbp)
<+>: movq %rbx, %rdi
<+>: movl %r15d, %esi
<+>: callq 0x1095bcf5e ; CA::Render::ShmemBitmap::lod_rowbytes(unsigned int) const
<+>: movq %rax, %rbx
<+>: testl %r15d, %r15d
<+>: je 0x1095682b3 ; <+2230>
<+>: testb $0x28, %r14b
<+>: jne 0x109568203 ; <+2054>
<+>: movl -0xd8(%rbp), %ecx
<+>: cmpl %r12d, %ecx
<+>: movl %r12d, %eax
<+>: cmoval %ecx, %eax
<+>: cmpl $0x7, %eax
<+>: ja 0x1095682b3 ; <+2230>
<+>: movl %r14d, -0xf0(%rbp)
<+>: leal -0x1(%r15), %r14d
<+>: movq -0x100(%rbp), %r13
<+>: movq %r13, %rdi
<+>: movl %r14d, %esi
<+>: movq %rbx, -0x118(%rbp)
<+>: callq 0x1095bd4fa ; CA::Render::ShmemBitmap::lod_width(unsigned int) const
<+>: movl %r12d, -0x124(%rbp)
<+>: movl %eax, %r12d
<+>: movq %r13, %rdi
<+>: movl %r14d, %esi
<+>: callq 0x1095bd338 ; CA::Render::ShmemBitmap::lod_height(unsigned int) const
<+>: movl %eax, %ebx
<+>: movq %r13, %rdi
<+>: movl %r14d, %esi
<+>: callq 0x1095bd2ba ; CA::Render::ShmemBitmap::lod_data(unsigned int)
<+>: movq %rax, -0x120(%rbp)
<+>: movq %r13, %rdi
<+>: movl %r14d, %esi
<+>: callq 0x1095bcf5e ; CA::Render::ShmemBitmap::lod_rowbytes(unsigned int) const
<+>: movl %r12d, %ecx
<+>: movl %ebx, %r8d
<+>: movl -0xd8(%rbp), %edx
<+>: cvtsi2sdq %rdx, %xmm2
<+>: movl -0x124(%rbp), %edx
<+>: cvtsi2sdq %rdx, %xmm3
<+>: movq -0x118(%rbp), %rdx
<+>: movq %rdx, (%rsp)
<+>: movl $0x0, 0x8(%rsp)
<+>: pxor %xmm0, %xmm0
<+>: xorpd %xmm1, %xmm1
<+>: movl -0x104(%rbp), %edi
<+>: movq -0x120(%rbp), %rsi
<+>: movq %rax, %rdx
<+>: movq -0xf8(%rbp), %r9
<+>: callq 0x10956cdfa ; CA::downsample_image(unsigned int, void const*, unsigned long, unsigned long, unsigned long, void*, unsigned long, double, double, double, double, unsigned int)
<+>: jmp 0x109568498 ; <+2715>
<+>: testb $0x20, %r14b
<+>: jne 0x1095686a1 ; <+3236>
<+>: movq -0x140(%rbp), %rax
<+>: movq 0x8(%rax), %r9
<+>: movq -0xf8(%rbp), %rdi
<+>: movl -0xd8(%rbp), %esi
<+>: movl %r12d, %edx
<+>: movl -0x104(%rbp), %ecx
<+>: movq %rbx, %r8
<+>: callq 0x10956b012 ; CAGetCachedCGBitmapContext
<+>: movq %rax, %r13
<+>: testq %r13, %r13
<+>: je 0x1095683bc ; <+2495>
<+>: testl %r15d, %r15d
<+>: movsd 0x143553(%rip), %xmm0
<+>: movapd %xmm0, %xmm1
<+>: je 0x10956832c ; <+2351>
<+>: movl -0xd8(%rbp), %eax
<+>: xorps %xmm0, %xmm0
<+>: cvtsi2sdq %rax, %xmm0
<+>: divsd -0x160(%rbp), %xmm0
<+>: movl %r12d, %eax
<+>: xorps %xmm1, %xmm1
<+>: cvtsi2sdq %rax, %xmm1
<+>: divsd -0x170(%rbp), %xmm1
<+>: movb -0x149(%rbp), %al
<+>: testb %al, %al
<+>: jne 0x1095683fc ; <+2559>
<+>: testl %r15d, %r15d
<+>: je 0x1095683c8 ; <+2507>
<+>: movsd %xmm0, -0x70(%rbp)
<+>: movsd %xmm0, -0xd8(%rbp)
<+>: movsd %xmm1, -0x58(%rbp)
<+>: movsd %xmm1, -0xf0(%rbp)
<+>: leaq -0x68(%rbp), %rax
<+>: movq $0x0, 0x8(%rax)
<+>: movq $0x0, (%rax)
<+>: leaq -0x50(%rbp), %rax
<+>: movq $0x0, 0x8(%rax)
<+>: movq $0x0, (%rax)
<+>: movq -0x30(%rbp), %rdi
<+>: leaq -0x70(%rbp), %rsi
<+>: movss 0x14350d(%rip), %xmm0
<+>: leaq -0xd0(%rbp), %rdx
<+>: callq 0x1096a972e ; symbol stub for: CGSTransformRegion
<+>: movq -0xd0(%rbp), %rsi
<+>: movq %r13, %rdi
<+>: callq 0x1096a93d4 ; symbol stub for: CGContextReplacePathWithShapePath
<+>: movq -0xd0(%rbp), %rdi
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: jmp 0x1095683e4 ; <+2535>
<+>: movl %r14d, -0xf0(%rbp)
<+>: jmp 0x109568498 ; <+2715>
<+>: movsd %xmm1, -0xf0(%rbp)
<+>: movsd %xmm0, -0xd8(%rbp)
<+>: movq -0x30(%rbp), %rsi
<+>: movq %r13, %rdi
<+>: callq 0x1096a93d4 ; symbol stub for: CGContextReplacePathWithShapePath
<+>: movq %r13, %rdi
<+>: callq 0x1096a9368 ; symbol stub for: CGContextClip
<+>: movsd -0xd8(%rbp), %xmm0
<+>: movsd -0xf0(%rbp), %xmm1
<+>: testl %r15d, %r15d
<+>: je 0x109568409 ; <+2572>
<+>: movq %r13, %rdi
<+>: callq 0x1096a93ec ; symbol stub for: CGContextScaleCTM
<+>: testb $0x2, %r14b
<+>: je 0x109568447 ; <+2634>
<+>: movq 0x174c0a(%rip), %rax ; (void *)0x00000001094d6d30: CGRectInfinite
<+>: movq %rax, %rcx
<+>: movq 0x18(%rcx), %rax
<+>: movq %rax, 0x18(%rsp)
<+>: movq 0x10(%rcx), %rax
<+>: movq %rax, 0x10(%rsp)
<+>: movq (%rcx), %rax
<+>: movq 0x8(%rcx), %rcx
<+>: movq %rcx, 0x8(%rsp)
<+>: movq %rax, (%rsp)
<+>: movq %r13, %rdi
<+>: callq 0x1096a9362 ; symbol stub for: CGContextClearRect
<+>: andl $-0x3, %r14d
<+>: movl %r14d, -0xf0(%rbp)
<+>: callq 0x1096a9ed8 ; symbol stub for: pthread_self
<+>: movq -0x130(%rbp), %r14
<+>: movq %rax, 0x168(%r14)
<+>: movq -0x138(%rbp), %rbx
<+>: movq %rbx, %rdi
<+>: callq 0x1096a9ec0 ; symbol stub for: pthread_mutex_unlock
<+>: movq %r13, %rdi
<+>: movq 0x10(%rbp), %rsi
<+>: callq *-0x148(%rbp)
<+>: movq %rbx, %rdi
<+>: callq 0x1096a9eb4 ; symbol stub for: pthread_mutex_lock
<+>: movq $0x0, 0x168(%r14)
<+>: movq %r13, %rdi
<+>: callq 0x10956b186 ; CAReleaseCachedCGContext
<+>: incl %r15d
<+>: cmpl -0x110(%rbp), %r15d
<+>: movl -0xf0(%rbp), %r14d
<+>: jb 0x109568196 ; <+1945>
<+>: movq -0x130(%rbp), %rbx
<+>: leaq 0x158(%rbx), %rax
<+>: movq -0x100(%rbp), %rcx
<+>: lock
<+>: incl 0x4(%rcx)
<+>: movq -0x30(%rbp), %rdi
<+>: movq -0x178(%rbp), %r13
<+>: movq $0x0, (%rax)
<+>: testq %rdi, %rdi
<+>: movq -0x138(%rbp), %r15
<+>: je 0x1095684eb ; <+2798>
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: testq %r13, %r13
<+>: je 0x1095684f8 ; <+2811>
<+>: movq %r13, %rdi
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movq -0xa0(%rbp), %rdi
<+>: testq %rdi, %rdi
<+>: je 0x109568509 ; <+2828>
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movq %rbx, %rdi
<+>: callq 0x109567917 ; CABackingStoreReleaseImages(CABackingStore*)
<+>: xorl %eax, %eax
<+>: movq 0x18(%rbp), %rdi
<+>: testq %rdi, %rdi
<+>: je 0x109568524 ; <+2855>
<+>: movq (%rdi), %rax
<+>: callq *0x48(%rax)
<+>: incl %eax
<+>: movq -0x140(%rbp), %rcx
<+>: movl %eax, 0x20(%rcx)
<+>: movq $0x0, 0x28(%rcx)
<+>: movq $0x0, 0x160(%rbx)
<+>: movb $0x6, 0x174(%rbx)
<+>: addq $0x50, %rbx
<+>: movq %rbx, %rdi
<+>: callq 0x1096a9e6c ; symbol stub for: pthread_cond_broadcast
<+>: movq %r15, %rdi
<+>: callq 0x1096a9ec0 ; symbol stub for: pthread_mutex_unlock
<+>: addq $0x198, %rsp
<+>: popq %rbx
<+>: popq %r12
<+>: popq %r13
<+>: popq %r14
<+>: popq %r15
<+>: popq %rbp
<+>: retq
<+>: movabsq $0x3ff0000000000000, %rax
<+>: movq %rax, -0x70(%rbp)
<+>: movq $0x0, -0x60(%rbp)
<+>: movq $0x0, -0x68(%rbp)
<+>: movabsq $-0x4010000000000000, %rax
<+>: movq %rax, -0x58(%rbp)
<+>: movq $0x0, -0x50(%rbp)
<+>: movq -0xf8(%rbp), %rbx
<+>: movd %rbx, %xmm0
<+>: punpckldq 0x1432aa(%rip), %xmm0
<+>: subpd 0x1432b2(%rip), %xmm0
<+>: haddpd %xmm0, %xmm0
<+>: movapd %xmm0, -0xf0(%rbp)
<+>: movlpd %xmm0, -0x48(%rbp)
<+>: movq -0x38(%rbp), %rdi
<+>: leaq -0x70(%rbp), %rsi
<+>: movss 0x1432c1(%rip), %xmm0
<+>: leaq -0x40(%rbp), %rdx
<+>: callq 0x1096a972e ; symbol stub for: CGSTransformRegion
<+>: movq -0x38(%rbp), %rdi
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movapd -0xf0(%rbp), %xmm2
<+>: movq -0x40(%rbp), %rdi
<+>: movq %rdi, -0x38(%rbp)
<+>: movq %rbx, -0xf8(%rbp)
<+>: movq -0xd8(%rbp), %xmm0
<+>: punpckldq 0x143248(%rip), %xmm0
<+>: subpd 0x143250(%rip), %xmm0
<+>: haddpd %xmm0, %xmm0
<+>: pxor %xmm1, %xmm1
<+>: movdqa %xmm1, -0x90(%rbp)
<+>: movlpd %xmm0, -0x80(%rbp)
<+>: movsd %xmm2, -0x78(%rbp)
<+>: leaq -0x90(%rbp), %rsi
<+>: callq 0x1096a9710 ; symbol stub for: CGSRectInRegion
<+>: movb %al, %bl
<+>: testb %bl, %bl
<+>: jne 0x10956867e ; <+3201>
<+>: movq -0x38(%rbp), %rdi
<+>: leaq -0x90(%rbp), %rsi
<+>: leaq -0x30(%rbp), %rdx
<+>: callq 0x1096a96f8 ; symbol stub for: CGSIntersectRegionWithRect
<+>: movq -0x30(%rbp), %rdi
<+>: callq 0x1096a971c ; symbol stub for: CGSRegionIsEmpty
<+>: testb %al, %al
<+>: je 0x10956867e ; <+3201>
<+>: movq -0x30(%rbp), %rdi
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movq $0x0, -0x30(%rbp)
<+>: movq -0x38(%rbp), %rdi
<+>: callq 0x1096a9722 ; symbol stub for: CGSReleaseRegion
<+>: movq -0x30(%rbp), %rax
<+>: testb %bl, %bl
<+>: jne 0x109567b34 ; <+311>
<+>: testq %rax, %rax
<+>: je 0x109568554 ; <+2903>
<+>: jmp 0x109567b34 ; <+311>
<+>: callq 0x1096a9bb4 ; symbol stub for: abort

QuartzCore`CABackingStoreUpdate_的反汇编代码

自制反汇编逆向分析工具 与hopper逆向输出对比的更多相关文章

  1. Android逆向分析工具表

    逆向分析工具表 工具 描述 网址 androidterm Android Terminal Emulator http://code.google.com/p/androidterm/ droidbo ...

  2. Android动态逆向分析工具ZjDroid--脱壳神器

    项目地址:https://github.com/BaiduSecurityLabs/ZjDroid 前提条件: 1.Root手机一部 2.须要通过Xposed installer( http://dl ...

  3. 安卓动态逆向分析工具--Andbug&Androguard

    工具使用方法: 转自: http://bbs.pediy.com/showthread.php?t=183412 https://testerhome.com/topics/3542 安装andbug ...

  4. IM通信协议逆向分析、Wireshark自定义数据包格式解析插件编程学习

    相关学习资料 http://hi.baidu.com/hucyuansheng/item/bf2bfddefd1ee70ad68ed04d http://en.wikipedia.org/wiki/I ...

  5. 一文了解安卓APP逆向分析与保护机制

    "知物由学"是网易云易盾打造的一个品牌栏目,词语出自汉·王充<论衡·实知>.人,能力有高下之分,学习才知道事物的道理,而后才有智慧,不去求问就不会知道."知物 ...

  6. cm2 逆向分析

    目录 cm2 逆向分析 前言 查壳 逆向分析 encrypt函数 POC代码 cm2 逆向分析 前言 这是逆向实战之CTF比赛篇的第3篇,在这里我就不再讲的特别小白了,有些简单操作可能会略过. 查壳 ...

  7. C++反汇编与逆向分析技术揭秘

    C++反汇编-继承和多重继承   学无止尽,积土成山,积水成渊-<C++反汇编与逆向分析技术揭秘> 读书笔记 一.单类继承 在父类中声明为私有的成员,子类对象无法直接访问,但是在子类对象的 ...

  8. 《C++反汇编与逆向分析技术揭秘》--算术运算和赋值

    一.加法 1.Debug下: 14: int nVarOne0 = 1 + 5 - 3 * 6;//编译时计算得到结果 00C0550E C7 45 F8 F4 FF FF FF mov dword ...

  9. 《C++反汇编与逆向分析技术揭秘》--认识启动函数,找到用户入口

    <C++反汇编与逆向分析>和<程序员的自我修养>都是以VC6的代码作为例子讲解的.这里是在vs2017下,CRT代码有些区别,但整体流程上都是初始化环境,设置参数,最后转到用户 ...

随机推荐

  1. 开源造轮子:一个简洁,高效,轻量级,酷炫的不要不要的canvas粒子运动插件库

    一:开篇 哈哈哈,感谢标题党的莅临~ 虽然标题有点夸张的感觉,但实际上,插件库确实是简洁,高效,轻量级,酷炫酷炫的咯.废话不多说,先来看个标配例子吧: (codepen在线演示编辑:http://co ...

  2. 解决js计算0.1+0.2 !==0.3

    经常做用js数据运算的同学应该了解,在js中,0.1+0.2不会等于0.3,而是等于: 我一开始发现这个bug的时候也觉得很奇怪,那怎么去解决这个bug,让0.1+0.2 最后能得到0.3呢? 方法一 ...

  3. 下载达 10 万次的 IDEA 插件,K8s 一键部署了解一下?

    作者 | 铃儿响叮当 导读:涉及开发的技术人员,永远绕不开的就是将应用部署到相应服务器上,本文将给大家讲解:对于容器服务 ACK,怎么实现真正"一键部署",提高开发部署效率,在 K ...

  4. Java中Object类hashCode的底层实现

    Java中Object类hashCode的底层实现 openjdk\jdk\src\share\native\java\lang\Object.c 42 static JNINativeMethod ...

  5. Hadoop 在 windows 7 64位的配置(一)|非cygwin

    参照原文   http://blog.csdn.net/supperman_009/article/details/39991809 环境: Hadoop-2.4.1 Windows 7 64位 jd ...

  6. 函数进阶(三) day14

    目录 昨日内容 迭代器 可迭代对象 迭代器对象 for循环原理 三元表达式 列表推导式 字典生成式 zip 生成器表达式 生成器 yield 递归 今日内容 匿名函数 内置方法 掌握 了解 异常处理 ...

  7. UnityWebRequest_ZT

    using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using U ...

  8. SpringBoot整合MybatisPlus3.X之分页插件(四)

    注:详细请看2.X博客中,3.X直接上代码. 建议装一个MybatisX插件,可以在Mapper和Xml来回切换 pom.xml <dependencies> <dependency ...

  9. SpringBoot整合MybatisPlus3.X之逻辑删除(三)

    pom.xml <dependencies> <dependency> <groupId>org.springframework.boot</groupId& ...

  10. foreach数组并直接改变数组内容

    <?php $arr = array(1, 2, 3, 4); foreach ($arr as &$value) { $value = $value * 2; } // $arr is ...