Function at 0x409c10
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59636a
mov eax, dword fs:[0]
push eax
sub esp, 0x700
mov eax, dword [0x5d5de8]
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.0040a6d0
cmp byte [edi + 0xb8], 0
mov dword [edi + 0xbc], 0
je 0x409d74
mov ecx, dword [0x5dcd5c]
add ecx, 0x7c
push ecx
lea edx, [ebp - 0x5c8]
push str.SOFTWARE_
push edx
call fcn.00441b60
add esp, 0xc
mov esi, eax
lea ebx, [ebp - 0x15c]
mov dword [ebp - 4], 0
call fcn.00471fe0
push str.Test3D
push eax
lea eax, [ebp - 0x140]
push eax
mov byte [ebp - 4], 1
call fcn.00441c10
add esp, 0xc
cmp dword [ebp - 0x144], 0x10
jb 0x409cdb
mov ecx, dword [ebp - 0x158]
push ecx
call fcn.00569095
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 0x409d0f
mov edx, dword [ebp - 0x5c4]
push edx
call fcn.00569095
add esp, 4
cmp dword [ebp - 0x128], esi
mov eax, dword [ebp - 0x13c]
jae 0x409d23
lea eax, [ebp - 0x13c]
push ebx
lea ecx, [edi + 0x1c]
push ecx
push ebx
push 0xf003f
push ebx
push 0x5a5b90
push ebx
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp - 0x128], esi
jb 0x409d58
mov edx, dword [ebp - 0x13c]
push edx
call fcn.00569095
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 0x409e03
mov eax, dword [0x5dcd60]
push str.DirectDrawCreateEx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x409dda
push str.No_DirectDrawCreateEx
lea ecx, [ebp - 0x5f0]
call fcn.00438950
lea eax, [ebp - 0x5f0]
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0040a760
cmp dword [ebp - 0x5d8], 0x10
mov bl, al
jb 0x409dd3
mov ecx, dword [ebp - 0x5ec]
push ecx
call fcn.00569095
add esp, 4
mov al, bl
jmp 0x40a688
push 0
push 0x5a5750
lea ebx, [edi + 4]
push ebx
push 0
mov dword [ebp - 0x598], ebx
call eax
mov ecx, str.DirectDrawCreateEx
mov edi, eax
call fcn.0040a790
mov edi, dword [ebp - 0x590]
jmp 0x409e18
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.004388d0
test al, al
jne 0x409ece
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.0040a790
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 0x409e85
mov ecx, dword [ebp - 0x5ac]
sub eax, edx
push eax
lea edx, [ebp - 0x58c]
push edx
call fcn.0043dd50
lea eax, [ebp - 0x38c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409eb0
mov ecx, dword [ebp - 0x59c]
sub eax, edx
push eax
lea eax, [ebp - 0x38c]
push eax
call fcn.0043dd50
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 0x409ff1
push eax
lea esi, [ebp - 0x5c8]
call fcn.0046f150
add esp, 4
mov esi, 0x10
mov byte [ebp - 4], 4
cmp dword [eax + 0x18], esi
jb 0x409f72
mov eax, dword [eax + 4]
jmp 0x409f75
add eax, 4
push eax
lea eax, [ebp - 0x140]
push str.GetAvailableVidMem_failed:__s
push eax
call fcn.00472300
add esp, 0xc
mov edi, dword [ebp - 0x590]
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.0040a770
cmp dword [ebp - 0x128], esi
jb 0x409fb2
mov ecx, dword [ebp - 0x13c]
push ecx
call fcn.00569095
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 0x40a0af
mov edx, dword [ebp - 0x5c4]
push edx
call fcn.00569095
add esp, 4
jmp 0x40a0af
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 0x40a069
push str.Not_enough_video_memory.
lea ecx, [ebp - 0x5f0]
call fcn.00438950
lea eax, [ebp - 0x5f0]
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.0040a760
cmp dword [ebp - 0x5d8], 0x10
mov bl, al
jb 0x409dd3
mov eax, dword [ebp - 0x5ec]
push eax
call fcn.00569095
add esp, 4
mov al, bl
jmp 0x40a688
cmp eax, dword [esi + 0xb4]
jae 0x40a0ad
push str.Low_video_memory.
lea ecx, [ebp - 0x5c8]
call fcn.00438950
mov ecx, dword [ebp - 0x590]
lea eax, [ebp - 0x5c8]
mov byte [ebp - 4], 7
call fcn.0040a770
lea ecx, [ebp - 0x5c8]
mov byte [ebp - 4], 2
call fcn.004389f0
mov edi, dword [ebp - 0x590]
jmp 0x40a0af
mov edi, esi
cmp byte [edi + 0xb8], 0
je 0x40a0d7
call fcn.00409610
test al, al
je 0x40a0c8
xor al, al
jmp 0x40a688
mov ecx, dword [ebp - 0x590]
mov byte [ecx + 0xb9], 1
mov edi, ecx
push 0
push 0x5a5b90
lea ecx, [edi + 0x78]
call fcn.0043dd50
push 0
push 0x5a5b90
lea ecx, [edi + 0x94]
call fcn.0043dd50
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.0043b2f0
push 2
push 0x5a5e1c
lea eax, [ebp - 0x15c]
push eax
xor edx, edx
mov byte [ebp - 4], 8
call fcn.0043b480
cmp eax, 0xffffffff
jne 0x40a23b
push 0x104
lea ecx, [ebp - 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40a23b
lea edx, [ebp - 0x124]
push edx
lea ecx, [ebp - 0x5c8]
call fcn.00438950
lea edi, [ebp - 0x5c8]
lea esi, [ebp - 0x5f0]
mov byte [ebp - 4], 9
call fcn.00472070
lea ecx, [ebp - 0x15c]
push ecx
push eax
lea edx, [ebp - 0x140]
push edx
mov byte [ebp - 4], 0xa
call fcn.00441cc0
add esp, 0xc
push 0xffffffffffffffff
xor ebx, ebx
push ebx
push eax
lea ecx, [ebp - 0x15c]
mov byte [ebp - 4], 0xb
call fcn.0043b2f0
mov esi, 0x10
cmp dword [ebp - 0x128], esi
jb 0x40a1d8
mov eax, dword [ebp - 0x13c]
push eax
call fcn.00569095
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 0x40a207
mov ecx, dword [ebp - 0x5ec]
push ecx
call fcn.00569095
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 0x40a235
mov edx, dword [ebp - 0x5c4]
push edx
call fcn.00569095
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 0x40a25e
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 0x40a2bd
lea eax, [ebp - 0x5d4]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x40a2b6
lea ecx, [ebp - 0x134]
push ecx
lea edx, [ebp - 0x5d4]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x40a2b6
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 0x40a2ce
mov esi, dword [ebx + 4]
jmp 0x40a2d1
lea esi, [ebx + 4]
push edi
call fcn.00409b50
test al, al
jne 0x40a328
mov esi, 0x10
cmp dword [ebx + 0x18], esi
jb 0x40a2ea
mov ebx, dword [ebx + 4]
jmp 0x40a2ed
add ebx, 4
push ebx
lea ecx, [ebp - 0x5c8]
push str.Unsupported_video_card:__s
push ecx
call fcn.00472300
add esp, 0xc
mov ecx, edi
mov byte [ebp - 4], 0xc
call fcn.0040a770
mov byte [ebp - 4], 8
cmp dword [ebp - 0x5b0], esi
jb 0x40a328
mov edx, dword [ebp - 0x5c4]
push edx
call fcn.00569095
add esp, 4
mov esi, dword [ebp - 0x598]
mov eax, dword [esi]
mov edx, dword [eax]
lea ecx, [edi + 0x14]
push ecx
push 0x5a5780
push eax
mov eax, dword [edx]
mov dword [ebp - 0x5a4], ecx
call eax
mov ecx, str.QueryInterface_IID_IDirect3D7
mov edi, eax
call fcn.0040a790
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.0040a790
push 0x7c
lea ecx, [ebp - 0x70c]
push 0
push ecx
call fcn.00569a00
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.0040a790
mov eax, dword [ebp - 0x590]
mov ebx, dword [ebp - 0x704]
mov edi, dword [ebp - 0x700]
add eax, 0x68
call fcn.00408df0
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 0x5a5790
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ecx, str.CreateDevice
mov edi, eax
call fcn.0040a790
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 0x40a6b0
push ebx
call eax
mov ecx, str.EnumTextureFormats
mov edi, eax
call fcn.0040a790
test byte [ebp - 0x5a0], 1
jne 0x40a528
push str.A8R8G8B8_texture_format_not_supported.
lea ecx, [ebp - 0x5c8]
call fcn.00438950
mov esi, dword [ebp - 0x590]
lea eax, [ebp - 0x5c8]
mov ecx, esi
mov byte [ebp - 4], 0xd
call fcn.0040a770
mov edi, 0x10
mov byte [ebp - 4], 8
cmp dword [ebp - 0x5b0], edi
jb 0x40a4a4
mov ecx, dword [ebp - 0x5c4]
push ecx
call fcn.00569095
add esp, 4
test byte [ebp - 0x5a0], 2
jne 0x40a524
push str.A4R4G4B4_and_A8R8G8B8_texture_formats_not_supported.
lea ecx, [ebp - 0x140]
call fcn.00438950
lea eax, [ebp - 0x140]
mov ecx, esi
mov byte [ebp - 4], 0xe
call fcn.0040a760
cmp dword [ebp - 0x128], edi
mov bl, al
jb 0x40a4e7
mov edx, dword [ebp - 0x13c]
push edx
call fcn.00569095
add esp, 4
cmp dword [ebp - 0x144], edi
mov dword [ebp - 0x128], 0xf
mov dword [ebp - 0x12c], 0
mov byte [ebp - 0x13c], 0
jb 0x409dd3
mov eax, dword [ebp - 0x158]
push eax
call fcn.00569095
add esp, 4
mov al, bl
jmp 0x40a688
xor bl, bl
jmp 0x40a535
mov esi, dword [ebp - 0x590]
mov bl, 1
mov edi, 0x10
push 0x7c
lea ecx, [ebp - 0x68c]
push 0
push ecx
mov byte [0x5dcd4a], bl
call fcn.00569a00
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 0x40a5cc
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 0x40a5fa
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.0040a790
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.0040a790
cmp dword [ebp - 0x144], 0x10
jb 0x40a65e
mov ecx, dword [ebp - 0x158]
push ecx
call fcn.00569095
add esp, 4
mov al, 1
jmp 0x40a688
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.005697e2
mov esp, ebp
pop ebp
ret 4