def patch(addr): data = list(get_bytes(addr,28)) if((ord(data[0]) == 0xB9) and (ord(data[1]) == 0xD2) and (ord(data[2]) == 0xC3) and ord(data[3]) == 0x01 and (ord(data[5]) == 0xE8) and (ord(data[6]) == 0x0B)): for i in range(0,28): patch_byte(addr+i,0x90) base = 0x401000 len = 0x411000-base for i in range(len): patch(base+i) AnalyzeArea(base, 0x411000) print 'Finished'