<s> import sys <EOL> import os . path <EOL> sys . path . append ( os . path . abspath ( __file__ + "<STR_LIT>" ) ) <EOL> import windows <EOL> import windows . native_exec . simple_x86 as x86 <EOL> import windows . native_exec . simple_x64 as x64 <EOL> cp = windows . current_process <EOL> print ( "<STR_LIT>" . format ( cp = windows . current_process ) ) <EOL> print ( "<STR_LIT>" . format ( cp = cp ) ) <EOL> print ( "<STR_LIT>" . format ( cp = cp ) ) <EOL> print ( "<STR_LIT>" . format ( cp = cp ) ) <EOL> print ( "<STR_LIT>" . format ( cp = cp ) ) <EOL> print ( "<STR_LIT>" ) <EOL> if windows . current_process . bitness == <NUM_LIT:32> : <EOL> code = x86 . MultipleInstr ( ) <EOL> code += x86 . Mov ( "<STR_LIT>" , <NUM_LIT> ) <EOL> code += x86 . Inc ( "<STR_LIT>" ) <EOL> code += x86 . Ret ( ) <EOL> else : <EOL> code = x64 . MultipleInstr ( ) <EOL> code += x64 . Mov ( "<STR_LIT>" , <NUM_LIT> ) <EOL> code += x64 . Inc ( "<STR_LIT>" ) <EOL> code += x64 . Ret ( ) <EOL> native_code = code . get_code ( ) <EOL> v = windows . current_process . execute ( native_code ) <EOL> print ( "<STR_LIT>" ) <EOL> v . wait ( ) <EOL> print ( "<STR_LIT>" . format ( hex ( v . exit_code ) ) ) <EOL> print ( "<STR_LIT>" ) <EOL> addr = cp . virtual_alloc ( <NUM_LIT> ) <EOL> print ( "<STR_LIT>" . format ( hex ( addr ) ) ) <EOL> print ( "<STR_LIT>" ) <EOL> cp . write_memory ( addr , "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" . format ( repr ( cp . read_memory ( addr , <NUM_LIT:20> ) ) ) ) </s>
