Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This file has been generated by the Hex-Rays decompiler.
- Copyright (c) 2009 Hex-Rays <info@hex-rays.com>
- Detected compiler: GNU C++
- */
- #include <defs.h>
- //-------------------------------------------------------------------------
- // Data declarations
- extern _UNKNOWN start; // weak
- extern char format[]; // idb
- extern char aS[]; // idb
- extern char aAlertS[]; // idb
- extern char aSS[]; // idb
- extern char s2[]; // idb
- extern char aS_0[]; // idb
- extern char aVGfrRZf_GUNg_j[73]; // weak
- extern int _CTOR_LIST__; // weak
- extern int _DTOR_LIST__[]; // weak
- extern _UNKNOWN _DTOR_END__; // weak
- extern int _JCR_LIST__; // weak
- extern FILE *stdin; // idb
- extern char completed_7021; // weak
- extern int dtor_idx_7023; // weak
- // extern _UNKNOWN _gmon_start__; weak
- //-------------------------------------------------------------------------
- // Function declarations
- int __cdecl init_proc();
- int __gmon_start__(void); // weak
- char *gets(char *s);
- int toupper(int c);
- int fflush(FILE *stream);
- size_t strlen(const char *s);
- int printf(const char *format, ...);
- void *malloc(size_t size);
- int strcmp(const char *s1, const char *s2);
- void __cdecl _do_global_dtors_aux();
- int __cdecl frame_dummy();
- int *__cdecl tor(int *a1);
- char *__cdecl untrash(const char *s);
- signed int __cdecl main();
- void __cdecl _libc_csu_fini();
- int *__cdecl _libc_csu_init();
- void __cdecl _i686_get_pc_thunk_bx();
- void (*__cdecl _do_global_ctors_aux())(void);
- void __cdecl term_proc();
- //----- (080483C0) --------------------------------------------------------
- int __cdecl init_proc()
- {
- int v1; // ST04_4@3
- if ( &_gmon_start__ )
- __gmon_start__();
- frame_dummy();
- _do_global_ctors_aux();
- return v1;
- }
- // 8048400: using guessed type int __gmon_start__(void);
- //----- (08048490) --------------------------------------------------------
- #error "8048493: positive sp value has been found (funcsize=2)"
- //----- (080484C0) --------------------------------------------------------
- void __cdecl _do_global_dtors_aux()
- {
- int v0; // eax@2
- int i; // ebx@2
- if ( !completed_7021 )
- {
- v0 = dtor_idx_7023;
- for ( i = ((signed int)(&_DTOR_END__ - (_UNKNOWN *)_DTOR_LIST__) >> 2) - 1;
- dtor_idx_7023 < (unsigned int)i;
- v0 = dtor_idx_7023 )
- {
- dtor_idx_7023 = v0 + 1;
- ((void (*)(void))_DTOR_LIST__[dtor_idx_7023])();
- }
- completed_7021 = 1;
- }
- }
- // 8049F14: using guessed type int _DTOR_LIST__[];
- // 804A030: using guessed type char completed_7021;
- // 804A034: using guessed type int dtor_idx_7023;
- //----- (08048520) --------------------------------------------------------
- int __cdecl frame_dummy()
- {
- int result; // eax@1
- result = _JCR_LIST__;
- if ( _JCR_LIST__ )
- result = 0;
- return result;
- }
- // 8049F1C: using guessed type int _JCR_LIST__;
- //----- (08048544) --------------------------------------------------------
- int *__cdecl tor(int *a1)
- {
- int *i; // [sp+18h] [bp-10h]@1
- int v3; // [sp+1Ch] [bp-Ch]@2
- for ( i = a1; *(_BYTE *)i; i = (int *)((char *)i + 1) )
- {
- v3 = toupper(*(_BYTE *)i);
- if ( v3 <= 64 || v3 > 77 )
- {
- if ( v3 > 77 )
- {
- if ( v3 <= 90 )
- *(_BYTE *)i -= 13;
- }
- }
- else
- {
- *(_BYTE *)i += 13;
- }
- }
- return a1;
- }
- //----- (080485B3) --------------------------------------------------------
- char *__cdecl untrash(const char *s)
- {
- char *result; // eax@11
- signed int i; // [sp+14h] [bp-14h]@1
- int v3; // [sp+18h] [bp-10h]@1
- size_t v4; // [sp+1Ch] [bp-Ch]@1
- v3 = 0;
- v4 = strlen(s);
- for ( i = 0; i < (signed int)v4; ++i )
- {
- if ( s[i] > 64 && s[i] <= 90 || s[i] > 96 && s[i] <= 122 || s[i] == 32 || s[i] == 58 )
- s[v3++] = s[i];
- }
- result = (char *)&s[v3];
- s[v3] = 0;
- return result;
- }
- //----- (0804865D) --------------------------------------------------------
- signed int __cdecl main()
- {
- int *v0; // eax@1
- int *v1; // eax@1
- int *v2; // eax@1
- int *v3; // eax@1
- int *v4; // eax@1
- int *v5; // eax@1
- int *v6; // eax@3
- signed int result; // eax@7
- int *v8; // ebx@7
- int *v9; // eax@7
- int *v10; // eax@9
- signed int v11; // [sp+1Bh] [bp-2065h]@1
- signed int v12; // [sp+1Fh] [bp-2061h]@1
- signed int v13; // [sp+23h] [bp-205Dh]@1
- signed int v14; // [sp+27h] [bp-2059h]@1
- signed int v15; // [sp+2Bh] [bp-2055h]@1
- signed int v16; // [sp+2Fh] [bp-2051h]@1
- signed int v17; // [sp+33h] [bp-204Dh]@1
- signed __int16 v18; // [sp+37h] [bp-2049h]@1
- signed int v19; // [sp+39h] [bp-2047h]@1
- signed int v20; // [sp+3Dh] [bp-2043h]@1
- signed int v21; // [sp+41h] [bp-203Fh]@1
- signed int v22; // [sp+45h] [bp-203Bh]@1
- signed __int16 v23; // [sp+49h] [bp-2037h]@1
- signed int v24; // [sp+4Bh] [bp-2035h]@1
- signed int v25; // [sp+4Fh] [bp-2031h]@1
- signed int v26; // [sp+53h] [bp-202Dh]@1
- char v27; // [sp+57h] [bp-2029h]@1
- signed int v28; // [sp+58h] [bp-2028h]@1
- signed int v29; // [sp+5Ch] [bp-2024h]@1
- signed int v30; // [sp+60h] [bp-2020h]@1
- signed int v31; // [sp+64h] [bp-201Ch]@1
- signed __int16 v32; // [sp+68h] [bp-2018h]@1
- char v33; // [sp+6Ah] [bp-2016h]@1
- signed int v34; // [sp+6Bh] [bp-2015h]@1
- signed int v35; // [sp+6Fh] [bp-2011h]@1
- signed int v36; // [sp+73h] [bp-200Dh]@1
- signed __int16 v37; // [sp+77h] [bp-2009h]@1
- signed int v38; // [sp+79h] [bp-2007h]@1
- signed int v39; // [sp+7Dh] [bp-2003h]@1
- signed int v40; // [sp+81h] [bp-1FFFh]@1
- signed int v41; // [sp+85h] [bp-1FFBh]@1
- signed int v42; // [sp+89h] [bp-1FF7h]@1
- signed int v43; // [sp+8Dh] [bp-1FF3h]@1
- signed int v44; // [sp+91h] [bp-1FEFh]@1
- signed int v45; // [sp+95h] [bp-1FEBh]@1
- signed __int16 v46; // [sp+99h] [bp-1FE7h]@1
- signed int v47; // [sp+9Bh] [bp-1FE5h]@1
- signed int v48; // [sp+9Fh] [bp-1FE1h]@1
- signed int v49; // [sp+A3h] [bp-1FDDh]@1
- signed int v50; // [sp+A7h] [bp-1FD9h]@1
- signed int v51; // [sp+ABh] [bp-1FD5h]@1
- char v52; // [sp+AFh] [bp-1FD1h]@1
- char v53; // [sp+B0h] [bp-1FD0h]@1
- char v54; // [sp+F8h] [bp-1F88h]@1
- signed int v55; // [sp+F9h] [bp-1F87h]@1
- signed int v56; // [sp+FDh] [bp-1F83h]@1
- signed int v57; // [sp+101h] [bp-1F7Fh]@1
- signed int v58; // [sp+105h] [bp-1F7Bh]@1
- signed int v59; // [sp+109h] [bp-1F77h]@1
- signed int v60; // [sp+10Dh] [bp-1F73h]@1
- char v61; // [sp+111h] [bp-1F6Fh]@1
- signed int v62; // [sp+112h] [bp-1F6Eh]@1
- signed int v63; // [sp+116h] [bp-1F6Ah]@1
- signed int v64; // [sp+11Ah] [bp-1F66h]@1
- signed int v65; // [sp+11Eh] [bp-1F62h]@1
- signed __int16 v66; // [sp+122h] [bp-1F5Eh]@1
- char v67; // [sp+124h] [bp-1F5Ch]@1
- char v68; // [sp+8F4h] [bp-178Ch]@1
- char v69; // [sp+10C4h] [bp-FBCh]@1
- char v70; // [sp+1894h] [bp-7ECh]@1
- signed int i; // [sp+2064h] [bp-1Ch]@1
- void *v72; // [sp+2068h] [bp-18h]@1
- void *v73; // [sp+206Ch] [bp-14h]@1
- v72 = malloc(0x7D0u);
- v73 = malloc(4u);
- v62 = 543646273;
- v63 = 1914724966;
- v64 = 745301614;
- v65 = 1902670112;
- v66 = 114;
- v55 = 1635413585;
- v56 = 560428576;
- v57 = 1179403808;
- v58 = 542790215;
- v59 = 1498828371;
- v60 = 978470216;
- v61 = 0;
- memcpy(&v53, "v\nGFr^r\n\n\nZf.,G,u/\t\t-nG\n-_J.\r..r\r[#]N\r\r\aer\n;;Abg\n\rRc}vp@a{rffN?g#N...yY", 0x48u);
- v54 = aVGfrRZf_GUNg_j[72];
- v47 = 543711820;
- v48 = 544367982;
- v49 = 543646305;
- v50 = 1887007338;
- v51 = 779254370;
- v52 = 0;
- v38 = 1886806866;
- v39 = 1918983774;
- v40 = 757948205;
- v41 = 711353951;
- v42 = 2071086624;
- v43 = 811544621;
- v44 = 1752202541;
- v45 = 1735812447;
- v46 = 108;
- v34 = 1919312214;
- v35 = 1629513573;
- v36 = 980580974;
- v37 = 32;
- v28 = 1919312214;
- v29 = 2032166757;
- v30 = 543647342;
- v31 = 1920626273;
- v32 = 8250;
- v33 = 0;
- v24 = 1919312214;
- v25 = 1713399653;
- v26 = 540699506;
- v27 = 0;
- v19 = 1919312214;
- v20 = 1864397157;
- v21 = 1969710454;
- v22 = 980184689;
- v23 = 32;
- v11 = 168452438;
- v12 = 762471946;
- v13 = 757935405;
- v14 = 707422053;
- v15 = 1579166250;
- v16 = 1717988963;
- v17 = 980511242;
- v18 = 32;
- *(_DWORD *)v73 = 0;
- untrash((const char *)&v38);
- v0 = tor(&v38);
- printf("\n--- Welcome to '%s' systems.\n", v0);
- v1 = tor(&v34);
- printf("%s", v1);
- fflush(stdin);
- gets(&v70);
- v2 = tor(&v28);
- printf("%s", v2);
- fflush(stdin);
- gets(&v69);
- v3 = tor(&v24);
- printf("%s", v3);
- fflush(stdin);
- gets((char *)v72);
- v4 = tor(&v19);
- printf("%s", v4);
- fflush(stdin);
- gets(&v68);
- untrash((const char *)&v11);
- v5 = tor(&v11);
- printf("%s", v5);
- fflush(stdin);
- gets(&v67);
- for ( i = -5; i <= 9; ++i )
- {
- if ( *(_DWORD *)v73 == i )
- {
- v6 = tor(&v47);
- printf("ALERT: %s\n", v6);
- }
- }
- if ( *(_DWORD *)v73 )
- {
- untrash(&v53);
- v8 = tor((int *)&v53);
- v9 = tor(&v55);
- printf("%s %s\n", v9, v8);
- result = 0;
- }
- else
- {
- if ( strcmp(&v67, "admin_r00t") )
- {
- result = 69;
- }
- else
- {
- v10 = tor(&v62);
- printf("%s :)\n", v10);
- result = 69;
- }
- }
- return result;
- }
- //----- (08048B00) --------------------------------------------------------
- void __cdecl _libc_csu_fini()
- {
- ;
- }
- //----- (08048B10) --------------------------------------------------------
- int *__cdecl _libc_csu_init()
- {
- init_proc();
- return &_CTOR_LIST__;
- }
- // 8049F0C: using guessed type int _CTOR_LIST__;
- //----- (08048B6A) --------------------------------------------------------
- void __cdecl _i686_get_pc_thunk_bx()
- {
- ;
- }
- //----- (08048B70) --------------------------------------------------------
- void (*__cdecl _do_global_ctors_aux())(void)
- {
- void (*result)(void); // eax@1
- int *v1; // ebx@2
- result = (void (*)(void))_CTOR_LIST__;
- if ( _CTOR_LIST__ != -1 )
- {
- v1 = &_CTOR_LIST__;
- do
- {
- --v1;
- result();
- result = (void (*)(void))*v1;
- }
- while ( *v1 != -1 );
- }
- return result;
- }
- // 8049F0C: using guessed type int _CTOR_LIST__;
- //----- (08048B9C) --------------------------------------------------------
- void __cdecl term_proc()
- {
- _do_global_dtors_aux();
- }
- #error "There were 1 decompilation failure(s) on 12 function(s)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement