吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1602|回复: 1
收起左侧

[新手问题] ISCC的一道reverse题目

[复制链接]
未晴雾香 发表于 2021-5-12 23:56
逆向算法不都是倒着写一遍吗,为啥出来个这个东西 image.png

我感觉写的也没有毛病啊
[C++] 纯文本查看 复制代码
#include <stdio.h>
#include <stdlib.h> 
#include <string>
#include <memory.h>
int __cdecl mix(char* a1, char* Str, int a3)
{
    char v3; // dl
    int result; // eax
    char v5; // [esp+14h] [ebp-24h]
    int n; // [esp+18h] [ebp-20h]
    int m; // [esp+1Ch] [ebp-1Ch]
    int l; // [esp+20h] [ebp-18h]
    size_t k; // [esp+24h] [ebp-14h]
    int j; // [esp+28h] [ebp-10h]
    int i; // [esp+2Ch] [ebp-Ch]

    for (i = 0; i < a3; ++i)
        a1[i] -= 64;
    for (j = 0; j < a3; ++j)
        a1[j] -= a1[j + 1];
    for (k = 0; k < strlen(Str); ++k)
        Str[k] %= 64;
    for (l = 0; l < a3; ++l)
        a1[l] += Str[l % 7];
    for (m = 0; a3 / 2 > m; ++m)
    {
        v5 = a1[m];
        a1[m] = a1[a3 - m - 1];
        a1[a3 - m - 1] = v5;
    }
    for (n = 0; ; ++n)
    {
        result = n;
        if (n >= a3)
            break;
        if ((Str[n % 7] & 1) != 0)
            v3 = a1[n] + 2;
        else
            v3 = a1[n] + 1;
        a1[n] = v3;
    }
    return result;
}
void jiemi(char* flag) {
    char temp[3] = {67,-33,20};
    
    for (int n = 0; ; ++n)
    {
        char v3;
        int result = n;
        if (n >= 3)
            break;
        if ((temp[n % 7] & 1)== 0)
             v3 = flag[n] + 2;
        else
             v3 = flag[n] + 1;
        flag[n] = v3;

    }

    for (int m = 0; 3 / 2 > m; ++m)
    {
        int v5 = flag[m];
        flag[m] = flag[3 - m - 1];
        flag[3 - m - 1] = v5;
    }
    
    for (int l = 0; l < 3; ++l)
        flag[l] =temp[l]- temp[l % 7];
    for (int j = 0; j < 3; ++j)
        flag[j] =temp[j]+ flag[j + 1];
    for (int i = 0; i < 3; ++i)
        flag[i] =temp[i]+ 64;
}

int __cdecl main()
{
    char Str[3]; // [esp+11h] [ebp-97h] BYREF
    char v5[57]; // [esp+14h] [ebp-94h] BYREF
    int v6; // [esp+4Dh] [ebp-5Bh]
    char flag[64]; // [esp+51h] [ebp-57h] BYREF
    char reverse[7]; // [esp+91h] [ebp-17h] BYREF
    int strlength; // [esp+98h] [ebp-10h]
    int i; // [esp+9Ch] [ebp-Ch]

    v6 = 0;
    memset(v5, 0, 4 * (((Str - v5 + 64) & 0xFFFFFFFC) >> 2));
    Str[0] = 67;
    Str[1] = -33;
    Str[2] = 20;
    v5[0] = 3;
    v5[1] = 13;
    v5[2] = 44;
    v5[3] = 9;
    v5[4] = 1;
    v5[5] = 23;
    v5[6] = 23;
    v5[7] = 8;
    v5[8] = -4;
    v5[9] = 43;
    v5[10] = -6;
    v5[11] = 20;
    v5[12] = 23;
    v5[13] = -7;
    v5[14] = 37;
    v5[15] = -11;
    v5[16] = 34;
    v5[17] = 61;
    v5[18] = -50;
    v5[19] = 24;
    v5[20] = 22;
    v5[21] = 10;
    memcpy(reverse, "REVERSE", sizeof(reverse));
    strlength = strlen(Str);
   
    jiemi(v5);
    puts(v5);
    puts("\nflag正确!");
    return 0;
}


image.png image.png
文件下载地址
http://iscc.isclab.org.cn/static/uploads/d651b538a6ac6507c129a5d4339c0363/Analysis.exe






发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

zhy27 发表于 2021-5-13 09:56
你看一下mix的参数,mix函数内部的Str应该是“REVERSE”
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-25 02:48

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表