Function at 0x4f8390
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x605d5a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x69c
mov eax, dword [0x65480c]
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x55c], esi
call fcn.004d7890
mov al, byte [esi + 0x60]
xor ebx, ebx
test al, al
mov dword [esi + 0x64], ebx
je 0x4f84ca
mov eax, dword [0x68cde0]
add eax, 0x30
push eax
lea ecx, [ebp - 0x588]
push str.SOFTWARE_
push ecx
call fcn.00418830
push eax
lea edx, [ebp - 0x558]
push edx
mov dword [ebp - 4], ebx
call fcn.00518a60
push str.Test3D
push eax
lea eax, [ebp - 0x568]
push eax
mov byte [ebp - 4], 1
call fcn.00412be0
mov ecx, dword [ebp - 0x558]
mov eax, dword [ebp - 0x550]
add esp, 0x20
sub eax, ecx
cmp ecx, ebx
je 0x4f844a
cmp eax, 0x80
jbe 0x4f8440
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f844a
push eax
push ecx
call fcn.00401f50
add esp, 8
mov ecx, dword [ebp - 0x588]
mov eax, dword [ebp - 0x580]
sub eax, ecx
cmp ecx, ebx
je 0x4f8478
cmp eax, 0x80
jbe 0x4f846e
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f8478
push eax
push ecx
call fcn.00401f50
add esp, 8
mov edx, dword [ebp - 0x568]
push ebx
lea ecx, [esi + 0x1c]
push ecx
push ebx
push 0xf003f
push ebx
push 0x60c437
push ebx
push edx
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ecx, dword [ebp - 0x568]
mov eax, dword [ebp - 0x560]
sub eax, ecx
cmp ecx, ebx
je 0x4f84ca
cmp eax, 0x80
jbe 0x4f84c0
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f84ca
push eax
push ecx
call fcn.00401f50
add esp, 8
mov edi, dword [ebp + 0xc]
cmp edi, ebx
mov dword [ebp - 4], 2
jne 0x4f8567
mov eax, dword [0x68cde4]
push str.DirectDrawCreateEx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
jne 0x4f854a
lea ecx, [ebp + 0xf]
push ecx
push str.No_DirectDrawCreateEx
lea ecx, [ebp - 0x558]
call fcn.00402f20
lea edx, [ebp - 0x558]
mov byte [ebp - 4], 3
push edx
mov ecx, esi
call fcn.004f6780
mov ecx, dword [ebp - 0x558]
mov bl, al
mov eax, dword [ebp - 0x550]
sub eax, ecx
test ecx, ecx
je 0x4f8bb1
cmp eax, 0x80
jbe 0x4f8ba7
push ecx
call fcn.005e05ca
add esp, 4
mov al, bl
jmp 0x4f8d21
push ebx
push 0x612b10
add esi, 4
push esi
push ebx
call eax
push str.DirectDrawCreateEx
push eax
call fcn.004f67e0
add esp, 8
jmp 0x4f8572
mov eax, dword [edi]
push edi
call dword [eax + 4]
add esi, 4
mov dword [esi], edi
mov esi, dword [esi]
mov ecx, dword [esi]
push ebx
lea edx, [ebp - 0x444]
push edx
push esi
call dword [ecx + 0x6c]
push str.GetDeviceIdentifier
push eax
call fcn.004f67e0
mov eax, dword [ebp - 0x55c]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
add eax, 0x20
mov dword [eax], ecx
mov ecx, dword [ebp - 0x24]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x20]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
xor eax, eax
mov dword [ebp - 0x5a8], eax
mov dword [ebp - 0x5a4], eax
mov dword [ebp - 0x5a0], eax
add esp, 8
push eax
mov dword [ebp - 0x59c], eax
mov dword [ebp - 0x5a8], 0x4000
call dword [sym.imp.USER32.dll_GetDC]
mov edi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov esi, eax
push 8
push esi
call edi
push 0xa
push esi
mov ebx, eax
call edi
push 0xc
push esi
mov dword [ebp - 0x56c], eax
call edi
push esi
push 0
mov edi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebp - 0x55c]
lea edx, [ebp - 0x5ac]
push edx
lea edx, [ebp - 0x57c]
push edx
add eax, 4
mov eax, dword [eax]
mov ecx, dword [eax]
lea edx, [ebp - 0x5a8]
push edx
push eax
call dword [ecx + 0x5c]
test eax, eax
jge 0x4f86dc
push eax
lea eax, [ebp - 0x578]
push eax
call fcn.00514190
add esp, 8
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x558]
push str.GetAvailableVidMem_failed:__s
push ecx
mov byte [ebp - 4], 4
call fcn.00515b20
add esp, 0xc
mov edi, dword [ebp - 0x55c]
push eax
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.004f67b0
mov ecx, dword [ebp - 0x558]
mov eax, dword [ebp - 0x550]
sub eax, ecx
test ecx, ecx
je 0x4f869e
cmp eax, 0x80
jbe 0x4f8694
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f869e
push eax
push ecx
call fcn.00401f50
add esp, 8
mov ecx, dword [ebp - 0x578]
mov eax, dword [ebp - 0x570]
sub eax, ecx
test ecx, ecx
mov byte [ebp - 4], 2
je 0x4f876f
cmp eax, 0x80
jbe 0x4f86cd
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f876f
push eax
push ecx
call fcn.00401f50
add esp, 8
jmp 0x4f876f
mov esi, dword [ebp - 0x57c]
mov eax, edi
cdq
mov edi, dword [ebp - 0x55c]
mov ecx, dword [edi + 0x58]
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [ebp - 0x56c]
imul eax, ebx
add eax, esi
shr eax, 0x14
cmp eax, ecx
mov dword [ebp - 0x57c], eax
jae 0x4f8735
lea edx, [ebp + 0xf]
push edx
push str.Not_enough_video_memory.
lea ecx, [ebp - 0x558]
call fcn.00402f20
lea eax, [ebp - 0x558]
mov byte [ebp - 4], 6
push eax
mov ecx, edi
jmp 0x4f8512
cmp eax, dword [edi + 0x5c]
jae 0x4f876f
lea ecx, [ebp + 0xf]
push ecx
push str.Low_video_memory.
lea ecx, [ebp - 0x578]
call fcn.00402f20
lea edx, [ebp - 0x578]
push edx
mov ecx, edi
mov byte [ebp - 4], 7
call fcn.004f67b0
lea ecx, [ebp - 0x578]
mov byte [ebp - 4], 2
call fcn.0041d780
mov al, byte [edi + 0x60]
test al, al
je 0x4f878c
mov ecx, edi
call fcn.004f6540
test al, al
je 0x4f8788
xor al, al
jmp 0x4f8d21
mov byte [edi + 0x61], 1
lea eax, [ebp + 0xf]
push eax
lea ecx, [ebp - 0x444]
push ecx
lea ecx, [ebp - 0x568]
call fcn.00402f20
push 2
push 0
push 0x6134c0
lea ecx, [ebp - 0x568]
mov byte [ebp - 4], 8
call fcn.004eac70
cmp eax, 0xffffffff
jne 0x4f88dc
push 0x104
lea edx, [ebp - 0x54c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4f88dc
lea eax, [ebp + 0xf]
push eax
lea ecx, [ebp - 0x54c]
push ecx
lea ecx, [ebp - 0x558]
call fcn.00402f20
push 1
lea edx, [ebp - 0x558]
push edx
lea eax, [ebp - 0x594]
push eax
mov byte [ebp - 4], 9
call fcn.00516ab0
add esp, 0xc
lea ecx, [ebp - 0x568]
push ecx
push eax
lea edx, [ebp - 0x578]
push edx
mov byte [ebp - 4], 0xa
call fcn.00412d30
add esp, 0xc
lea ecx, [ebp - 0x568]
cmp eax, ecx
mov byte [ebp - 4], 0xb
je 0x4f884e
mov ecx, dword [eax + 4]
mov eax, dword [eax]
lea edx, [ebp + 0xf]
push edx
push ecx
push eax
lea ecx, [ebp - 0x568]
call fcn.0040c800
mov ecx, dword [ebp - 0x578]
mov eax, dword [ebp - 0x570]
sub eax, ecx
test ecx, ecx
je 0x4f887c
cmp eax, 0x80
jbe 0x4f8872
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f887c
push eax
push ecx
call fcn.00401f50
add esp, 8
mov ecx, dword [ebp - 0x594]
mov eax, dword [ebp - 0x58c]
sub eax, ecx
test ecx, ecx
je 0x4f88aa
cmp eax, 0x80
jbe 0x4f88a0
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f88aa
push eax
push ecx
call fcn.00401f50
add esp, 8
mov ecx, dword [ebp - 0x558]
mov eax, dword [ebp - 0x550]
sub eax, ecx
test ecx, ecx
mov byte [ebp - 4], 8
je 0x4f88dc
cmp eax, 0x80
jbe 0x4f88d2
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f88dc
push eax
push ecx
call fcn.00401f50
add esp, 8
mov ecx, dword [ebp - 0x568]
xor eax, eax
mov dword [ebp - 0x584], eax
push eax
push eax
push 3
push eax
push 1
push connect
push ecx
mov dword [ebp - 0x580], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4f8949
lea edx, [ebp - 0x584]
push edx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x4f8942
lea eax, [ebp - 0x598]
push eax
lea ecx, [ebp - 0x584]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x4f8942
movzx edx, word [ebp - 0x598]
mov dword [edi + 0x64], edx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x244]
push eax
mov ecx, edi
call fcn.004f10d0
test al, al
jne 0x4f89b4
lea ecx, [ebp - 0x244]
push ecx
lea edx, [ebp - 0x594]
push str.Unsupported_video_card:__s
push edx
call fcn.00515b20
add esp, 0xc
push eax
mov ecx, edi
mov byte [ebp - 4], 0xc
call fcn.004f67b0
mov ecx, dword [ebp - 0x594]
mov eax, dword [ebp - 0x58c]
sub eax, ecx
test ecx, ecx
mov byte [ebp - 4], 8
je 0x4f89b4
cmp eax, 0x80
jbe 0x4f89aa
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f89b4
push eax
push ecx
call fcn.00401f50
add esp, 8
mov eax, dword [edi + 4]
mov edx, dword [eax]
lea ecx, [edi + 0x14]
push ecx
lea esi, [edi + 4]
push 0x612ae0
push eax
mov dword [ebp - 0x56c], ecx
call dword [edx]
push str.QueryInterface_IID_IDirect3D7
push eax
call fcn.004f67e0
mov ecx, dword [ebp + 8]
mov esi, dword [esi]
mov eax, dword [esi]
add esp, 8
push 8
push ecx
push esi
call dword [eax + 0x50]
push str.SetCooperativeLevel
push eax
call fcn.004f67e0
mov ebx, dword [ebp - 0x55c]
add esp, 8
xor eax, eax
push 0
mov ecx, 0x1f
lea edi, [ebp - 0x6a8]
rep stosd dword es:[edi], eax
mov eax, 0x64
lea esi, [ebx + 8]
push esi
mov dword [ebp - 0x69c], eax
mov dword [ebp - 0x6a0], eax
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x6a8]
push ecx
mov dword [ebp - 0x6a8], 0x7c
mov dword [ebp - 0x6a4], 7
mov dword [ebp - 0x640], 0x2040
mov edx, dword [eax]
push eax
call dword [edx + 0x18]
push str.CreateSurface__Primary_
push eax
call fcn.004f67e0
mov edx, dword [ebp - 0x6a0]
mov eax, dword [ebp - 0x69c]
add esp, 8
push edx
push eax
lea ecx, [ebx + 0x30]
call fcn.004e3cb0
mov ecx, dword [ebp - 0x56c]
mov eax, dword [ecx]
mov ecx, dword [esi]
mov edx, dword [eax]
lea edi, [ebx + 0x18]
push edi
push ecx
push 0x612ad0
push eax
call dword [edx + 0x10]
push str.CreateDevice
push eax
call fcn.004f67e0
mov edi, dword [edi]
add esp, 8
lea eax, [ebp + 0xc]
push eax
push 0x4d7860
mov dword [ebp + 0xc], 0
mov edx, dword [edi]
push edi
call dword [edx + 0x10]
push str.EnumTextureFormats
push eax
call fcn.004f67e0
mov al, byte [ebp + 0xc]
add esp, 8
test al, 1
jne 0x4f8bbc
lea ecx, [ebp + 0xf]
push ecx
push str.A8R8G8B8_texture_format_not_supported.
lea ecx, [ebp - 0x558]
call fcn.00402f20
lea edx, [ebp - 0x558]
push edx
mov ecx, ebx
mov byte [ebp - 4], 0xd
call fcn.004f67b0
mov ecx, dword [ebp - 0x558]
mov eax, dword [ebp - 0x550]
sub eax, ecx
test ecx, ecx
mov byte [ebp - 4], 8
je 0x4f8b27
cmp eax, 0x80
jbe 0x4f8b1d
push ecx
call fcn.005e05ca
add esp, 4
jmp 0x4f8b27
push eax
push ecx
call fcn.00401f50
add esp, 8
test byte [ebp + 0xc], 2
jne 0x4f8bb8
lea eax, [ebp + 0xf]
push eax
push str.A4R4G4B4_and_A8R8G8B8_texture_formats_not_supported.
lea ecx, [ebp - 0x558]
call fcn.00402f20
lea ecx, [ebp - 0x558]
push ecx
mov ecx, ebx
mov byte [ebp - 4], 0xe
call fcn.004f6780
mov ecx, dword [ebp - 0x558]
mov bl, al
mov eax, dword [ebp - 0x550]
sub eax, ecx
test ecx, ecx
je 0x4f8b96
cmp eax, 0x80
jbe 0x4f8b8c
push ecx
call fcn.005e05ca
mov eax, dword [ebp - 0x560]
mov ecx, dword [ebp - 0x568]
add esp, 4
jmp 0x4f8525
push eax
push ecx
call fcn.00401f50
add esp, 8
mov eax, dword [ebp - 0x560]
mov ecx, dword [ebp - 0x568]
jmp 0x4f8525
push eax
push ecx
call fcn.00401f50
add esp, 8
mov al, bl
jmp 0x4f8d21
xor dl, dl
jmp 0x4f8bbe
mov dl, 1
xor eax, eax
test dl, dl
mov ecx, 0x1f
lea edi, [ebp - 0x62c]
rep stosd dword es:[edi], eax
mov eax, 0x40
mov dword [ebp - 0x620], eax
mov dword [ebp - 0x624], eax
mov ecx, 0x10
mov eax, 0x20
mov byte [0x656d52], dl
mov dword [ebp - 0x62c], 0x7c
mov dword [ebp - 0x628], 0x1007
mov dword [ebp - 0x5c4], 0x1000
mov dword [ebp - 0x5c0], ecx
mov dword [ebp - 0x5e4], eax
mov dword [ebp - 0x5e0], 0x41
je 0x4f8c56
mov dword [ebp - 0x5d8], eax
mov dword [ebp - 0x5c8], 0xff000000
mov dword [ebp - 0x5d4], 0xff0000
mov dword [ebp - 0x5d0], 0xff00
mov dword [ebp - 0x5cc], 0xff
jmp 0x4f8c84
mov dword [ebp - 0x5d8], ecx
mov dword [ebp - 0x5c8], 0xf000
mov dword [ebp - 0x5d4], 0xf00
mov dword [ebp - 0x5d0], 0xf0
mov dword [ebp - 0x5cc], 0xf
mov eax, dword [ebx + 4]
mov edx, dword [eax]
push 0
lea ecx, [ebx + 0xc]
push ecx
lea ecx, [ebp - 0x62c]
push ecx
push eax
call dword [edx + 0x18]
push str.CreateSurface__TextureSurface1_
push eax
call fcn.004f67e0
mov eax, dword [ebx + 4]
mov edx, dword [eax]
add esp, 8
push 0
add ebx, 0x10
push ebx
lea ecx, [ebp - 0x62c]
push ecx
push eax
call dword [edx + 0x18]
push 0x6133b4
push eax
call fcn.004f67e0
mov ecx, dword [ebp - 0x568]
mov eax, dword [ebp - 0x560]
add esp, 8
sub eax, ecx
test ecx, ecx
je 0x4f8cfc
cmp eax, 0x80
jbe 0x4f8cf2
push ecx
call fcn.005e05ca
add esp, 4
mov al, 1
jmp 0x4f8d21
push eax
push ecx
call fcn.00401f50
add esp, 8
mov al, 1
jmp 0x4f8d21
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.005e149c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8