summaryrefslogtreecommitdiff
path: root/src/source.cpp
blob: 1ce07546d156d4a95ac01637ff85ab088a13a509 (plain)
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
//|_   _   _.     _  ._  |_   _.  _ |
//| | (/_ (_| \/ (/_ | | | | (_| (_ |<

#include "cs2/hack.h"
#include "conin.h"
#include "menu.h"

bool run() {
  con_init();
  PROCESS64* p = hack_init();

  Sleep( 1000 );
  gcfg.load();

  menu_show_ui( p );

  for( ;; ) {
    if( !hack_run( p ) ) {
      nt_close64( p->get_base() );
      u_sleep( 5 * T_SEC );
      break;
    }
  }

  return false;
}
  
I32 __cdecl main() {
  u_set_debug_privilege();
  u_thread_create( &con_hook_handler );
  u_thread_create( &con_handler );

  for( ; !run(); );

  return 0;
}