首页
社区
课程
招聘
[未解决,已结帖] [求助]求助帮忙分析,这是个什么算法? 50.00雪花
发表于: 2020-4-30 16:49 2610

[未解决,已结帖] [求助]求助帮忙分析,这是个什么算法? 50.00雪花

2020-4-30 16:49
2610
int __cdecl sub_10001010(__int16 a1)
{
  int v1; // ecx
  signed int v2; // eax
  int v3; // ecx
  int v4; // eax
  int v5; // ebp
  char *v6; // ebx
  char *v7; // eax
  signed int v8; // esi
  int v9; // ecx
  int v10; // eax
  char v11; // dl
  char v12; // dl
  char v13; // dl
  char v14; // dl
  signed int v15; // edi
  int v16; // edx
  int v17; // eax
  char v18; // cl
  char v19; // cl
  char v20; // cl
  char v21; // cl
  signed int v22; // eax
  bool v23; // zf
  bool v24; // sf
  unsigned __int8 v25; // of
  int v27; // [esp+10h] [ebp-100h]
  signed int v28; // [esp+14h] [ebp-FCh]
  char *v29; // [esp+18h] [ebp-F8h]
  char v30[4]; // [esp+1Ch] [ebp-F4h]
  char v31[124]; // [esp+20h] [ebp-F0h]
  char v32; // [esp+9Ch] [ebp-74h]
  char v33; // [esp+9Dh] [ebp-73h]
  char v34; // [esp+9Eh] [ebp-72h]
  char v35[25]; // [esp+9Fh] [ebp-71h]
  char v36[26]; // [esp+B8h] [ebp-58h]
  char v37; // [esp+D2h] [ebp-3Eh]
  char v38; // [esp+D3h] [ebp-3Dh]
  char v39; // [esp+D4h] [ebp-3Ch]
  char v40; // [esp+D5h] [ebp-3Bh]
  char v41; // [esp+D6h] [ebp-3Ah]
  char v42[53]; // [esp+D7h] [ebp-39h]

  v2 = 0;
  do
  {
    *(&v39 + v2) = (*(_BYTE *)(((signed int)(unsigned __int8)byte_10004098[v2] >> 3) + v1) & (unsigned __int8)byte_10004028[2 * (byte_10004098[v2] & 7)]) != 0;
    *(&v40 + v2) = (*(_BYTE *)(((signed int)(unsigned __int8)byte_10004099[v2] >> 3) + v1) & (unsigned __int8)byte_10004028[2 * (byte_10004099[v2] & 7)]) != 0;
    *(&v41 + v2) = (*(_BYTE *)(((signed int)(unsigned __int8)byte_1000409A[v2] >> 3) + v1) & (unsigned __int8)byte_10004028[2 * (byte_1000409A[v2] & 7)]) != 0;
    v42[v2] = (*(_BYTE *)(((signed int)(unsigned __int8)byte_1000409B[v2] >> 3) + v1) & (unsigned __int8)byte_10004028[2 * (byte_1000409B[v2] & 7)]) != 0;
    v2 += 4;
  }
  while ( v2 < 56 );
  v3 = 0;
  v27 = 0;
  v28 = 30;
  while ( 1 )
  {
    v4 = v28;
    if ( a1 != 1 )
      v4 = 2 * v3;
    v5 = (unsigned __int8)byte_100040D0[v3];
    v6 = &v31[4 * v4];
    v7 = &v30[4 * v4];
    *(_DWORD *)v6 = 0;
    v29 = v7;
    *(_DWORD *)v7 = 0;
    v8 = 0;
    v9 = v5 + 3;
    v10 = v5 + 2;
    do
    {
      if ( v9 - 3 >= 28 )
        v11 = v36[v9 - 3];
      else
        v11 = *(&v37 + v10);
      *(&v32 + v8) = v11;
      if ( v9 - 2 >= 28 )
        v12 = v36[v9 - 2];
      else
        v12 = *(&v38 + v10);
      *(&v33 + v8) = v12;
      if ( v10 >= 28 )
        v13 = v36[v10];
      else
        v13 = *(&v39 + v10);
      *(&v34 + v8) = v13;
      if ( v9 >= 28 )
        v14 = v36[v9];
      else
        v14 = *(&v40 + v10);
      v35[v8] = v14;
      v8 += 4;
      v10 += 4;
      v9 += 4;
    }
    while ( v8 < 28 );
    v15 = 28;
    v16 = v5 + 31;
    v17 = v5 + 30;
    do
    {
      if ( v16 - 3 >= 56 )
        v18 = v36[v16 - 3];
      else
        v18 = *(&v37 + v17);
      *(&v32 + v15) = v18;
      if ( v16 - 2 >= 56 )
        v19 = v36[v16 - 2];
      else
        v19 = *(&v38 + v17);
      *(&v33 + v15) = v19;
      if ( v17 >= 56 )
        v20 = v36[v17];
      else
        v20 = *(&v39 + v17);
      *(&v34 + v15) = v20;
      if ( v16 >= 56 )
        v21 = v36[v16];
      else
        v21 = *(&v40 + v17);
      v35[v15] = v21;
      v15 += 4;
      v17 += 4;
      v16 += 4;
    }
    while ( v15 < 56 );
    v22 = 0;
    do
    {
      if ( *(&v32 + (unsigned __int8)byte_100040E0[v22]) )
        *(_DWORD *)v29 |= dword_10004038[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040F8[v22]) )
        *(_DWORD *)v6 |= dword_10004038[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040E1[v22]) )
        *(_DWORD *)v29 |= dword_1000403C[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040F9[v22]) )
        *(_DWORD *)v6 |= dword_1000403C[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040E2[v22]) )
        *(_DWORD *)v29 |= dword_10004040[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040FA[v22]) )
        *(_DWORD *)v6 |= dword_10004040[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040E3[v22]) )
        *(_DWORD *)v29 |= dword_10004044[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040FB[v22]) )
        *(_DWORD *)v6 |= dword_10004044[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040E4[v22]) )
        *(_DWORD *)v29 |= dword_10004048[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040FC[v22]) )
        *(_DWORD *)v6 |= dword_10004048[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040E5[v22]) )
        *(_DWORD *)v29 |= dword_1000404C[v22];
      if ( *(&v32 + (unsigned __int8)byte_100040FD[v22]) )
        *(_DWORD *)v6 |= dword_1000404C[v22];
      v22 += 6;
    }
    while ( v22 < 24 );
    ++v27;
    v25 = __OFSUB__(v28 - 2, -2);
    v23 = v28 == 0;
    v24 = v28 < 0;
    v28 -= 2;
    if ( (unsigned __int8)(v24 ^ v25) | v23 )
      break;
    v3 = v27;
  }
  return sub_100013D0(v30);
}

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

最后于 2020-4-30 16:50 被spring丶必应编辑 ,原因:
收藏
免费 0
支持
分享
最新回复 (3)
雪    币: 631
活跃值: (46)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
别问,问就是MD5, 哈哈
2020-5-14 20:21
0
雪    币: 5855
活跃值: (438)
能力值: ( LV4,RANK:45 )
在线值:
发帖
回帖
粉丝
3
你看看那些数组里面的常量,然后去github搜索,就能找到相关算法了
2020-5-14 22:28
0
雪    币: 0
活跃值: (999)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
找人动态调试了下,看这种idea反编译的伪代码没有意义!
2020-6-4 22:56
0
游客
登录 | 注册 方可回帖
返回
//