0

I've de-compiled in IDA 7.0 (freeware version) such a simple c program (compiled in the Microsoft Visual Studio Community 2019):

#include <stdio.h>
#include <string.h >

char* sayHello(char* resultStr, char* addedStr) {
  strcat_s(resultStr, strlen(resultStr)+strlen(addedStr)+1, addedStr);
  return resultStr;
}

int main() {
  char str_in_1[100] = "Hello"; 
  char str_in_2[] = " World!";

  printf ("%s", sayHello(str_in_1, str_in_2));
}

Now i can't find the string sayHello (function name) either in the Functions window nor in the IDA View-A. How to find out w

9
  • Hello your question was not very clear, I could insert the disassembly part or improve your question, I can't help you with little information without seeing something similar in Assembly, link images of your disassembler, show us how the machine code was.
    – Happy
    Feb 5, 2021 at 11:43
  • At the risk of answering wrong, you usually compile code in VSC, and try to make a disassembler you will not find clean functions, you need to find them manually, when compiled the VSC generates a .pdb file, use it together with your IDA, there are references in which you search and you can facilitate your studies and analysis in general, however the sooner you train without this resource the better.
    – Happy
    Feb 5, 2021 at 11:46
  • So without the .pdb file the IDA can't produce assembled code with functins names?
    – Daros911
    Feb 5, 2021 at 15:21
  • @0x0A Can You be so nice and answer my question?
    – Daros911
    Feb 5, 2021 at 15:40
  • Exact, it will not produce the exact function name code, however it will retrieve the name of the functions imported by its binary and through them you can identify where the algorithm is located within the IDA disassembler, so I recommend a lot of practice is necessary intermediate knowledge of C and understand how windows internals work.
    – Happy
    Feb 5, 2021 at 15:57

1 Answer 1

1

Default VS compilation options do not enable debugging information generation so all function names are removed from the final executable (they're not required for execution). You need to build with debug info on and ensure that the PDB file is available when you open the exe in IDA.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.