Function at 0x1005c823
Capabilities:
Get common file path

Disassembly:
mov eax, 0x10071d48
call fcn.10070900
mov eax, dword [ebp + 8]
sub esp, 0x208
push esi
sub eax, 0x1001
je 0x1005ca67
dec eax
je 0x1005ca47
sub eax, 0xe
je 0x1005ca40
sub eax, 0x10
je 0x1005ca26
dec eax
je 0x1005c9d0
dec eax
je 0x1005c9c9
sub eax, 0xefe0
jne 0x1005c9c2
mov ecx, dword [ebp + 0xc]
mov edx, str.viewport_DX9
call fcn.1005cac8
test al, al
je 0x1005c9c2
cmp dword [0x100b4a5c], 0
jne 0x1005c902
mov esi, 0x104
lea eax, [ebp - 0x110]
push esi
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryA]
dec eax
cmp eax, 0x102
ja 0x1005c8e6
push str.D3D9.dll
lea eax, [ebp - 0x110]
push eax
push 0x10073e44
lea eax, [ebp - 0x214]
push esi
push eax
call dword [sym.imp.MSVCR120.dll_sprintf_s]
add esp, 0x14
test eax, eax
jle 0x1005c8e6
lea eax, [ebp - 0x214]
push eax
call fcn.10058852
mov dword [0x100b4a5c], eax
jmp 0x1005c8eb
mov eax, dword [0x100b4a5c]
test eax, eax
je 0x1005c902
push str.Direct3DCreate9
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [0x100b4a58], eax
jmp 0x1005c907
mov eax, dword [0x100b4a58]
test eax, eax
je 0x1005c932
push 0x2654
call sub.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ecx, eax
mov dword [ebp + 0xc], ecx
xor eax, eax
mov dword [ebp - 4], eax
test ecx, ecx
je 0x1005caa7
call fcn.1004dfe3
jmp 0x1005caa7
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edx, dword [0x1016cce4]
mov esi, eax
test edx, edx
je 0x1005c94d
mov ecx, esi
sub ecx, edx
cmp ecx, 0x64
jbe 0x1005c9c2
mov eax, dword [0x1016f138]
push 0x21
push dword [0x1016ccdc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov ecx, dword [0x1016f138]
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x1d4]
mov eax, dword [0x1016f138]
pop ecx
pop ecx
push 0x22
push dword [0x1016ccdc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov ecx, dword [0x1016f138]
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x1d4]
mov eax, dword [0x1016f138]
pop ecx
pop ecx
push 0x23
push dword [0x1016ccdc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov ecx, dword [0x1016f138]
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x1d4]
pop ecx
pop ecx
mov dword [0x1016cce4], esi
xor eax, eax
jmp 0x1005caa7
push str._c__Microsoft._All_rights_reserved
jmp 0x1005ca13
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x1005c9fe
lea eax, [esi - 1]
push eax
mov eax, dword [0x1016f138]
push 1
push dword [0x1016ccdc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
push eax
push esi
push dword [ebp + 0xc]
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
jmp 0x1005ca1e
mov ecx, dword [0x1016f138]
push 1
push dword [0x1016ccdc]
mov edx, dword [ecx]
push ecx
call dword [edx + 0xc]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.MSVCR120.dll_wcscpy]
pop ecx
pop ecx
xor eax, eax
inc eax
jmp 0x1005caa7
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1005ca39
lea eax, [ecx - 1]
push eax
push str.9.0.0
push ecx
jmp 0x1005c9f0
push str.9.0.0
jmp 0x1005ca13
mov eax, 0x91
jmp 0x1005caa7
mov eax, dword [0x100b4a5c]
test eax, eax
je 0x1005c9c2
push eax
call dword [sym.imp.kernel32.dll_FreeLibrary]
and dword [0x100b4a5c], 0
jmp 0x1005c9c2
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [0x1016f138], edx
mov dword [0x1016f13c], eax
mov ecx, dword [edx]
push eax
push edx
call dword [ecx + 8]
push str.DirectX_9.0
mov dword [0x1016ccdc], eax
mov eax, dword [0x1016f138]
push 0x110
push str.viewport_DX9
push dword [0x1016f13c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x38]
push 5
pop eax
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10