Function at 0x476560
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, 0x2818
call fcn.004c4e80
mov eax, dword [0x53c160]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x280c]
push 0x1000
push eax
push 0
mov ebx, ecx
mov dword [ebp - 0x2810], edi
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov esi, dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
test eax, eax
je 0x476680
push str..local
lea eax, [ebp - 0x280c]
push 0x1000
push eax
call fcn.004d7655
mov edi, dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
lea eax, [ebp - 0x280c]
add esp, 0xc
push eax
call edi
cmp eax, 0xffffffff
jne 0x47667a
push 0x1000
lea eax, [ebp - 0x280c]
push eax
push str.ProgramFiles
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
test eax, eax
je 0x476626
push str.Debugging_Tools_for_Windowsdbghelp.dll
lea eax, [ebp - 0x280c]
push 0x1000
push eax
call fcn.004d7655
add esp, 0xc
lea eax, [ebp - 0x280c]
push eax
call edi
cmp eax, 0xffffffff
je 0x476626
lea eax, [ebp - 0x280c]
push eax
call esi
mov dword [ebx + 4], eax
cmp dword [ebx + 4], 0
jne 0x47667a
push 0x1000
lea eax, [ebp - 0x280c]
push eax
push str.ProgramFiles
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
test eax, eax
je 0x47667a
push str.Debugging_Tools_for_Windows_64_Bitdbghelp.dll
lea eax, [ebp - 0x280c]
push 0x1000
push eax
call fcn.004d7655
add esp, 0xc
lea eax, [ebp - 0x280c]
push eax
call edi
cmp eax, 0xffffffff
je 0x47667a
lea eax, [ebp - 0x280c]
push eax
call esi
mov dword [ebx + 4], eax
mov edi, dword [ebp - 0x2810]
mov eax, dword [ebx + 4]
test eax, eax
jne 0x476699
push str.dbghelp.dll
call esi
mov dword [ebx + 4], eax
test eax, eax
je 0x4768e2
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 + 0x30], 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 + 0x3c], eax
call esi
push str.SymSetOptions
push dword [ebx + 4]
mov dword [ebx + 0x28], eax
call esi
push str.SymFunctionTableAccess64
push dword [ebx + 4]
mov dword [ebx + 0x38], 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.SymGetModuleInfo64
push dword [ebx + 4]
mov dword [ebx + 0x20], eax
call esi
push str.SymGetSymFromAddr64
push dword [ebx + 4]
mov dword [ebx + 0x24], eax
call esi
push str.UnDecorateSymbolName
push dword [ebx + 4]
mov dword [ebx + 0x2c], eax
call esi
push str.SymLoadModule64
push dword [ebx + 4]
mov dword [ebx + 0x40], eax
call esi
push str.SymGetSearchPath
push dword [ebx + 4]
mov dword [ebx + 0x34], eax
call esi
cmp dword [ebx + 0x10], 0
mov dword [ebx + 0x44], eax
je 0x4768cb
cmp dword [ebx + 0x14], 0
je 0x4768cb
cmp dword [ebx + 0x1c], 0
je 0x4768cb
cmp dword [ebx + 0x20], 0
je 0x4768cb
cmp dword [ebx + 0x28], 0
je 0x4768cb
cmp dword [ebx + 0x2c], 0
je 0x4768cb
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x4768cb
cmp dword [ebx + 0x38], 0
je 0x4768cb
cmp dword [ebx + 0x3c], 0
je 0x4768cb
cmp dword [ebx + 0x40], 0
je 0x4768cb
cmp dword [ebx + 0x34], 0
je 0x4768cb
test edi, edi
je 0x4767d5
push edi
call fcn.004d76ca
mov dword [ebx + 0xc], eax
add esp, 4
mov eax, dword [ebx + 0x30]
push 0
push dword [ebx + 0xc]
push dword [ebx + 8]
call eax
test eax, eax
jne 0x4767fe
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 + 0x28]
call eax
mov ecx, dword [ebx + 0x38]
and eax, 0xfffffff9
or eax, 0x210
push eax
call ecx
push 0x400
mov dword [ebp - 0x2810], eax
lea eax, [ebp - 0x80c]
push 0
push eax
call fcn.004c6130
mov ecx, dword [ebx + 0x44]
add esp, 0xc
test ecx, ecx
je 0x476864
push 0x400
lea eax, [ebp - 0x80c]
push eax
push dword [ebx + 8]
call ecx
test eax, eax
jne 0x476864
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 - 0x40c]
push 0
push eax
call fcn.004c6130
add esp, 0xc
mov dword [ebp - 0x2814], 0x400
lea eax, [ebp - 0x2814]
push eax
lea eax, [ebp - 0x40c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov ecx, dword [ebx]
lea edx, [ebp - 0x40c]
push edx
push dword [ebp - 0x2810]
lea edx, [ebp - 0x80c]
mov eax, dword [ecx]
push edx
call dword [eax + 4]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004c3ba1
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
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret 4