Function at 0x10001050
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
jmp 0x10004e90
mov eax, dword [esp + 4]
sub esp, 0x3dc
test eax, eax
push ebx
push ebp
push esi
push edi
jne 0x100052e4
push 0x104
lea eax, [esp + 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x260]
push ecx
lea edx, [esp + 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edi, [esp + 0x58]
lea eax, [esp + 0x58]
dec edi
push eax
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + edi], 0x5c
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x10004ef8
push 0x100440cc
lea ecx, [esp + 0x5c]
push ecx
call ebx
push str.DDRAW.DLL
lea edx, [esp + 0x5c]
push edx
call ebx
mov eax, dword [str.DDRAW.DLL]
test eax, eax
je 0x10004f9a
lea ebp, [esp + 0x15c]
mov edi, 0x1004f224
dec ebp
mov esi, edi
lea eax, [esp + 0x260]
push eax
lea ecx, [esp + 0x160]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x15c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + ebp], 0x5c
je 0x10004f59
push 0x100440cc
lea eax, [esp + 0x160]
push eax
call ebx
mov ecx, dword [edi]
push ecx
lea edx, [esp + 0x160]
push edx
call ebx
push 0x4000
lea eax, [esp + 0x368]
push eax
lea ecx, [esp + 0x164]
push ecx
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 0xffffffff
je 0x10005152
mov eax, dword [esi + 4]
add esi, 4
test eax, eax
mov edi, esi
jne 0x10004f20
mov edi, dword [esp + 0x10]
push 0
push 0
push 0
push str.DISPLAY
call dword [sym.imp.GDI32.dll_CreateDCA]
mov esi, eax
test esi, esi
je 0x10004fbe
push 0xc
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [esp + 0x10], eax
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x10]
mov ebp, 4
cmp eax, ebp
jle 0x10005013
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x10005013
push str.DirectDrawCreate
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1000500c
push 0
lea ecx, [esp + 0x28]
push ecx
push 0
call eax
test eax, eax
jne 0x1000500c
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
push eax
call dword [edx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x104
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + edi], 0x5c
je 0x10005040
push 0x100440cc
lea edx, [esp + 0x5c]
push edx
call ebx
push str.DDRAW.DLL
lea eax, [esp + 0x5c]
push eax
call ebx
push 0
push 5
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x64]
push 0x1004416c
push edx
call fcn.100010af
mov eax, dword [esp + 0x3c]
add esp, 0x14
cmp eax, ebp
jb 0x1000512e
mov eax, dword [str.Version]
mov ecx, 6
mov esi, str.SoftwareMicrosoftDirectX
lea edi, [esp + 0x3c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x10044164]
lea edx, [esp + 0x18]
push edx
push 0xf003f
mov dword [esp + 0x24], eax
push 0
movsw word es:[edi], word [esi]
lea eax, [esp + 0x48]
push eax
push 0x80000002
movsb byte es:[edi], byte [esi]
mov dword [esp + 0x34], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1000512e
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x160]
push edx
push eax
push eax
lea eax, [esp + 0x2c]
push eax
push ecx
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x10005123
lea edx, [esp + 0x15c]
push 0x100440d0
push edx
call fcn.1002c75b
add esp, 8
xor esi, esi
jmp 0x10005100
test eax, eax
je 0x10005123
push eax
call fcn.1002c692
push 0x100440d0
push 0
mov dword [esp + esi*4 + 0x34], eax
call fcn.1002c75b
add esp, 0xc
inc esi
cmp esi, 5
jb 0x10005100
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
shl ebx, 0x10
lea eax, [ebp - 1]
or ebx, edx
cmp eax, 3
ja case.default.0x1000514b
jmp dword [eax*4 + 0x10005300]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3dc
ret
xor ebp, ebp
xor ebx, ebx
jmp 0x100051ee
cmp ebx, 0x5f
ja 0x10005196
mov ebp, 1
pop edi
mov eax, ebp
pop esi
xor ebx, ebx
shl eax, 0x18
pop ebp
or eax, ebx
pop ebx
add esp, 0x3dc
ret
cmp ebx, 0x448
jb 0x1000516d
cmp ebx, 0x7ee
jae 0x100051b4
mov ebp, 2
pop edi
mov eax, ebp
pop esi
xor ebx, ebx
shl eax, 0x18
pop ebp
or eax, ebx
pop ebx
add esp, 0x3dc
ret
cmp ebx, 0x44
ja 0x100051cd
mov ebp, 3
pop edi
mov eax, ebp
pop esi
xor ebx, ebx
shl eax, 0x18
pop ebp
or eax, ebx
pop ebx
add esp, 0x3dc
ret
mov ebp, 4
pop edi
mov eax, ebp
pop esi
xor ebx, ebx
shl eax, 0x18
pop ebp
or eax, ebx
pop ebx
add esp, 0x3dc
ret
test ebp, ebp
jne 0x100052ec
cmp dword [esp + 0x10], 4
jle 0x10005211
call fcn.10001082
mov ebp, eax
shr ebp, 8
pop edi
mov eax, ebp
pop esi
shl eax, 0x18
pop ebp
or eax, ebx
pop ebx
add esp, 0x3dc
ret
mov edx, dword [0x10044164]
mov ecx, 6
mov esi, str.SoftwareMicrosoftDirectX
lea edi, [esp + 0x3c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [str.Version]
lea eax, [esp + 0x10]
push eax
push 0xf003f
mov dword [esp + 0x24], ecx
push 0
movsw word es:[edi], word [esi]
lea ecx, [esp + 0x48]
push ecx
push 0x80000002
movsb byte es:[edi], byte [esi]
mov dword [esp + 0x34], edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x100052ec
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x160]
push eax
push 0
push 0
lea ecx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x100052c3
lea eax, [esp + 0x15c]
push 0x100440d0
push eax
call fcn.1002c75b
add esp, 8
xor esi, esi
test eax, eax
je 0x100052c3
push eax
call fcn.1002c692
push 0x100440d0
push 0
mov dword [esp + esi*4 + 0x34], eax
call fcn.1002c75b
add esp, 0xc
inc esi
cmp esi, 5
jb 0x100052a0
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebp, dword [esp + 0x2c]
pop edi
mov eax, ebp
pop esi
shl eax, 0x18
pop ebp
or eax, ebx
pop ebx
add esp, 0x3dc
ret
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x14]
pop edi
mov eax, ebp
pop esi
shl eax, 0x18
pop ebp
or eax, ebx
pop ebx
add esp, 0x3dc
ret