Comments (10)
Can you successfully run RetDec (retdec-decompiler.py
) from command line - not via IDA?
I.e. gen you try the following:
python retdec-decompiler.py --help
- In your environment probably something like this (I'm guessing from the paths in that error message, maybe you will have to fix it a little bit):
C:\Users\x230\AppData\Local\Programs\Python\Python35-32\python.exe D:\GitHub\retdec-v3.3-windows-32b\retdec\bin\retdec-decompiler.py --help
- In your environment probably something like this (I'm guessing from the paths in that error message, maybe you will have to fix it a little bit):
python retdec-decompiler.py x86_crackme_hash.exe
C:\Users\x230\AppData\Local\Programs\Python\Python35-32\python.exe D:\GitHub\retdec-v3.3-windows-32b\retdec\bin\retdec-decompiler.py D:\examples\x86_crackme_hash.exe
If it works, we will try some more things. If it does not, please paste here what is says.
from retdec-idaplugin.
Can you successfully run RetDec (
retdec-decompiler.py
) from command line - not via IDA?I.e. gen you try the following:
python retdec-decompiler.py --help
- In your environment probably something like this (I'm guessing from the paths in that error message, maybe you will have to fix it a little bit):
C:\Users\x230\AppData\Local\Programs\Python\Python35-32\python.exe D:\GitHub\retdec-v3.3-windows-32b\retdec\bin\retdec-decompiler.py --help
python retdec-decompiler.py x86_crackme_hash.exe
C:\Users\x230\AppData\Local\Programs\Python\Python35-32\python.exe D:\GitHub\retdec-v3.3-windows-32b\retdec\bin\retdec-decompiler.py D:\examples\x86_crackme_hash.exe
If it works, we will try some more things. If it does not, please paste here what is says.
Running alone looks like there is no problem, but there is an error message, I don't know if it is the reason.
`##### Trying to unpack D:\examples\x86_crackme_hash.exe into D:\examples\x86_crackme_hash-unpacked.tmp by using generic unpacker...
RUN: D:\GitHub\retdec-v3.2-windows-32b\retdec\bin\retdec-unpacker D:\examples\x86_crackme_hash.exe -o D:\examples\x86_crackme_hash-unpacked.tmp --max-memory-half-ram
No matching plugins found for 'Microsoft Linker 12.0'
No matching plugins found for 'MSVC'Unpacking by using generic unpacker: nothing to do
'upx' not available: nothing to do`
from retdec-idaplugin.
//
// This file was generated by the Retargetable Decompiler
// Website: https://retdec.com
// Copyright (c) 2019 Retargetable Decompiler [email protected]
//
#include <stdint.h>
#include <stdio.h>
// ------------------- Function Prototypes --------------------
int32_t function_401000(char * a1);
// --------------------- Global Variables ---------------------
char (*g1)[6] = "1>=&1";
// ------------------------ Functions -------------------------
// Address range: 0x401000 - 0x40105c
int32_t function_401000(char * a1) {
char v1 = *a1; // 0x4010265
if (v1 == 0) {
// 0x401054
return 0xabcd;
}
int32_t v2 = *(int32_t *)&g1;
int32_t v3 = 0; // 0x4010238
char v4 = *(char *)((int32_t)(0x100000000 * (int64_t)(v3 >> 31) % 5) + v2); // 0x401046
int32_t result = (int32_t)(v4 ^ v1) + 0xabcd; // 0x40104c
int32_t v5 = v3 + 1; // 0x40101a
char v6 = *(char *)(v5 + (int32_t)a1); // 0x401026
// branch -> 0x40102d
while (v6 != 0) {
// 0x40102d
v3 = v5;
v4 = *(char *)((int32_t)((0x100000000 * (int64_t)(v3 >> 31) | (int64_t)v5 & 0xffffffff) % 5) + v2);
result += (int32_t)(v4 ^ v6);
v5 = v3 + 1;
v6 = *(char *)(v5 + (int32_t)a1);
// continue -> 0x40102d
}
// 0x401054
return result;
}
// Address range: 0x401060 - 0x4010b7
int main(int argc, char ** argv) {
int32_t result = -1;
if (argc == 2) {
int32_t v1 = function_401000((char )(int32_t *)((int32_t)argv + 4)); // 0x40107e
if (v1 != 0xad6d) {
// 0x4010a2
printf("loose\n");
// branch -> 0x4010b0
} else {
// 0x401092
printf("Win\n");
// branch -> 0x4010b0
}
// 0x4010b0
result = v1;
// branch -> 0x4010b3
}
// 0x4010b3
return result;
}
// --------------- Dynamically Linked Functions ---------------
// int printf(const char * restrict format, ...);
// --------------------- Meta-Information ---------------------
// Detected compiler/packer: microsoft linker (12.0)
// Detected functions: 2
// Decompilation date: 2019-03-20 18:16:00
from retdec-idaplugin.
Ok, it looks like RetDec itself is working.
No, that message about not available UPX is not critical and can be ignored.
Now, we will try to determine if something goes wrong with the decompilation itself, or if the problem is in IDA plugin.
Trigger decompilation from IDA plugin - it will fail, but it will generate the needed files (e.g. config file x86_crackme_hash.idb.json
) and it will show that error message you posted. Copy (or rewrite) the full command that is being run by launch_process(command)
and try to run it manually - i.e. run C:\Users\x230\AppData\Local\Programs\Python\Python35-32\python.exe "D:\GitHub\retdec-v3.3-windows-32b\retdec\bin\retdec-decompiler.py" "D:\examples\x86_crackme_hash.exe" --config="..." --color-for-ida -o "..." --select-decode-only --select-ranges="..."
.
Does it fail, or does it work? If it fails, what does it say?
from retdec-idaplugin.
Ok, it looks like RetDec itself is working.
No, that message about not available UPX is not critical and can be ignored.Now, we will try to determine if something goes wrong with the decompilation itself, or if the problem is in IDA plugin.
Trigger decompilation from IDA plugin - it will fail, but it will generate the needed files (e.g. config filex86_crackme_hash.idb.json
) and it will show that error message you posted. Copy (or rewrite) the full command that is being run bylaunch_process(command)
and try to run it manually - i.e. runC:\Users\x230\AppData\Local\Programs\Python\Python35-32\python.exe "D:\GitHub\retdec-v3.3-windows-32b\retdec\bin\retdec-decompiler.py" "D:\examples\x86_crackme_hash.exe" --config="..." --color-for-ida -o "..." --select-decode-only --select-ranges="..."
.Does it fail, or does it work? If it fails, what does it say?
I've run it manually,seems it's works.So I don't understand why doesn't work in IDA.
If possible, you can use Teamviewer to remotely operate my computer to determine if there is something wrong with my IDA configuration.
from retdec-idaplugin.
I have just noticed that the command in the IDA error window is different from the one that you have tried to run manually:
Even the input files are different. Could you please try running the exact same command as in the IDA error window?
Also, could you please provide the following information?
- What version of IDA do you use?
- What version of
retdec-idaplugin
do you use? - What version of Windows do you use?
from retdec-idaplugin.
What version of IDA do you use? : 7.0
What version of retdec-idaplugin do you use? : v3.3(3.2 the same error)
What version of Windows do you use? :win7 SP1 Ultimate
I noticed that there is no .c file output.
from retdec-idaplugin.
It seems that this problem is caused by Chinese character. When the file you reverse is put in the path that has Chinese character, it raises this error. I meet the same problem, but if I move the file to English path, it works.
from retdec-idaplugin.
It seems that this problem is caused by Chinese character. When the file you reverse is put in the path that has Chinese character, it raises this error. I meet the same problem, but if I move the file to English path, it works.
Thank for replay,But there is absoluty English Path.
from retdec-idaplugin.
After 3503eb6, plugin no longer uses launch_process. Release v1.0 will come shortly.
from retdec-idaplugin.
Related Issues (20)
- Loading of output C file FAILED on Mac HOT 2
- Can help compile a mac version, A Mac IDA7.0 is here HOT 4
- retdec 4.0 unrecognized arguments HOT 5
- lauch_process ... failed with error code 2 HOT 6
- launch_process(...) failed with error code 1 HOT 3
- retdec not loading HOT 2
- How to compile the c file generated by retdec-idaplugin? HOT 1
- Default invocation broken for 32bit targets HOT 4
- Compilation failed during configure-msvc step for yara HOT 1
- Build with old SDK
- Continued support for IDA 7.2-7.4 HOT 2
- Please support IDA 7.7 HOT 8
- The compiled version from release doees not work HOT 4
- Unable to parse decompilation output: The document is empty. HOT 6
- Build failures on macOS HOT 3
- IDA7.7 v1.0 release does not work HOT 6
- Decompile Pesudo Code No Longer Works HOT 1
- this dll let plugin crash
- GLIBC_2.34 error with IDAPro v8.3
- I don't see parameters being used within the code.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from retdec-idaplugin.