Function at 0x4700b0
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.0046f9e0
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 0x470137
mov ecx, dword [ebp - 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x47012d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x47057e
push edx
push ecx
call fcn.005342bc
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 0x47028b
test esi, 0x10
jne 0x47028b
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 0x470262
lea ecx, [ebp - 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x47025f
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 0x47025f
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, eax
test edx, edx
je 0x470256
xor ecx, ecx
test esi, esi
je 0x47023e
cmp esi, 8
jb 0x47023e
movaps xmm2, xmmword [0x57c150]
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 0x470211
xor ebx, ebx
cmp ecx, esi
jae 0x47024f
movzx eax, byte [ecx + edx]
inc ecx
and ebx, eax
cmp ecx, esi
jb 0x470244
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 0x47026d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x57bb98
push 1
call fcn.005607a0
add esp, 4
push eax
call fcn.004724d0
mov bl, byte [ebp - 1]
add esp, 0xc
jmp 0x47028d
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.004b0ea0
add esp, 0x14
pop esi
test eax, eax
je 0x4702f5
push dword [edi]
call fcn.004b1430
add esp, 4
push eax
push 0x57bb9c
push 2
call fcn.005607a0
add esp, 4
push eax
call fcn.004724d0
add esp, 0xc
xor bl, bl
jmp 0x4704fe
test bl, bl
jne 0x4703c7
lea eax, [ebp - 8]
push eax
push 0
push 0x472400
push str.CREATE_TABLE_IF_NOT_EXISTS_Version_ID_INTEGER_PRIMARY_KEY__Ver_INTEGER_
push dword [edi]
call fcn.004af800
add esp, 0x14
test eax, eax
jne 0x470446
push dword [0x5b500c]
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.004af800
add esp, 0x2c
test eax, eax
jne 0x47038d
mov eax, dword [0x5b500c]
mov dword [edi + 4], eax
lea eax, [ebp - 8]
push eax
push 0
push 0x472400
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.004af800
add esp, 0x14
test eax, eax
je 0x4703bf
push dword [ebp - 8]
push str.SQL_error:__s_n
push 2
call fcn.005607a0
add esp, 4
push eax
call fcn.004724d0
push dword [ebp - 8]
call fcn.004b09e0
add esp, 0x10
lea ecx, [ebp - 0x60]
call fcn.00403070
xor bl, bl
jmp 0x4704fe
lea ecx, [ebp - 0x60]
call fcn.00403070
cmp dword [edi + 4], 0
jne 0x4704f5
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.004b1680
add esp, 0x14
test eax, eax
jne 0x47041e
push dword [ebp - 0xc]
call fcn.004b2380
add esp, 4
cmp eax, 0x64
jne 0x470413
push 0
push dword [ebp - 0xc]
call fcn.004b2730
add esp, 8
mov dword [edi + 4], eax
push dword [ebp - 0xc]
call fcn.004b2c10
add esp, 4
cmp dword [edi + 4], 0
jne 0x4704f5
lea eax, [ebp - 8]
push eax
push 0
push 0x472400
push str.CREATE_TABLE_IF_NOT_EXISTS_Version_ID_INTEGER_PRIMARY_KEY__Ver_INTEGER_
push dword [edi]
call fcn.004af800
add esp, 0x14
test eax, eax
je 0x470470
push dword [ebp - 8]
push str.SQL_error:__s_n
push 2
call fcn.005607a0
add esp, 4
push eax
call fcn.004724d0
push dword [ebp - 8]
call fcn.004b09e0
add esp, 0x10
xor bl, bl
jmp 0x4704fe
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.004af800
add esp, 0x2c
test eax, eax
je 0x4704e6
push dword [ebp - 8]
push str.SQL_error:__s_n
push 2
call fcn.005607a0
add esp, 4
push eax
call fcn.004724d0
push dword [ebp - 8]
call fcn.004b09e0
add esp, 0x10
lea ecx, [ebp - 0x60]
call fcn.00403070
xor bl, bl
jmp 0x4704fe
lea ecx, [ebp - 0x60]
mov dword [edi + 4], 0x2968
call fcn.00403070
mov ecx, edi
call fcn.00471010
mov bl, al
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x47052e
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x470524
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470583
push edx
push ecx
call fcn.005342bc
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 0x470576
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x47056c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x470583
push edx
push ecx
call fcn.005342bc
add esp, 8
pop edi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00560610
call fcn.00560610
int3