I have an exe file but no access to its source code. It takes as input a list of 8 parameters and prints text files containing the output. I was wondering if it is possible to write an AI-based program that (given that I am a newbie with IA) can "train" a neural network using the input and output of my exe file to kind of create a black box that emulate the given exe file.
If the program is a black box - that is, it actually computes its output from the values of the inputs within its own code (which means, it does not, for example, go out and read values off some device, or rely on some external service whose results are not predictable) - then, yes, you can write an AI that emulates the program. Unless the program is fairly trivial, however, the emulation will be approximate - that is, for at least some inputs, the output will not be correct. How close you can get to adequate emulation will depend on the details of how the inputs are processed, and how much training effort you are will and able to afford.
If you want to do this, you should probably start learning about reinforcement learning toolkits. Rllib is one popular such tool set, if you're using (as I would assume you are) Python for your experiments.