Function at 0x410840
Capabilities:
Check if file exists
Get file attributes
Get session user name
Link many functions at runtime
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1c04
call fcn.00433e90
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx], 0
je 0x410b9b
push 0x1000
lea eax, [ebp - 0x1404]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x41095c
push str..local
lea eax, [ebp - 0x1404]
push 0x1000
push eax
call fcn.00440343
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [ebp - 0x1404]
add esp, 0xc
push eax
call edi
cmp eax, 0xffffffff
jne 0x41095c
cmp dword [ebx + 4], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
jne 0x41095c
push 0x1000
lea ecx, [ebp - 0x1404]
push ecx
push str.ProgramFiles
call eax
test eax, eax
je 0x410907
push str.Debugging_Tools_for_Windows__x86_dbghelp.dll
lea eax, [ebp - 0x1404]
push 0x1000
push eax
call fcn.00440343
add esp, 0xc
lea eax, [ebp - 0x1404]
push eax
call edi
cmp eax, 0xffffffff
je 0x410907
lea eax, [ebp - 0x1404]
push eax
call esi
mov dword [ebx + 4], eax
cmp dword [ebx + 4], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
jne 0x41095c
push 0x1000
lea ecx, [ebp - 0x1404]
push ecx
push str.ProgramFiles
call eax
test eax, eax
je 0x41095c
push str.Debugging_Tools_for_Windowsdbghelp.dll
lea eax, [ebp - 0x1404]
push 0x1000
push eax
call fcn.00440343
add esp, 0xc
lea eax, [ebp - 0x1404]
push eax
call edi
cmp eax, 0xffffffff
je 0x41095c
lea eax, [ebp - 0x1404]
push eax
call esi
mov dword [ebx + 4], eax
mov eax, dword [ebx + 4]
test eax, eax
jne 0x410975
push str.dbghelp.dll
call esi
mov dword [ebx + 4], eax
test eax, eax
je 0x410b9b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SymInitialize
push eax
call esi
push str.SymCleanup
push dword [ebx + 4]
mov dword [ebx + 0x2c], eax
call esi
push str.StackWalk64
push dword [ebx + 4]
mov dword [ebx + 0x10], eax
call esi
push str.SymGetOptions
push dword [ebx + 4]
mov dword [ebx + 0x38], eax
call esi
push str.SymSetOptions
push dword [ebx + 4]
mov dword [ebx + 0x24], eax
call esi
push str.SymFunctionTableAccess64
push dword [ebx + 4]
mov dword [ebx + 0x34], eax
call esi
push str.SymGetLineFromAddr64
push dword [ebx + 4]
mov dword [ebx + 0x14], eax
call esi
push str.SymGetModuleBase64
push dword [ebx + 4]
mov dword [ebx + 0x18], eax
call esi
push str.SymGetModuleInfo64
push dword [ebx + 4]
mov dword [ebx + 0x1c], eax
call esi
push str.SymGetSymFromAddr64
push dword [ebx + 4]
mov dword [ebx + 0x20], eax
call esi
push str.UnDecorateSymbolName
push dword [ebx + 4]
mov dword [ebx + 0x28], eax
call esi
push str.SymLoadModule64
push dword [ebx + 4]
mov dword [ebx + 0x3c], eax
call esi
push str.SymGetSearchPath
push dword [ebx + 4]
mov dword [ebx + 0x30], eax
call esi
cmp dword [ebx + 0x10], 0
mov dword [ebx + 0x40], eax
je 0x410b84
cmp dword [ebx + 0x14], 0
je 0x410b84
cmp dword [ebx + 0x1c], 0
je 0x410b84
cmp dword [ebx + 0x20], 0
je 0x410b84
cmp dword [ebx + 0x24], 0
je 0x410b84
cmp dword [ebx + 0x28], 0
je 0x410b84
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x410b84
cmp dword [ebx + 0x34], 0
je 0x410b84
cmp dword [ebx + 0x38], 0
je 0x410b84
cmp dword [ebx + 0x3c], 0
je 0x410b84
cmp dword [ebx + 0x30], 0
je 0x410b84
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x410aa7
push ecx
call fcn.00440467
mov dword [ebx + 0xc], eax
add esp, 4
mov eax, dword [ebx + 0x2c]
push 0
push dword [ebx + 0xc]
push dword [ebx + 8]
call eax
test eax, eax
jne 0x410ad0
mov edi, dword [ebx]
mov eax, dword [edi]
mov esi, dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
push eax
push str.SymInitialize
mov ecx, edi
call esi
mov eax, dword [ebx + 0x24]
call eax
mov ecx, dword [ebx + 0x34]
or eax, 0x214
push eax
call ecx
push 0x800
mov dword [ebp + 8], eax
lea eax, [ebp - 0x1c04]
push 0
push eax
call fcn.00438530
mov ecx, dword [ebx + 0x40]
add esp, 0xc
test ecx, ecx
je 0x410b30
push 0x800
lea eax, [ebp - 0x1c04]
push eax
push dword [ebx + 8]
call ecx
test eax, eax
jne 0x410b30
mov edi, dword [ebx]
mov eax, dword [edi]
mov esi, dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
push eax
push str.SymGetSearchPath
mov ecx, edi
call esi
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.00438530
add esp, 0xc
mov dword [ebp - 4], 0x400
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov ecx, dword [ebx]
lea edx, [ebp - 0x404]
push edx
push dword [ebp + 8]
lea edx, [ebp - 0x1c04]
mov eax, dword [ecx]
push edx
call dword [eax + 4]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebx + 4], 0
mov dword [ebx + 0x10], 0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4