Function at 0x545730
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7941aa
mov eax, dword fs:[0]
push eax
sub esp, 0x708
mov eax, dword [0x867e6c]
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 edi, edx
mov esi, ebx
mov dword [ebp - 0x5c0], ebx
mov dword [ebp - 0x5cc], eax
mov dword [ebp - 0x594], edi
call fcn.00546180
cmp byte [ebx + 0xb8], 0
mov dword [ebx + 0xbc], 0
je 0x545897
mov ecx, dword [0x88b148]
add ecx, 0x94
push ecx
mov edi, str.SOFTWARE_
lea esi, [ebp - 0x5e8]
call fcn.00403060
add esp, 4
mov edi, eax
lea eax, [ebp - 0x15c]
mov dword [ebp - 4], 0
call fcn.00439630
push eax
mov edi, str.Test3D
lea esi, [ebp - 0x140]
mov byte [ebp - 4], 1
call fcn.00402fb0
add esp, 4
cmp dword [ebp - 0x144], 0x10
jb 0x5457fc
mov edx, dword [ebp - 0x158]
push edx
call fcn.006441c7
add esp, 4
xor edi, edi
mov esi, 0x10
mov dword [ebp - 0x144], 0xf
mov dword [ebp - 0x148], edi
mov byte [ebp - 0x158], 0
cmp dword [ebp - 0x5d0], esi
jb 0x545831
mov eax, dword [ebp - 0x5e4]
push eax
call fcn.006441c7
add esp, 4
mov eax, dword [ebp - 0x13c]
cmp dword [ebp - 0x128], esi
jae 0x545845
lea eax, [ebp - 0x13c]
push edi
lea ecx, [ebx + 0x1c]
push ecx
push edi
push 0xf003f
push edi
push 0x81d304
push edi
push eax
push 0x80000001
call dword [sym.imp.advapi32.dll_RegCreateKeyExA]
cmp dword [ebp - 0x128], esi
jb 0x54587a
mov edx, dword [ebp - 0x13c]
push edx
call fcn.006441c7
add esp, 4
mov dword [ebp - 0x12c], edi
mov edi, dword [ebp - 0x594]
mov dword [ebp - 0x128], 0xf
mov byte [ebp - 0x13c], 0
mov dword [ebp - 4], 2
test edi, edi
jne 0x545916
mov eax, dword [0x88b5d0]
push str.DirectDrawCreateEx
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
test eax, eax
jne 0x5458f9
push str.No_DirectDrawCreateEx
lea ecx, [ebp - 0x140]
call fcn.00401280
lea eax, [ebp - 0x140]
mov ecx, ebx
mov byte [ebp - 4], 3
call fcn.00546210
cmp dword [ebp - 0x128], 0x10
mov bl, al
jb 0x5458f2
mov ecx, dword [ebp - 0x13c]
push ecx
call fcn.006441c7
add esp, 4
mov al, bl
jmp 0x546092
push 0
push 0x828374
lea ecx, [ebx + 4]
push ecx
push 0
call eax
mov ecx, str.DirectDrawCreateEx
mov edi, eax
call fcn.00546240
jmp 0x545921
mov edx, dword [edi]
mov eax, dword [edx + 4]
push edi
call eax
mov dword [ebx + 4], edi
lea eax, [ebx + 0x4c]
lea ecx, [ebx + 0x30]
lea esi, [ebx + 0x20]
call fcn.005e0d00
test al, al
jne 0x5459be
mov eax, dword [ebx + 4]
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.00546240
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]
inc eax
test cl, cl
jne 0x545983
sub eax, edx
push eax
lea edx, [ebp - 0x58c]
push edx
lea ecx, [ebx + 0x30]
call fcn.004016e0
lea eax, [ebp - 0x38c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5459a5
sub eax, edx
push eax
lea eax, [ebp - 0x38c]
push eax
lea ecx, [ebx + 0x4c]
call fcn.004016e0
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 - 0x594]
push edx
lea edx, [ebp - 0x5dc]
push edx
push eax
mov eax, dword [ecx + 0x5c]
call eax
test eax, eax
jge 0x545ad9
push eax
lea esi, [ebp - 0x5b4]
call fcn.005e6cc0
add esp, 4
mov edi, 0x10
mov byte [ebp - 4], 4
cmp dword [eax + 0x18], edi
jb 0x545a61
mov eax, dword [eax + 4]
jmp 0x545a64
add eax, 4
push eax
push str.GetAvailableVidMem_failed:__s
lea esi, [ebp - 0x140]
call fcn.00439900
add esp, 8
mov ecx, ebx
mov byte [ebp - 4], 5
call fcn.00546220
cmp dword [ebp - 0x128], edi
jb 0x545a9a
mov ecx, dword [ebp - 0x13c]
push ecx
call fcn.006441c7
add esp, 4
mov byte [ebp - 4], 2
mov dword [ebp - 0x128], 0xf
mov dword [ebp - 0x12c], 0
mov byte [ebp - 0x13c], 0
cmp dword [ebp - 0x59c], edi
jb 0x545b8c
mov edx, dword [ebp - 0x5b0]
push edx
call fcn.006441c7
add esp, 4
jmp 0x545b8c
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 - 0x594]
shr eax, 0x14
mov dword [ebp - 0x594], eax
cmp eax, dword [ebx + 0xb0]
jae 0x545b4f
push str.Not_enough_video_memory.
lea ecx, [ebp - 0x140]
call fcn.00401280
lea eax, [ebp - 0x140]
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00546210
cmp dword [ebp - 0x128], 0x10
mov bl, al
jb 0x5458f2
mov eax, dword [ebp - 0x13c]
push eax
call fcn.006441c7
add esp, 4
mov al, bl
jmp 0x546092
cmp eax, dword [ebx + 0xb4]
jae 0x545b87
push str.Low_video_memory.
lea ecx, [ebp - 0x5b4]
call fcn.00401280
lea eax, [ebp - 0x5b4]
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.00546220
lea ecx, [ebp - 0x5b4]
mov byte [ebp - 4], 2
call fcn.004012f0
mov edi, 0x10
cmp byte [ebx + 0xb8], 0
je 0x545bae
mov eax, ebx
call fcn.00545400
test al, al
je 0x545ba7
xor al, al
jmp 0x546092
mov byte [ebx + 0xb9], 1
push 0
push 0x81d304
lea ecx, [ebx + 0x78]
call fcn.004016e0
push 0
push 0x81d304
lea ecx, [ebx + 0x94]
call fcn.004016e0
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.00401530
push 2
push 0x820e38
lea ecx, [ebp - 0x15c]
push ecx
xor eax, eax
mov byte [ebp - 4], 8
call fcn.00547550
cmp eax, 0xffffffff
jne 0x545cae
push 0x104
lea edx, [ebp - 0x124]
push edx
call dword [sym.imp.kernel32.dll_GetSystemDirectoryA]
test eax, eax
je 0x545cae
lea eax, [ebp - 0x124]
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00401280
mov al, 1
lea edi, [ebp - 0x5b4]
lea ecx, [ebp - 0x710]
mov byte [ebp - 4], 9
call fcn.004396c0
lea ecx, [ebp - 0x15c]
push ecx
push eax
lea esi, [ebp - 0x140]
mov byte [ebp - 4], 0xa
call fcn.00402f10
add esp, 8
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x15c]
mov byte [ebp - 4], 0xb
call fcn.00401530
mov ecx, esi
call fcn.004012f0
lea ecx, [ebp - 0x710]
call fcn.004012f0
mov ecx, edi
mov byte [ebp - 4], 8
call fcn.004012f0
mov edi, 0x10
xor eax, eax
mov dword [ebp - 0x5bc], eax
mov dword [ebp - 0x5b8], eax
mov eax, dword [ebp - 0x158]
cmp dword [ebp - 0x144], edi
jae 0x545cd0
lea eax, [ebp - 0x158]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x545d2f
lea edx, [ebp - 0x5bc]
push edx
push 0
push 0
push esi
call dword [sym.imp.kernel32.dll_GetFileTime]
test eax, eax
je 0x545d28
lea eax, [ebp - 0x134]
push eax
lea ecx, [ebp - 0x5bc]
push ecx
call dword [sym.imp.kernel32.dll_FileTimeToSystemTime]
test eax, eax
je 0x545d28
movzx edx, word [ebp - 0x134]
mov dword [ebx + 0xbc], edx
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
cmp dword [ebx + 0x64], edi
jb 0x545d39
mov edi, dword [ebx + 0x50]
jmp 0x545d3c
lea edi, [ebx + 0x50]
push ebx
call fcn.00545670
test al, al
jne 0x545d8f
cmp dword [ebx + 0x64], 0x10
jb 0x545d51
mov eax, dword [ebx + 0x50]
jmp 0x545d54
lea eax, [ebx + 0x50]
push eax
push str.Unsupported_video_card:__s
lea esi, [ebp - 0x5b4]
call fcn.00439900
add esp, 8
mov ecx, ebx
mov byte [ebp - 4], 0xc
call fcn.00546220
mov byte [ebp - 4], 8
cmp dword [ebp - 0x59c], 0x10
jb 0x545d8f
mov eax, dword [ebp - 0x5b0]
push eax
call fcn.006441c7
add esp, 4
mov eax, dword [ebx + 4]
mov edx, dword [eax]
lea ecx, [ebx + 0x14]
push ecx
push 0x828394
push eax
mov eax, dword [edx]
call eax
mov ecx, str.QueryInterface_IID_IDirect3D7
mov edi, eax
call fcn.00546240
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.00546240
push 0x7c
lea ecx, [ebp - 0x6f4]
push 0
push ecx
call fcn.0064edd0
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.00546240
mov eax, dword [ebp - 0x6ec]
mov edi, dword [ebp - 0x6e8]
push eax
lea eax, [ebx + 0x68]
call fcn.00544b20
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 0x8283a4
push eax
call edx
mov ecx, str.CreateDevice
mov edi, eax
call fcn.00546240
mov eax, dword [ebx + 0x18]
lea edx, [ebp - 0x598]
push edx
mov dword [ebp - 0x598], 0
mov ecx, dword [eax]
push 0x5460b0
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ecx, str.EnumTextureFormats
mov edi, eax
call fcn.00546240
test byte [ebp - 0x598], 1
jne 0x545f39
push str.A8R8G8B8_texture_format_not_supported.
lea ecx, [ebp - 0x140]
call fcn.00401280
lea eax, [ebp - 0x140]
mov ecx, ebx
mov byte [ebp - 4], 0xd
call fcn.00546220
mov esi, 0x10
mov byte [ebp - 4], 8
cmp dword [ebp - 0x128], esi
jb 0x545ee7
mov ecx, dword [ebp - 0x13c]
push ecx
call fcn.006441c7
add esp, 4
test byte [ebp - 0x598], 2
jne 0x545f30
push str.A4R4G4B4_and_A8R8G8B8_texture_formats_not_supported.
lea ecx, [ebp - 0x5b4]
call fcn.00401280
lea eax, [ebp - 0x5b4]
mov ecx, ebx
mov byte [ebp - 4], 0xe
call fcn.00546210
lea ecx, [ebp - 0x5b4]
mov bl, al
call fcn.004012f0
lea ecx, [ebp - 0x15c]
call fcn.004012f0
mov al, bl
jmp 0x546092
mov byte [0x88b558], 0
jmp 0x545f45
mov byte [0x88b558], 1
mov esi, 0x10
push 0x7c
lea edx, [ebp - 0x674]
push 0
push edx
call fcn.0064edd0
mov eax, pe_nt_image_headers32
mov dword [ebp - 0x668], eax
mov dword [ebp - 0x66c], eax
add esp, 0xc
cmp byte [0x88b558], 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 0x545fdb
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 0x546009
mov dword [ebp - 0x620], esi
mov dword [ebp - 0x610], 0xf000
mov dword [ebp - 0x61c], 0xf00
mov dword [ebp - 0x618], 0xf0
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.00546240
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.00546240
cmp dword [ebp - 0x144], esi
jb 0x546068
mov ecx, dword [ebp - 0x158]
push ecx
call fcn.006441c7
add esp, 4
mov al, 1
jmp 0x546092
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.00643db8
mov esp, ebp
pop ebp
ret 4