Function at 0x508500
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x65405a
mov eax, dword fs:[0]
push eax
sub esp, 0x708
mov eax, dword [0x6af168]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
mov ebx, ecx
mov esi, ebx
mov dword [ebp - 0x5c0], ebx
mov dword [ebp - 0x5cc], eax
mov edi, edx
call fcn.00508ea0
xor esi, esi
cmp byte [ebx + 0xb8], 0
mov dword [ebx + 0xbc], esi
je 0x508656
mov ecx, dword [0x6b9d90]
add ecx, 0x7c
push ecx
lea edx, [ebp - 0x5e8]
push str.SOFTWARE_
push edx
call fcn.0044cec0
add esp, 0xc
lea ecx, [ebp - 0x15c]
mov dword [ebp - 4], esi
push ecx
mov esi, eax
call fcn.004e7770
add esp, 4
push str.Test3D
push eax
lea edx, [ebp - 0x140]
push edx
mov byte [ebp - 4], 1
call fcn.0044cf70
add esp, 0xc
cmp dword [ebp - 0x144], 0x10
jb 0x5085c3
mov eax, dword [ebp - 0x158]
push eax
call fcn.0062493b
add esp, 4
xor esi, esi
cmp dword [ebp - 0x5d0], 0x10
mov dword [ebp - 0x144], 0xf
mov dword [ebp - 0x148], esi
mov byte [ebp - 0x158], 0
jb 0x5085f4
mov ecx, dword [ebp - 0x5e4]
push ecx
call fcn.0062493b
add esp, 4
cmp dword [ebp - 0x128], 0x10
mov eax, dword [ebp - 0x13c]
jae 0x508609
lea eax, [ebp - 0x13c]
push esi
lea edx, [ebx + 0x1c]
push edx
push esi
push 0xf003f
push esi
push 0x66f61c
push esi
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp - 0x128], 0x10
jb 0x50863f
mov eax, dword [ebp - 0x13c]
push eax
call fcn.0062493b
add esp, 4
mov dword [ebp - 0x128], 0xf
mov dword [ebp - 0x12c], esi
mov byte [ebp - 0x13c], 0
test edi, edi
mov dword [ebp - 4], 2
jne 0x5086d6
mov ecx, dword [0x6b9d94]
push str.DirectDrawCreateEx
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x5086b9
push str.No_DirectDrawCreateEx
lea ecx, [ebp - 0x140]
call fcn.00402130
lea eax, [ebp - 0x140]
mov ecx, ebx
mov byte [ebp - 4], 3
call fcn.00508f30
cmp dword [ebp - 0x128], 0x10
mov bl, al
jb 0x5086b2
mov edx, dword [ebp - 0x13c]
push edx
call fcn.0062493b
add esp, 4
mov al, bl
jmp 0x508e62
push 0
push 0x67f934
lea ecx, [ebx + 4]
push ecx
push 0
call eax
mov ecx, str.DirectDrawCreateEx
mov edi, eax
call fcn.00508f60
jmp 0x5086e1
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push edi
call ecx
mov dword [ebx + 4], edi
lea eax, [ebx + 0x4c]
lea ecx, [ebx + 0x30]
lea esi, [ebx + 0x20]
call fcn.0053a020
test al, al
jne 0x508782
mov eax, dword [ebx + 4]
mov edx, dword [eax]
mov edx, dword [edx + 0x6c]
push 0
lea ecx, [ebp - 0x58c]
push ecx
push eax
call edx
mov ecx, str.GetDeviceIdentifier
mov edi, eax
call fcn.00508f60
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x170]
mov edx, dword [ebp - 0x16c]
mov dword [esi], eax
mov eax, dword [ebp - 0x168]
mov dword [esi + 4], ecx
mov dword [esi + 8], edx
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x58c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x508743
sub eax, edx
push eax
lea ecx, [ebp - 0x58c]
push ecx
lea ecx, [ebx + 0x30]
call fcn.00402300
lea eax, [ebp - 0x38c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x508767
sub eax, edx
push eax
lea edx, [ebp - 0x38c]
push edx
lea ecx, [ebx + 0x4c]
call fcn.00402300
xor eax, eax
mov dword [ebp - 0x5dc], eax
push eax
mov dword [ebp - 0x5d8], eax
mov dword [ebp - 0x5d4], eax
mov dword [ebp - 0x5d0], eax
mov dword [ebp - 0x5dc], 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 dword [ebp - 0x5c8], eax
call edi
push 0xc
push esi
mov dword [ebp - 0x5c4], eax
call edi
push esi
push 0
mov edi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
lea edx, [ebp - 0x5ec]
push edx
lea edx, [ebp - 0x598]
push edx
lea edx, [ebp - 0x5dc]
push edx
push eax
mov eax, dword [ecx + 0x5c]
call eax
test eax, eax
jge 0x50889e
push eax
lea esi, [ebp - 0x5b4]
call fcn.004e4da0
add esp, 4
mov edi, 0x10
mov byte [ebp - 4], 4
cmp dword [eax + 0x18], edi
jb 0x508825
mov eax, dword [eax + 4]
jmp 0x508828
add eax, 4
push eax
lea ecx, [ebp - 0x140]
push str.GetAvailableVidMem_failed:__s
push ecx
call fcn.004e7a20
add esp, 0xc
mov ecx, ebx
mov byte [ebp - 4], 5
call fcn.00508f40
cmp dword [ebp - 0x128], edi
jb 0x50885f
mov edx, dword [ebp - 0x13c]
push edx
call fcn.0062493b
add esp, 4
mov byte [ebp - 4], 2
cmp dword [ebp - 0x59c], edi
mov dword [ebp - 0x128], 0xf
mov dword [ebp - 0x12c], 0
mov byte [ebp - 0x13c], 0
jb 0x508951
mov eax, dword [ebp - 0x5b0]
push eax
call fcn.0062493b
add esp, 4
jmp 0x508951
mov eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [ebp - 0x5c4]
imul eax, dword [ebp - 0x5c8]
add eax, dword [ebp - 0x598]
shr eax, 0x14
cmp eax, dword [ebx + 0xb0]
mov dword [ebp - 0x598], eax
jae 0x508914
push str.Not_enough_video_memory.
lea ecx, [ebp - 0x140]
call fcn.00402130
lea eax, [ebp - 0x140]
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00508f30
cmp dword [ebp - 0x128], 0x10
mov bl, al
jb 0x5086b2
mov ecx, dword [ebp - 0x13c]
push ecx
call fcn.0062493b
add esp, 4
mov al, bl
jmp 0x508e62
cmp eax, dword [ebx + 0xb4]
jae 0x50894c
push str.Low_video_memory.
lea ecx, [ebp - 0x5b4]
call fcn.00402130
lea eax, [ebp - 0x5b4]
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.00508f40
lea ecx, [ebp - 0x5b4]
mov byte [ebp - 4], 2
call fcn.00401c70
mov edi, 0x10
cmp byte [ebx + 0xb8], 0
je 0x508978
mov edi, ebx
call fcn.00507f70
test al, al
je 0x50896c
xor al, al
jmp 0x508e62
mov byte [ebx + 0xb9], 1
mov edi, 0x10
push 0
push 0x66f61c
lea ecx, [ebx + 0x78]
call fcn.00402300
push 0
push 0x66f61c
lea ecx, [ebx + 0x94]
call fcn.00402300
push 0xffffffffffffffff
push 0
lea eax, [ebx + 0x30]
push eax
lea ecx, [ebp - 0x15c]
mov dword [ebp - 0x144], 0xf
mov dword [ebp - 0x148], 0
mov byte [ebp - 0x158], 0
call fcn.00401d10
push 2
push 0x6800b0
lea edx, [ebp - 0x15c]
push edx
xor eax, eax
mov byte [ebp - 4], 8
call fcn.004f58e0
cmp eax, 0xffffffff
jne 0x508a7f
push 0x104
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x508a7f
lea ecx, [ebp - 0x124]
push ecx
lea ecx, [ebp - 0x5b4]
call fcn.00402130
lea edi, [ebp - 0x5b4]
lea eax, [ebp - 0x710]
mov byte [ebp - 4], 9
call fcn.004e7800
lea edx, [ebp - 0x15c]
push edx
push eax
lea eax, [ebp - 0x140]
push eax
mov byte [ebp - 4], 0xa
call fcn.0044d040
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x15c]
mov byte [ebp - 4], 0xb
call fcn.00401d10
lea ecx, [ebp - 0x140]
call fcn.00401c70
lea ecx, [ebp - 0x710]
call fcn.00401c70
mov ecx, edi
mov byte [ebp - 4], 8
call fcn.00401c70
mov edi, 0x10
xor eax, eax
cmp dword [ebp - 0x144], edi
mov dword [ebp - 0x5bc], eax
mov dword [ebp - 0x5b8], eax
mov eax, dword [ebp - 0x158]
jae 0x508aa1
lea eax, [ebp - 0x158]
push 0
push 0
push 3
push 0
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x508b00
lea ecx, [ebp - 0x5bc]
push ecx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x508af9
lea edx, [ebp - 0x134]
push edx
lea eax, [ebp - 0x5bc]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x508af9
movzx ecx, word [ebp - 0x134]
mov dword [ebx + 0xbc], ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebx + 0x64], edi
jb 0x508b0a
mov esi, dword [ebx + 0x50]
jmp 0x508b0d
lea esi, [ebx + 0x50]
push ebx
call fcn.00508440
test al, al
jne 0x508b5f
cmp dword [ebx + 0x64], edi
jb 0x508b21
mov eax, dword [ebx + 0x50]
jmp 0x508b24
lea eax, [ebx + 0x50]
push eax
lea edx, [ebp - 0x5b4]
push str.Unsupported_video_card:__s
push edx
call fcn.004e7a20
add esp, 0xc
mov ecx, ebx
mov byte [ebp - 4], 0xc
call fcn.00508f40
mov byte [ebp - 4], 8
cmp dword [ebp - 0x59c], edi
jb 0x508b5f
mov eax, dword [ebp - 0x5b0]
push eax
call fcn.0062493b
add esp, 4
mov eax, dword [ebx + 4]
mov edx, dword [eax]
lea ecx, [ebx + 0x14]
push ecx
push 0x67f964
push eax
mov eax, dword [edx]
call eax
mov ecx, str.QueryInterface_IID_IDirect3D7
mov edi, eax
call fcn.00508f60
mov eax, dword [ebx + 4]
mov edx, dword [ebp - 0x5cc]
mov ecx, dword [eax]
push 8
push edx
push eax
mov eax, dword [ecx + 0x50]
call eax
mov ecx, str.SetCooperativeLevel
mov edi, eax
call fcn.00508f60
push 0x7c
lea ecx, [ebp - 0x6f4]
push 0
push ecx
call fcn.0062a710
add esp, 0xc
mov eax, 0x64
push 0
mov dword [ebp - 0x6e8], eax
mov dword [ebp - 0x6ec], eax
mov eax, dword [ebx + 4]
lea esi, [ebx + 8]
push esi
lea ecx, [ebp - 0x6f4]
mov dword [ebp - 0x6f4], 0x7c
mov dword [ebp - 0x6f0], 7
mov dword [ebp - 0x68c], 0x2040
mov edx, dword [eax]
mov edx, dword [edx + 0x18]
push ecx
push eax
call edx
mov ecx, str.CreateSurface__Primary_
mov edi, eax
call fcn.00508f60
mov eax, dword [ebp - 0x6ec]
mov edi, dword [ebp - 0x6e8]
push eax
lea eax, [ebx + 0x68]
call fcn.005076a0
mov eax, dword [ebx + 0x14]
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
lea ecx, [ebx + 0x18]
push ecx
mov ecx, dword [esi]
push ecx
push 0x67f974
push eax
call edx
mov ecx, str.CreateDevice
mov edi, eax
call fcn.00508f60
mov eax, dword [ebx + 0x18]
lea edx, [ebp - 0x594]
push edx
mov dword [ebp - 0x594], 0
mov ecx, dword [eax]
push 0x508e80
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ecx, str.EnumTextureFormats
mov edi, eax
call fcn.00508f60
test byte [ebp - 0x594], 1
jne 0x508d09
push str.A8R8G8B8_texture_format_not_supported.
lea ecx, [ebp - 0x140]
call fcn.00402130
lea eax, [ebp - 0x140]
mov ecx, ebx
mov byte [ebp - 4], 0xd
call fcn.00508f40
mov esi, 0x10
mov byte [ebp - 4], 8
cmp dword [ebp - 0x128], esi
jb 0x508cb7
mov ecx, dword [ebp - 0x13c]
push ecx
call fcn.0062493b
add esp, 4
test byte [ebp - 0x594], 2
jne 0x508d00
push str.A4R4G4B4_and_A8R8G8B8_texture_formats_not_supported.
lea ecx, [ebp - 0x5b4]
call fcn.00402130
lea eax, [ebp - 0x5b4]
mov ecx, ebx
mov byte [ebp - 4], 0xe
call fcn.00508f30
lea ecx, [ebp - 0x5b4]
mov bl, al
call fcn.00401c70
lea ecx, [ebp - 0x15c]
call fcn.00401c70
mov al, bl
jmp 0x508e62
mov byte [0x6b9d7e], 0
jmp 0x508d15
mov byte [0x6b9d7e], 1
mov esi, 0x10
push 0x7c
lea edx, [ebp - 0x674]
push 0
push edx
call fcn.0062a710
mov eax, 0x40
mov dword [ebp - 0x668], eax
mov dword [ebp - 0x66c], eax
add esp, 0xc
cmp byte [0x6b9d7e], 0
mov eax, 0x20
mov dword [ebp - 0x674], 0x7c
mov dword [ebp - 0x670], 0x1007
mov dword [ebp - 0x60c], 0x1000
mov dword [ebp - 0x608], esi
mov dword [ebp - 0x62c], eax
mov dword [ebp - 0x628], 0x41
je 0x508dab
mov dword [ebp - 0x620], eax
mov dword [ebp - 0x610], 0xff000000
mov dword [ebp - 0x61c], 0xff0000
mov dword [ebp - 0x618], 0xff00
mov dword [ebp - 0x614], 0xff
jmp 0x508dd9
mov dword [ebp - 0x620], esi
mov dword [ebp - 0x610], 0xf000
mov dword [ebp - 0x61c], 0xf00
mov dword [ebp - 0x618], pe_nt_image_headers32
mov dword [ebp - 0x614], 0xf
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
push 0
lea edx, [ebx + 0xc]
push edx
lea edx, [ebp - 0x674]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
mov ecx, str.CreateSurface__TextureSurface1_
mov edi, eax
call fcn.00508f60
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
push 0
add ebx, 0x10
push ebx
lea edx, [ebp - 0x674]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
mov ecx, str.CreateSurface__TextureSurfacd2_
mov edi, eax
call fcn.00508f60
cmp dword [ebp - 0x144], esi
jb 0x508e38
mov ecx, dword [ebp - 0x158]
push ecx
call fcn.0062493b
add esp, 4
mov al, 1
jmp 0x508e62
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00624940
mov esp, ebp
pop ebp
ret 4