You probably don't know how to use Ghidra right now. That is fine. Use Ghidra to open up the decompiled source code for this function. Then track the function calls and see what happens.
- In your own words, describe what occurs in this program from a high level. Do not use address or variable names.