SHOW:
|
|
- or go back to the newest paste.
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) |
7 | + | |
8 | int main() | |
9 | - | for (int i = 0; i < (arraylength / 2); i++) { |
9 | + | |
10 | - | int temporary = array[i]; // temporary wasn't declared |
10 | + | |
11 | - | array[i] = array[(arraylength - 1) - i]; |
11 | + | |
12 | - | array[(arraylength - 1) - i] = temporary; |
12 | + | |
13 | HANDLE dll = LoadLibrary(L"C:\\Users\\MyPC\\Desktop\\DumpShark\\step_by_step.dll"); | |
14 | - | } |
14 | + | |
15 | ||
16 | ||
17 | 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}; | |
18 | FARPROC fn[27]; | |
19 | ||
20 | for (int i = 0; i < 27; i++) { | |
21 | fn[i] = GetProcAddress((HMODULE)dll, (LPCSTR)MAKEINTRESOURCE(ordinal[i])); | |
22 | } | |
23 | ||
24 | FARPROC print= GetProcAddress((HMODULE)dll, (LPCSTR)"Print"); | |
25 | ||
26 | for (int i = 26; i >=0; i--) { | |
27 | BYTE res = (BYTE)fn[i](); | |
28 | } | |
29 | print(); | |
30 | cout<< endl; | |
31 | FreeLibrary((HMODULE)dll); | |
32 | ||
33 | ||
34 | ||
35 | system("pause"); | |
36 | return 0; | |
37 | } |