I am reversing a program with IDA Pro, but for some reason it cannot recognize a function inside the text section.
Can someone show me how to reformat the codes (in the figure) as a function?
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.
Sign up to join this communityYou should be able to go to encrypt_String and press P
I experienced this error when function body contained some embedded data; it is normal for assembler code, but I never saw such technique with high level language, so code packers/obfuscators embed data pieces in code segment as anti-disassembling measure.
When unused random data appears in code, IDA can not detect function borders automatically.
So, in such obfuscated code, instead of Create function
(or press P
) at the function start you can use Set function end
(or press E
) at function end, and IDA will create function from last "non-function" code start to current function. From my experience, this way may work with P
at the beginning of obfuscated function doesn't work.