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
| int __cdecl main(int argc, const char **argv, const char **envp) { char *v3; char v5; __int16 v6; char *lineptr; size_t n; void *ptr; __int64 v10; void *v11; char format[264]; unsigned __int64 v13;
v13 = __readfsqword(0x28u); setvbuf(stdin, 0LL, 2, 0LL); setvbuf(stdout, 0LL, 2, 0LL); while ( 1 ) { puts("Submit replay as hex (use xxd -p -c0 replay.osr | ./analyzer):"); lineptr = 0LL; n = 0LL; if ( getline(&lineptr, &n, stdin) <= 0 ) break; v3 = lineptr; v3[strcspn(lineptr, "\n")] = 0; if ( !*lineptr ) break; v10 = hexs2bin(lineptr, &ptr); v11 = ptr; if ( !v10 ) { puts("Error: failed to decode hex"); return 1; } puts("\n=~= miss-analyzer =~="); v5 = read_byte(&v11, &v10); if ( v5 ) { switch ( v5 ) { case 1: puts("Mode: osu!taiko"); break; case 2: puts("Mode: osu!catch"); break; case 3: puts("Mode: osu!mania"); break; } } else { puts("Mode: osu!"); } consume_bytes(&v11, &v10, 4LL); read_string(&v11, &v10, format, 255LL); printf("Hash: %s\n", format); read_string(&v11, &v10, format, 255LL); printf("Player name: "); printf(format); putchar(10); read_string(&v11, &v10, format, 255LL); consume_bytes(&v11, &v10, 10LL); v6 = read_short(&v11, &v10); printf("Miss count: %d\n", (unsigned int)v6); if ( v6 ) puts("Yep, looks like you missed."); else puts("You didn't miss!"); puts("=~=~=~=~=~=~=~=~=~=~=\n"); free(lineptr); free(ptr); } return 0; }
|