Function at 0x408bc0
Capabilities:
Check if file exists
Get file attributes
Reference sql statements

Disassembly:
sub esp, 0x444
lea eax, [esp + 0x30]
push ebx
push ebp
push esi
push edi
mov esi, ecx
push esi
push str._skey4.db
push 0x104
push eax
call fcn.00405dd0
push esi
push str._skey3.db
lea eax, [esp + 0x260]
push 0x104
push eax
call fcn.00405dd0
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [esp + 0x60]
add esp, 0x20
xor ebx, ebx
push eax
call esi
cmp eax, 0xffffffff
je 0x408ef4
test al, 0xa7
je 0x408ef4
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x44]
push eax
call fcn.0049d450
add esp, 8
test eax, eax
jne 0x408f58
mov ecx, dword [esp + 0x1c]
mov edx, str.SELECT_item1__item2_FROM_metadata_WHERE_id__password_
push eax
lea eax, [esp + 0x18]
push eax
push ebx
push 1
push 0xffffffffffffffff
call fcn.00477e90
add esp, 0x14
push dword [esp + 0x14]
call fcn.00442640
add esp, 4
cmp eax, 0x64
jne 0x408edc
mov esi, dword [esp + 0x14]
xor edx, edx
mov ecx, esi
call fcn.00442bd0
push eax
call fcn.00441a50
add esp, 4
mov edi, eax
test esi, esi
je 0x408cbb
mov eax, dword [esi]
cmp byte [eax + 0x41], bl
jne 0x408c9c
mov edx, dword [esi + 0x50]
cmp edx, 0xc0a
je 0x408c9c
mov ecx, dword [eax + 0x38]
and ecx, edx
jmp 0x408ca7
mov ecx, eax
call fcn.0041fa20
mov ecx, eax
mov eax, dword [esi]
mov dword [esi + 0x50], ecx
mov eax, dword [eax + 0xc]
test eax, eax
je 0x408cbb
push eax
call dword [0x4dab44]
add esp, 4
push 0
push dword [esp + 0x18]
call fcn.00442cd0
push 1
push dword [esp + 0x20]
mov esi, eax
call fcn.00443000
push 1
push dword [esp + 0x28]
mov ebp, eax
mov dword [esp + 0x38], ebp
call fcn.00442cd0
push esi
mov dword [esp + 0x34], eax
call fcn.004a9d98
mov ebx, eax
add esp, 0x1c
test ebx, ebx
je 0x408d02
push esi
push edi
push ebx
call fcn.004a5830
add esp, 0xc
mov edx, dword [esp + 0x18]
mov ecx, ebp
xor edi, edi
call fcn.0040c240
mov esi, eax
test esi, esi
js 0x408d6e
lea eax, [esi*8]
sub eax, esi
shl eax, 2
push eax
call fcn.004a9d98
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x408d6e
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x24]
mov ecx, dword [esp + 0x20]
push esi
push ebp
push eax
call fcn.0040c330
add esp, 0xc
test eax, eax
setns al
test al, al
je 0x408d6e
lea eax, [esp + 0x18]
mov edx, ebx
push eax
lea ecx, [esp + 0x28]
call fcn.00407d60
add esp, 4
mov edi, eax
push ebp
call fcn.004a9b70
add esp, 4
push dword [esp + 0x14]
call fcn.00441810
add esp, 4
test edi, edi
je 0x408eb7
mov ecx, edi
mov edx, str.password_check
mov esi, 0xc
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x408eb7
add ecx, 4
add edx, 4
sub esi, 4
jae 0x408d90
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push 0
push eax
push 0
push 1
push 0xffffffffffffffff
mov edx, str.SELECT_a11__a102_FROM_nssPrivate_
call fcn.00477e90
add esp, 0x14
push dword [esp + 0x14]
call fcn.00442640
add esp, 4
cmp eax, 0x64
jne 0x408eda
push 0
push dword [esp + 0x18]
call fcn.00443000
push 0
push dword [esp + 0x20]
mov edi, eax
call fcn.00442cd0
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
je 0x408e91
test edi, edi
je 0x408e91
mov edx, eax
mov ecx, edi
call fcn.0040c240
mov esi, eax
test esi, esi
js 0x408e91
lea eax, [esi*8]
sub eax, esi
shl eax, 2
push eax
call fcn.004a9d98
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x408e91
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x24]
push esi
push ebp
push eax
mov ecx, edi
call fcn.0040c330
add esp, 0xc
test eax, eax
setns al
test al, al
je 0x408e91
lea eax, [esp + 0x18]
mov edx, ebx
push eax
lea ecx, [esp + 0x28]
call fcn.00407d60
add esp, 4
mov ebx, eax
push ebp
call fcn.004a9b70
add esp, 4
push dword [esp + 0x14]
call fcn.00441810
mov ecx, dword [esp + 0x20]
add esp, 4
xor edx, edx
call fcn.0049acf0
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x444
ret
push dword [esp + 0x14]
xor ebx, ebx
call fcn.00441810
mov ecx, dword [esp + 0x20]
add esp, 4
xor edx, edx
call fcn.0049acf0
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x444
ret
push ebx
call fcn.004a9b70
add esp, 4
test edi, edi
je 0x408ecd
push edi
call fcn.004a9b70
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x444
ret
xor ebx, ebx
mov ecx, dword [esp + 0x1c]
xor edx, edx
call fcn.0049acf0
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x444
ret
lea eax, [esp + 0x248]
push eax
call esi
cmp eax, 0xffffffff
je 0x408f58
test al, 0xa7
je 0x408f58
xorps xmm0, xmm0
lea edx, [esp + 0x248]
lea ecx, [esp + 0x24]
movq qword [esp + 0x34], xmm0
movups xmmword [esp + 0x24], xmm0
call fcn.00408160
test al, al
je 0x408f34
lea ecx, [esp + 0x24]
call fcn.00408610
mov ebx, eax
push dword [esp + 0x24]
call fcn.004a9b70
add esp, 4
push dword [esp + 0x34]
call fcn.004a9b70
add esp, 4
push dword [esp + 0x2c]
call fcn.004a9b70
add esp, 4
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x444
ret