1
0
Fork 0

DBG: slight logic change

This commit is contained in:
mrexodia 2016-10-17 14:13:16 +02:00
parent 11d6d9a636
commit d2f8991805
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 6 additions and 14 deletions

View File

@ -268,20 +268,12 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR
if(instr.arg[i].constant == instr.arg[i].value) //avoid: call <module.label> ; addr:label
{
if(instr.type == instr_branch)
{
if(strstr(instr.instruction, "call") && instr.argcount == 1 && !instr.arg[0].memvalue && instr.arg[0].constant == addr + instr.instr_size)
{
temp_string.assign("call the next instruction");
}
else
{
continue;
}
}
auto constant = instr.arg[i].constant;
if(instr.arg[i].type == arg_normal && constant < 256 && (isprint(int(constant)) || isspace(int(constant))) && (strstr(instr.instruction, "cmp") || strstr(instr.instruction, "mov")))
if(instr.arg[i].value == addr + instr.instr_size && strstr(instr.instruction, "call"))
temp_string.assign("call $0");
else if(instr.type == instr_branch)
continue;
else if(instr.arg[i].type == arg_normal && constant < 256 && (isprint(int(constant)) || isspace(int(constant))) && (strstr(instr.instruction, "cmp") || strstr(instr.instruction, "mov")))
{
temp_string.assign(instr.arg[i].mnemonic);
temp_string.push_back(':');
@ -289,7 +281,7 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR
temp_string.append(StringUtils::Escape((unsigned char)constant));
temp_string.push_back('\'');
}
if(DbgGetStringAt(instr.arg[i].constant, string_text))
else if(DbgGetStringAt(instr.arg[i].constant, string_text))
{
temp_string.assign(instr.arg[i].mnemonic);
temp_string.push_back(':');