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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
| int main(int argc, const char **argv, const char **envp) { __int64 v3; char *v4; __int64 v5; size_t v6; int v7; int v8; size_t v9; unsigned __int64 v10; char *c; int v13; int v14; int v15;
v14 = 0; v3 = 1LL; v4 = "\n"; write_n((__int64)"\n", 1LL); do { HIDWORD(c) = 0; while ( SHIDWORD(c) <= 3 ) { LOBYTE(c) = BYTE4(c) + 49; write_n((__int64)" # INDEX: ", 12LL); writeln(&c, 1LL); write_n((__int64)" # CONTENT: ", 12LL); if ( tinypad[2 * SHIDWORD(c) + 33] ) { v6 = strlen(tinypad[2 * SHIDWORD(c) + 33]); writeln(tinypad[2 * SHIDWORD(c) + 33], v6); } v3 = 1LL; v4 = "\n"; writeln("\n", 1LL); ++HIDWORD(c); } v13 = 0; v7 = getcmd(v4, v3, v5); v14 = v7; if ( v7 == 'D' ) { write_n((__int64)"(INDEX)>>> ", 11LL); v13 = read_int(); if ( v13 <= 0 || v13 > 4 ) { LABEL_29: v3 = 13LL; v4 = "Invalid index"; writeln("Invalid index", 13LL); continue; } if ( !tinypad[2 * v13 + 30] ) { LABEL_31: v3 = 8LL; v4 = "Not used"; writeln("Not used", 8LL); continue; } free(tinypad[2 * v13 + 31]); tinypad[2 * v13 + 30] = 0LL; v3 = 9LL; v4 = "\nDeleted."; writeln("\nDeleted.", 9LL); } else if ( v7 > 'D' ) { if ( v7 != 'E' ) { if ( v7 == 'Q' ) continue; LABEL_41: v3 = 17LL; v4 = "No such a command"; writeln("No such a command", 17LL); continue; } write_n((__int64)"(INDEX)>>> ", 11LL); v13 = read_int(); if ( v13 <= 0 || v13 > 4 ) goto LABEL_29; if ( !tinypad[2 * v13 + 30] ) goto LABEL_31; LODWORD(c) = 48; strcpy((char *)tinypad, tinypad[2 * v13 + 31]); while ( toupper((int)c) != 'Y' ) { write_n((__int64)"CONTENT: ", 9LL); v9 = strlen((const char *)tinypad); writeln(tinypad, v9); write_n((__int64)"(CONTENT)>>> ", 13LL); v10 = strlen(tinypad[2 * v13 + 31]); read_until((char *)tinypad, v10, 0xAu); writeln("Is it OK?", 9LL); write_n((__int64)"(Y/n)>>> ", 9LL); read_until((char *)&c, 1uLL, 0xAu); } strcpy(tinypad[2 * v13 + 31], (const char *)tinypad); v3 = 8LL; v4 = "\nEdited."; writeln("\nEdited.", 8LL); } else { if ( v7 != 'A' ) goto LABEL_41; while ( v13 <= 3 && tinypad[2 * v13 + 32] ) ++v13; if ( v13 == 4 ) { v3 = 17LL; v4 = "No space is left."; writeln("No space is left.", 17LL); } else { v15 = -1; write_n((__int64)"(SIZE)>>> ", 10LL); v15 = read_int(); if ( v15 <= 0 ) { v8 = 1; } else { v8 = v15; if ( (unsigned __int64)v15 > 0x100 ) v8 = 256; } v15 = v8; tinypad[2 * v13 + 32] = (char *)v8; tinypad[2 * v13 + 33] = (char *)malloc(v15); if ( !tinypad[2 * v13 + 33] ) { writerrln("[!] No memory is available.", 27LL); exit(-1); } write_n((__int64)"(CONTENT)>>> ", 13LL); read_until(tinypad[2 * v13 + 33], v15, 0xAu); v3 = 7LL; v4 = "\nAdded."; writeln("\nAdded.", 7LL); } } } while ( v14 != 'Q' ); return 0; }
|