1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
#include <cstdio>
#include <cstring>
#include <cstdlib>
const char* output[] = {
"What is your name?\n",
"What do you want to do?\n(deposit, withdraw, view, exit)\n",
"How much?\n",
"You don't have enough!\n",
"You have ", " dollars in your account\n"
};
const char* input[] = {
"deposit", "withdraw", "view", "exit"
};
void print_str(const char* s){
printf("%s", s);
}
void print_int(int i){
printf("%d", i);
}
char* get_str(){
char* s = (char*)malloc(32);
scanf("%s", s);
return s;
}
int get_int(){
int i;
scanf("%d", &i);
return i;
}
bool equal(const char* a, const char* b){
return strcmp(a, b) == 0;
}
const int size = 32;
int len = 0;
char* name_list[size] = {0};
int cash_list[size] = {0};
char begin[] = {
0x55, 0x8B, 0xEC, 0x83, 0xEC, 0x54, 0x53, 0x56, 0x57, 0xA1,
0x00, 0xD0, 0x49, 0x00, 0x50, 0xFF, 0x55, 0x14, 0x83, 0xC4,
0x04, 0xFF, 0x55, 0x1C, 0x89, 0x45, 0xFC, 0xC7, 0x45, 0xF8,
0x00, 0x00, 0x00, 0x00, 0xEB, 0x09, 0x8B, 0x45, 0xF8, 0x83,
0xC0, 0x01, 0x89, 0x45, 0xF8, 0x8B, 0x45, 0xF8, 0x3B, 0x45,
0x10, 0x7D, 0x1F, 0x8B, 0x45, 0xF8, 0x8B, 0x4D, 0x08, 0x8B,
0x14, 0x81, 0x52, 0x8B, 0x45, 0xFC, 0x50, 0xFF, 0x55, 0x24,
0x83, 0xC4, 0x08, 0x0F, 0xB6, 0xC8, 0x85, 0xC9, 0x74, 0x02,
0xEB, 0x02, 0xEB, 0xD0, 0x8B, 0x45, 0xF8, 0x3B, 0x45, 0x10,
0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0x00, 0x50, 0xFF,
0x55, 0x14, 0x83, 0xC4, 0x04, 0xA1, 0x20, 0xD0, 0x49, 0x00,
0x50, 0x8B, 0x4D, 0xF4, 0x51, 0xFF, 0x55, 0x24, 0x83, 0xC4,
0x08, 0x0F, 0xB6, 0xD0, 0x85, 0xD2, 0x74, 0x28, 0xA1, 0x10,
0xD0, 0x49, 0x00, 0x50, 0xFF, 0x55, 0x14, 0x83, 0xC4, 0x04,
0x8B, 0x45, 0xF8, 0x8B, 0x4D, 0x0C, 0x8B, 0x14, 0x81, 0x52,
0xFF, 0x55, 0x18, 0x83, 0xC4, 0x04, 0xA1, 0x14, 0xD0, 0x49,
0x00, 0x50, 0xFF, 0x55, 0x14, 0x83, 0xC4, 0x04, 0xA1, 0x24,
0xD0, 0x49, 0x00, 0x50, 0x8B, 0x4D, 0xF4, 0x51, 0xFF, 0x55,
0x24, 0x83, 0xC4, 0x08, 0x0F, 0xB6, 0xD0, 0x85, 0xD2, 0x74,
0x02, 0xEB, 0x05, 0xE9, 0x8F, 0xFE, 0xFF, 0xFF, 0x5F, 0x5E,
0x5B, 0x8B, 0xE5, 0x5D, 0xC3
};
int main(){
_asm{
push offset equal
push offset get_int
push offset get_str
push offset print_int
push offset print_str
mov eax,dword ptr [len]
push eax
push offset cash_list
push offset name_list
call offset begin
add esp, 0x20
}
return 0;
}
|