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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
cmp byte [eax + 0x42], 4
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x3c], ebx
jne 0x61e40c08
mov ebx, dword [eax + 0x3c]
jmp 0x61e41145
mov dword [ebp - 0x4c], eax
mov eax, dword [eax]
mov esi, edx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x54], eax
mov edi, dword [eax + 4]
mov eax, dword [ebp - 0x4c]
test byte [eax + 0x40], 0x20
jne 0x61e40c31
mov eax, dword [ebp - 0x4c]
mov edx, dword [eax + 0x48]
test edx, edx
jne 0x61e40cf3
jmp 0x61e40c50
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x4c]
mov edx, dword [eax + 0x34]
mov eax, dword [edi + 8]
call sym._saveAllCursors.isra.465
test eax, eax
mov ebx, eax
mov dword [ebp - 0x40], eax
je 0x61e40c21
jmp 0x61e41145
mov dword [esp], 0
mov eax, dword [ebp - 0x54]
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
call sym._invalidateIncrblobCursors
mov eax, dword [ebp - 0x4c]
test byte [eax + 0x40], 2
je 0x61e40cba
mov ecx, dword [ebp - 0x4c]
mov edx, dword [esi + 0xc]
mov ebx, dword [ebp - 0x4c]
mov eax, dword [esi + 8]
mov ecx, dword [ecx + 0x14]
mov ebx, dword [ebx + 0x10]
cmp edx, ecx
jne 0x61e40c94
cmp eax, ebx
jne 0x61e40c94
mov dword [ebp - 0x3c], 0
jmp 0x61e40d83
cmp edx, 0
jl 0x61e40cba
jg 0x61e40ca0
cmp eax, 0
jbe 0x61e40cba
add eax, 0xffffffff
adc edx, 0xffffffff
cmp ecx, edx
jne 0x61e40cba
cmp ebx, eax
jne 0x61e40cba
mov dword [ebp - 0x3c], 0xffffffff
jmp 0x61e40d83
cmp dword [ebp - 0x3c], 0
jne 0x61e40d83
lea eax, [ebp - 0x3c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 8], eax
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], edx
xor edx, edx
call sym._sqlite3BtreeMovetoUnpacked
mov ebx, eax
mov dword [ebp - 0x40], eax
jmp 0x61e40d7b
cmp dword [ebp - 0x3c], 0
jne 0x61e40d83
mov eax, dword [esi + 0x18]
test ax, ax
je 0x61e40d50
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x30], edx
mov edx, dword [esi + 0x14]
mov dword [esp], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], 0
mov byte [ebp - 0x26], 0
mov dword [ebp - 0x2c], edx
lea edx, [ebp - 0x30]
mov byte [ebp - 0x25], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov byte [ebp - 0x24], 0
mov byte [ebp - 0x23], 0
mov byte [ebp - 0x22], 0
call sym._sqlite3BtreeMovetoUnpacked
jmp 0x61e40d75
lea eax, [ebp - 0x3c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 8], eax
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], edx
mov edx, dword [esi]
call sym._btreeMoveto
mov dword [ebp - 0x40], eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
jne 0x61e41145
mov eax, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x34], 0
movsx eax, byte [eax + 0x44]
mov eax, dword [ebx + eax*4 + 0x78]
mov dword [ebp - 0x50], eax
mov eax, dword [edi + 0x50]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x50]
cmp byte [eax + 2], 0
movzx edi, byte [eax + 0xa]
je 0x61e40e10
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x64], eax
add eax, dword [esi + 0x20]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0x7f
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x74], eax
ja 0x61e40de3
mov al, byte [ebp - 0x54]
mov ecx, dword [ebp - 0x58]
mov byte [ecx + edi], al
mov al, 1
jmp 0x61e40df5
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x58]
mov ecx, edx
add eax, edi
sar ecx, 0x1f
call sym._sqlite3Fts5PutVarint
movzx ecx, al
mov eax, dword [ebp - 0x58]
mov edx, dword [esi + 8]
lea ebx, [ecx + edi]
mov ecx, dword [esi + 0xc]
add eax, ebx
call sym._sqlite3Fts5PutVarint
lea ecx, [ebx + eax]
jmp 0x61e40e4c
mov eax, dword [esi + 8]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0x7f
mov eax, dword [esi]
mov dword [ebp - 0x74], eax
ja 0x61e40e2e
mov al, byte [ebp - 0x54]
mov esi, dword [ebp - 0x58]
mov byte [esi + edi], al
mov al, 1
jmp 0x61e40e40
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x58]
mov ecx, edx
add eax, edi
sar ecx, 0x1f
call sym._sqlite3Fts5PutVarint
movzx eax, al
lea ecx, [eax + edi]
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x50]
movzx esi, word [eax + 0xe]
cmp esi, dword [ebp - 0x54]
jl 0x61e40e77
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x54]
add eax, ecx
mov dword [ebp - 0x5c], eax
cmp eax, 3
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x6c], eax
jg 0x61e40ea9
mov dword [ebp - 0x5c], 4
jmp 0x61e40ea9
mov edi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x50]
mov edx, dword [edi + 0x34]
movzx ebx, word [eax + 0x10]
mov eax, dword [ebp - 0x54]
mov edi, dword [edx + 0x24]
xor edx, edx
sub eax, ebx
sub edi, 4
div edi
add edx, ebx
cmp esi, edx
cmovl edx, ebx
lea eax, [ecx + edx]
lea edi, [eax + 4]
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x6c], eax
add ecx, dword [ebp - 0x58]
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x70], ecx
cmp dword [ebp - 0x54], 0
jle 0x61e40fee
test edx, edx
jne 0x61e40fb0
mov eax, dword [ebp - 0x60]
mov edi, dword [ebp - 0x30]
cmp byte [eax + 0x11], 0
jne 0x61e40f02
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x30]
lea edx, [ebp - 0x34]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x60]
call sym._allocateBtreePage
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x38], eax
cmp byte [esi + 0x11], 0
je 0x61e40f5e
test eax, eax
je 0x61e40f30
jmp 0x61e40f5e
mov esi, dword [0x61e8c324]
mov eax, dword [ebp - 0x30]
lea ebx, [eax + 1]
mov eax, dword [ebp - 0x60]
mov edx, ebx
mov dword [ebp - 0x30], ebx
call sym._ptrmapPageno
cmp ebx, eax
je 0x61e40f08
mov ecx, dword [ebp - 0x60]
xor edx, edx
mov eax, esi
div dword [ecx + 0x20]
inc eax
cmp ebx, eax
je 0x61e40f08
jmp 0x61e40ed4
lea eax, [ebp - 0x38]
cmp edi, 1
mov edx, dword [ebp - 0x30]
sbb ecx, ecx
mov dword [esp], edi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x60]
add ecx, 4
movzx ecx, cl
call sym._ptrmapPut
cmp dword [ebp - 0x38], 0
je 0x61e40f74
mov eax, dword [ebp - 0x34]
call sym._releasePage
cmp dword [ebp - 0x38], 0
je 0x61e40f74
mov eax, dword [ebp - 0x68]
call sym._releasePage
mov eax, dword [ebp - 0x38]
jmp 0x61e40ff8
mov eax, dword [ebp - 0x30]
mov edi, dword [ebp - 0x6c]
bswap eax
mov dword [edi], eax
mov eax, dword [ebp - 0x68]
call sym._releasePage
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x68], eax
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x6c], eax
mov dword [eax], 0
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x38]
add eax, 4
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 0x24]
lea edx, [eax - 4]
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x54], edx
mov ebx, dword [ebp - 0x54]
cmovg ebx, edx
cmp dword [ebp - 0x64], 0
jle 0x61e40fd2
cmp ebx, dword [ebp - 0x64]
mov edi, dword [ebp - 0x70]
cmovg ebx, dword [ebp - 0x64]
mov esi, dword [ebp - 0x74]
mov ecx, ebx
rep movsb byte es:[edi], byte [esi]
jmp 0x61e40fdb
mov edi, dword [ebp - 0x70]
xor eax, eax
mov ecx, ebx
rep stosb byte es:[edi], al
sub dword [ebp - 0x54], ebx
add dword [ebp - 0x70], ebx
sub edx, ebx
add dword [ebp - 0x74], ebx
sub dword [ebp - 0x64], ebx
jmp 0x61e40eb6
mov eax, dword [ebp - 0x68]
call sym._releasePage
xor eax, eax
test eax, eax
mov dword [ebp - 0x40], eax
jne 0x61e41142
mov eax, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x4c]
cmp dword [ebp - 0x3c], 0
movsx eax, byte [eax + 0x44]
lea edx, [edi + eax*2]
movzx esi, word [edx + 0x50]
jne 0x61e410cb
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 0x48]
call sym._sqlite3PagerWrite
test eax, eax
mov ebx, eax
mov dword [ebp - 0x40], eax
jne 0x61e41142
mov eax, dword [ebp - 0x50]
mov edi, dword [ebp - 0x50]
mov eax, dword [eax + 0x40]
movzx eax, word [eax + esi*2]
xchg al, ah
and eax, dword [edi + 0x18]
movzx eax, ax
add eax, dword [edi + 0x38]
cmp byte [edi + 8], 0
mov dword [ebp - 0x54], eax
jne 0x61e41061
mov eax, dword [ebp - 0x54]
mov edi, dword [ebp - 0x58]
mov eax, dword [eax]
mov dword [edi], eax
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
lea ecx, [ebp - 0x30]
call sym._clearCell
movzx ecx, word [ebp - 0x1e]
mov dword [ebp - 0x40], eax
cmp ecx, dword [ebp - 0x5c]
jne 0x61e410b3
movzx eax, word [ebp - 0x20]
cmp eax, dword [ebp - 0x24]
jne 0x61e410b3
mov esi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
add eax, dword [ebp - 0x5c]
cmp dword [esi + 0x3c], eax
jae 0x61e410a3
mov eax, 0x104f6
call sym._sqlite3CorruptError
mov ebx, eax
jmp 0x61e41145
mov edi, dword [ebp - 0x54]
mov esi, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
rep movsb byte es:[edi], byte [esi]
jmp 0x61e41145
lea eax, [ebp - 0x40]
mov edx, esi
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call sym._dropCell
cmp dword [ebp - 0x40], 0
jne 0x61e41142
jmp 0x61e410e1
jns 0x61e410e1
mov edi, dword [ebp - 0x50]
cmp word [edi + 0x16], 0
je 0x61e410e1
lea esi, [esi + 1]
mov word [edx + 0x50], si
movzx esi, si
lea eax, [ebp - 0x40]
mov ecx, dword [ebp - 0x58]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov edx, esi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call sym._insertCell
mov eax, dword [ebp - 0x4c]
mov word [eax + 0x22], 0
mov eax, dword [ebp - 0x50]
cmp byte [eax + 0xc], 0
je 0x61e41142
mov eax, dword [ebp - 0x4c]
and byte [eax + 0x40], 0xfd
call sym._balance
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x4c]
movsx eax, byte [eax + 0x44]
mov eax, dword [esi + eax*4 + 0x78]
mov byte [eax + 0xc], 0
mov byte [esi + 0x42], 0
mov ebx, dword [ebp - 0x40]
add esp, 0x7c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret