LUA [NEVERLOSE] Герцовка / Frequency

  • 20
  • 1
  • 12
Lua:
do
    local FFE1 = utils.opcode_scan('engine.dll', 'FF E1')
    local ctype = ffi.typeof( 'int(__fastcall*)(unsigned int, unsigned int, unsigned int, unsigned long, void*)')
    local fnGetModuleHandle = ffi.cast('uint32_t(__fastcall*)(unsigned int, unsigned int, const char*)', FFE1)
    local pGetModuleHandle = ffi.cast('uint32_t**', ffi.cast('uint32_t', utils.opcode_scan('engine.dll', 'FF 15 ? ? ? ? 85 C0 74 0B')) + 2)[0][0]
    local fnGetProcAddress = ffi.cast('uint32_t(__fastcall*)(unsigned int, unsigned int, uint32_t, const char*)', FFE1)
    local pGetProcAddress = ffi.cast('uint32_t**', ffi.cast('uint32_t', utils.opcode_scan('engine.dll', 'FF 15 ? ? ? ? A3 ? ? ? ? EB 05')) + 2)[0][0]
    local pLpDevMode0 = ffi.new('struct { char pad_0[120]; unsigned long dmDisplayFrequency; char pad_2[32]; }[1]')[0]
    local mdHandle = fnGetModuleHandle(pGetModuleHandle,0,'user32.dll')
    local pcAdd = fnGetProcAddress(pGetProcAddress,0,mdHandle,'EnumDisplaySettingsA')
    ffi.cast(ctype, FFE1)(
        pcAdd,
        0,
        0,
        4294967295,
        pLpDevMode0
    )
    frequency = pLpDevMode0.dmDisplayFrequency
end
print(frequency) --etc
 
Сверху Снизу