Joke Collection Website - Talk about mood - Yi language: memory _ driver read and write 1. Write byte set source code.

Yi language: memory _ driver read and write 1. Write byte set source code.

. Subroutine? Read byte set. Byte set? Open? Read byte set data (return byte set? Failed to return empty)?

. Parameters? Process ID, integer type,? ,? Process ID

. Parameters? Memory address,? Integer? ,? store address

. Parameters? Length? Integer? Can you be free? Can be empty. Leave blank to read the length intelligently.

. Local variables? Variable? Byte set? ,? ,? A variable that holds the read data.

. Local variables? Operation handle, integer

. Local variables? Memory block information, Jingyi _ Memory attribute

Operating handle? =? OpenProcess? (#PROCESS_ALL_ACCESS,? 0,? Process ID)'? Get operation handle

What if it's true? (length? =? 0)

VirtualQueryEx? (operating handle,? Memory address,? Memory block information, 28)

Length? =? Memory block information. Area length? +? Memory block information. Area address? -? store address

If it's over.

Variable? =? Take an empty byte set? (length)

ReadProcessMemory_ byte setting? (operating handle,? Memory address,? Variable? Length? 0)

CloseHandle? (operating handle)

Return? (variable). Subroutine? Write byte set? Logical type? Open? Write byte data (success returns true, failure returns false)

. Parameters? Process ID, integer type,? ,? Process ID

. Parameters? Memory address,? Integer? ,? store address

. Parameters? Data to be written? Byte set? ,? Read in data

. Local variables? Operation handle, integer

. Local variables? First,? integer

Operating handle? =? OpenProcess? (#PROCESS_ALL_ACCESS,? 0,? Process ID)

Answer? =? WriteProcessMemory_ byte set? (operating handle,? Memory address,? Data to be written? Take byte set length? (data to be written),? 0)

CloseHandle? (operating handle)

. What if? (a? =? 0)

Return? (error)

Otherwise.

Return? (correct)

. Subroutine? Read decimals? Decimal type, public

. Parameters? Process ID, integer

. Parameters? Memory address,? integer

. Local variables? Temporary integer, decimal type

. Local variables? Operation handle, integer

Operating handle? =? OpenProcess? (#PROCESS_ALL_ACCESS,? 0,? Process ID)'? Get operation handle

ReadProcessMemory_ decimal type? (operating handle,? Memory address,? Temporary integer, 4,? 0)

CloseHandle? (operating handle)

Return? (temporary integer)

. Subroutine? Write decimal, logical? disclose

. Parameters? Process ID, integer type,? ,? Process ID

. Parameters? Memory address,? Integer? ,? store address

. Parameters? The value to write. Decimal type,,? Read in data

. Local variables? Office _ process handle, integer

. Local variables? First,? integer

. Local variables? Director _,? integer

Office _ process handle? =? OpenProcess? (#PROCESS_ALL_ACCESS,? 0,? Process ID)

Answer? =? WriteProcessMemory_ decimal type? (office _ process handle,? Memory address,? The value to write. 4,? 0)

CloseHandle? (office _ process handle)

Return? (a? =? 1)