Function at 0x4fea20
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, 0x1804
call fcn.00521200
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x4fea3e
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4
push ebx
push edi
push 0x1000
lea eax, [ebp - 0x1804]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4feb3f
push str..local
lea ecx, [ebp - 0x1804]
push 0x1000
push ecx
call fcn.00523192
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0xc
lea edx, [ebp - 0x1804]
push edx
call ebx
cmp eax, 0xffffffff
jne 0x4feb3f
cmp dword [esi + 4], 0
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
jne 0x4feb53
push 0x1000
lea eax, [ebp - 0x1804]
push eax
push str.ProgramFiles
call edi
test eax, eax
je 0x4feaeb
push str.Debugging_Tools_for_Windows__x86_dbghelp.dll
lea ecx, [ebp - 0x1804]
push 0x1000
push ecx
call fcn.00523192
add esp, 0xc
lea edx, [ebp - 0x1804]
push edx
call ebx
cmp eax, 0xffffffff
je 0x4feaeb
lea eax, [ebp - 0x1804]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 4], eax
cmp dword [esi + 4], 0
jne 0x4feb53
push 0x1000
lea ecx, [ebp - 0x1804]
push ecx
push str.ProgramFiles
call edi
test eax, eax
je 0x4feb3f
push str.Debugging_Tools_for_Windowsdbghelp.dll
lea edx, [ebp - 0x1804]
push 0x1000
push edx
call fcn.00523192
add esp, 0xc
lea eax, [ebp - 0x1804]
push eax
call ebx
cmp eax, 0xffffffff
je 0x4feb3f
lea ecx, [ebp - 0x1804]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 4], eax
cmp dword [esi + 4], 0
jne 0x4feb53
push str.dbghelp.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x4fed8d
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SymInitialize
push eax
call edi
mov edx, dword [esi + 4]
push str.SymCleanup
push edx
mov dword [esi + 0x2c], eax
call edi
mov dword [esi + 0x10], eax
mov eax, dword [esi + 4]
push str.StackWalk64
push eax
call edi
mov ecx, dword [esi + 4]
push str.SymGetOptions
push ecx
mov dword [esi + 0x38], eax
call edi
mov edx, dword [esi + 4]
push str.SymSetOptions
push edx
mov dword [esi + 0x24], eax
call edi
mov dword [esi + 0x34], eax
mov eax, dword [esi + 4]
push str.SymFunctionTableAccess64
push eax
call edi
mov ecx, dword [esi + 4]
push str.SymGetLineFromAddr64
push ecx
mov dword [esi + 0x14], eax
call edi
mov edx, dword [esi + 4]
push str.SymGetModuleBase64
push edx
mov dword [esi + 0x18], eax
call edi
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 4]
push str.SymGetModuleInfo64
push eax
call edi
mov ecx, dword [esi + 4]
push str.SymGetSymFromAddr64
push ecx
mov dword [esi + 0x20], eax
call edi
mov edx, dword [esi + 4]
push str.UnDecorateSymbolName
push edx
mov dword [esi + 0x28], eax
call edi
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 4]
push str.SymLoadModule64
push eax
call edi
mov ecx, dword [esi + 4]
push str.SymGetSearchPath
push ecx
mov dword [esi + 0x30], eax
call edi
xor ebx, ebx
mov dword [esi + 0x40], eax
cmp dword [esi + 0x10], ebx
je 0x4fed7d
cmp dword [esi + 0x14], ebx
je 0x4fed7d
cmp dword [esi + 0x1c], ebx
je 0x4fed7d
cmp dword [esi + 0x20], ebx
je 0x4fed7d
cmp dword [esi + 0x24], ebx
je 0x4fed7d
cmp dword [esi + 0x28], ebx
je 0x4fed7d
cmp dword [esi + 0x2c], ebx
je 0x4fed7d
cmp dword [esi + 0x34], ebx
je 0x4fed7d
cmp dword [esi + 0x38], ebx
je 0x4fed7d
cmp dword [esi + 0x3c], ebx
je 0x4fed7d
cmp dword [esi + 0x30], ebx
je 0x4fed7d
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4fec90
push eax
call dword [sym.imp.msvcrt.dll__strdup]
add esp, 4
mov dword [esi + 0xc], eax
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x2c]
push ebx
push edx
push eax
call ecx
test eax, eax
jne 0x4fecbb
mov edx, dword [esi]
mov edi, dword [edx]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi]
push eax
mov eax, dword [edi + 0x10]
push str.SymInitialize
call eax
mov ecx, dword [esi + 0x24]
call ecx
mov edx, dword [esi + 0x34]
or eax, 0x210
push eax
call edx
push 0x3ff
mov ebx, eax
lea eax, [ebp - 0x803]
push 0
push eax
mov byte [ebp - 0x804], 0
call sub.msvcrt.dll_memset
mov eax, dword [esi + 0x40]
add esp, 0xc
test eax, eax
je 0x4fed22
mov edx, dword [esi + 8]
push 0x400
lea ecx, [ebp - 0x804]
push ecx
push edx
call eax
test eax, eax
jne 0x4fed22
mov eax, dword [esi]
mov edi, dword [eax]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi]
mov edx, dword [edi + 0x10]
push eax
push str.SymGetSearchPath
call edx
push 0x3ff
lea eax, [ebp - 0x403]
push 0
push eax
mov byte [ebp - 0x404], 0
call sub.msvcrt.dll_memset
add esp, 0xc
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x404]
push edx
mov dword [ebp - 4], 0x400
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov ecx, dword [esi]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
lea edx, [ebp - 0x404]
push edx
push ebx
lea edx, [ebp - 0x804]
push edx
call eax
pop edi
pop ebx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esi + 4], ebx
mov dword [esi + 0x10], ebx
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4