Function at 0x665b7ea0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
mov esi, edx
xor edx, edx
mov ebx, eax
sub esp, 0xac
lea ecx, [esp + 0x74]
call sym._walIndexPage
test eax, eax
mov edi, eax
jne 0x665b7f06
mov eax, dword [esp + 0x74]
test eax, eax
je 0x665b7f13
mov edx, esi
mov eax, ebx
call sym._walIndexTryHdr
test eax, eax
jne 0x665b7f13
cmp dword [ebx + 0x34], 0x2de218
je 0x665b7f06
mov dword [esp + 0xc], 0x6661a358
mov dword [esp + 8], 0xc724
mov edi, 0xe
mov dword [esp + 4], str.cannot_open_file_at_line__d_of___.10s_
mov dword [esp], 0xe
call sym.libsqlite3_0.dll_sqlite3_log
add esp, 0xac
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [ebx + 0x2e], 2
jne 0x665b7f60
cmp byte [ebx + 0x2b], 0
lea eax, [ebx + 4]
mov dword [esp + 0x2c], eax
je 0x665b7f80
lea ecx, [esp + 0x74]
xor edx, edx
mov byte [ebx + 0x2c], 1
mov eax, ebx
call sym._walIndexPage
test eax, eax
mov ebp, eax
je 0x665b7fd0
cmp byte [ebx + 0x2b], 0
mov byte [ebx + 0x2c], 0
mov edi, ebp
jne 0x665b7f06
mov eax, dword [ebx + 4]
mov ecx, 1
xor edx, edx
call sym._walUnlockExclusive.isra.76.part.77
jmp 0x665b7f06
cmp byte [ebx + 0x2b], 0
je 0x665b7fa1
add esp, 0xac
mov edi, 0x108
pop ebx
mov eax, edi
pop esi
pop edi
pop ebp
ret
lea eax, [ebx + 4]
xor edx, edx
mov dword [esp], 1
mov ecx, 1
call sym._walLockExclusive.isra.74.part.75
test eax, eax
je 0x665b7f26
mov edi, eax
jmp 0x665b7f06
mov eax, dword [ebx + 4]
xor edx, edx
call sym._walLockShared.isra.70.part.71
test eax, eax
mov edi, eax
jne 0x665b7f06
cmp byte [ebx + 0x2b], 0
mov eax, dword [ebx + 4]
jne 0x665b7f66
xor edx, edx
mov edi, 0x108
call sym._walUnlockShared.isra.72.part.73
jmp 0x665b7f06
mov edx, esi
mov eax, ebx
call sym._walIndexTryHdr
test eax, eax
jne 0x665b7fff
cmp byte [ebx + 0x2b], 0
mov byte [ebx + 0x2c], 0
mov eax, dword [ebx + 4]
jne 0x665b7ed4
mov ecx, 1
xor edx, edx
call sym._walUnlockExclusive.isra.76.part.77
jmp 0x665b7ed4
movzx eax, byte [ebx + 0x2d]
add eax, 1
mov edx, eax
mov dword [esp + 0x34], eax
mov eax, 8
sub eax, edx
cmp byte [ebx + 0x2b], 0
mov dword [esp + 0x38], eax
je 0x665b810e
lea edi, [ebx + 0x38]
lea eax, [ebx + 0x34]
mov dword [ebx + 0x34], 0
mov dword [ebx + 0x60], 0
and edi, 0xfffffffc
sub eax, edi
lea ecx, [eax + 0x30]
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x78]
mov eax, dword [ebx + 8]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x18]
test eax, eax
mov ebp, eax
jne 0x665b80ed
cmp dword [esp + 0x7c], 0
jl 0x665b813b
jle 0x665b8130
mov eax, dword [ebx + 8]
lea edx, [esp + 0x80]
mov dword [esp + 0x30], edx
mov ecx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x20
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [ecx + 8]
test eax, eax
mov edi, eax
jne 0x665b81cc
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x88]
bswap eax
bswap ecx
mov dword [esp + 0x2c], ecx
mov ecx, eax
and ecx, 0xfffffffe
cmp ecx, 0x377f0682
je 0x665b81d3
mov eax, edi
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0
test eax, eax
je 0x665b814b
mov ebp, eax
cmp byte [ebx + 0x2b], 0
jne 0x665b8103
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
call sym._walUnlockExclusive.isra.76.part.77
mov dword [esi], 1
jmp 0x665b7f41
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
lea eax, [ebx + 4]
mov dword [esp], 0
call sym._walLockExclusive.isra.74.part.75
test eax, eax
mov ebp, eax
jne 0x665b8103
jmp 0x665b8021
cmp dword [esp + 0x78], 0x20
ja 0x665b8072
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0
mov eax, dword [esp + 0x3c]
mov dword [ebx + 0x4c], eax
mov eax, dword [esp + 0x40]
mov dword [ebx + 0x50], eax
mov eax, ebx
call sym._walIndexWriteHdr
mov eax, dword [ebx + 0x20]
mov edx, dword [ebx + 0x44]
mov eax, dword [eax]
test edx, edx
mov dword [eax + 0x60], 0
mov dword [eax + 0x64], 0
mov dword [eax + 0x68], 0xffffffff
mov dword [eax + 0x6c], 0xffffffff
mov dword [eax + 0x70], 0xffffffff
mov dword [eax + 0x74], 0xffffffff
je 0x665b8199
mov dword [eax + 0x68], edx
cmp dword [ebx + 0x48], 0
je 0x665b80ed
mov eax, dword [ebx + 0x64]
mov dword [esp + 8], edx
mov dword [esp + 4], str.recovered__d_frames_from_WAL_file__s
mov dword [esp], 0x11b
mov dword [esp + 0xc], eax
call sym.libsqlite3_0.dll_sqlite3_log
jmp 0x665b80ed
mov edi, 7
mov ebp, edi
jmp 0x665b80ed
mov edx, dword [esp + 0x2c]
mov ecx, edx
sub ecx, 1
test edx, ecx
jne 0x665b80d5
mov ecx, edx
sub ecx, 0x200
cmp ecx, 0xfe00
ja 0x665b80d5
mov ecx, dword [esp + 0x8c]
mov dword [ebx + 0x24], edx
and eax, 1
mov edx, dword [esp + 0x90]
mov byte [ebx + 0x41], al
xor eax, 1
movzx eax, al
mov dword [esp], 0
bswap ecx
mov dword [ebx + 0x68], ecx
mov ecx, dword [esp + 0x94]
mov dword [ebx + 0x54], edx
mov edx, dword [esp + 0x30]
mov dword [ebx + 0x58], ecx
lea ecx, [ebx + 0x4c]
mov dword [esp + 0x44], ecx
mov dword [esp + 4], ecx
mov ecx, 0x18
call sym._walChecksumBytes
mov eax, dword [esp + 0x98]
bswap eax
cmp dword [ebx + 0x4c], eax
jne 0x665b80d5
mov eax, dword [esp + 0x9c]
bswap eax
cmp dword [ebx + 0x50], eax
jne 0x665b80d5
cmp dword [esp + 0x84], 0x18e22d00
je 0x665b82a6
mov dword [esp + 0xc], 0x6661a358
mov dword [esp + 8], 0xc37e
mov edi, 0xe
mov dword [esp + 4], str.cannot_open_file_at_line__d_of___.10s_
mov dword [esp], 0xe
call sym.libsqlite3_0.dll_sqlite3_log
jmp 0x665b80d5
mov eax, dword [esp + 0x2c]
lea ecx, [eax + 0x18]
mov eax, ecx
mov dword [esp], ecx
mov dword [esp + 0x4c], ecx
cdq
mov dword [esp + 0x50], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x54], edx
call sym.libsqlite3_0.dll_sqlite3_malloc64
test eax, eax
mov edi, eax
je 0x665b81c7
lea ecx, [eax + 0x18]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x40], 0
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x3c], 0
mov ebp, edi
mov dword [esp + 0x58], ecx
lea ecx, [edi + 8]
mov dword [esp + 0x48], 0
mov eax, edx
sar edx, 0x10
mov dword [esp + 0x30], esi
xor al, al
mov dword [esp + 0x68], ecx
lea ecx, [ebx + 0x54]
or eax, edx
xor edx, edx
mov word [esp + 0x5e], ax
mov dword [esp + 0x6c], ecx
mov eax, 0x20
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x54]
add esi, eax
adc edi, edx
cmp edi, dword [esp + 0x7c]
mov ecx, esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], edi
jl 0x665b8346
jg 0x665b839b
cmp ecx, dword [esp + 0x78]
ja 0x665b839b
mov ecx, dword [ebx + 8]
add dword [esp + 0x48], 1
mov esi, dword [ecx]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x10], edx
mov dword [esp + 4], ebp
mov dword [esp], ecx
mov dword [esp + 8], eax
call dword [esi + 8]
test eax, eax
jne 0x665b8453
mov eax, dword [esp + 0x68]
mov dword [esp + 8], 8
mov dword [esp + 4], eax
mov eax, dword [esp + 0x6c]
mov dword [esp], eax
call sym._memcmp
test eax, eax
jne 0x665b839b
mov edi, dword [ebp]
bswap edi
test edi, edi
jne 0x665b83bc
mov edi, ebp
mov esi, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
xor eax, eax
mov dword [esp], edi
mov dword [esp + 0x2c], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [esp + 0x2c]
jmp 0x665b80e7
xor eax, eax
cmp byte [ebx + 0x41], 0
mov ecx, 8
mov edx, ebp
sete al
mov esi, eax
mov eax, dword [esp + 0x44]
mov dword [esp + 4], eax
mov dword [esp], eax
mov eax, esi
call sym._walChecksumBytes
mov eax, dword [esp + 0x44]
mov ecx, dword [ebx + 0x24]
mov edx, dword [esp + 0x58]
mov dword [esp + 4], eax
mov dword [esp], eax
mov eax, esi
call sym._walChecksumBytes
mov eax, dword [ebp + 0x10]
bswap eax
cmp dword [ebx + 0x4c], eax
jne 0x665b839b
mov eax, dword [ebp + 0x14]
bswap eax
cmp dword [ebx + 0x50], eax
jne 0x665b839b
mov ecx, edi
mov edi, dword [esp + 0x48]
mov esi, dword [ebp + 4]
mov eax, ebx
mov edx, edi
bswap esi
call sym._walIndexAppend
test eax, eax
jne 0x665b8453
test esi, esi
je 0x665b8446
movzx eax, word [esp + 0x5e]
mov dword [ebx + 0x44], edi
mov dword [ebx + 0x48], esi
mov word [ebx + 0x42], ax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0x3c], eax
mov eax, dword [ebx + 0x50]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
jmp 0x665b8322
mov edi, ebp
mov esi, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
jmp 0x665b83a7