Function at 0x4163c0
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
sub esp, 0x72c
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [esp + 0x1c]
push esi
push edi
mov dword [esp + 0x24], str.readme.htm
mov dword [esp + 0x28], str.readme.txt
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcpyA]
lea edx, [esp + 0x30]
push 0x4f80d4
mov ebx, dword [ecx]
push edx
mov byte [esp + 0x1b], 0
mov byte [esp + 0x1a], 0
call esi
lea eax, [esp + 0x430]
push 0x4f80d8
push eax
call esi
lea ecx, [esp + 0x534]
push 0x4f80dc
push ecx
call esi
lea edx, [esp + 0x638]
push 0x4f80e0
push edx
call esi
mov esi, dword [esp + 0x744]
test esi, esi
je 0x4164f0
lea eax, [esp + 0x18]
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftDirectX_SDK
push 0x80000002
call dword [sym.imp.ADVAPI32.DLL_RegOpenKeyExA]
test eax, eax
jne 0x4164e5
lea ecx, [esp + 0x20]
lea edx, [esp + 0x638]
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push edx
push eax
push 0
push str.DX9J3SDK_Samples_Path
push ecx
mov dword [esp + 0x38], 0x104
call dword [sym.imp.ADVAPI32.DLL_RegQueryValueExA]
test eax, eax
mov byte [esp + 0x73b], 0
jne 0x4164e5
push ebx
lea edx, [esp + 0x63c]
push esi
push edx
push str._sC_s_s
lea eax, [esp + 0x40]
push 0x3ff
push eax
call dword [sym.imp.MSVCRT.DLL__snprintf]
add esp, 0x18
lea ecx, [esp + 0x30]
mov byte [esp + 0x42f], 0
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4164e5
mov byte [esp + 0x12], 1
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
lea eax, [esp + 0x430]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
mov edi, dword [sym.imp.MSVCRT.DLL__mbsrchr]
lea ecx, [esp + 0x430]
push 0x5c
push ecx
mov byte [esp + 0x53b], 0
call edi
mov esi, eax
add esp, 8
test esi, esi
je 0x416560
lea edx, [esi + 1]
push 0x104
lea eax, [esp + 0x538]
push edx
push eax
call dword [sym.imp.MSVCRT.DLL__mbsnbcpy]
lea ecx, [esp + 0x540]
push 0x2e
mov byte [esp + 0x647], 0
push ecx
mov byte [esi], 0
call edi
add esp, 0x14
test eax, eax
je 0x416560
mov byte [eax], 0
mov al, byte [esp + 0x12]
test al, al
jne 0x41691a
lea edi, [esp + 0x430]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.MSVCRT.DLL__mbsrchr]
add esp, 8
test eax, eax
je 0x4165ab
mov byte [eax], 0
lea edx, [esp + 0x30]
push 0x4ee91c
push edx
call ebp
lea eax, [esp + 0x534]
lea ecx, [esp + 0x30]
push eax
push ecx
call ebp
lea edx, [esp + 0x30]
push 0x4ee920
push edx
call ebp
lea eax, [esp + 0x30]
push ebx
push eax
call ebp
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41691a
or ecx, eax
lea edi, [esp + 0x430]
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.MSVCRT.DLL__mbsrchr]
add esp, 8
test eax, eax
je 0x41662c
mov byte [eax], 0
lea edx, [esp + 0x30]
push str.BumpMapping_
push edx
call ebp
lea eax, [esp + 0x534]
lea ecx, [esp + 0x30]
push eax
push ecx
call ebp
lea edx, [esp + 0x30]
push 0x4ee934
push edx
call ebp
lea eax, [esp + 0x30]
push ebx
push eax
call ebp
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41691a
or ecx, eax
lea edi, [esp + 0x430]
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.MSVCRT.DLL__mbsrchr]
add esp, 8
test eax, eax
je 0x4166ad
mov byte [eax], 0
lea edx, [esp + 0x30]
push str.EnvMapping_
push edx
call ebp
lea eax, [esp + 0x534]
lea ecx, [esp + 0x30]
push eax
push ecx
call ebp
lea edx, [esp + 0x30]
push 0x4ee948
push edx
call ebp
lea eax, [esp + 0x30]
push ebx
push eax
call ebp
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41691a
or ecx, eax
lea edi, [esp + 0x430]
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.MSVCRT.DLL__mbsrchr]
add esp, 8
test eax, eax
je 0x41672e
mov byte [eax], 0
lea edx, [esp + 0x30]
push str.Meshes_
push edx
call ebp
lea eax, [esp + 0x534]
lea ecx, [esp + 0x30]
push eax
push ecx
call ebp
lea edx, [esp + 0x30]
push 0x4ee958
push edx
call ebp
lea eax, [esp + 0x30]
push ebx
push eax
call ebp
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41691a
or ecx, eax
lea edi, [esp + 0x430]
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.MSVCRT.DLL__mbsrchr]
add esp, 8
test eax, eax
je 0x4167af
mov byte [eax], 0
lea edx, [esp + 0x30]
push str.StencilBuffer_
push edx
call ebp
lea eax, [esp + 0x534]
lea ecx, [esp + 0x30]
push eax
push ecx
call ebp
lea edx, [esp + 0x30]
push 0x4ee96c
push edx
call ebp
lea eax, [esp + 0x30]
push ebx
push eax
call ebp
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41691a
or ecx, eax
lea edi, [esp + 0x430]
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x4ee970
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call ebp
lea edx, [esp + 0x30]
push ebx
push edx
call ebp
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41691a
or ecx, eax
lea edi, [esp + 0x430]
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.MSVCRT.DLL__mbsrchr]
add esp, 8
test eax, eax
je 0x41687f
mov byte [eax], 0
lea edx, [esp + 0x30]
push 0x4ee974
push edx
call ebp
lea eax, [esp + 0x30]
push ebx
push eax
call ebp
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41691a
or ecx, eax
lea edi, [esp + 0x430]
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.DLL__mbsrchr]
lea ecx, [esp + 0x34]
push ecx
call esi
add esp, 8
test eax, eax
je 0x4168e3
mov byte [eax], 0
lea edx, [esp + 0x30]
push 0x5c
push edx
call esi
add esp, 8
test eax, eax
je 0x4168f6
mov byte [eax], 0
lea eax, [esp + 0x30]
push 0x4ee978
push eax
call ebp
lea ecx, [esp + 0x30]
push ebx
push ecx
call ebp
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x41696b
push 0x4ee97c
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x41696b
push str.ShellExecuteA
push esi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
je 0x41695c
mov edx, dword [esp + 0x740]
push 5
push 0
lea ecx, [esp + 0x38]
push 0
push ecx
push str.open
push edx
call eax
cmp eax, 0x20
mov bl, 1
ja 0x416960
mov bl, byte [esp + 0x13]
push esi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
test bl, bl
jne 0x4169a2
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
inc eax
add edx, 4
cmp eax, 2
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edx
jl 0x4163f0
mov eax, dword [esp + 0x740]
push 0x30
push str.DirectX_SDK_Sample
push str.Could_not_find_readme
push eax
call dword [sym.imp.USER32.DLL_MessageBoxA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x72c
ret