Function at 0x53fe10
Capabilities:
Check mutex on windows
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x616704]
push ebx
mov ebx, dword [0x616928]
push esi
mov esi, dword [0x616724]
push edi
mov edi, dword [0x61672c]
push str.OYAZIVIEWER_SQL3_MUTEX
push 0
push 0x1f0001
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [ebx + 0x10], eax
test eax, eax
jne 0x53feaf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x7d0
mov esi, eax
call fcn.00560858
add esp, 4
mov edi, eax
push esi
push 0x1451
push 0x5ada04
push 0x5aa1dc
push 0x1f4
push edi
call fcn.00406c50
add esp, 0x18
push 0x30
push 0x591508
push edi
push dword [ebp + 8]
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 esp, ebp
pop ebp
ret 0x10
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esi + 0x1c00]
push ebx
push eax
call dword [sym.imp.sqlite3.dll_sqlite3_open16]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x53ff21
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x1452
push str.SQLite3_open_error
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00560853
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
add esp, 4
jmp 0x54072c
cmp byte [esi + 0x6c6b], 0
mov ebx, dword [ebp + 8]
mov esi, dword [sym.imp.sqlite3.dll_sqlite3_prepare16]
je 0x54006a
push dword [ebp - 8]
mov ecx, edi
push ebx
call fcn.00432900
test eax, eax
jne 0x540705
push dword [ebp - 8]
push ebx
mov ebx, dword [ebp - 0x14]
mov ecx, ebx
call fcn.004461d0
test eax, eax
jne 0x540700
push eax
lea eax, [ebx + 0x10]
push eax
push 0xffffffffffffffff
push str.SELECT_updateCount_FROM_folderSubTable_WHERE_rootPath____AND_path_____
push dword [ebx + 8]
call esi
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x53ffb8
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x3712
push str.SQLite3_prepare_error
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
mov eax, dword [ebp + 8]
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push eax
jmp 0x540654
push 0
lea eax, [edi + 0xc]
push eax
push 0xffffffffffffffff
push str.SELECT_updateCount_FROM_favoriteTable_WHERE_path___
push dword [edi + 8]
call esi
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x540011
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x2c4a
push str.SQLite3_prepare_error
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
mov eax, dword [ebp + 8]
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push eax
jmp 0x5405eb
push 0
lea eax, [edi + 0x10]
push eax
push 0xffffffffffffffff
push str.SELECT_updateCount_FROM_favoriteSubTable_WHERE_path___
push dword [edi + 8]
call esi
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x54006a
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x2c4e
push str.SQLite3_prepare_error
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
mov eax, dword [ebp + 8]
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push eax
jmp 0x540582
mov eax, dword [ebp - 0xc]
push 0
lea ecx, [eax + 4]
push ecx
push 0xffffffffffffffff
push str.SELECT_path_FROM_logTable_ORDER_BY_lastDate_DESC__lastTime_DESC
push dword [eax]
mov dword [ebp - 0x20], ecx
call esi
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x5400c8
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x1453
push str.SQLite3_prepare_error_1
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
mov eax, dword [ebp + 8]
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push eax
jmp 0x540527
mov eax, dword [ebp - 0xc]
push 0
lea ecx, [eax + 8]
push ecx
push 0xffffffffffffffff
push str.DELETE_FROM_logTable_WHERE_path_____
push dword [eax]
mov dword [ebp - 0x28], ecx
call esi
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x540126
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x1454
push str.SQLite3_prepare_error_2
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
mov eax, dword [ebp + 8]
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push eax
jmp 0x5404cc
mov eax, dword [ebp - 0xc]
push 0
lea ecx, [eax + 0xc]
push ecx
push 0xffffffffffffffff
push str.DELETE_FROM_bkDescTable_WHERE_path_____
push dword [eax]
mov dword [ebp - 0x24], ecx
call esi
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x540163
push 0x3e8
call fcn.00560858
add esp, 4
push ebx
push 0x1455
push str.SQLite3_prepare_error_3
jmp 0x540450
mov esi, dword [ebp - 0xc]
push 0
push 0
push 0
push str.BEGIN_
push dword [esi]
call dword [sym.imp.sqlite3.dll_sqlite3_exec]
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x54019f
push 0x3e8
call fcn.00560858
add esp, 4
push ebx
push 0x1456
push str.SQLite3_begin_error
jmp 0x540450
mov eax, dword [esi + 4]
lea ebx, [esi + 4]
test eax, eax
je 0x54041c
push eax
call dword [sym.imp.sqlite3.dll_sqlite3_column_count]
add esp, 4
mov dword [ebp - 0x1c], 0
push dword [ebx]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
cmp eax, 0x64
jne 0x54041c
push 0
push dword [ebx]
call dword [sym.imp.sqlite3.dll_sqlite3_column_text16]
mov ebx, dword [ebp - 8]
add esp, 8
mov dword [ebp - 0x10], eax
cmp byte [ebx + 0x6c6b], 0
je 0x540375
xor esi, esi
xor bl, bl
push esi
push eax
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push dword [ebp - 0x10]
push 1
push dword [edi + 0xc]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_text16]
add esp, 0x14
test eax, eax
jne 0x54025d
mov eax, dword [edi + 0xc]
test eax, eax
je 0x54025d
push eax
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
cmp eax, 0x64
jne 0x54025d
nop
push 0
push dword [edi + 0xc]
call dword [sym.imp.sqlite3.dll_sqlite3_column_int]
push dword [edi + 0xc]
inc esi
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 0xc
cmp eax, 0x64
je 0x540230
test esi, esi
movzx ebx, bl
mov eax, 1
cmovg ebx, eax
mov dword [ebp - 0x18], ebx
push dword [edi + 0xc]
call dword [sym.imp.sqlite3.dll_sqlite3_reset]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x540402
push dword [edi + 0xc]
call dword [sym.imp.sqlite3.dll_sqlite3_clear_bindings]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x5403e8
cmp byte [ebp - 0x18], al
jne 0x54039e
xor esi, esi
xor bl, bl
push esi
push dword [ebp - 0x10]
mov dword [ebp - 0x18], ebx
mov byte [ebp - 1], bl
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push dword [ebp - 0x10]
push 1
push dword [edi + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_text16]
add esp, 0x14
test eax, eax
jne 0x540304
mov eax, dword [edi + 0x10]
test eax, eax
je 0x540304
push eax
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
cmp eax, 0x64
jne 0x540304
push 0
push dword [edi + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_column_int]
push dword [edi + 0x10]
inc esi
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 0xc
cmp eax, 0x64
je 0x5402d4
test esi, esi
movzx ebx, bl
mov eax, 1
cmovg ebx, eax
mov dword [ebp - 0x18], ebx
mov byte [ebp - 1], bl
push dword [edi + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_reset]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x5403ce
push dword [edi + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_clear_bindings]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x5403b1
cmp byte [ebp - 0x18], al
jne 0x54039e
mov ebx, dword [ebp - 0x10]
mov ecx, ebx
call fcn.0040d890
cmp eax, 1
je 0x54037a
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 1]
push eax
push ebx
mov ebx, dword [ebp + 8]
push ebx
call fcn.00446980
test eax, eax
jne 0x540480
cmp byte [ebp - 1], al
je 0x54037d
mov ebx, dword [ebp - 0x20]
push dword [ebx]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
mov esi, dword [ebp - 0xc]
jmp 0x5401c6
mov ebx, dword [ebp + 8]
jmp 0x540383
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 8]
inc edx
mov dword [ebp - 0x1c], edx
cmp edx, dword [ecx + 0x6c6c]
jle 0x54039e
push eax
push ebx
mov ecx, esi
call fcn.00540750
mov ebx, dword [ebp - 0x20]
push dword [ebx]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
mov esi, dword [ebp - 0xc]
jmp 0x5401c6
push 0x3e8
call fcn.00560858
add esp, 4
push ebx
push 0x2c50
push str.SQLite3_clear_bindings_error
jmp 0x540450
push 0x3e8
call fcn.00560858
add esp, 4
push ebx
push 0x2c4f
push str.SQLite3_reset_error
jmp 0x540450
push 0x3e8
call fcn.00560858
add esp, 4
push ebx
push 0x2c4c
push str.SQLite3_clear_bindings_error
jmp 0x540450
push 0x3e8
call fcn.00560858
add esp, 4
push ebx
push 0x2c4b
push str.SQLite3_reset_error
jmp 0x540450
push 0
push 0
push 0
push str.COMMIT_
push dword [esi]
call dword [sym.imp.sqlite3.dll_sqlite3_exec]
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x540480
push 0x3e8
call fcn.00560858
add esp, 4
push ebx
push 0x1457
push str.SQLite3_commit_error
push str._s_Place_d_LastCode_d
mov esi, eax
push 0x3e8
push esi
call fcn.00407340
mov eax, dword [ebp + 8]
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00560853
add esp, 4
mov eax, dword [ebp - 0x24]
push dword [eax]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5404db
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x1458
push str.SQLite3_finalize_error_3
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00560853
add esp, 4
mov eax, dword [ebp - 0x28]
push dword [eax]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x540536
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x1459
push str.SQLite3_finalize_error_2
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00560853
add esp, 4
mov eax, dword [ebp - 0x20]
push dword [eax]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x540591
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x145a
push str.SQLite3_finalize_error_1
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00560853
add esp, 4
mov esi, dword [ebp - 8]
cmp byte [esi + 0x6c6b], 0
je 0x5406ce
push dword [edi + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5405fd
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x2c51
push str.SQLite3_finalize_error
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00560853
mov esi, dword [ebp - 8]
add esp, 4
cmp byte [esi + 0x6c6b], 0
je 0x5406ce
push dword [edi + 0xc]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x540666
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x2c4d
push str.SQLite3_finalize_error
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00560853
mov esi, dword [ebp - 8]
add esp, 4
cmp byte [esi + 0x6c6b], 0
je 0x5406ce
mov eax, dword [ebp - 0x14]
push dword [eax + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5406ce
push 0x3e8
call fcn.00560858
add esp, 4
mov esi, eax
push ebx
push 0x3717
push str.SQLite3_finalize_error
push str._s_Place_d_LastCode_d
push 0x3e8
push esi
call fcn.00407340
add esp, 0x18
push 0x30
push 0x5aa224
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00560853
mov esi, dword [ebp - 8]
add esp, 4
mov ebx, dword [ebp - 0x14]
cmp byte [esi + 0x6c6b], 0
je 0x540708
push dword [ebx + 8]
call dword [sym.imp.sqlite3.dll_sqlite3_close]
mov ecx, dword [ebx]
add esp, 4
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, eax
test ecx, ecx
je 0x5406f7
push ecx
call ebx
test esi, esi
jne 0x54072c
mov esi, dword [ebp - 8]
jmp 0x54070e
mov esi, dword [ebp - 8]
jmp 0x5406d1
mov esi, dword [ebp - 8]
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp byte [esi + 0x6c6b], 0
je 0x54072c
push dword [edi + 8]
call dword [sym.imp.sqlite3.dll_sqlite3_close]
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x54072c
push eax
call ebx
mov esi, dword [ebp - 0xc]
push dword [esi]
call dword [sym.imp.sqlite3.dll_sqlite3_close]
mov eax, dword [esi + 0x10]
add esp, 4
test eax, eax
je 0x540744
push eax
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10