Function at 0x53ec30
Capabilities:
Check if file exists
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x5f3008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [0x616724]
push edi
mov edi, dword [0x616928]
push str.OYAZIVIEWER_SQL3_MUTEX
push 0
push 0x1f0001
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x44], edi
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [edi + 0x10], eax
test eax, eax
jne 0x53ecd6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x7d0
mov esi, eax
call fcn.00560858
add esp, 4
mov edi, eax
push esi
push 0x13fb
push 0x5ada04
push 0x5aa1dc
push 0x1f4
push edi
call fcn.00406c50
add esp, 0x18
push 0x30
push 0x591508
push edi
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
call fcn.00560853
add esp, 4
mov eax, 0x270f
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0xc
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esi + 0x1c00]
push edi
push eax
call dword [sym.imp.sqlite3.dll_sqlite3_open16]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x53ed13
push 0x3e8
call fcn.00560858
add esp, 4
push ebx
push 0x13c2
push str.SQLite3_open_error
jmp 0x53ef71
push 0
lea ebx, [edi + 4]
push ebx
push 0xffffffffffffffff
push str.SELECT_title__openPath__path__charSelect__pageNumber__buffPosition_FROM_logTable_ORDER_BY_lastDate_DESC__lastTime_DESC
push dword [edi]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare16]
add esp, 0x14
test eax, eax
jne 0x53ef48
mov eax, dword [ebx]
test eax, eax
je 0x53ef48
push eax
call dword [sym.imp.sqlite3.dll_sqlite3_column_count]
add esp, 4
mov dword [ebp - 0x20], 0
push dword [ebx]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
cmp eax, 0x64
jne 0x53ef48
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_column_text16]
mov esi, 0x6167f0
mov dword [ebp - 0x2c], esi
push 0
push dword [ebx]
call edi
push 1
push dword [ebx]
mov dword [ebp - 0x28], eax
call edi
push 2
push dword [ebx]
mov dword [ebp - 0x24], eax
call edi
push 3
push dword [ebx]
mov edi, eax
mov dword [ebp - 0x34], edi
call dword [sym.imp.sqlite3.dll_sqlite3_column_int]
push 4
push dword [ebx]
mov dword [ebp - 0x38], eax
call dword [sym.imp.sqlite3.dll_sqlite3_column_int]
push 5
push dword [ebx]
mov dword [ebp - 0x3c], eax
call dword [sym.imp.sqlite3.dll_sqlite3_column_int]
add esp, 0x30
mov dword [ebp - 0x40], eax
push dword [ebp - 0x24]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x53edd4
mov ecx, edi
call fcn.0040d890
cmp eax, 1
jne 0x53ef2b
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
add eax, 4
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
add esp, 4
mov dword [esi], eax
lea eax, [ebp - 0x18]
push dword [ebp - 0x20]
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
mov ecx, dword [ebp - 0x20]
mov edx, eax
sar ecx, 0x1f
add esp, 0x10
and ecx, 1
add ecx, 2
sub edx, ecx
cmp eax, ecx
mov ecx, 0
cmovl edx, ecx
cmp edx, eax
jge 0x53ee4d
sub eax, edx
lea esi, [ebp - 0x18]
lea esi, [esi + edx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x1c]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x34]
jmp 0x53ee4f
xor eax, eax
xor ecx, ecx
mov word [ebp + eax*2 - 0x1c], cx
mov ecx, 0x26
mov eax, dword [esi]
mov word [eax], cx
mov ecx, dword [esi]
mov ax, word [ebp - 0x1c]
mov word [ecx + 2], ax
mov ecx, 0x20
mov eax, dword [esi]
mov word [eax + 4], cx
mov eax, dword [ebp - 0x28]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
push eax
mov eax, dword [esi]
add eax, 6
push eax
call fcn.00565fee
add esp, 0xc
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
add esp, 4
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x24]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
push eax
push dword [esi + 8]
call fcn.00565fee
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
add esp, 4
mov dword [esi + 4], eax
push edi
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
push eax
push dword [esi + 4]
call fcn.00565fee
mov eax, dword [ebp - 0x38]
add esp, 0xc
inc dword [ebp - 0x20]
mov word [esi + 0xc], ax
mov eax, dword [ebp - 0x3c]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x40]
mov dword [esi + 0x14], eax
add esi, 0x18
mov dword [ebp - 0x2c], esi
cmp esi, 0x6168e0
jge 0x53ef45
push dword [ebx]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_column_text16]
add esp, 4
cmp eax, 0x64
je 0x53ed70
mov edi, dword [ebp - 0x44]
push dword [ebx]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x53efa0
push 0x3e8
call fcn.00560858
add esp, 4
push ebx
push 0x13c3
push str.SQLite3_finalize_error
push str._s_Place_d_LastCode_d
mov esi, eax
push 0x3e8
push esi
call fcn.00407340
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push dword [ebp - 0x30]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00560853
add esp, 4
push dword [edi]
call dword [sym.imp.sqlite3.dll_sqlite3_close]
mov eax, dword [edi + 0x10]
add esp, 4
test eax, eax
je 0x53efb9
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0xc