rework endswitch disassemble
This commit is contained in:
parent
c0580ef14a
commit
7b1fdea6b7
@ -365,15 +365,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
||||
{
|
||||
const auto value = script_->read<std::uint32_t>();
|
||||
|
||||
if (value < 0x40000 && value > 0)
|
||||
if (value < 0x40000)
|
||||
{
|
||||
const auto data = stack_->read_c_string();
|
||||
|
||||
if (data.data()[0] != 0x01)
|
||||
{
|
||||
inst->data.push_back("case");
|
||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
||||
inst->data.push_back(utils::string::quote(data, false));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
else
|
||||
inst->data.push_back("default");
|
||||
stack_->read_c_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -365,15 +365,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
||||
{
|
||||
const auto value = script_->read<std::uint32_t>();
|
||||
|
||||
if (value < 0x40000 && value > 0)
|
||||
if (value < 0x40000)
|
||||
{
|
||||
const auto data = stack_->read_c_string();
|
||||
|
||||
if (data.data()[0] != 0x01)
|
||||
{
|
||||
inst->data.push_back("case");
|
||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
||||
inst->data.push_back(utils::string::quote(data, false));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
else
|
||||
inst->data.push_back("default");
|
||||
stack_->read_c_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -364,15 +364,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
||||
{
|
||||
const auto value = script_->read<std::uint32_t>();
|
||||
|
||||
if (value < 0x40000 && value > 0)
|
||||
if (value < 0x40000)
|
||||
{
|
||||
const auto data = stack_->read_c_string();
|
||||
|
||||
if (data.data()[0] != 0x01)
|
||||
{
|
||||
inst->data.push_back("case");
|
||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
||||
inst->data.push_back(utils::string::quote(data, false));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
else
|
||||
inst->data.push_back("default");
|
||||
stack_->read_c_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -364,15 +364,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
||||
{
|
||||
const auto value = script_->read<std::uint32_t>();
|
||||
|
||||
if (value < 0x40000 && value > 0)
|
||||
if (value < 0x40000)
|
||||
{
|
||||
const auto data = stack_->read_c_string();
|
||||
|
||||
if (data.data()[0] != 0x01)
|
||||
{
|
||||
inst->data.push_back("case");
|
||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
||||
inst->data.push_back(utils::string::quote(data, false));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
else
|
||||
inst->data.push_back("default");
|
||||
stack_->read_c_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -364,15 +364,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
||||
{
|
||||
const auto value = script_->read<std::uint32_t>();
|
||||
|
||||
if (value < 0x40000 && value > 0)
|
||||
if (value < 0x40000)
|
||||
{
|
||||
const auto data = stack_->read_c_string();
|
||||
|
||||
if (data.data()[0] != 0x01)
|
||||
{
|
||||
inst->data.push_back("case");
|
||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
||||
inst->data.push_back(utils::string::quote(data, false));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
else
|
||||
inst->data.push_back("default");
|
||||
stack_->read_c_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -365,15 +365,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
||||
{
|
||||
const auto value = script_->read<std::uint32_t>();
|
||||
|
||||
if (value < 0x40000 && value > 0)
|
||||
if (value < 0x40000)
|
||||
{
|
||||
const auto data = stack_->read_c_string();
|
||||
|
||||
if (data.data()[0] != 0x01)
|
||||
{
|
||||
inst->data.push_back("case");
|
||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
||||
inst->data.push_back(utils::string::quote(data, false));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
else
|
||||
inst->data.push_back("default");
|
||||
stack_->read_c_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -366,15 +366,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
||||
{
|
||||
const auto value = script_->read<std::uint32_t>();
|
||||
|
||||
if (value < 0x40000 && value > 0)
|
||||
if (value < 0x40000)
|
||||
{
|
||||
const auto data = stack_->read_c_string();
|
||||
|
||||
if (data.data()[0] != 0x01)
|
||||
{
|
||||
inst->data.push_back("case");
|
||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
||||
inst->data.push_back(utils::string::quote(data, false));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
else
|
||||
inst->data.push_back("default");
|
||||
stack_->read_c_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -417,15 +417,17 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst)
|
||||
{
|
||||
const auto value = script_->read<std::uint32_t>();
|
||||
|
||||
if (value < 0x40000 && value > 0)
|
||||
if (value < 0x80000)
|
||||
{
|
||||
const auto data = stack_->read_c_string();
|
||||
|
||||
if (data.data()[0] != 0x01)
|
||||
{
|
||||
inst->data.push_back("case");
|
||||
inst->data.push_back(utils::string::quote(stack_->read_c_string(), false));
|
||||
inst->data.push_back(utils::string::quote(data, false));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
else
|
||||
inst->data.push_back("default");
|
||||
stack_->read_c_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user