Function at 0x46fbc0
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push edi
lea eax, [ebp - 0x60]
mov dword [ebp - 8], 0
push eax
mov edi, ecx
xor ebx, ebx
call fcn.0046f4f0
add esp, 4
mov ecx, eax
push 0xa
push str.dbicon.db
call fcn.00402350
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x48], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x38], xmm0
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], 7
mov word [eax], cx
mov edx, dword [ebp - 0x4c]
cmp edx, 8
jb 0x46fc47
mov ecx, dword [ebp - 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46fc3d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x47008e
push edx
push ecx
call fcn.0053140c
add esp, 8
cmp dword [ebp - 0x34], 8
lea eax, [ebp - 0xc]
push esi
lea esi, [ebp - 0x48]
mov dword [ebp - 0xc], ebx
cmovae esi, dword [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push dword [ebp - 0xc]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_Wow64RevertWow64FsRedirection]
cmp esi, 0xffffffff
je 0x46fd9b
test esi, 0x10
jne 0x46fd9b
cmp dword [ebp - 0x34], 8
lea eax, [ebp - 0x48]
push 0
cmovae eax, dword [ebp - 0x48]
push 0x80
push 3
push 0
push 0
push 0x80000000
push eax
mov byte [ebp - 1], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x46fd72
lea ecx, [ebp - 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x46fd6f
push 0
push 0
push 0
push 0x4000002
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x46fd6f
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, eax
test edx, edx
je 0x46fd66
xor ecx, ecx
test esi, esi
je 0x46fd4e
cmp esi, 8
jb 0x46fd4e
movaps xmm2, xmmword [0x579150]
mov eax, esi
and eax, 0xfffffff8
movaps xmm3, xmm2
movd xmm1, dword [edx + ecx]
xorps xmm0, xmm0
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
pand xmm2, xmm1
movd xmm1, dword [edx + ecx + 4]
punpcklbw xmm1, xmm0
add ecx, 8
punpcklwd xmm1, xmm0
pand xmm3, xmm1
cmp ecx, eax
jb 0x46fd21
xor ebx, ebx
cmp ecx, esi
jae 0x46fd5f
movzx eax, byte [ecx + edx]
inc ecx
and ebx, eax
cmp ecx, esi
jb 0x46fd54
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x46fd7d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x578b98
push 1
call fcn.0055d7f0
add esp, 4
push eax
call fcn.00471fe0
mov bl, byte [ebp - 1]
add esp, 0xc
jmp 0x46fd9d
xor bl, bl
push 0xfde9
lea eax, [ebp - 0x30]
mov dword [ebp - 0x20], 0
push eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x1c], 0xf
push eax
mov byte [ebp - 0x30], 0
call fcn.00401830
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
push edi
cmovae eax, dword [ebp - 0x30]
push eax
call fcn.004ae0d0
add esp, 0x14
pop esi
test eax, eax
je 0x46fe05
push dword [edi]
call fcn.004ae660
add esp, 4
push eax
push 0x578b9c
push 2
call fcn.0055d7f0
add esp, 4
push eax
call fcn.00471fe0
add esp, 0xc
xor bl, bl
jmp 0x47000e
test bl, bl
jne 0x46fed7
lea eax, [ebp - 8]
push eax
push 0
push 0x471f10
push str.CREATE_TABLE_IF_NOT_EXISTS_Version_ID_INTEGER_PRIMARY_KEY__Ver_INTEGER_
push dword [edi]
call fcn.004aca30
add esp, 0x14
test eax, eax
jne 0x46ff56
push dword [0x5b200c]
lea eax, [ebp - 0x60]
push str.REPLACE_INTO_Version_ID_Ver__VALUES__1__d__
push eax
call fcn.004014d0
push 0xfde9
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.00401830
cmp dword [ebp - 0x1c], 0x10
lea ecx, [ebp - 8]
push ecx
push 0
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push 0
push eax
push dword [edi]
call fcn.004aca30
add esp, 0x2c
test eax, eax
jne 0x46fe9d
mov eax, dword [0x5b200c]
mov dword [edi + 4], eax
lea eax, [ebp - 8]
push eax
push 0
push 0x471f10
push str.CREATE_TABLE_IF_NOT_EXISTS_Cache_ID_INTEGER_PRIMARY_KEY_Invalid_TINYINT_DEFAULT_0_Icon16_BLOB_Icon32_BLOB_Icon48_BLOB_
push dword [edi]
call fcn.004aca30
add esp, 0x14
test eax, eax
je 0x46fecf
push dword [ebp - 8]
push str.SQL_error:__s_n
push 2
call fcn.0055d7f0
add esp, 4
push eax
call fcn.00471fe0
push dword [ebp - 8]
call fcn.004adc10
add esp, 0x10
lea ecx, [ebp - 0x60]
call fcn.00403070
xor bl, bl
jmp 0x47000e
lea ecx, [ebp - 0x60]
call fcn.00403070
cmp dword [edi + 4], 0
jne 0x470005
push 0
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0xffffffffffffffff
push str.select_Ver_from_Version_where_id1
push dword [edi]
call fcn.004ae8b0
add esp, 0x14
test eax, eax
jne 0x46ff2e
push dword [ebp - 0xc]
call fcn.004af5b0
add esp, 4
cmp eax, 0x64
jne 0x46ff23
push 0
push dword [ebp - 0xc]
call fcn.004af960
add esp, 8
mov dword [edi + 4], eax
push dword [ebp - 0xc]
call fcn.004afe40
add esp, 4
cmp dword [edi + 4], 0
jne 0x470005
lea eax, [ebp - 8]
push eax
push 0
push 0x471f10
push str.CREATE_TABLE_IF_NOT_EXISTS_Version_ID_INTEGER_PRIMARY_KEY__Ver_INTEGER_
push dword [edi]
call fcn.004aca30
add esp, 0x14
test eax, eax
je 0x46ff80
push dword [ebp - 8]
push str.SQL_error:__s_n
push 2
call fcn.0055d7f0
add esp, 4
push eax
call fcn.00471fe0
push dword [ebp - 8]
call fcn.004adc10
add esp, 0x10
xor bl, bl
jmp 0x47000e
push 0x2968
lea eax, [ebp - 0x60]
push str.REPLACE_INTO_Version_ID_Ver__VALUES__1__d__
push eax
call fcn.004014d0
push 0xfde9
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.00401830
cmp dword [ebp - 0x1c], 0x10
lea ecx, [ebp - 8]
push ecx
push 0
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push 0
push eax
push dword [edi]
call fcn.004aca30
add esp, 0x2c
test eax, eax
je 0x46fff6
push dword [ebp - 8]
push str.SQL_error:__s_n
push 2
call fcn.0055d7f0
add esp, 4
push eax
call fcn.00471fe0
push dword [ebp - 8]
call fcn.004adc10
add esp, 0x10
lea ecx, [ebp - 0x60]
call fcn.00403070
xor bl, bl
jmp 0x47000e
lea ecx, [ebp - 0x60]
mov dword [edi + 4], 0x2968
call fcn.00403070
mov ecx, edi
call fcn.00470b20
mov bl, al
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x47003e
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x470034
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470093
push edx
push ecx
call fcn.0053140c
add esp, 8
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
cmp edx, 8
jb 0x470086
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x47007c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470093
push edx
push ecx
call fcn.0053140c
add esp, 8
pop edi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0055d660
call fcn.0055d660
int3