由于比较忙,时间紧,先把分析过程中主要的代码贴上来先
int __cdecl sub_4156F0(_DWORD *a1, int a2, int (__fastcall *a3)(int, int *), int a4, unsigned int a5, int a6, int a7, int a8, int *a9, int a10, int a11, int a12, int a13)
{
int v13; // ecx
int v14; // ecx
unsigned int v15; // ebx
int *v16; // edx
int v17; // ecx
int v18; // eax
void *retaddr[2]; // [esp+0h] [ebp+0h]
v14 = v13 - 1;
v15 = 1;
v16 = &a7;
if ( a5 >= 1 )
{
v14 = a7;
if ( a5 >= 2 )
{
v16 = a9;
if ( a5 >= 3 && a5 >= 4 )
{
v14 = a13 - 1;
v16 = &a9[2 * (a5 - 1) - 2];
}
}
}
while ( 1 )
{
v17 = v14 - 1;
if ( a5 < v15 )
break;
v18 = *v16;
v16 -= 2;
v14 = v17 - 3;
++v15;
}
*a1 = a3(v17, v16) - 4;
return MK_FP(retaddr[0], retaddr[0])();
}
signed int sub_4155AC()
{
char *v0; // ebp
__m128i v1; // xmm1
unsigned int v2; // edx
char v3; // al
int v4; // ecx
int v5; // eax
_BYTE *v6; // ecx
int v7; // ecx
_BYTE *v8; // edx
int v9; // ecx
unsigned int v12; // edx
bool v13; // zf
char v14; // al
unsigned int v15; // ecx
unsigned int v16; // eax
int v17; // eax
char v18; // al
unsigned int v19; // ecx
unsigned int v20; // eax
int v21; // eax
char v23[5]; // [esp+Ch] [ebp-34h]
_BYTE v24[3]; // [esp+11h] [ebp-2Fh]
__int128 v25; // [esp+20h] [ebp-20h]
__int128 v26; // [esp+30h] [ebp-10h]
int savedregs; // [esp+40h] [ebp+0h]
v0 = (char *)&savedregs + 1;
v1 = _mm_load_si128((const __m128i *)0xFFFFFE50);
*(_DWORD *)&v23[1] = 44;
v2 = 0;
_mm_storeu_si128((__m128i *)v24, _mm_load_si128((const __m128i *)0xFFFFFE4B));
_mm_storeu_si128((__m128i *)((char *)&v26 + 1), _mm_load_si128((const __m128i *)0xFFFFFE12));
_mm_storeu_si128((__m128i *)((char *)&v25 + 1), v1);
do
{
v3 = v2 - 52;
v4 = v2++;
v24[v4] ^= v3;
v5 = *(_DWORD *)&v23[1];
}
while ( v2 < *(_DWORD *)&v23[1] );
v24[*(_DWORD *)&v23[1]] = 0;
v6 = (_BYTE *)(v4 + 2);
LOBYTE(v5) = *v6;
if ( *v6 )
{
v7 = (int)(v6 - 1);
v0 = (char *)&savedregs;
v8 = &v24[-v7];
do
{
v9 = v7 + 1;
if ( (_BYTE)v5 != v8[v9] )
break;
--v5;
v7 = v9 + 1;
++v8;
LOBYTE(v5) = *(_BYTE *)v7;
}
while ( *(_BYTE *)v7 );
}
_EAX = v5 - 1;
__asm { arpl dx, ax }
*(v0 - 56) = -48;
v12 = 1;
v13 = *(char *)(_EAX + v0[_EAX - 48]) == v0[_EAX - 48];
*((_DWORD *)v0 - 16) = 4;
if ( v13 )
{
*((_DWORD *)v0 - 15) = 2013671449;
*(_WORD *)(v0 - 55) = 0;
*(v0 - 53) = 0;
do
{
v14 = v12 - 52;
v15 = v12++;
v0[v15 - 60] ^= v14;
v16 = *((_DWORD *)v0 - 16);
}
while ( v12 < v16 );
v0[v16 - 60] = 0;
LOBYTE(v15) = *(v0 - 60);
if ( (_BYTE)v15 )
{
v17 = (int)(v0 - 60);
do
{
*(_BYTE *)(2 * v17) = ++v15;
LOBYTE(v15) = *(_BYTE *)v17;
}
while ( *(_BYTE *)v17 );
}
}
else
{
*((_DWORD *)v0 - 15) = 1006641272;
*(_WORD *)(v0 - 55) = 0;
*(v0 - 53) = 0;
do
{
v18 = v12 - 52;
v19 = v12++;
v0[v19 - 60] ^= v18;
v20 = *((_DWORD *)v0 - 16);
}
while ( v12 < v20 );
v0[v20 - 60] = 0;
LOBYTE(v19) = *(v0 - 60);
if ( (_BYTE)v19 )
{
v21 = (int)(v0 - 60);
do
{
*(_BYTE *)(2 * v21) = ++v19;
LOBYTE(v19) = *(_BYTE *)v21;
}
while ( *(_BYTE *)v21 );
}
}
return -1;
}
int __cdecl sub_41E530(int a1, int a2)
{
[招生]系统0day安全班,企业级设备固件漏洞挖掘,Linux平台漏洞挖掘!
最后于 2021-12-3 11:23
被yegu编辑
,原因: