TL;DR: The registers are used to pass arguments between the calling function to the callee. In order to understand their values you'll need to look at code prior to it being called.
Since you've mentioned the data stored from the registers is then used to initialize another register before a call, this is a case of data passed between functions using registers.
This may slightly look like saving registers for them to be restored prior to retuning back to the caller, however according to OP the values are not copied back from the stack (
var_40) near the functions return. Additionally,
eax is nearly never a preserved register so this is unlikely to be the case.
What are calling conventions
Calling convention is how arguments are passed between caller and callee functions. Wether arguments are stored on the stack, in registers or anyplace else by the caller function prior to calling the callee function, in order for the callee function to read them.
Once we know what calling conventions are, a question raises as to who defined what available calling conventions are available as well as picks the calling convention to use between functions. Obviously, if a caller and callee assume a different calling convention code will break and we'll likely to get a segfault.
Although this question may seem trivial in cases where the same compiler builds both the callee and caller, compiling different binaries by different compilers may complicate things.
You may want to read more about calling conventions used by the compiler/architecture you're reverse engineering.
fastcall calling conventions
There are quite a few x86 calling conventions with several resembling each other but used by different compilers but x64 calling conventions are more standardized.
Originally, calling conventions heavily relied on the stack and all parameters were passed through it, however for performance reasons register usage became more frequent as it avoids the extra memory writes. Since not all data can be stored using registers (and other reasons) these are mixed calling conventions.
These mixed calling conventions are commonly called "fastcall" due to being faster by avoiding the unneeded stack writes. There are several x86 fast calling conventions, depending on compiler used. Although there are several calling conventions take make usage of the
edx, but the important thing to note here is that they're used for the values previously set by the calling function.