求逆函数

#include <stdio.h>
#include <string.h>

#define LOBYTE(x) (((char*)&x)[0])

char book[256] = {0,94,24,84,113,76,8,68,48,126,24,124,81,68,8,102,80,92,88,84,48,76,24,68,48,124,24,116,16,68,24,100,0,94,120,84,113,126,123,84,48,126,24,124,89,126,8,102,64,92,120,20,48,76,104,4,32,60,24,116,8,12,8,100,44,110,47,124,121,108,40,108,125,126,127,124,121,108,105,110,115,100,117,102,48,108,57,110,51,100,53,116,16,76,16,108,36,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,124,79,72,72,104,0,94,24,84,113,76,8,68,48,126,24,124,81,68,8,102,80,92,88,84,48,76,24,68,48,124,24,116,16,68,24,100,0,94,120,84,113,126,123,84,48,126,24,124,89,126,8,102,64,92,120,20,48,76,104,4,32,60,24,116,8,12,8,100,44,110,47,124,121,108,40,108,125,126,127,124,121,108,105,110,115,100,117,102,48,108,57,110,51,100,53,116,16,76,16,108,36,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,124,79,72,72,104};
  
unsigned char unk_8048980[60]={255,255,255,255,17,0,0,0,245,255,255,255,3,0,0,0,248,255,255,255,5,0,0,0,14,0,0,0,253,255,255,255,1,0,0,0,6,0,0,0,245,255,255,255,6,0,0,0,248,255,255,255,246,255,255,255,0,0,0,0};

bool __cdecl sub_8048801(char *flag)
{
  int v1; // edi@1
  int v2; // esi@1
  char v3; // al@6
  int cnt; // eax@10
  char baseVector[100]={0};
  char v7=(char)(baseVector+3); // [sp+3h] [bp-59h]@13
  char v8=(char)(baseVector+4); // [sp+4h] [bp-58h]@6
  char v9=(char)(baseVector+5); // [sp+5h] [bp-57h]@16
  int* v10=(int*)((char*)baseVector+16); // [sp+10h] [bp-4Ch]@13
  char v11=(char)(baseVector+20); // [sp+14h] [bp-48h]@1
  memcpy(&v11, &unk_8048980, 0x3Cu);
  v1 = 0;
  v2 = 0;
  *flag = 111;
  do
  {
    if ( flag[v2] <= 96 )
      flag[v2] = 0;
    if ( flag[v2] > 122 )
      flag[v2] = 24;
    v3 = book[flag[v2]];
    *(&v8 + v2) = v3;
    if ( (unsigned char)v3 > 0xCCu && v3 != -49 )
      v1 = 1;
    ++v2;
  }
  while ( v2 != 15 );
  cnt = 0;
  
    while ( 1 )
    {
      ++cnt; 
      *(&v8 + cnt) =(unsigned char)(*(&v8 + cnt - 1) + (*(int*)((int*)unk_8048980+cnt-1)));
	  printf("%c",book[*(&v8 + cnt)]);
      if ( cnt == 14 )
      {
        return 0;
      }
    }
	*(&v8 +cnt) = *(&v8 +cnt);
}


int main()
{
	char x[16]="ooooooooooooooo";
	unsigned char i;
	printf("flag{");
	sub_8048801(x);
	printf("}");
	return 0;
}

 
Flag:

温馨提示: 此处内容需要评论本文后刷新才能查看,支付2元即可直接查看所有Flag。

小广告:关于获取西普实验吧所有Flag请点击这里查看索引

查看所有Flag文章需要输入密码,需要获取文章密码的童鞋请扫描下面微信或支付宝二维码捐助至少2元(老哥,捐多捐少是个缘分)之后发送支付凭证号联系我获取,Flag大全地址:Flag大全

新功能:捐款的小伙伴请联系我把自己的注册邮箱加入网站白名单,可以免回复看到本站所有Flag

PS:本站不是实验吧的官方站点,纯粹是个人博客,收取Flag费用仅是维持服务器费用,做站不易,且行窃珍惜!

微信二维码:
支付宝二维码: