Function at 0x46db30
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.0046d460
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 0x46dbb7
mov ecx, dword [ebp - 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46dbad
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46dffe
push edx
push ecx
call fcn.00531d2c
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 0x46dd0b
test esi, 0x10
jne 0x46dd0b
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 0x46dce2
lea ecx, [ebp - 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x46dcdf
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 0x46dcdf
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, eax
test edx, edx
je 0x46dcd6
xor ecx, ecx
test esi, esi
je 0x46dcbe
cmp esi, 8
jb 0x46dcbe
movaps xmm2, xmmword [0x57a150]
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 0x46dc91
xor ebx, ebx
cmp ecx, esi
jae 0x46dccf
movzx eax, byte [ecx + edx]
inc ecx
and ebx, eax
cmp ecx, esi
jb 0x46dcc4
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 0x46dced
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x579b98
push 1
call fcn.0055e200
add esp, 4
push eax
call fcn.0046ff50
mov bl, byte [ebp - 1]
add esp, 0xc
jmp 0x46dd0d
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.004ae930
add esp, 0x14
pop esi
test eax, eax
je 0x46dd75
push dword [edi]
call fcn.004aeec0
add esp, 4
push eax
push 0x579b9c
push 2
call fcn.0055e200
add esp, 4
push eax
call fcn.0046ff50
add esp, 0xc
xor bl, bl
jmp 0x46df7e
test bl, bl
jne 0x46de47
lea eax, [ebp - 8]
push eax
push 0
push 0x46fe80
push str.CREATE_TABLE_IF_NOT_EXISTS_Version_ID_INTEGER_PRIMARY_KEY__Ver_INTEGER_
push dword [edi]
call fcn.004ad290
add esp, 0x14
test eax, eax
jne 0x46dec6
push dword [0x5b300c]
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.004ad290
add esp, 0x2c
test eax, eax
jne 0x46de0d
mov eax, dword [0x5b300c]
mov dword [edi + 4], eax
lea eax, [ebp - 8]
push eax
push 0
push 0x46fe80
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.004ad290
add esp, 0x14
test eax, eax
je 0x46de3f
push dword [ebp - 8]
push str.SQL_error:__s_n
push 2
call fcn.0055e200
add esp, 4
push eax
call fcn.0046ff50
push dword [ebp - 8]
call fcn.004ae470
add esp, 0x10
lea ecx, [ebp - 0x60]
call fcn.00403070
xor bl, bl
jmp 0x46df7e
lea ecx, [ebp - 0x60]
call fcn.00403070
cmp dword [edi + 4], 0
jne 0x46df75
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.004af110
add esp, 0x14
test eax, eax
jne 0x46de9e
push dword [ebp - 0xc]
call fcn.004afe10
add esp, 4
cmp eax, 0x64
jne 0x46de93
push 0
push dword [ebp - 0xc]
call fcn.004b01c0
add esp, 8
mov dword [edi + 4], eax
push dword [ebp - 0xc]
call fcn.004b06a0
add esp, 4
cmp dword [edi + 4], 0
jne 0x46df75
lea eax, [ebp - 8]
push eax
push 0
push 0x46fe80
push str.CREATE_TABLE_IF_NOT_EXISTS_Version_ID_INTEGER_PRIMARY_KEY__Ver_INTEGER_
push dword [edi]
call fcn.004ad290
add esp, 0x14
test eax, eax
je 0x46def0
push dword [ebp - 8]
push str.SQL_error:__s_n
push 2
call fcn.0055e200
add esp, 4
push eax
call fcn.0046ff50
push dword [ebp - 8]
call fcn.004ae470
add esp, 0x10
xor bl, bl
jmp 0x46df7e
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.004ad290
add esp, 0x2c
test eax, eax
je 0x46df66
push dword [ebp - 8]
push str.SQL_error:__s_n
push 2
call fcn.0055e200
add esp, 4
push eax
call fcn.0046ff50
push dword [ebp - 8]
call fcn.004ae470
add esp, 0x10
lea ecx, [ebp - 0x60]
call fcn.00403070
xor bl, bl
jmp 0x46df7e
lea ecx, [ebp - 0x60]
mov dword [edi + 4], 0x2968
call fcn.00403070
mov ecx, edi
call fcn.0046ea90
mov bl, al
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x46dfae
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x46dfa4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46e003
push edx
push ecx
call fcn.00531d2c
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 0x46dff6
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46dfec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46e003
push edx
push ecx
call fcn.00531d2c
add esp, 8
pop edi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0055e070
call fcn.0055e070
int3