RiseVisual

main.cpp

Mar 18th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #include <fstream>
  2. #include "common.h"
  3.  
  4. DWORD WINAPI attach(LPVOID base)
  5. {
  6.  
  7.  
  8. std::ifstream config(std::string(getenv("APPDATA")).append("\\dopamine"));
  9.  
  10. std::string config_folder = "C:\\Users\\joey's pc\\AppData\\Roaming\\ExWdDsOPRUc\\NOuPUcSy";
  11. config >> config_folder;
  12.  
  13. std::ifstream commfile(std::string(config_folder).append("\\comm.txt"));
  14. if (!commfile.good())
  15. {
  16. MessageBoxA(NULL, "Invalid config path.\nPlease fix your path or, if it's correct, run Lua script first.", "Error", NULL);
  17. return 0;
  18. }
  19.  
  20. functions::init();
  21. communication::init(config_folder);
  22.  
  23. return 0;
  24. }
  25.  
  26. BOOL WINAPI DllMain(
  27. _In_ HINSTANCE hinstDll,
  28. _In_ DWORD fdwReason,
  29. _In_opt_ LPVOID lpvReserved
  30. )
  31. {
  32. switch (fdwReason) {
  33. case DLL_PROCESS_ATTACH:
  34. DisableThreadLibraryCalls(hinstDll);
  35. CreateThread(nullptr, 0, attach, hinstDll, 0, nullptr);
  36. return TRUE;
  37. default:
  38. return TRUE;
  39. }
  40. }
Add Comment
Please, Sign In to add comment