Advertisement
Guest User

Untitled

a guest
May 18th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <vector>
  3. #include "stdafx.h"
  4. #include <windows.h>
  5. #include <iostream>
  6. using namespace std;
  7. void reverse_array(int array[], int arraylength)
  8. {
  9. for (int i = 0; i < (arraylength / 2); i++) {
  10. int temporary = array[i]; // temporary wasn't declared
  11. array[i] = array[(arraylength - 1) - i];
  12. array[(arraylength - 1) - i] = temporary;
  13. }
  14. }
  15. int main()
  16. {
  17.  
  18. typedef int(__stdcall *f_funci)();
  19.  
  20. HANDLE dll = LoadLibrary(L"C:\\Users\\MyPC\\Desktop\\DumpShark\\step_by_step.dll");
  21.  
  22.  
  23.  
  24. int ordinal[] = { 20, 15, 3, 4, 19, 29, 30, 21, 8, 14, 28, 6, 29, 30, 23, 25, 1, 2, 18, 27, 9, 23, 29, 24, 5, 10,1};
  25. FARPROC fn[27];
  26.  
  27. for (int i = 0; i < 27; i++) {
  28. fn[i] = GetProcAddress((HMODULE)dll, (LPCSTR)MAKEINTRESOURCE(ordinal[i]));
  29. }
  30.  
  31. FARPROC print= GetProcAddress((HMODULE)dll, (LPCSTR)"Print");
  32.  
  33. for (int i = 26; i >=0; i--) {
  34. BYTE res = (BYTE)fn[i]();
  35. }
  36. print();
  37. cout<< endl;
  38. FreeLibrary((HMODULE)dll);
  39.  
  40.  
  41.  
  42. system("pause");
  43. return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement