Skip to content

Commit

Permalink
Added test to 0AA4
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC committed Apr 13, 2024
1 parent d15c006 commit 0fbb3c0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/cleo_tests/MemoryOperations/0AA4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ terminate_this_custom_script
function tests

it("should return address of Sleep function from kernel32.dll", test1)
it("should get export by index", test2)
return

function test1
Expand All @@ -24,4 +25,18 @@ function tests
assert(false)
end
end

function test2
int load_library_addr = read_memory 0x858070 4 false

int kernel_dll_addr = call_function_return {address} load_library_addr {numParams} 1 {pop} 0 {funcParams} "kernel32.dll" // tested opcode
if
// lib address can be any valid pointer, not necessarily one loaded with 0AA2 opcode
int sleep_addr = get_dynamic_library_procedure {procName} 1 {DynamicLibrary} kernel_dll_addr
then
assert(true)
else
assert(false)
end
end
end

0 comments on commit 0fbb3c0

Please sign in to comment.