Function at 0x4aa1e0
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x574]
sub esp, 0x574
push 0xffffffffffffffff
push 0x5cb1b5
mov eax, dword fs:[0]
push eax
sub esp, 0x170
mov eax, dword [0x61a654]
xor eax, ebp
mov dword [ebp + 0x570], 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 + 0x57c]
mov ebx, ecx
mov ecx, dword [ebp + 0x580]
mov dword [ebp - 0x18], ecx
mov ecx, ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x50], eax
call fcn.004860c0
xor esi, esi
cmp byte [ebx + 0xb8], 0
mov dword [ebx + 0xbc], esi
je 0x4aa322
mov edx, dword [0x620598]
add edx, 0x7c
push edx
lea eax, [ebp - 0x3c]
push str.SOFTWARE_
push eax
call fcn.00456ff0
push eax
lea ecx, [ebp + 0x430]
push ecx
mov dword [ebp - 4], esi
call fcn.00472180
push str.Test3D
push eax
lea edx, [ebp + 0x44c]
push edx
mov byte [ebp - 4], 1
call fcn.00456db0
mov edi, 0x10
add esp, 0x20
cmp dword [ebp + 0x448], edi
jb 0x4aa2af
mov eax, dword [ebp + 0x434]
push eax
call fcn.0059e6bb
add esp, 4
mov dword [ebp + 0x448], 0xf
mov dword [ebp + 0x444], esi
mov byte [ebp + 0x434], 0
cmp dword [ebp - 0x24], edi
jb 0x4aa2d7
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0059e6bb
add esp, 4
mov eax, dword [ebp + 0x450]
cmp dword [ebp + 0x464], edi
jae 0x4aa2eb
lea eax, [ebp + 0x450]
push esi
lea edx, [ebx + 0x1c]
push edx
push esi
push 0xf003f
push esi
push 0x5d6014
push esi
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp + 0x464], edi
jb 0x4aa327
mov eax, dword [ebp + 0x450]
push eax
call fcn.0059e6bb
add esp, 4
jmp 0x4aa327
mov edi, 0x10
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], 2
cmp eax, esi
jne 0x4aa3c7
mov ecx, dword [0x62059c]
push str.DirectDrawCreateEx
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
cmp eax, esi
jne 0x4aa3aa
push 0x15
push str.No_DirectDrawCreateEx
lea ecx, [ebp + 0x44c]
mov dword [ebp + 0x464], 0xf
mov dword [ebp + 0x460], esi
mov byte [ebp + 0x450], 0
call fcn.00401590
lea edx, [ebp + 0x44c]
push edx
mov ecx, ebx
mov byte [ebp - 4], 3
call fcn.004a6a70
mov bl, al
cmp dword [ebp + 0x464], edi
jb 0x4aa3a3
mov eax, dword [ebp + 0x450]
push eax
call fcn.0059e6bb
add esp, 4
mov al, bl
jmp 0x4aab6c
push esi
push 0x5dfbb0
lea edi, [ebx + 4]
push edi
push esi
call eax
push str.DirectDrawCreateEx
push eax
call fcn.004a6ab0
add esp, 8
jmp 0x4aa3d7
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov eax, dword [ebp - 0x18]
lea edi, [ebx + 4]
mov dword [edi], eax
lea eax, [ebx + 0x4c]
push eax
lea ecx, [ebx + 0x30]
push ecx
lea esi, [ebx + 0x20]
push esi
call fcn.004a8e30
add esp, 0xc
test al, al
jne 0x4aa479
mov edi, dword [edi]
mov ecx, dword [edi]
mov eax, dword [ecx + 0x6c]
push 0
lea edx, [ebp]
push edx
push edi
call eax
push str.GetDeviceIdentifier
push eax
call fcn.004a6ab0
mov ecx, dword [ebp + 0x418]
mov edx, dword [ebp + 0x41c]
mov eax, dword [ebp + 0x420]
mov dword [esi], ecx
mov ecx, dword [ebp + 0x424]
mov dword [esi + 4], edx
mov dword [esi + 8], eax
lea eax, [ebp]
add esp, 8
mov dword [esi + 0xc], ecx
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4aa440
sub eax, edx
push eax
lea edx, [ebp]
push edx
lea ecx, [ebx + 0x30]
call fcn.00401590
lea eax, [ebp + 0x200]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4aa460
sub eax, edx
push eax
lea eax, [ebp + 0x200]
push eax
lea ecx, [ebx + 0x4c]
call fcn.00401590
xor eax, eax
mov dword [ebp - 0x60], eax
push eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x60], 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 - 0x4c], eax
call edi
push 0xc
push esi
mov dword [ebp - 0x18], 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 - 0x80]
push edx
lea edx, [ebp - 0x20]
push edx
lea edx, [ebp - 0x60]
push edx
push eax
mov eax, dword [ecx + 0x5c]
call eax
test eax, eax
jge 0x4aa570
push eax
lea ecx, [ebp - 0x3c]
push ecx
call fcn.0046ec80
add esp, 8
mov edi, 0x10
mov byte [ebp - 4], 4
cmp dword [eax + 0x18], edi
jb 0x4aa4fc
mov eax, dword [eax + 4]
jmp 0x4aa4ff
add eax, 4
push eax
lea edx, [ebp + 0x44c]
push str.GetAvailableVidMem_failed:__s
push edx
call fcn.00472440
add esp, 0xc
push eax
mov ecx, ebx
mov byte [ebp - 4], 5
call fcn.004a6a90
cmp dword [ebp + 0x464], edi
jb 0x4aa537
mov eax, dword [ebp + 0x450]
push eax
call fcn.0059e6bb
add esp, 4
mov dword [ebp + 0x464], 0xf
mov dword [ebp + 0x460], 0
mov byte [ebp + 0x450], 0
mov byte [ebp - 4], 2
cmp dword [ebp - 0x24], edi
jb 0x4aa5ff
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0059e6bb
add esp, 4
jmp 0x4aa5ff
mov eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x4c]
add eax, dword [ebp - 0x20]
shr eax, 0x14
mov dword [ebp - 0x20], eax
cmp eax, dword [ebx + 0xb0]
jae 0x4aa5cf
push str.Not_enough_video_memory.
lea ecx, [ebp - 0x7c]
call fcn.004013c0
lea edx, [ebp - 0x7c]
push edx
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.004a6a70
cmp dword [ebp - 0x64], 0x10
mov bl, al
jb 0x4aa3a3
mov eax, dword [ebp - 0x78]
push eax
call fcn.0059e6bb
add esp, 4
mov al, bl
jmp 0x4aab6c
cmp eax, dword [ebx + 0xb4]
jae 0x4aa5ff
push str.Low_video_memory.
lea ecx, [ebp - 0x3c]
call fcn.004013c0
lea ecx, [ebp - 0x3c]
push ecx
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.004a6a90
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 2
call fcn.00401400
cmp byte [ebx + 0xb8], 0
mov esi, 0x10
je 0x4aa623
mov ecx, ebx
call fcn.004a65f0
test al, al
je 0x4aab6c
mov byte [ebx + 0xb9], 1
xor edi, edi
push edi
push 0x5d6014
lea ecx, [ebx + 0x78]
call fcn.00401590
push edi
push 0x5d6014
lea ecx, [ebx + 0x94]
call fcn.00401590
push 0xffffffffffffffff
push edi
lea eax, [ebx + 0x30]
push eax
lea ecx, [ebp + 0x430]
mov dword [ebp + 0x448], 0xf
mov dword [ebp + 0x444], edi
mov byte [ebp + 0x434], 0
call fcn.00401620
push 2
push edi
push 0x5e02a4
lea ecx, [ebp + 0x430]
mov byte [ebp - 4], 8
call fcn.00469a20
cmp eax, 0xffffffff
jne 0x4aa75c
push 0x104
lea edx, [ebp + 0x468]
push edx
call dword [sym.imp.kernel32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4aa75c
lea eax, [ebp + 0x468]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004013c0
push 1
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x7c]
push edx
mov byte [ebp - 4], 9
call fcn.00472210
add esp, 0xc
lea ecx, [ebp + 0x430]
push ecx
push eax
lea edx, [ebp + 0x44c]
push edx
mov byte [ebp - 4], 0xa
call fcn.004287d0
add esp, 0xc
push 0xffffffffffffffff
push edi
push eax
lea ecx, [ebp + 0x430]
mov byte [ebp - 4], 0xb
call fcn.00401620
cmp dword [ebp + 0x464], esi
jb 0x4aa711
mov eax, dword [ebp + 0x450]
push eax
call fcn.0059e6bb
add esp, 4
mov dword [ebp + 0x464], 0xf
mov dword [ebp + 0x460], edi
mov byte [ebp + 0x450], 0
cmp dword [ebp - 0x64], esi
jb 0x4aa739
mov ecx, dword [ebp - 0x78]
push ecx
call fcn.0059e6bb
add esp, 4
mov dword [ebp - 0x64], 0xf
mov dword [ebp - 0x68], edi
mov byte [ebp - 0x78], 0
mov byte [ebp - 4], 8
cmp dword [ebp - 0x24], esi
jb 0x4aa75c
mov edx, dword [ebp - 0x38]
push edx
call fcn.0059e6bb
add esp, 4
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x434]
cmp dword [ebp + 0x448], esi
jae 0x4aa778
lea eax, [ebp + 0x434]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4aa7d1
lea eax, [ebp - 0x44]
push eax
push 0
push 0
push edi
call dword [sym.imp.kernel32.dll_GetFileTime]
test eax, eax
je 0x4aa7ca
lea ecx, [ebp + 0x458]
push ecx
lea edx, [ebp - 0x44]
push edx
call dword [sym.imp.kernel32.dll_FileTimeToSystemTime]
test eax, eax
je 0x4aa7ca
movzx eax, word [ebp + 0x458]
mov dword [ebx + 0xbc], eax
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
cmp dword [ebx + 0x64], esi
jb 0x4aa7db
mov eax, dword [ebx + 0x50]
jmp 0x4aa7de
lea eax, [ebx + 0x50]
push eax
mov ecx, ebx
call fcn.004a69a0
test al, al
jne 0x4aa82a
cmp dword [ebx + 0x64], esi
jb 0x4aa7f4
mov eax, dword [ebx + 0x50]
jmp 0x4aa7f7
lea eax, [ebx + 0x50]
push eax
lea ecx, [ebp - 0x3c]
push str.Unsupported_video_card:__s
push ecx
call fcn.00472440
add esp, 0xc
push eax
mov ecx, ebx
mov byte [ebp - 4], 0xc
call fcn.004a6a90
mov byte [ebp - 4], 8
cmp dword [ebp - 0x24], esi
jb 0x4aa82a
mov edx, dword [ebp - 0x38]
push edx
call fcn.0059e6bb
add esp, 4
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
mov edx, dword [ecx]
lea edi, [ebx + 0x14]
push edi
push 0x5dfbe0
push eax
call edx
push str.QueryInterface_IID_IDirect3D7
push eax
call fcn.004a6ab0
mov eax, dword [ebx + 4]
mov edx, dword [ebp - 0x50]
mov ecx, dword [eax]
add esp, 8
push 8
push edx
push eax
mov eax, dword [ecx + 0x50]
call eax
push str.SetCooperativeLevel
push eax
call fcn.004a6ab0
add esp, 8
push 0x7c
lea ecx, [ebp - 0x17c]
push 0
push ecx
call fcn.005a06a0
add esp, 0xc
mov eax, 0x64
push 0
mov dword [ebp - 0x170], eax
mov dword [ebp - 0x174], eax
mov eax, dword [ebx + 4]
lea esi, [ebx + 8]
push esi
lea ecx, [ebp - 0x17c]
mov dword [ebp - 0x17c], 0x7c
mov dword [ebp - 0x178], 7
mov dword [ebp - 0x114], 0x2040
mov edx, dword [eax]
mov edx, dword [edx + 0x18]
push ecx
push eax
call edx
push str.CreateSurface__Primary_
push eax
call fcn.004a6ab0
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x170]
add esp, 8
push eax
push ecx
lea ecx, [ebx + 0x68]
call fcn.00498850
mov eax, dword [edi]
mov ecx, dword [esi]
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
lea edi, [ebx + 0x18]
push edi
push ecx
push 0x5dfbf0
push eax
call edx
push str.CreateDevice
push eax
call fcn.004a6ab0
mov edi, dword [edi]
add esp, 8
lea ecx, [ebp - 0x1c]
xor esi, esi
push ecx
mov dword [ebp - 0x1c], esi
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
push 0x4860a0
push edi
call edx
push str.EnumTextureFormats
push eax
call fcn.004a6ab0
add esp, 8
test byte [ebp - 0x1c], 1
jne 0x4aaa1a
push 0x26
push str.A8R8G8B8_texture_format_not_supported.
lea ecx, [ebp + 0x44c]
mov dword [ebp + 0x464], 0xf
mov dword [ebp + 0x460], esi
mov byte [ebp + 0x450], 0
call fcn.00401590
lea eax, [ebp + 0x44c]
push eax
mov ecx, ebx
mov byte [ebp - 4], 0xd
call fcn.004a6a90
mov edi, 0x10
mov byte [ebp - 4], 8
cmp dword [ebp + 0x464], edi
jb 0x4aa997
mov ecx, dword [ebp + 0x450]
push ecx
call fcn.0059e6bb
add esp, 4
test byte [ebp - 0x1c], 2
jne 0x4aaa11
push str.A4R4G4B4_and_A8R8G8B8_texture_formats_not_supported.
lea ecx, [ebp + 0x44c]
call fcn.004013c0
lea edx, [ebp + 0x44c]
push edx
mov ecx, ebx
mov byte [ebp - 4], 0xe
call fcn.004a6a70
mov bl, al
cmp dword [ebp + 0x464], edi
jb 0x4aa9d8
mov eax, dword [ebp + 0x450]
push eax
call fcn.0059e6bb
add esp, 4
mov dword [ebp + 0x464], 0xf
mov dword [ebp + 0x460], esi
mov byte [ebp + 0x450], 0
cmp dword [ebp + 0x448], edi
jb 0x4aa3a3
mov ecx, dword [ebp + 0x434]
push ecx
call fcn.0059e6bb
add esp, 4
mov al, bl
jmp 0x4aab6c
mov byte [0x621f0a], 0
jmp 0x4aaa26
mov byte [0x621f0a], 1
mov edi, 0x10
push 0x7c
lea edx, [ebp - 0x100]
push esi
push edx
call fcn.005a06a0
mov eax, 0x40
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf8], eax
add esp, 0xc
cmp byte [0x621f0a], 0
mov eax, 0x20
mov dword [ebp - 0x100], 0x7c
mov dword [ebp - 0xfc], 0x1007
mov dword [ebp - 0x98], 0x1000
mov dword [ebp - 0x94], edi
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb4], 0x41
je 0x4aaabb
mov dword [ebp - 0xac], eax
mov dword [ebp - 0x9c], 0xff000000
mov dword [ebp - 0xa8], 0xff0000
mov dword [ebp - 0xa4], 0xff00
mov dword [ebp - 0xa0], 0xff
jmp 0x4aaae9
mov dword [ebp - 0xac], edi
mov dword [ebp - 0x9c], 0xf000
mov dword [ebp - 0xa8], 0xf00
mov dword [ebp - 0xa4], 0xf0
mov dword [ebp - 0xa0], 0xf
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
push esi
lea edx, [ebx + 0xc]
push edx
lea edx, [ebp - 0x100]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
push str.CreateSurface__TextureSurface1_
push eax
call fcn.004a6ab0
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
add esp, 8
push esi
add ebx, 0x10
push ebx
lea edx, [ebp - 0x100]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
push 0x5e0198
push eax
call fcn.004a6ab0
add esp, 8
cmp dword [ebp + 0x448], edi
jb 0x4aab4a
mov ecx, dword [ebp + 0x434]
push ecx
call fcn.0059e6bb
add esp, 4
mov al, 1
jmp 0x4aab6c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x570]
xor ecx, ebp
call fcn.0059e619
add ebp, 0x574
mov esp, ebp
pop ebp
ret 8