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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10054b4d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x10087040]
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 0x10016b21
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10016ca2
test al, 0x10
jne 0x10016ca2
cmp dword [esi + 0x14], 7
jbe 0x10016b41
mov esi, dword [esi]
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10016bcc
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.10008fe0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.1003a470
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x10016bc5
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10016bbb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016d04
push ecx
push edx
call fcn.10052765
add esp, 8
mov al, 1
jmp 0x10016c86
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 0x10016c20
cmp dword [ebp - 0x1c], 0x1e400
jne 0x10016c20
cmp dword [ebp - 0x18], 0
jne 0x10016c20
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.10008fe0
mov byte [ebp - 4], 3
jmp 0x10016b89
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.10008fe0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
call fcn.1003a470
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x10016c84
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10016c7a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016d04
push ecx
push edx
call fcn.10052765
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.10052757
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.10008fe0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.1003a470
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x10016bc5
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10016bbb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10016bbb
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.10008fe0
push esi
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 7
call fcn.10017f40
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.1003a470
lea ecx, [ebp - 0x40]
call fcn.10006b70
lea ecx, [ebp - 0x58]
call fcn.10006b70
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, 0x10016c84
ret