Function at 0x10087950
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, 0x1818
call fcn.100acb10
mov eax, dword [0x100c6040]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x1810], ebx
cmp dword [edi], 0
je 0x10087cd0
push 0x1000
lea eax, [ebp - 0x180c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x10087a85
push str..local
lea eax, [ebp - 0x180c]
push 0x1000
push eax
call fcn.100954dc
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [ebp - 0x180c]
add esp, 0xc
push eax
call ebx
cmp eax, 0xffffffff
jne 0x10087a7f
cmp dword [edi + 4], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
jne 0x10087a7f
push 0x1000
lea ecx, [ebp - 0x180c]
push ecx
push str.ProgramFiles
call eax
test eax, eax
je 0x10087a2a
push str.Debugging_Tools_for_Windows__x86_dbghelp.dll
lea eax, [ebp - 0x180c]
push 0x1000
push eax
call fcn.100954dc
add esp, 0xc
lea eax, [ebp - 0x180c]
push eax
call ebx
cmp eax, 0xffffffff
je 0x10087a2a
lea eax, [ebp - 0x180c]
push eax
call esi
mov dword [edi + 4], eax
cmp dword [edi + 4], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
jne 0x10087a7f
push 0x1000
lea ecx, [ebp - 0x180c]
push ecx
push str.ProgramFiles
call eax
test eax, eax
je 0x10087a7f
push str.Debugging_Tools_for_Windowsdbghelp.dll
lea eax, [ebp - 0x180c]
push 0x1000
push eax
call fcn.100954dc
add esp, 0xc
lea eax, [ebp - 0x180c]
push eax
call ebx
cmp eax, 0xffffffff
je 0x10087a7f
lea eax, [ebp - 0x180c]
push eax
call esi
mov dword [edi + 4], eax
mov ebx, dword [ebp - 0x1810]
mov eax, dword [edi + 4]
test eax, eax
jne 0x10087a9e
push str.dbghelp.dll
call esi
mov dword [edi + 4], eax
test eax, eax
je 0x10087cd0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SymInitialize
push eax
call esi
push str.SymCleanup
push dword [edi + 4]
mov dword [edi + 0x2c], eax
call esi
push str.StackWalk64
push dword [edi + 4]
mov dword [edi + 0x10], eax
call esi
push str.SymGetOptions
push dword [edi + 4]
mov dword [edi + 0x38], eax
call esi
push str.SymSetOptions
push dword [edi + 4]
mov dword [edi + 0x24], eax
call esi
push str.SymFunctionTableAccess64
push dword [edi + 4]
mov dword [edi + 0x34], eax
call esi
push str.SymGetLineFromAddr64
push dword [edi + 4]
mov dword [edi + 0x14], eax
call esi
push str.SymGetModuleBase64
push dword [edi + 4]
mov dword [edi + 0x18], eax
call esi
push str.SymGetModuleInfo64
push dword [edi + 4]
mov dword [edi + 0x1c], eax
call esi
push str.SymGetSymFromAddr64
push dword [edi + 4]
mov dword [edi + 0x20], eax
call esi
push str.UnDecorateSymbolName
push dword [edi + 4]
mov dword [edi + 0x28], eax
call esi
push str.SymLoadModule64
push dword [edi + 4]
mov dword [edi + 0x3c], eax
call esi
push str.SymGetSearchPath
push dword [edi + 4]
mov dword [edi + 0x30], eax
call esi
cmp dword [edi + 0x10], 0
mov dword [edi + 0x40], eax
je 0x10087cb9
cmp dword [edi + 0x14], 0
je 0x10087cb9
cmp dword [edi + 0x1c], 0
je 0x10087cb9
cmp dword [edi + 0x20], 0
je 0x10087cb9
cmp dword [edi + 0x24], 0
je 0x10087cb9
cmp dword [edi + 0x28], 0
je 0x10087cb9
cmp dword [edi + 0x2c], 0
je 0x10087cb9
cmp dword [edi + 0x34], 0
je 0x10087cb9
cmp dword [edi + 0x38], 0
je 0x10087cb9
cmp dword [edi + 0x3c], 0
je 0x10087cb9
cmp dword [edi + 0x30], 0
je 0x10087cb9
test ebx, ebx
je 0x10087bc9
push ebx
call fcn.1009be59
add esp, 4
mov dword [edi + 0xc], eax
mov eax, dword [edi + 0x2c]
push 0
push dword [edi + 0xc]
push dword [edi + 8]
call eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10087bf5
mov eax, dword [edi]
push 0
push 0
mov esi, dword [eax]
call ebx
mov ecx, dword [edi]
push eax
push str.SymInitialize
call dword [esi + 0x10]
mov eax, dword [edi + 0x24]
call eax
or eax, 0x210
push eax
mov eax, dword [edi + 0x34]
call eax
push 0x400
mov dword [ebp - 0x1810], eax
lea eax, [ebp - 0x80c]
push 0
push eax
call fcn.1008e1e0
mov ecx, dword [edi + 0x40]
add esp, 0xc
test ecx, ecx
je 0x10087c52
push 0x400
lea eax, [ebp - 0x80c]
push eax
push dword [edi + 8]
call ecx
test eax, eax
jne 0x10087c52
mov eax, dword [edi]
push 0
push 0
mov esi, dword [eax]
call ebx
mov ecx, dword [edi]
push eax
push str.SymGetSearchPath
call dword [esi + 0x10]
push 0x400
lea eax, [ebp - 0x40c]
push 0
push eax
call fcn.1008e1e0
add esp, 0xc
mov dword [ebp - 0x1814], 0x400
lea eax, [ebp - 0x1814]
push eax
lea eax, [ebp - 0x40c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov ecx, dword [edi]
lea edx, [ebp - 0x40c]
push edx
push dword [ebp - 0x1810]
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.1008c0ce
mov esp, ebp
pop ebp
ret 4
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [edi + 4], 0
mov dword [edi + 0x10], 0
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1008c0ce
mov esp, ebp
pop ebp
ret 4