Function at 0x4134f0
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 0x457fdc
mov ebx, dword [ecx]
push edx
mov byte [esp + 0x1b], 0
mov byte [esp + 0x1a], 0
call esi
lea eax, [esp + 0x430]
push 0x457fe0
push eax
call esi
lea ecx, [esp + 0x534]
push 0x457fe4
push ecx
call esi
lea edx, [esp + 0x638]
push 0x457fe8
push edx
call esi
mov esi, dword [esp + 0x744]
test esi, esi
je 0x413620
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 0x413615
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 0x413615
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 0x413615
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 0x413690
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 0x413690
mov byte [eax], 0
mov al, byte [esp + 0x12]
test al, al
jne 0x413a4a
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 0x4136db
mov byte [eax], 0
lea edx, [esp + 0x30]
push 0x4544f0
push edx
call ebp
lea eax, [esp + 0x534]
lea ecx, [esp + 0x30]
push eax
push ecx
call ebp
lea edx, [esp + 0x30]
push 0x4544f4
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 0x413a4a
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 0x41375c
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 0x454508
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 0x413a4a
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 0x4137dd
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 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 0x413a4a
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 0x41385e
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 0x45452c
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 0x413a4a
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 0x4138df
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 0x413a4a
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 0x454544
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 0x413a4a
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 0x4139af
mov byte [eax], 0
lea edx, [esp + 0x30]
push 0x454548
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 0x413a4a
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 0x413a13
mov byte [eax], 0
lea edx, [esp + 0x30]
push 0x5c
push edx
call esi
add esp, 8
test eax, eax
je 0x413a26
mov byte [eax], 0
lea eax, [esp + 0x30]
push 0x45454c
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 0x413a9b
push 0x454550
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x413a9b
push str.ShellExecuteA
push esi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
je 0x413a8c
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 0x413a90
mov bl, byte [esp + 0x13]
push esi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
test bl, bl
jne 0x413ad2
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 0x413520
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