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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005998d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x1008d040]
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 0x100173b1
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10017532
test al, 0x10
jne 0x10017532
cmp dword [esi + 0x14], 7
jbe 0x100173d1
mov esi, dword [esi]
push 0
push 0x80
push 3
push 0
push 1
push connect
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1001745c
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.10009150
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.1003ae50
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x10017455
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1001744b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10017594
push ecx
push edx
call fcn.100574cb
add esp, 8
mov al, 1
jmp 0x10017516
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 0x100174b0
cmp dword [ebp - 0x1c], 0x1e400
jne 0x100174b0
cmp dword [ebp - 0x18], 0
jne 0x100174b0
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.10009150
mov byte [ebp - 4], 3
jmp 0x10017419
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.10009150
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
call fcn.1003ae50
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x10017514
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1001750a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10017594
push ecx
push edx
call fcn.100574cb
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.100574bd
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.10009150
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.1003ae50
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x10017455
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1001744b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1001744b
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.10009150
push esi
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 7
call fcn.10018810
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.1003ae50
lea ecx, [ebp - 0x40]
call fcn.10006c50
lea ecx, [ebp - 0x58]
call fcn.10006c50
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, 0x10017514
ret