MCPcopy Create free account
hub / github.com/D7EAD/mkPIVM / emit_cipher_reset

Function emit_cipher_reset

src/codec.cpp:98–107  ·  view source on GitHub ↗

reload cipher_state from cipher_init

Source from the content-addressed store, hash-verified

96
97 // reload cipher_state from cipher_init
98 inline void emit_cipher_reset(X64Emitter& e, const VMConfig& vm) {
99 const auto& r = vm.dispatcher_regs();
100 const std::int32_t init_off = static_cast<std::int32_t>(vm.state_layout().cipher_extra) + kCipherInitOff;
101 e.mov_reg_mem(
102 r.cipher_state,
103 r.state_ptr,
104 init_off,
105 true
106 );
107 }
108
109 // fetch one byte from [ip], decrypt with current cipher state, update state,
110 // advance ip, leave result in low 8 of dst

Callers 1

emit_handlerMethod · 0.85

Calls 1

mov_reg_memMethod · 0.45

Tested by

no test coverage detected