Function at 0x100172a0
Capabilities:
Check if file exists
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10047cdd
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x1007c040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 4], 0
mov eax, esi
cmp dword [esi + 0x14], 7
jbe 0x100172e1
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10017462
test al, 0x10
jne 0x10017462
cmp dword [esi + 0x14], 7
jbe 0x10017301
mov esi, dword [esi]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1001738c
push 0x1f
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
push str.D3D8_override:_Unable_to_check.
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x40], xmm0
call fcn.10009090
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.1003ad80
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x10017385
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1001737b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100174c4
push ecx
push edx
call fcn.10045a15
add esp, 8
mov al, 1
jmp 0x10017446
lea eax, [ebp - 0x1c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x100173e0
cmp dword [ebp - 0x1c], 0x1e400
jne 0x100173e0
cmp dword [ebp - 0x18], 0
jne 0x100173e0
push 0x17
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
push str.D3D8_override:_d3d8to9.
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x40], xmm0
call fcn.10009090
mov byte [ebp - 4], 3
jmp 0x10017349
push 0x17
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
push str.D3D8_override:_Unknown.
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x40], xmm0
call fcn.10009090
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
call fcn.1003ad80
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x10017444
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1001743a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100174c4
push ecx
push edx
call fcn.10045a15
add esp, 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10045a07
mov esp, ebp
pop ebp
ret
push 0x14
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
push str.D3D8_override:_None.
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x40], xmm0
call fcn.10009090
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.1003ad80
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x10017385
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1001737b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1001737b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x58]
mov eax, dword [ebp - 0x24]
xorps xmm0, xmm0
test eax, eax
mov dword [ebp - 0x48], 0
push 0x29
mov esi, str.Unknown_exception
mov dword [ebp - 0x44], 0
push str.Error_checking_d3d8_override._Exception:
cmovne esi, eax
movups xmmword [ebp - 0x58], xmm0
call fcn.10009090
push esi
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 7
call fcn.10018740
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x40], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x30], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 8
call fcn.1003ad80
lea ecx, [ebp - 0x40]
call fcn.10006c20
lea ecx, [ebp - 0x58]
call fcn.10006c20
lea eax, [ebp - 0x24]
mov dword [ebp - 0x28], vtable.std::exception.0
push eax
call dword [sym.imp.VCRUNTIME140.dll___std_exception_destroy]
add esp, 4
mov eax, 0x10017444
ret