Upload:
8:43 PM 01/17/2022
Description
Hi, I decided to test how difficult it is to find the key to my creation, I think it will not be easy, although I could be wrong, it is forbidden to change anything in the program, the file is clean, good luck
demberto on 12:52 PM 01/27/2022: Key is 6 chars long, that's all I can figure out, apart from some crazy instructions below I never saw before
Temagen on 3:49 AM 01/29/2022: can help me with solution
VladMetz on 11:31 AM 01/29/2022: I was wrong it is not keygen , it is ctf, I will give you a hint the flag is more than 6 characters, where did you stop?
Slava on 5:22 AM 02/05/2022: can you say what compiler you've used? And am I supposed to get a string for a right flag? So far I've only found "Invalid"
GreeZW on 6:47 PM 02/05/2022: int main(int argc, const char **argv, const char **envp)
{
int Input_Key; // ecx
unsigned int D; // edi
void **E; // esi
int F; // ecx
int *G; // edx
void **H; // eax
int I; // esi
float J; // xmm0_4
int K; // esi
int L; // ecx
double M; // xmm0_8
double N; // xmm1_8
float O; // xmm5_4
const char *Strings; // edx
float P; // xmm5_4
void **Q; // eax
int R; // [esp+8h] [ebp-80h] BYREF
int S; // [esp+2Ch] [ebp-5Ch]
int T; // [esp+30h] [ebp-58h]
int U; // [esp+34h] [ebp-54h]
int V; // [esp+38h] [ebp-50h]
int W; // [esp+3Ch] [ebp-4Ch]
int X; // [esp+40h] [ebp-48h]
int Y; // [esp+44h] [ebp-44h]
int Z; // [esp+48h] [ebp-40h]
float AB; // [esp+4Ch] [ebp-3Ch]
float CD; // [esp+50h] [ebp-38h]
int EF; // [esp+54h] [ebp-34h]
int GH; // [esp+58h] [ebp-30h]
bool IJ; // [esp+5Fh] [ebp-29h]
void *Unit[4]; // [esp+60h] [ebp-28h] BYREF
unsigned int A; // [esp+70h] [ebp-18h]
unsigned int B; // [esp+74h] [ebp-14h]
int C; // [esp+84h] [ebp-4h]
Unit[0] = 0;
A = 0;
B = 15;
C = -1;
Calc_Bad_String(Unit, &Unknow_Value0, 0);
C = 1;
Put_String(Input_Key, "Input key: ");
Calc_Pass(Dword_Unknow, Unit);
D = A;
E = (void **)Unit[0];
if ( A = 6 )
{
F = 0;
IJ = B = 16;
G = &R;
do
{
H = Unit;
if ( F = 8 )
{
++G;
if ( IJ )
H = E;
*G = *((char *)H + F);
}
else
{
if ( IJ )
H = E;
*(&S + F) = *((char *)H + F);
}
++F;
}
while ( F = 0.00000011920929 )
Strings = "Invalid\n";
Put_String(L, Strings);
Close_Console((int)"pause");
E = (void **)Unit[0];
}
if ( B = 16 )
{
Q = E;
if ( B + 1 = 4096 )
{
E = (void **)*(E - 1);
if ( (unsigned int)((char *)Q - (char *)E - 4) 31 )
Invalid_Parameter_No_Info_No_Return();
}
Free_Unit(E);
}
return 0;
}
This is the main app. Use float never seen that
any var is by my sh**t Logical is not good but give a look
VladMetz on 12:22 PM 02/06/2022: Slava, message valid flag - Yes, you higher! GreeZW , you didn't show all the logic of the application, yours is unlikely to help in any way
VladMetz on 12:26 PM 02/06/2022: Slava, I opened it in x32dbg
survivalizeed on 9:55 PM 04/17/2024: I have the entire routine reversed now. The key is 16 chars long and is split in half and then processed. Only thing which seems rather impossible is inverting it. I will try my best now ...
survivalizeed on 10:08 PM 04/17/2024: For anyone looking for the complete cleaned up routine (heavy spoiler)
int keypart1[8] = {};
int keypart2[8] = {};
for (int i = 0; i 7) {
keypart2[i - 8] = input[i];
}
else {
keypart1[i] = (int)input[i];
}
}
int sum = keypart1[0] + keypart1[1] + keypart1[2] + keypart1[3] + keypart1[4]
+ keypart1[5] + keypart1[6] + keypart1[7];
int sum_pow = pow(keypart1[0], 2) + pow(keypart1[1], 2) + pow(keypart1[2], 2) +
pow(keypart1[3], 2) + pow(keypart1[4], 2) + pow(keypart1[5], 2) +
pow(keypart1[6], 2) + pow(keypart1[7], 2);
double added_log = 0;
for (int i = 0; i = 0.00000011920929) {
std::cout
You must me logged to submit a solution