summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-05-27 05:01:39 -0400
committermidipix <writeonce@midipix.org>2016-05-27 05:04:15 -0400
commit18fa180b7093bedf5347979ffb95419aacaffe61 (patch)
tree466e55a1b9f0c3126cc0097c30324b81095c6a62
parentcfd00a35a48e9a721d18c9c1d504370277fbbbff (diff)
downloadpemagine-18fa180b7093bedf5347979ffb95419aacaffe61.tar.bz2
pemagine-18fa180b7093bedf5347979ffb95419aacaffe61.tar.xz
pe_get_imported_symbol_info_32(): simplify logic.
-rw-r--r--src/meta/pe_get_symbol_name.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/meta/pe_get_symbol_name.c b/src/meta/pe_get_symbol_name.c
index e0205ce..31d351f 100644
--- a/src/meta/pe_get_symbol_name.c
+++ b/src/meta/pe_get_symbol_name.c
@@ -112,26 +112,16 @@ static char * pe_get_imported_symbol_info_32(
struct symbol * sym;
fn_name = 0;
- mod_info = 0;
sym = (struct symbol *)sym_addr;
- if ((sym->call == 0xff) && (sym->ds == 0x25)) {
- sym_redirected_addr = (uint32_t ***)sym->sym_addr;
-
- if (sym_redirected_addr)
- mod_info = pe_get_symbol_module_info(**sym_redirected_addr);
-
- if (mod_info)
- mod_base = mod_info->dll_base;
- else
- mod_base = (void *)0;
-
- if (mod_base)
- fn_name = pe_get_symbol_name(
- mod_base,
- **sym_redirected_addr);
- }
-
+ if ((sym->call == 0xff) && (sym->ds == 0x25))
+ if ((sym_redirected_addr = (uint32_t ***)sym->sym_addr))
+ if ((mod_info = pe_get_symbol_module_info(
+ **sym_redirected_addr)))
+ if ((mod_base = mod_info->dll_base))
+ fn_name = pe_get_symbol_name(
+ mod_base,
+ **sym_redirected_addr);
if (fn_name && ldr_tbl_entry)
*ldr_tbl_entry = mod_info;