Function at 0x1005fa40
Capabilities:
Get common file path

Disassembly:
mov eax, 0x100776df
call fcn.10075be0
mov eax, dword [ebp + 8]
sub esp, 0x20c
push esi
sub eax, 0x1001
je 0x1005fc7f
sub eax, 1
je 0x1005fc63
sub eax, 0xe
je 0x1005fc5c
sub eax, 0x10
je 0x1005fc28
sub eax, 1
je 0x1005fc09
sub eax, 1
je 0x1005fc02
sub eax, 0xefe0
jne 0x1005fbfb
cmp dword [ebp + 0xc], eax
je 0x1005fbfb
push 0x100
push str.viewport_DX9
push dword [ebp + 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x1005fbfb
cmp dword [0x100bbad0], eax
jne 0x1005fb35
mov esi, 0x104
lea eax, [ebp - 0x114]
push esi
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryA]
dec eax
cmp eax, 0x102
ja 0x1005fb19
push str.D3D9.dll
lea eax, [ebp - 0x114]
push eax
push 0x1007a024
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.10024e56
add esp, 0x14
test eax, eax
jle 0x1005fb19
lea eax, [ebp - 0x218]
push eax
call fcn.1005b370
mov dword [0x100bbad0], eax
jmp 0x1005fb1e
mov eax, dword [0x100bbad0]
test eax, eax
je 0x1005fb35
push str.Direct3DCreate9
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [0x100bbacc], eax
jmp 0x1005fb3a
mov eax, dword [0x100bbacc]
test eax, eax
je 0x1005fb65
push 0x2654
call fcn.10024e56
pop ecx
mov ecx, eax
mov dword [ebp - 0x10], ecx
xor eax, eax
mov dword [ebp - 4], eax
test ecx, ecx
je 0x1005fcd2
call fcn.1004f025
jmp 0x1005fcd2
push edi
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edx, dword [0x10173d14]
mov edi, eax
test edx, edx
je 0x1005fb81
mov ecx, edi
sub ecx, edx
cmp ecx, 0x64
jbe 0x1005fbfa
mov eax, dword [0x10176190]
push ebx
push 0x21
pop ecx
mov esi, dword [eax]
mov ebx, 0x1d4
call fcn.10058a56
mov ecx, dword [esi + ebx]
push eax
push dword [0x10176190]
call dword [0x100783dc]
call dword [esi + ebx]
mov eax, dword [0x10176190]
pop ecx
pop ecx
push 0x22
mov esi, dword [eax]
pop ecx
call fcn.10058a56
mov ecx, dword [esi + ebx]
push eax
push dword [0x10176190]
call dword [0x100783dc]
call dword [esi + ebx]
mov eax, dword [0x10176190]
pop ecx
pop ecx
push 0x23
mov esi, dword [eax]
pop ecx
call fcn.10058a56
mov ecx, dword [esi + ebx]
push eax
push dword [0x10176190]
call dword [0x100783dc]
call dword [esi + ebx]
pop ecx
pop ecx
mov dword [0x10173d14], edi
pop ebx
pop edi
xor eax, eax
jmp 0x1005fcd2
push str._c__Microsoft._All_rights_reserved
jmp 0x1005fc4c
mov esi, dword [ebp + 0x14]
xor ecx, ecx
inc ecx
test esi, esi
je 0x1005fc20
lea eax, [esi - 1]
push eax
call fcn.10058a56
push eax
push esi
jmp 0x1005fc39
call fcn.10058a56
push eax
jmp 0x1005fc4c
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1005fc47
lea eax, [ecx - 1]
push eax
push str.9.0.0
push ecx
push dword [ebp + 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
jmp 0x1005fc57
push str.9.0.0
push dword [ebp + 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy]
pop ecx
pop ecx
xor eax, eax
inc eax
jmp 0x1005fcd2
mov eax, 0x91
jmp 0x1005fcd2
mov eax, dword [0x100bbad0]
test eax, eax
je 0x1005fbfb
push eax
call dword [sym.imp.kernel32.dll_FreeLibrary]
and dword [0x100bbad0], 0
jmp 0x1005fbfb
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [0x10176190], edx
mov dword [0x10176194], eax
mov ecx, dword [edx]
push eax
push edx
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x100783dc]
call esi
mov dword [0x10173d10], eax
mov eax, dword [0x10176190]
push str.DirectX_9.0
push 0x110
push str.viewport_DX9
mov esi, dword [eax]
push dword [0x10176194]
push eax
mov ecx, dword [esi + 0x38]
call dword [0x100783dc]
call dword [esi + 0x38]
push 5
pop eax
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret 0x10