private function create_runtime($ldr) { $this->eip = null; $this->rva = null; $this->offset = null; if ($ldr) { try { if (is_object($ldr->cpu)) { require_once PLATO_ROOT . 'class.disassemble.php'; $this->eip = $ldr->cpu->register->eip; $this->rva = $ldr->memory->conv_address_rva($this->eip); $this->offset = $ldr->bin->conv_rva_offset($this->rva); /* 反汇编 */ $this->opcode = plato_class_disassemble::parse($ldr); } } catch (Exception $ex) { // do nothing } } }
private function invoke($object, $map) { if ($map) { if ($object[0] == $this) { /* breakpoint */ if ($this->debug) { call_user_func($this->debug, $this->ldr, $this->register->eip); } return false; } else { if ($this->track) { echo '[SERVICE] __plato_' . substr($object[1], 7) . '<br />'; } /* return address */ $this->register->eip = $this->pop(4); /* call service program */ call_user_func($object); return true; } } if ($this->track) { printf('[C: 0x%08X] ', $this->decoder->address); echo plato_class_disassemble::parse($this->ldr); echo '<br />'; } return call_user_func($object); }