Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. typedef int (WINAPI* _MessageBoxA)(HWND, LPTSTR, LPTSTR, UINT);
  2. HMODULE user32 = (*LoadLibraryAPointer)("user32.dll");
  3. PDWORD Address = (PDWORD)((LPBYTE)user32 + pIED->AddressOfFunctions);
  4. PDWORD Name = (PDWORD)((LPBYTE)user32 + pIED->AddressOfNames);
  5. PDWORD Ordinal = (PWORD)((LPBYTE)user32 + pIED->AddressOfNameOrdinals);
  6.  
  7. _LoadLibraryA LoadLibraryAPointer;
  8. _MessageBoxA MessageBoxPointer;
  9.  
  10. for (int i = 0; i < pIED->AddressOfFunctions; i++)
  11. {
  12. if (!hashComparatorA(MESSAGE_BOX_HASH, (char*)user32 + Name[i]))
  13. {
  14. MessageBoxPointer = (user32 + Address[Ordinal[i]]);
  15. break;
  16. }
  17. }
  18.  
  19. error C2440: '=' : cannot convert from 'HMODULE' to '_MessageBoxA'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement