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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
mov ebp, dword [esp + 0xb0]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x6c], edx
mov dword [esp + 0x38], ecx
test ebp, ebp
jne 0x665bc750
mov ebx, edx
mov edx, 1
mov eax, dword [esp + 0x3c]
add dword [eax + 0xc0], edx
cmp dword [ebx + 0x14], 1
je 0x665bc79c
mov esi, dword [esp + 0x3c]
movzx eax, byte [esi + 0xa]
mov byte [esp + 0x40], al
mov eax, esi
mov esi, dword [esi + 0x98]
mov eax, dword [eax + 0xd0]
mov dword [esp + 0x58], esi
cmp word [eax + 0x28], 0
mov dword [esp + 0x24], eax
jne 0x665bc7b0
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
mov eax, dword [eax + 0x60]
test eax, eax
jne 0x665bcb71
movzx edx, byte [esi + 0x2b]
mov eax, dword [esi + 4]
lea ebp, [esp + 0x70]
test dl, dl
jne 0x665bc70a
mov edx, 3
call sym._walUnlockShared.isra.72.part.73
mov esi, dword [esp + 0x24]
mov edi, 0xffffffff
mov word [esi + 0x28], di
xor edi, edi
lea esi, [esi]
add edi, 1
mov ecx, 1
mov edx, ebp
mov dword [esp], edi
mov eax, esi
call sym._walTryBeginRead
cmp eax, 0xffffffff
je 0x665bc720
test eax, eax
mov esi, eax
je 0x665bc7b4
add esp, 0x9c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [esp + 0x6c]
test ebx, ebx
je 0x665bce3a
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x6c]
xor edx, edx
lea esi, [esi]
lea edi, [edi]
cmp dword [ebx + 0x14], ecx
ja 0x665bc77b
lea eax, [ebx + 0xc]
add edx, 1
mov ebx, dword [ebx + 0xc]
test ebx, ebx
mov dword [eax], ebx
jne 0x665bc770
mov ebx, dword [esp + 0x6c]
mov eax, dword [esp + 0x3c]
add dword [eax + 0xc0], edx
cmp dword [ebx + 0x14], 1
jne 0x665bc6b0
mov edx, dword [ebx + 0x10]
lea eax, [ebx + 4]
call sym._pager_write_changecounter.isra.40
jmp 0x665bc6b0
lea ebp, [esp + 0x70]
mov eax, dword [esp + 0x24]
movzx edi, byte [esp + 0x40]
mov eax, dword [eax + 0x44]
test eax, eax
mov dword [esp + 0x50], eax
jne 0x665bc960
mov esi, dword [esp + 0x58]
mov byte [esp + 0x70], 0x37
mov byte [esp + 0x71], 0x7f
mov byte [esp + 0x72], 6
mov byte [esp + 0x73], 0x82
mov byte [esp + 0x74], 0
mov eax, esi
mov byte [esp + 0x75], 0x2d
mov byte [esp + 0x76], 0xe2
shr eax, 0x18
mov byte [esp + 0x77], 0x18
mov byte [esp + 0x78], al
mov eax, esi
shr eax, 0x10
mov byte [esp + 0x79], al
mov eax, esi
shr eax, 8
mov byte [esp + 0x7a], al
mov eax, esi
mov byte [esp + 0x7b], al
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x68]
mov edx, eax
mov byte [esp + 0x7f], al
shr edx, 0x18
mov byte [esp + 0x7c], dl
mov edx, eax
shr edx, 0x10
mov byte [esp + 0x7d], dl
mov edx, eax
shr edx, 8
test eax, eax
mov byte [esp + 0x7e], dl
je 0x665bccf3
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x78]
mov edx, dword [eax + 0x58]
mov eax, dword [eax + 0x54]
mov dword [esp + 0x84], edx
mov dword [esp + 0x80], eax
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
add edx, eax
mov esi, dword [ecx]
add ecx, 8
add esi, edx
add eax, esi
mov esi, dword [ecx - 4]
add esi, eax
add edx, esi
lea esi, [esp + 0x88]
cmp ecx, esi
jb 0x665bc86d
mov ecx, eax
mov esi, dword [esp + 0x24]
mov byte [esp + 0x8b], al
shr ecx, 0x18
mov byte [esp + 0x8f], dl
mov byte [esp + 0x88], cl
mov ecx, eax
shr ecx, 0x10
mov byte [esp + 0x89], cl
mov ecx, eax
shr ecx, 8
mov byte [esp + 0x8a], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x8c], cl
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x8d], cl
mov ecx, edx
shr ecx, 8
mov byte [esp + 0x8e], cl
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 8]
mov byte [esi + 0x41], 0
mov dword [esi + 0x50], edx
mov byte [esi + 0x2f], 1
mov ecx, dword [esp + 0x58]
mov edx, dword [eax]
mov dword [esi + 0x24], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x20
mov dword [esp + 4], ebp
mov dword [esp], eax
call dword [edx + 0xc]
test eax, eax
mov esi, eax
jne 0x665bc73f
mov esi, dword [esp + 0x24]
cmp byte [esi + 0x30], 0
je 0x665bc960
test edi, edi
je 0x665bc960
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x40]
mov edx, dword [eax]
and ecx, 0x13
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x14]
test eax, eax
mov esi, eax
jne 0x665bc73f
lea esi, [esi]
lea edi, [edi]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x70], eax
mov eax, dword [eax + 8]
mov dword [esp + 0x80], edi
mov edi, dword [esp + 0x50]
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x84], eax
add eax, 0x18
cdq
mov esi, eax
mov dword [esp + 0x68], eax
mov ecx, edx
mov dword [esp + 0x28], eax
mov eax, edi
imul ecx, edi
mov dword [esp + 0x2c], edx
mov edi, ebx
mul esi
add edx, ecx
add eax, 0x20
adc edx, 0
mov ebx, eax
mov esi, edx
jmp 0x665bc9d2
mov edi, edx
mov ecx, dword [esp + 0xb0]
add ebp, 1
xor eax, eax
test ecx, ecx
je 0x665bc9ec
mov edx, dword [edi + 0xc]
test edx, edx
cmove eax, dword [esp + 0x38]
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 4]
mov dword [esp], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], ebx
mov dword [esp + 8], esi
call sym._walWriteOneFrame.isra.84
test eax, eax
jne 0x665bcb62
mov edx, dword [edi + 0xc]
add ebx, dword [esp + 0x28]
adc esi, dword [esp + 0x2c]
test edx, edx
jne 0x665bc9d0
mov ecx, dword [esp + 0xb0]
mov dword [esp + 0x50], ebp
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], esi
mov esi, eax
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x30]
test ecx, ecx
mov dword [esp + 0x5c], edi
jne 0x665bcbd0
mov eax, dword [esp + 0x24]
mov byte [esp + 0x40], 0
mov dword [esp + 0x30], 0
mov eax, dword [eax + 0x44]
mov dword [esp + 0x28], eax
mov ebp, ebx
mov dword [esp + 0x50], ebx
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x5c]
jmp 0x665bca76
test cl, cl
je 0x665bca91
mov ecx, dword [ebp + 0x14]
add ebx, 1
mov eax, esi
mov edx, ebx
call sym._walIndexAppend
mov ebp, dword [ebp + 0xc]
test eax, eax
sete cl
test ebp, ebp
jne 0x665bca72
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x50]
mov esi, eax
mov dword [esp + 0x5c], edi
cmp byte [esp + 0x40], 0
je 0x665bcae4
test cl, cl
je 0x665bcae4
mov dword [esp + 0x50], ebx
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x5c]
jmp 0x665bcac4
test ebp, ebp
jle 0x665bcada
mov ecx, dword [edi + 0x14]
add ebx, 1
mov eax, esi
mov edx, ebx
sub ebp, 1
call sym._walIndexAppend
test eax, eax
je 0x665bcac0
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x50]
mov esi, eax
test esi, esi
jne 0x665bc73f
mov eax, dword [esp + 0x58]
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
mov edx, eax
sar eax, 0x10
xor dl, dl
mov dword [edi + 0x44], ebp
or eax, edx
mov word [edi + 0x42], ax
mov eax, dword [esp + 0xb0]
test eax, eax
je 0x665bcb28
mov eax, dword [esp + 0x38]
add dword [edi + 0x3c], 1
mov dword [edi + 0x48], eax
mov eax, edi
call sym._walIndexWriteHdr
mov dword [edi + 0xc], ebp
mov edi, dword [esp + 0x3c]
mov eax, dword [edi + 0x58]
test eax, eax
jne 0x665bcb43
jmp 0x665bc73f
mov eax, dword [edi + 0x58]
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0x14]
call sym._sqlite3BackupUpdate
mov ebx, dword [ebx + 0xc]
test ebx, ebx
jne 0x665bcb40
add esp, 0x9c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
add esp, 0x9c
mov esi, eax
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
ret
lea ebp, [esp + 0x70]
mov dword [esp], 4
mov dword [esp + 4], ebp
call sym.libsqlite3_0.dll_sqlite3_randomness
mov eax, dword [esp + 0x24]
cmp byte [eax + 0x2b], 0
je 0x665bcdfa
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x70]
mov eax, esi
call sym._walRestartHdr
cmp byte [esi + 0x2b], 0
mov eax, dword [esi + 4]
jne 0x665bc70a
mov edx, 4
mov ecx, 4
call sym._walUnlockExclusive.isra.76.part.77
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 4]
movzx edx, byte [esi + 0x2b]
jmp 0x665bc6fc
test byte [esp + 0x40], 0x20
je 0x665bcd10
mov eax, dword [esp + 0x24]
cmp byte [eax + 0x31], 0
je 0x665bce41
mov edx, dword [eax + 8]
mov dword [esp + 0x30], 0x1000
mov dword [esp + 0x34], 0
mov eax, dword [edx]
mov eax, dword [eax + 0x2c]
test eax, eax
je 0x665bcc23
mov dword [esp], edx
call eax
cmp eax, 0x1f
mov dword [esp + 0x30], 0x200
mov dword [esp + 0x34], 0
jg 0x665bce80
mov eax, dword [esp + 0x60]
add eax, dword [esp + 0x30]
mov edx, dword [esp + 0x64]
adc edx, dword [esp + 0x34]
add eax, 0xffffffff
adc edx, 0xffffffff
mov dword [esp], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call sym.___divdi3
mov ecx, dword [esp + 0x34]
imul edx, dword [esp + 0x30]
imul ecx, eax
add ecx, edx
mul dword [esp + 0x30]
add edx, ecx
cmp dword [esp + 0x64], edx
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], edx
jg 0x665bcd10
jl 0x665bcc87
cmp dword [esp + 0x60], eax
jae 0x665bcd10
mov dword [esp + 0x40], ebx
mov esi, dword [esp + 0x64]
mov ebx, dword [esp + 0x60]
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x30], 0
nop
mov eax, dword [esp + 0x38]
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 4]
mov dword [esp + 4], ebx
mov dword [esp + 8], esi
mov dword [esp], eax
mov eax, ebp
call sym._walWriteOneFrame.isra.84
test eax, eax
jne 0x665bcb62
add ebx, dword [esp + 0x28]
adc esi, dword [esp + 0x2c]
add dword [esp + 0x30], 1
cmp esi, dword [esp + 0x7c]
jl 0x665bcca0
jle 0x665bce71
mov ebx, dword [esp + 0x40]
mov esi, eax
mov dword [esp + 0x5c], edi
mov byte [esp + 0x40], 1
mov ecx, 1
jmp 0x665bcd22
mov eax, dword [esp + 0x24]
mov dword [esp], 8
add eax, 0x54
mov dword [esp + 4], eax
call sym.libsqlite3_0.dll_sqlite3_randomness
jmp 0x665bc847
mov byte [esp + 0x40], 0
mov ecx, 1
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x24]
cmp byte [eax + 0x2f], 0
je 0x665bcde2
mov eax, dword [esp + 0x24]
mov edx, dword [eax + 0x14]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x64]
mov dword [esp + 0x60], eax
test edx, edx
js 0x665bcde2
mov edx, dword [esp + 0x50]
add edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
mov eax, edx
imul ebp, edx
mul dword [esp + 0x68]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
add dword [esp + 0x2c], ebp
mov edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
add edi, 0x1f
adc ebp, 0
mov dword [esp + 0x50], edi
mov edx, ebp
mov dword [esp + 0x54], ebp
mov ebp, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
cmp ebp, edx
jg 0x665bcdb3
jl 0x665bcd9d
mov eax, dword [esp + 0x50]
cmp edi, eax
ja 0x665bcdb3
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
add eax, 0x20
adc edx, 0
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], edx
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x60]
mov ebp, dword [esp + 0x64]
mov byte [esp + 0x28], cl
lea edx, [eax + 0x64]
mov dword [esp], edi
add eax, 8
mov dword [esp + 4], ebp
call sym._walLimitSize.isra.378
mov eax, dword [esp + 0x24]
movzx ecx, byte [esp + 0x28]
mov byte [eax + 0x2f], 0
mov eax, dword [esp + 0x24]
test cl, cl
mov eax, dword [eax + 0x44]
mov dword [esp + 0x28], eax
jne 0x665bca5e
jmp 0x665bca9f
mov eax, dword [esp + 0x24]
mov dword [esp], 0
mov ecx, 4
mov edx, 4
add eax, 4
call sym._walLockExclusive.isra.74.part.75
test eax, eax
mov esi, eax
je 0x665bcb93
cmp eax, 5
jne 0x665bc73f
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 4]
movzx edx, byte [esi + 0x2b]
jmp 0x665bc6fc
xor edx, edx
jmp 0x665bc69c
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x40]
mov edx, dword [eax]
and ecx, 0x13
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x14]
test eax, eax
mov esi, eax
mov byte [esp + 0x40], 0
sete cl
mov dword [esp + 0x30], 0
jmp 0x665bcd22
cmp ebx, dword [esp + 0x78]
jb 0x665bcca0
jmp 0x665bccdd
cmp eax, 0x10000
mov edx, 0x10000
cmovg eax, edx
mov dword [esp + 0x30], eax
sar eax, 0x1f
mov dword [esp + 0x34], eax
jmp 0x665bcc23