Function at 0x409bb0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e804a
mov eax, dword fs:[0]
push eax
sub esp, 0x700
mov eax, dword [0x6396a8]
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 edi, ecx
mov ebx, edx
mov esi, edi
mov dword [ebp - 0x590], edi
mov dword [ebp - 0x5cc], eax
mov dword [ebp - 0x59c], ebx
call fcn.0040a670
cmp byte [edi + 0xb8], 0
mov dword [edi + 0xbc], 0
je 0x409d14
mov ecx, dword [0x6405cc]
add ecx, 0x7c
push ecx
lea edx, [ebp - 0x5c8]
push str.SOFTWARE_
push edx
call fcn.00441e70
add esp, 0xc
mov esi, eax
lea ebx, [ebp - 0x15c]
mov dword [ebp - 4], 0
call fcn.00471c70
push str.Test3D
push eax
lea eax, [ebp - 0x140]
push eax
mov byte [ebp - 4], 1
call fcn.00441f20
add esp, 0xc
cmp dword [ebp - 0x144], 0x10
jb 0x409c7b
mov ecx, dword [ebp - 0x158]
push ecx
call fcn.005b28f2
add esp, 4
xor ebx, ebx
mov esi, 0x10
cmp dword [ebp - 0x5b0], esi
mov dword [ebp - 0x144], 0xf
mov dword [ebp - 0x148], ebx
mov byte [ebp - 0x158], bl
jb 0x409caf
mov edx, dword [ebp - 0x5c4]
push edx
call fcn.005b28f2
add esp, 4
cmp dword [ebp - 0x128], esi
mov eax, dword [ebp - 0x13c]
jae 0x409cc3
lea eax, [ebp - 0x13c]
push ebx
lea ecx, [edi + 0x1c]
push ecx
push ebx
push 0xf003f
push ebx
push 0x5ff2b0
push ebx
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp - 0x128], esi
jb 0x409cf8
mov edx, dword [ebp - 0x13c]
push edx
call fcn.005b28f2
add esp, 4
mov dword [ebp - 0x12c], ebx
mov byte [ebp - 0x13c], bl
mov ebx, dword [ebp - 0x59c]
mov dword [ebp - 0x128], 0xf
test ebx, ebx
mov dword [ebp - 4], 2
jne 0x409da3
mov eax, dword [0x6405d0]
push str.DirectDrawCreateEx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x409d7a
push str.No_DirectDrawCreateEx
lea ecx, [ebp - 0x5f0]
call fcn.00438a30
lea eax, [ebp - 0x5f0]
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0040a700
cmp dword [ebp - 0x5d8], 0x10
mov bl, al
jb 0x409d73
mov ecx, dword [ebp - 0x5ec]
push ecx
call fcn.005b28f2
add esp, 4
mov al, bl
jmp 0x40a628
push 0
push 0x5fee70
lea ebx, [edi + 4]
push ebx
push 0
mov dword [ebp - 0x598], ebx
call eax
mov ecx, str.DirectDrawCreateEx
mov edi, eax
call fcn.0040a730
mov edi, dword [ebp - 0x590]
jmp 0x409db8
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push ebx
call eax
lea eax, [edi + 4]
mov dword [eax], ebx
mov dword [ebp - 0x598], eax
mov ebx, eax
lea eax, [edi + 0x4c]
lea ecx, [edi + 0x30]
lea esi, [edi + 0x20]
mov dword [ebp - 0x59c], eax
mov dword [ebp - 0x5ac], ecx
call fcn.004389b0
test al, al
jne 0x409e6e
mov eax, dword [ebx]
mov ecx, dword [eax]
push 0
lea edx, [ebp - 0x58c]
push edx
push eax
mov eax, dword [ecx + 0x6c]
call eax
mov ecx, str.GetDeviceIdentifier
mov edi, eax
call fcn.0040a730
mov ecx, dword [ebp - 0x174]
mov edx, dword [ebp - 0x170]
mov eax, dword [ebp - 0x16c]
mov dword [esi], ecx
mov ecx, dword [ebp - 0x168]
mov dword [esi + 4], edx
mov dword [esi + 8], eax
lea eax, [ebp - 0x58c]
mov dword [esi + 0xc], ecx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409e25
mov ecx, dword [ebp - 0x5ac]
sub eax, edx
push eax
lea edx, [ebp - 0x58c]
push edx
call fcn.0043df40
lea eax, [ebp - 0x38c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409e50
mov ecx, dword [ebp - 0x59c]
sub eax, edx
push eax
lea eax, [ebp - 0x38c]
push eax
call fcn.0043df40
xor eax, eax
mov dword [ebp - 0x600], eax
push eax
mov dword [ebp - 0x5fc], eax
mov dword [ebp - 0x5f8], eax
mov dword [ebp - 0x5f4], eax
mov dword [ebp - 0x600], 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 - 0x5a4], eax
call edi
push esi
push 0
mov edi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, dword [ebp - 0x598]
mov eax, dword [ecx]
mov edx, dword [eax]
mov edx, dword [edx + 0x5c]
lea ecx, [ebp - 0x608]
push ecx
lea ecx, [ebp - 0x5a8]
push ecx
lea ecx, [ebp - 0x600]
push ecx
push eax
call edx
test eax, eax
jge 0x409f91
push eax
lea esi, [ebp - 0x5c8]
call fcn.0046edd0
add esp, 4
mov esi, 0x10
mov byte [ebp - 4], 4
cmp dword [eax + 0x18], esi
jb 0x409f12
mov eax, dword [eax + 4]
jmp 0x409f15
add eax, 4
push eax
lea eax, [ebp - 0x140]
push str.GetAvailableVidMem_failed:__s
push eax
call fcn.00471f90
add esp, 0xc
mov edi, dword [ebp - 0x590]
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.0040a710
cmp dword [ebp - 0x128], esi
jb 0x409f52
mov ecx, dword [ebp - 0x13c]
push ecx
call fcn.005b28f2
add esp, 4
mov byte [ebp - 4], 2
cmp dword [ebp - 0x5b0], esi
mov dword [ebp - 0x128], 0xf
mov dword [ebp - 0x12c], 0
mov byte [ebp - 0x13c], 0
jb 0x40a04f
mov edx, dword [ebp - 0x5c4]
push edx
call fcn.005b28f2
add esp, 4
jmp 0x40a04f
mov eax, edi
cdq
and edx, 7
add eax, edx
mov esi, dword [ebp - 0x590]
sar eax, 3
imul eax, dword [ebp - 0x5a4]
imul eax, ebx
add eax, dword [ebp - 0x5a8]
shr eax, 0x14
cmp eax, dword [esi + 0xb0]
mov dword [ebp - 0x5a8], eax
jae 0x40a009
push str.Not_enough_video_memory.
lea ecx, [ebp - 0x5f0]
call fcn.00438a30
lea eax, [ebp - 0x5f0]
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.0040a700
cmp dword [ebp - 0x5d8], 0x10
mov bl, al
jb 0x409d73
mov eax, dword [ebp - 0x5ec]
push eax
call fcn.005b28f2
add esp, 4
mov al, bl
jmp 0x40a628
cmp eax, dword [esi + 0xb4]
jae 0x40a04d
push str.Low_video_memory.
lea ecx, [ebp - 0x5c8]
call fcn.00438a30
mov ecx, dword [ebp - 0x590]
lea eax, [ebp - 0x5c8]
mov byte [ebp - 4], 7
call fcn.0040a710
lea ecx, [ebp - 0x5c8]
mov byte [ebp - 4], 2
call fcn.00525310
mov edi, dword [ebp - 0x590]
jmp 0x40a04f
mov edi, esi
cmp byte [edi + 0xb8], 0
je 0x40a077
call fcn.004095b0
test al, al
je 0x40a068
xor al, al
jmp 0x40a628
mov ecx, dword [ebp - 0x590]
mov byte [ecx + 0xb9], 1
mov edi, ecx
push 0
push 0x5ff2b0
lea ecx, [edi + 0x78]
call fcn.0043df40
push 0
push 0x5ff2b0
lea ecx, [edi + 0x94]
call fcn.0043df40
mov edx, dword [ebp - 0x5ac]
push 0xffffffffffffffff
push 0
push edx
lea ecx, [ebp - 0x15c]
mov dword [ebp - 0x144], 0xf
mov dword [ebp - 0x148], 0
mov byte [ebp - 0x158], 0
call fcn.0043b440
push 2
push 0x5ff53c
lea eax, [ebp - 0x15c]
push eax
xor edx, edx
mov byte [ebp - 4], 8
call fcn.0043b600
cmp eax, 0xffffffff
jne 0x40a1db
push 0x104
lea ecx, [ebp - 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40a1db
lea edx, [ebp - 0x124]
push edx
lea ecx, [ebp - 0x5c8]
call fcn.00438a30
lea edi, [ebp - 0x5c8]
lea esi, [ebp - 0x5f0]
mov byte [ebp - 4], 9
call fcn.00471d00
lea ecx, [ebp - 0x15c]
push ecx
push eax
lea edx, [ebp - 0x140]
push edx
mov byte [ebp - 4], 0xa
call fcn.00441fd0
add esp, 0xc
push 0xffffffffffffffff
xor ebx, ebx
push ebx
push eax
lea ecx, [ebp - 0x15c]
mov byte [ebp - 4], 0xb
call fcn.0043b440
mov esi, 0x10
cmp dword [ebp - 0x128], esi
jb 0x40a178
mov eax, dword [ebp - 0x13c]
push eax
call fcn.005b28f2
add esp, 4
cmp dword [ebp - 0x5d8], esi
mov edi, 0xf
mov dword [ebp - 0x128], edi
mov dword [ebp - 0x12c], ebx
mov byte [ebp - 0x13c], 0
jb 0x40a1a7
mov ecx, dword [ebp - 0x5ec]
push ecx
call fcn.005b28f2
add esp, 4
mov byte [ebp - 4], 8
cmp dword [ebp - 0x5b0], esi
mov dword [ebp - 0x5d8], edi
mov dword [ebp - 0x5dc], ebx
mov byte [ebp - 0x5ec], 0
jb 0x40a1d5
mov edx, dword [ebp - 0x5c4]
push edx
call fcn.005b28f2
add esp, 4
mov edi, dword [ebp - 0x590]
xor eax, eax
cmp dword [ebp - 0x144], 0x10
mov dword [ebp - 0x5d4], eax
mov dword [ebp - 0x5d0], eax
mov eax, dword [ebp - 0x158]
jae 0x40a1fe
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 0x40a25d
lea eax, [ebp - 0x5d4]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x40a256
lea ecx, [ebp - 0x134]
push ecx
lea edx, [ebp - 0x5d4]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x40a256
movzx eax, word [ebp - 0x134]
mov dword [edi + 0xbc], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x59c]
cmp dword [ebx + 0x18], 0x10
jb 0x40a26e
mov esi, dword [ebx + 4]
jmp 0x40a271
lea esi, [ebx + 4]
push edi
call fcn.00409af0
test al, al
jne 0x40a2c8
mov esi, 0x10
cmp dword [ebx + 0x18], esi
jb 0x40a28a
mov ebx, dword [ebx + 4]
jmp 0x40a28d
add ebx, 4
push ebx
lea ecx, [ebp - 0x5c8]
push str.Unsupported_video_card:__s
push ecx
call fcn.00471f90
add esp, 0xc
mov ecx, edi
mov byte [ebp - 4], 0xc
call fcn.0040a710
mov byte [ebp - 4], 8
cmp dword [ebp - 0x5b0], esi
jb 0x40a2c8
mov edx, dword [ebp - 0x5c4]
push edx
call fcn.005b28f2
add esp, 4
mov esi, dword [ebp - 0x598]
mov eax, dword [esi]
mov edx, dword [eax]
lea ecx, [edi + 0x14]
push ecx
push 0x5feea0
push eax
mov eax, dword [edx]
mov dword [ebp - 0x5a4], ecx
call eax
mov ecx, str.QueryInterface_IID_IDirect3D7
mov edi, eax
call fcn.0040a730
mov eax, dword [esi]
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.0040a730
push 0x7c
lea ecx, [ebp - 0x70c]
push 0
push ecx
call fcn.005b30e0
mov eax, 0x64
add esp, 0xc
mov dword [ebp - 0x700], eax
mov dword [ebp - 0x704], eax
mov eax, dword [esi]
mov esi, dword [ebp - 0x590]
push 0
add esi, 8
push esi
lea ecx, [ebp - 0x70c]
mov dword [ebp - 0x70c], 0x7c
mov dword [ebp - 0x708], 7
mov dword [ebp - 0x6a4], 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.0040a730
mov eax, dword [ebp - 0x590]
mov ebx, dword [ebp - 0x704]
mov edi, dword [ebp - 0x700]
add eax, 0x68
call fcn.00408d90
mov ebx, dword [ebp - 0x590]
mov edx, dword [esi]
mov eax, dword [ebp - 0x5a4]
mov eax, dword [eax]
mov ecx, dword [eax]
add ebx, 0x18
push ebx
push edx
push 0x5feeb0
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ecx, str.CreateDevice
mov edi, eax
call fcn.0040a730
mov ebx, dword [ebx]
lea edx, [ebp - 0x5a0]
push edx
mov dword [ebp - 0x5a0], 0
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x10]
push 0x40a650
push ebx
call eax
mov ecx, str.EnumTextureFormats
mov edi, eax
call fcn.0040a730
test byte [ebp - 0x5a0], 1
jne 0x40a4c8
push str.A8R8G8B8_texture_format_not_supported.
lea ecx, [ebp - 0x5c8]
call fcn.00438a30
mov esi, dword [ebp - 0x590]
lea eax, [ebp - 0x5c8]
mov ecx, esi
mov byte [ebp - 4], 0xd
call fcn.0040a710
mov edi, 0x10
mov byte [ebp - 4], 8
cmp dword [ebp - 0x5b0], edi
jb 0x40a444
mov ecx, dword [ebp - 0x5c4]
push ecx
call fcn.005b28f2
add esp, 4
test byte [ebp - 0x5a0], 2
jne 0x40a4c4
push str.A4R4G4B4_and_A8R8G8B8_texture_formats_not_supported.
lea ecx, [ebp - 0x140]
call fcn.00438a30
lea eax, [ebp - 0x140]
mov ecx, esi
mov byte [ebp - 4], 0xe
call fcn.0040a700
cmp dword [ebp - 0x128], edi
mov bl, al
jb 0x40a487
mov edx, dword [ebp - 0x13c]
push edx
call fcn.005b28f2
add esp, 4
cmp dword [ebp - 0x144], edi
mov dword [ebp - 0x128], 0xf
mov dword [ebp - 0x12c], 0
mov byte [ebp - 0x13c], 0
jb 0x409d73
mov eax, dword [ebp - 0x158]
push eax
call fcn.005b28f2
add esp, 4
mov al, bl
jmp 0x40a628
xor bl, bl
jmp 0x40a4d5
mov esi, dword [ebp - 0x590]
mov bl, 1
mov edi, 0x10
push 0x7c
lea ecx, [ebp - 0x68c]
push 0
push ecx
mov byte [0x6405ba], bl
call fcn.005b30e0
mov eax, 0x40
mov dword [ebp - 0x680], eax
mov dword [ebp - 0x684], eax
add esp, 0xc
test bl, bl
mov eax, 0x20
mov dword [ebp - 0x68c], 0x7c
mov dword [ebp - 0x688], 0x1007
mov dword [ebp - 0x624], 0x1000
mov dword [ebp - 0x620], edi
mov dword [ebp - 0x644], eax
mov dword [ebp - 0x640], 0x41
je 0x40a56c
mov dword [ebp - 0x638], eax
mov dword [ebp - 0x628], 0xff000000
mov dword [ebp - 0x634], 0xff0000
mov dword [ebp - 0x630], 0xff00
mov dword [ebp - 0x62c], 0xff
jmp 0x40a59a
mov dword [ebp - 0x638], edi
mov dword [ebp - 0x628], 0xf000
mov dword [ebp - 0x634], 0xf00
mov dword [ebp - 0x630], 0xf0
mov dword [ebp - 0x62c], 0xf
mov ebx, dword [ebp - 0x598]
mov eax, dword [ebx]
mov edx, dword [eax]
mov edx, dword [edx + 0x18]
push 0
lea ecx, [esi + 0xc]
push ecx
lea ecx, [ebp - 0x68c]
push ecx
push eax
call edx
mov ecx, str.CreateSurface__TextureSurface1_
mov edi, eax
call fcn.0040a730
mov eax, dword [ebx]
mov ecx, dword [eax]
push 0
add esi, 0x10
push esi
lea edx, [ebp - 0x68c]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
mov ecx, str.CreateSurface__TextureSurfacd2_
mov edi, eax
call fcn.0040a730
cmp dword [ebp - 0x144], 0x10
jb 0x40a5fe
mov ecx, dword [ebp - 0x158]
push ecx
call fcn.005b28f2
add esp, 4
mov al, 1
jmp 0x40a628
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.005b2f9b
mov esp, ebp
pop ebp
ret 4