-
-
[求助]请问这段IDA反编译出来的代码大概是什么意思?
-
发表于: 2012-3-8 16:33 4379
-
此函数出现在CView子类里的OnDraw函数中,我想找哪一段是画水印的,我想把水印去掉,各位有何高见请不吝赐教
void __userpurge CFOPCanvasCore::Draw(int a1<ecx>, int a2<ebx>, int a3)
{
int v3; // esi@1
int v4; // eax@3
int v5; // eax@4
int v6; // eax@5
int v7; // eax@11
int v8; // eax@19
int v9; // ebx@19
HDC hDC; // ebp@22
int v11; // [sp+4Ch] [bp-7Ch]@5
int v12; // [sp+50h] [bp-78h]@7
char v13; // [sp+5Ch] [bp-6Ch]@5
char v14; // [sp+60h] [bp-68h]@19
char v15; // [sp+78h] [bp-50h]@19
struct tagRECT Rect; // [sp+7Ch] [bp-4Ch]@4
struct tagRECT rcDst; // [sp+8Ch] [bp-3Ch]@10
struct tagRECT rc; // [sp+9Ch] [bp-2Ch]@6
char v19; // [sp+ACh] [bp-1Ch]@6
int v20; // [sp+C4h] [bp-4h]@11
v3 = a1;
if ( *(_DWORD *)(a1 + 1588) )
{
if ( *(_DWORD *)(a1 + 1440) )
{
(*(void (**)(void))(*(_DWORD *)a1 + 428))();
(*(void (__thiscall **)(int))(*(_DWORD *)v3 + 2072))(v3);
v4 = CFOPCanvasCore::GetCurrentModel(v3);
(*(void (__thiscall **)(int, signed int, _DWORD))(*(_DWORD *)v4 + 40))(v4, 1000, 0);
*(_DWORD *)(v3 + 1440) = 0;
}
v5 = CFOMaskData::SetMaxLength(v3);
if ( !GetUpdateRect(*(HWND *)(v5 + 32), &Rect, 0) )
{
(*(void (__thiscall **)(int, char *))(*(_DWORD *)v3 + 8))(v3, &v13);
v6 = (*(int (__thiscall **)(int, int *))(*(_DWORD *)v3 + 2048))(v3, &v11);
Rect.left = *(_DWORD *)v6;
Rect.top = *(_DWORD *)(v6 + 4);
Rect.right = *(_DWORD *)(v6 + 8);
Rect.bottom = *(_DWORD *)(v6 + 12);
CRect::InflateRect(&Rect, &v13);
}
CRect::NormalizeRect(&Rect);
InflateRect(&Rect, 20, 20);
(*(void (__thiscall **)(int, char *))(*(_DWORD *)v3 + 8))(v3, &v19);
(*(void (__thiscall **)(int, struct tagRECT *))(*(_DWORD *)v3 + 2048))(v3, &rc);
InflateRect(&rc, 10, 10);
CRect::InflateRect(&rc, &v19);
if ( !(*(int (__thiscall **)(int))(*(_DWORD *)v3 + 1080))(v3) )
{
(*(void (__thiscall **)(int, int *))(*(_DWORD *)v3 + 264))(v3, &v11);
CRect::InflateRect(&rc, 0, 0, v11, v12);
}
if ( (*(int (__thiscall **)(int))(*(_DWORD *)v3 + 2320))(v3) != 1 )// //
rc.bottom -= 26;
rcDst.left = Rect.left;
rcDst.top = Rect.top;
rcDst.right = Rect.right;
rcDst.bottom = Rect.bottom;
IntersectRect(&rcDst, &rcDst, &rc);
if ( *(_DWORD *)(v3 + 1492) )
{
CFOWndDC::CFOWndDC(v3, 0);
v7 = *(_DWORD *)(v3 + 2528);
v20 = 0;
if ( v7 )
{
(*(void (__thiscall **)(int, char *, int))(*(_DWORD *)v3 + 72))(v3, &v13, v3 + 1496);
*(_DWORD *)(v3 + 2528) = 0;
}
if ( *(_DWORD *)(v3 + 2532) )
{
(*(void (__thiscall **)(int, char *, int))(*(_DWORD *)v3 + 76))(v3, &v13, v3 + 1328);
*(_DWORD *)(v3 + 2532) = 0;
}
v20 = -1;
CFOWndDC::_CFOWndDC(&v13);
}
if ( *(_DWORD *)(v3 + 1652) && *(_DWORD *)(v3 + 76) && !*(_DWORD *)(a3 + 12) )
{
v12 = (*(int (__thiscall **)(int, signed int, int))(*(_DWORD *)a3 + 60))(a3, 1, a2);
(*(void (__thiscall **)(int, char *, _DWORD, _DWORD))(*(_DWORD *)a3 + 64))(a3, &v14, 0, 0);
CDC::SetWindowOrg(a3, &v14, 0, 0);
(*(void (__stdcall **)(signed int))(**(_DWORD **)(v3 + 76) + 60))(1);
(*(void (__stdcall **)(char *, _DWORD, _DWORD))(**(_DWORD **)(v3 + 76) + 64))(&v14, 0, 0);
CDC::SetWindowOrg(*(_DWORD *)(v3 + 76), &v15, 0, 0);
v8 = *(_DWORD *)(v3 + 88);
v9 = 0;
if ( v8 )
{
v9 = CDC::SelectPalette(a3, v8, 0);
if ( v9 )
RealizePalette(*(HDC *)(a3 + 4));
}
hDC = *(HDC *)(v3 + 76);
if ( hDC )
hDC = (HDC)*((_DWORD *)hDC + 1);
BitBlt(
*(HDC *)(a3 + 4),
rcDst.top,
rcDst.right,
rcDst.bottom - rcDst.top,
rc.left - rcDst.right,
hDC,
rcDst.top,
rcDst.right,
0xCC0020u);
if ( v9 )
CDC::SelectPalette(a3, v9, 0);
(*(void (__thiscall **)(int))(*(_DWORD *)a3 + 60))(a3);
}
else
{
(*(void (__thiscall **)(int, int))(*(_DWORD *)v3 + 1576))(v3, a3);
}
}
}
void __userpurge CFOPCanvasCore::Draw(int a1<ecx>, int a2<ebx>, int a3)
{
int v3; // esi@1
int v4; // eax@3
int v5; // eax@4
int v6; // eax@5
int v7; // eax@11
int v8; // eax@19
int v9; // ebx@19
HDC hDC; // ebp@22
int v11; // [sp+4Ch] [bp-7Ch]@5
int v12; // [sp+50h] [bp-78h]@7
char v13; // [sp+5Ch] [bp-6Ch]@5
char v14; // [sp+60h] [bp-68h]@19
char v15; // [sp+78h] [bp-50h]@19
struct tagRECT Rect; // [sp+7Ch] [bp-4Ch]@4
struct tagRECT rcDst; // [sp+8Ch] [bp-3Ch]@10
struct tagRECT rc; // [sp+9Ch] [bp-2Ch]@6
char v19; // [sp+ACh] [bp-1Ch]@6
int v20; // [sp+C4h] [bp-4h]@11
v3 = a1;
if ( *(_DWORD *)(a1 + 1588) )
{
if ( *(_DWORD *)(a1 + 1440) )
{
(*(void (**)(void))(*(_DWORD *)a1 + 428))();
(*(void (__thiscall **)(int))(*(_DWORD *)v3 + 2072))(v3);
v4 = CFOPCanvasCore::GetCurrentModel(v3);
(*(void (__thiscall **)(int, signed int, _DWORD))(*(_DWORD *)v4 + 40))(v4, 1000, 0);
*(_DWORD *)(v3 + 1440) = 0;
}
v5 = CFOMaskData::SetMaxLength(v3);
if ( !GetUpdateRect(*(HWND *)(v5 + 32), &Rect, 0) )
{
(*(void (__thiscall **)(int, char *))(*(_DWORD *)v3 + 8))(v3, &v13);
v6 = (*(int (__thiscall **)(int, int *))(*(_DWORD *)v3 + 2048))(v3, &v11);
Rect.left = *(_DWORD *)v6;
Rect.top = *(_DWORD *)(v6 + 4);
Rect.right = *(_DWORD *)(v6 + 8);
Rect.bottom = *(_DWORD *)(v6 + 12);
CRect::InflateRect(&Rect, &v13);
}
CRect::NormalizeRect(&Rect);
InflateRect(&Rect, 20, 20);
(*(void (__thiscall **)(int, char *))(*(_DWORD *)v3 + 8))(v3, &v19);
(*(void (__thiscall **)(int, struct tagRECT *))(*(_DWORD *)v3 + 2048))(v3, &rc);
InflateRect(&rc, 10, 10);
CRect::InflateRect(&rc, &v19);
if ( !(*(int (__thiscall **)(int))(*(_DWORD *)v3 + 1080))(v3) )
{
(*(void (__thiscall **)(int, int *))(*(_DWORD *)v3 + 264))(v3, &v11);
CRect::InflateRect(&rc, 0, 0, v11, v12);
}
if ( (*(int (__thiscall **)(int))(*(_DWORD *)v3 + 2320))(v3) != 1 )// //
rc.bottom -= 26;
rcDst.left = Rect.left;
rcDst.top = Rect.top;
rcDst.right = Rect.right;
rcDst.bottom = Rect.bottom;
IntersectRect(&rcDst, &rcDst, &rc);
if ( *(_DWORD *)(v3 + 1492) )
{
CFOWndDC::CFOWndDC(v3, 0);
v7 = *(_DWORD *)(v3 + 2528);
v20 = 0;
if ( v7 )
{
(*(void (__thiscall **)(int, char *, int))(*(_DWORD *)v3 + 72))(v3, &v13, v3 + 1496);
*(_DWORD *)(v3 + 2528) = 0;
}
if ( *(_DWORD *)(v3 + 2532) )
{
(*(void (__thiscall **)(int, char *, int))(*(_DWORD *)v3 + 76))(v3, &v13, v3 + 1328);
*(_DWORD *)(v3 + 2532) = 0;
}
v20 = -1;
CFOWndDC::_CFOWndDC(&v13);
}
if ( *(_DWORD *)(v3 + 1652) && *(_DWORD *)(v3 + 76) && !*(_DWORD *)(a3 + 12) )
{
v12 = (*(int (__thiscall **)(int, signed int, int))(*(_DWORD *)a3 + 60))(a3, 1, a2);
(*(void (__thiscall **)(int, char *, _DWORD, _DWORD))(*(_DWORD *)a3 + 64))(a3, &v14, 0, 0);
CDC::SetWindowOrg(a3, &v14, 0, 0);
(*(void (__stdcall **)(signed int))(**(_DWORD **)(v3 + 76) + 60))(1);
(*(void (__stdcall **)(char *, _DWORD, _DWORD))(**(_DWORD **)(v3 + 76) + 64))(&v14, 0, 0);
CDC::SetWindowOrg(*(_DWORD *)(v3 + 76), &v15, 0, 0);
v8 = *(_DWORD *)(v3 + 88);
v9 = 0;
if ( v8 )
{
v9 = CDC::SelectPalette(a3, v8, 0);
if ( v9 )
RealizePalette(*(HDC *)(a3 + 4));
}
hDC = *(HDC *)(v3 + 76);
if ( hDC )
hDC = (HDC)*((_DWORD *)hDC + 1);
BitBlt(
*(HDC *)(a3 + 4),
rcDst.top,
rcDst.right,
rcDst.bottom - rcDst.top,
rc.left - rcDst.right,
hDC,
rcDst.top,
rcDst.right,
0xCC0020u);
if ( v9 )
CDC::SelectPalette(a3, v9, 0);
(*(void (__thiscall **)(int))(*(_DWORD *)a3 + 60))(a3);
}
else
{
(*(void (__thiscall **)(int, int))(*(_DWORD *)v3 + 1576))(v3, a3);
}
}
}
赞赏
他的文章
看原图
赞赏
雪币:
留言: