Function at 0x414010
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 0x458024
mov ebx, dword [ecx]
push edx
mov byte [esp + 0x1b], 0
mov byte [esp + 0x1a], 0
call esi
lea eax, [esp + 0x430]
push 0x458028
push eax
call esi
lea ecx, [esp + 0x534]
push 0x45802c
push ecx
call esi
lea edx, [esp + 0x638]
push 0x458030
push edx
call esi
mov esi, dword [esp + 0x744]
test esi, esi
je 0x414140
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 0x414135
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 0x414135
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 0x414135
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 0x4141b0
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 0x4141b0
mov byte [eax], 0
mov al, byte [esp + 0x12]
test al, al
jne 0x41456a
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 0x4141fb
mov byte [eax], 0
lea edx, [esp + 0x30]
push 0x454518
push edx
call ebp
lea eax, [esp + 0x534]
lea ecx, [esp + 0x30]
push eax
push ecx
call ebp
lea edx, [esp + 0x30]
push 0x45451c
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 0x41456a
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 0x41427c
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 0x454530
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 0x41456a
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 0x4142fd
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 0x454544
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 0x41456a
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 0x41437e
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 0x454554
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 0x41456a
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 0x4143ff
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 str._
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 0x41456a
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 0x45456c
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 0x41456a
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 0x4144cf
mov byte [eax], 0
lea edx, [esp + 0x30]
push 0x454570
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 0x41456a
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 0x414533
mov byte [eax], 0
lea edx, [esp + 0x30]
push 0x5c
push edx
call esi
add esp, 8
test eax, eax
je 0x414546
mov byte [eax], 0
lea eax, [esp + 0x30]
push 0x454574
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 0x4145bb
push 0x454578
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x4145bb
push str.ShellExecuteA
push esi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
je 0x4145ac
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 0x4145b0
mov bl, byte [esp + 0x13]
push esi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
test bl, bl
jne 0x4145f2
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 0x414040
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