[原创] kctf2021秋季赛 声名远扬 | 宜武汇-ag真人国际厅网站

__int64 __fastcall sub_145ac(char *a1, __int64 a2)

  unsigned int v4; // edx

  char v5; // al

  __int64 v6; // rcx

  int v7; // edx

  char v8; // al

  char *v9; // rcx

  __int64 v10; // rax

  unsigned int v11; // edx

  char v12; // al

  __int64 v13; // rcx

  char v14; // cl

  __int64 v15; // r8

  int *v16; // rax

  char v17; // al

  __int64 v18; // rcx

  char v19; // cl

  __int64 v20; // r8

  int *v21; // rax

  int v23; // [rsp 4h] [rbp-3ch] byref

  char v24; // [rsp 8h] [rbp-38h]

  __int16 v25; // [rsp 9h] [rbp-37h]

  char v26; // [rsp bh] [rbp-35h]

  unsigned int v27; // [rsp ch] [rbp-34h]

  char v28[48]; // [rsp 10h] [rbp-30h] byref

 

  v27 = 44;

  v4 = 0;

  *(__m128i *)v28 = _mm_load_si128((const __m128i *)&xmmword_14408);

  *(__m128i *)&v28[32] = _mm_load_si128((const __m128i *)&xmmword_143f8);

  *(__m128i *)&v28[16] = _mm_load_si128(xmmword_14418);

  do

  {

    v5 = v4 - 52;

    v6 = v4 ;

    v28[v6] ^= v5;

  }

  while ( v4 < v27 );                           // 还原base64编码串

  v28[v27] = 0;

  v7 = 0;

  v8 = *a1;

  if ( *a1 )

  {

    v9 = a1;

    do

    {

      if ( v8 != v9[v28 - a1] )                 // strcmp

        break;

       v9;

       v7;

      v8 = *v9;

    }

    while ( *v9 );

  }

  v10 = v7;

  v11 = 0;

  v24 = -48;

  if ( a1[v10] == v28[v10] )                    // bingo

  {

    v23 = 0x78063019;                           // 正确

    v25 = 0;

    v26 = 0;

    do

    {

      v12 = v11 - 52;

      v13 = v11 ;

      *((_byte *)&v23 v13) ^= v12;

    }

    while ( v11 < 4 );

    v24 = 0;

    v14 = v23;

    if ( (_byte)v23 )

    {

      v15 = a2 - (_qword)&v23;

      v16 = &v23;

      do

      {

        *((_byte *)v16 v15) = v14;

        v16 = (int *)((char *)v16 1);

        v14 = *(_byte *)v16;

      }

      while ( *(_byte *)v16 );

    }

  }

  else

  {

    v23 = 0x3c002078;                           // 错误

    v25 = 0;

    v26 = 0;

    do

    {

      v17 = v11 - 52;

      v18 = v11 ;

      *((_byte *)&v23 v18) ^= v17;

    }

    while ( v11 < 4 );

    v24 = 0;

    v19 = v23;

    if ( (_byte)v23 )

    {

      v20 = a2 - (_qword)&v23;

      v21 = &v23;

      do

      {

        *((_byte *)v21 v20) = v19;

        v21 = (int *)((char *)v21 1);

        v19 = *(_byte *)v21;

      }

      while ( *(_byte *)v21 );

    }

  }

  return 0i64;

原文链接:https://bbs.kanxue.com/thread-270553.htm

网络摘文,本文作者:15h,如若转载,请注明出处:https://www.15cov.cn/2023/08/27/原创-kctf2021秋季赛-声名远扬/

发表评论

邮箱地址不会被公开。 必填项已用*标注

网站地图