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

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x18c
mov eax, dword [eax + 0x34]
mov dword [esp + 0x64], edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x80], 0
mov dword [esp + 0x8b], 0
mov byte [esp + 0x8f], 0
mov dword [esp + 0x140], 0
mov dword [esp + 0x148], 0
mov dword [esp + 0x44], eax
test ecx, ecx
je 0x665e2777
movzx eax, byte [edi + 0xc]
movzx ebx, word [edi + 0x18]
lea ecx, [eax + ebx]
cmp ecx, 1
jle 0x665e2250
mov esi, edx
mov edx, 2
sub edx, dword [esp + 0x1a4]
mov dword [esp + 0x34], edx
mov ebp, edx
test esi, esi
jne 0x665e1e27
mov dword [esp + 0x30], 0
mov edx, dword [esp + 0x34]
sub edx, eax
mov eax, dword [edi + 0x38]
cmp ebx, edx
je 0x665e2b8b
mov ecx, dword [edi + 0x40]
movzx edx, word [ecx + edx*2]
rol dx, 8
and dx, word [edi + 0x1a]
movzx edx, dx
add eax, edx
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x34]
mov ebp, dword [esp + 0x44]
mov edx, dword [eax]
bswap edx
mov dword [esp + 0x84], edx
mov dword [esp + 4], 0
lea eax, [esi*4]
lea ecx, [esp + 0xa4]
mov dword [esp], 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ecx
add ecx, eax
mov eax, ebp
call fcn.665b1060
mov dword [esp + 0x80], eax
mov ebx, eax
test eax, eax
jne 0x665e2b94
mov eax, dword [esp + esi*4 + 0xa4]
mov edx, dword [eax + 0x14]
test edx, edx
js 0x665e1e60
sub esi, 1
jb 0x665e1f30
mov edx, dword [esp + 0x30]
movzx eax, byte [edi + 0xc]
lea ecx, [edx + esi]
mov edx, dword [edi + 0x4c]
mov dword [esp + 0x20], ecx
mov ebx, ecx
test al, al
je 0x665e1cdd
movzx ecx, word [edi + 0x1c]
cmp ecx, ebx
je 0x665e1ec0
mov ecx, dword [esp + 0x20]
sub ecx, eax
mov eax, dword [edi + 0x40]
movzx ebx, word [eax + ecx*2]
rol bx, 8
and bx, word [edi + 0x1a]
movzx ebx, bx
add ebx, dword [edi + 0x38]
mov eax, dword [ebx]
mov dword [esp + esi*4 + 0x90], ebx
mov dword [esp + 4], ebx
bswap eax
mov dword [esp], edi
mov dword [esp + 0x84], eax
call edx
movzx ecx, ax
mov dword [esp + esi*4 + 0xec], ecx
test byte [ebp + 0x18], 0xc
je 0x665e1d34
mov eax, ebx
sub eax, dword [edi + 0x38]
lea edx, [ecx + eax]
cmp edx, dword [ebp + 0x28]
jle 0x665e1f00
mov eax, dword [esp + 0x80]
test eax, eax
jne 0x665e1d69
movzx eax, byte [edi + 0xc]
mov edx, dword [esp + 0x20]
sub edx, eax
lea eax, [esp + 0x80]
mov dword [esp], eax
mov eax, edi
call fcn.665b1c10
mov eax, dword [esp + 0x80]
test eax, eax
je 0x665e1e50
mov eax, dword [esp + 0x24]
xor edx, edx
mov dword [esp + eax + 0xa0], 0
lea edi, [eax - 1]
cmp edi, 4
jb 0x665e1d95
and edi, 0xfffffffc
xor eax, eax
mov dword [esp + eax + 0xa4], edx
add eax, 4
cmp eax, edi
jb 0x665e1d87
mov dword [esp + 0x48], 0
mov eax, dword [esp + 0x148]
test eax, eax
je 0x665e1db0
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [esp + 0x34]
lea ebx, [esp + 0xa8]
lea esi, [ebx + eax*4]
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x665e1dd0
mov eax, dword [eax + 0x48]
call fcn.6658dc20
mov eax, ebx
cmp esi, ebx
je 0x665e1de5
mov eax, dword [eax]
add ebx, 4
test eax, eax
jne 0x665e1dc8
mov eax, ebx
cmp esi, ebx
jne 0x665e1dd6
mov eax, dword [esp + 0x48]
test eax, eax
je 0x665e1e15
mov eax, dword [esp + 0x48]
lea ebx, [esp + 0xb0]
lea esi, [ebx + eax*4]
lea esi, [esi]
nop
mov eax, dword [ebx]
test eax, eax
je 0x665e1e0e
mov eax, dword [eax + 0x48]
call fcn.6658dc20
add ebx, 4
cmp esi, ebx
jne 0x665e1e00
mov eax, dword [esp + 0x80]
add esp, 0x18c
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [esi - 1]
mov dword [esp + 0x30], edx
add edx, ebp
cmp ecx, esi
jne 0x665e1c23
mov edx, esi
mov esi, dword [esp + 0x1a4]
lea esi, [edx + esi - 2]
mov dword [esp + 0x30], esi
jmp 0x665e1c23
mov edx, dword [esp + 0x84]
jmp 0x665e1c5f
call fcn.665b1600
mov dword [esp + 0x80], eax
test eax, eax
je 0x665e1cb0
mov eax, dword [esp + 0x24]
mov dword [esp + 0x48], ebx
xor edx, edx
cmp eax, 4
jb 0x665e27d9
mov eax, dword [esp + 0x24]
mov dword [esp + eax + 0xa0], 0
sub eax, 1
cmp eax, 4
jb 0x665e1d9d
and eax, 0xfffffffc
xor ecx, ecx
mov dword [esp + ecx + 0xa4], edx
add ecx, 4
cmp ecx, eax
jb 0x665e1ea7
jmp 0x665e1d9d
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
mov dword [esp + esi*4 + 0x90], eax
mov dword [esp + 4], eax
bswap ecx
mov dword [esp], edi
mov dword [esp + 0x84], ecx
call edx
mov byte [edi + 0xc], 0
movzx eax, ax
mov dword [esp + esi*4 + 0xec], eax
mov eax, dword [esp + 0x80]
jmp 0x665e1d61
add eax, dword [esp + 0x3c]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [esp + 0x28], ecx
call sub.msvcrt.dll_memcpy
sub ebx, dword [edi + 0x38]
add ebx, dword [esp + 0x3c]
mov dword [esp + esi*4 + 0x90], ebx
mov ecx, dword [esp + 0x28]
jmp 0x665e1d34
mov eax, dword [esp + 0x34]
mov edx, 0xaaaaaaab
mov dword [esp + 0x48], ebx
lea esi, [eax + 1]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x6c], esi
mov ecx, dword [eax + 0x24]
lea eax, [ecx - 8]
mul edx
shr edx, 2
lea ebx, [edx + 4]
imul ebx, esi
add ebx, 3
and ebx, 0xfffffffc
lea esi, [ebx + ebx]
lea eax, [esi + ebx]
lea eax, [ecx + eax*2]
cdq
call fcn.6658bcf0
mov dword [esp + 0x148], eax
test eax, eax
je 0x665e27c9
mov ebp, dword [esp + 0xa4]
lea eax, [eax + ebx*4]
mov dword [esp + 0x70], edi
mov dword [esp + 0x14c], eax
add eax, esi
mov dword [esp + 0x60], eax
movzx eax, byte [ebp + 8]
mov dword [esp + 0x144], ebp
movzx esi, byte [ebp + 3]
shl eax, 2
mov dword [esp + 0x20], ebp
mov dword [esp + 0x38], esi
mov dword [esp + 0x40], 0
mov dword [esp + 0x28], 0
mov word [esp + 0x5e], ax
movzx eax, ax
mov dword [esp + 0x68], eax
mov eax, ebp
mov ebx, dword [esp + 0x20]
mov eax, dword [eax + 0x38]
movzx edx, word [ebx + 0x18]
mov esi, dword [ebx + 0x38]
movzx edi, word [ebx + 0x1a]
movzx ebx, word [ebx + 0x12]
movzx eax, byte [eax]
mov ebp, edx
add ebx, esi
cmp byte [esi], al
jne 0x665e2720
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x140]
movzx eax, byte [eax + 0xc]
mov dword [esp + 4], 0
add eax, edx
mov edx, dword [esp + 0x14c]
add eax, eax
lea edx, [edx + ecx*2]
mov dword [esp + 8], eax
mov dword [esp], edx
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x20]
movzx edx, byte [eax + 0xc]
test dl, dl
jne 0x665e2100
mov eax, dword [esp + 0x140]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
movzx edx, word [eax + 0x18]
movzx eax, word [eax + 0x12]
lea ebp, [eax + edx*2]
add ebp, esi
cmp ebx, ebp
jae 0x665e20a5
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x148]
lea ecx, [eax + edx*4]
mov edx, ebx
lea esi, [esi]
lea esi, [esi]
movzx eax, word [edx]
add edx, 2
add ecx, 4
rol ax, 8
and eax, edi
movzx eax, ax
add eax, esi
mov dword [ecx - 4], eax
cmp ebp, edx
ja 0x665e2070
sub ebp, 1
mov eax, dword [esp + 0x24]
sub ebp, ebx
shr ebp, 1
lea eax, [eax + ebp + 1]
mov dword [esp + 0x24], eax
mov dword [esp + 0x140], eax
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
test ebx, ebx
mov dword [esp + eax*4 + 0xd8], esi
sete bl
cmp eax, dword [esp + 0x34]
jge 0x665e20cb
test bl, bl
jne 0x665e21b0
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0xa4]
lea edx, [edi + 1]
cmp edi, dword [esp + 0x34]
je 0x665e22ae
mov edi, dword [esp + edx*4 + 0xa4]
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], edi
jmp 0x665e1fd0
mov eax, dword [esp + 0x20]
movzx eax, word [eax + 0x1c]
cmp bp, ax
jb 0x665e27ee
mov ecx, dword [esp + 0x140]
mov ebp, dword [esp + 0x148]
mov dword [esp + 0x24], ecx
test ax, ax
je 0x665e276e
mov dword [esp + 0x54], eax
lea eax, [ebx + eax*2]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x58], ebp
lea ecx, [ebp + ecx*4]
mov ebp, eax
lea esi, [esi]
movzx eax, word [ebx]
add ebx, 2
add ecx, 4
rol ax, 8
and eax, edi
movzx eax, ax
add eax, esi
mov dword [ecx - 4], eax
cmp ebx, ebp
jne 0x665e2148
mov ecx, dword [esp + 0x54]
add dword [esp + 0x24], ecx
mov ebp, dword [esp + 0x58]
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
lea ecx, [ebp + ecx*4]
movzx ebp, dl
mov eax, ebx
lea ebx, [ebx + ebp*4]
mov edx, dword [eax + 0x24]
add eax, 4
add ecx, 4
mov dword [ecx - 4], edx
cmp ebx, eax
jne 0x665e2183
add ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x140], ebp
jmp 0x665e2041
mov ecx, eax
mov edx, dword [esp + 0x14c]
mov eax, dword [esp + eax*4 + 0xec]
mov edi, dword [esp + 0x40]
mov word [edx + esi*2], ax
mov esi, dword [esp + 0x60]
movzx eax, ax
mov edx, dword [esp + ecx*4 + 0x90]
mov dword [esp + 8], eax
add esi, edi
add edi, eax
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 0x40], edi
call sub.msvcrt.dll_memcpy
mov edi, dword [esp + 0x68]
mov eax, dword [esp + 0x140]
mov ecx, dword [esp + 0x148]
lea edx, [esi + edi]
mov edi, dword [esp + 0x20]
mov dword [ecx + eax*4], edx
mov ecx, dword [esp + 0x14c]
lea esi, [ecx + eax*2]
movzx ecx, word [esi]
sub cx, word [esp + 0x5e]
mov word [esi], cx
cmp byte [edi + 8], 0
jne 0x665e2270
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x38]
mov eax, dword [eax + 8]
mov dword [edx], eax
mov eax, dword [esp + 0x140]
add eax, 1
mov dword [esp + 0x140], eax
jmp 0x665e20cb
mov dword [esp + 0x30], 0
mov eax, dword [edi + 0x38]
movzx edx, byte [edi + 9]
mov dword [esp + 0x34], ecx
lea eax, [eax + edx + 8]
mov dword [esp + 0x50], eax
jmp 0x665e1c48
cmp cx, 3
ja 0x665e2238
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + 0x60]
nop
add ecx, 1
mov byte [edi + ecx - 1], 0
mov edx, dword [esp + 0x14c]
mov eax, dword [esp + 0x140]
lea esi, [edx + eax*2]
movzx edx, word [esi]
add edx, 1
mov word [esi], dx
cmp dx, 3
jbe 0x665e2280
mov dword [esp + 0x40], ecx
jmp 0x665e2238
mov ebp, eax
mov eax, dword [esp + 0x44]
movzx esi, word [esp + 0x5e]
mov byte [esp + 0x74], bl
mov edi, dword [esp + 0x70]
lea ecx, [esp + 0xec]
mov dword [esp + 0x20], 0
mov eax, dword [eax + 0x28]
mov dword [esp + 0x70], esi
mov ebx, ecx
mov dword [esp + 0x28], 0
lea eax, [eax + esi - 0xc]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x3c]
mov dword [esp + 0x4c], edi
mov dword [esp + 0x150], eax
mov eax, dword [esp + 0xd8]
mov dword [esp + 0x40], eax
mov dword [esp + 0x168], eax
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
lea esi, [edi + 1]
test ecx, ecx
jne 0x665e2341
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x28], esi
mov eax, dword [eax + 0x3c]
mov dword [esp + edi*4 + 0x154], eax
mov eax, dword [esp + 0x40]
add eax, 1
mov dword [esp + edi*4 + 0x16c], eax
lea eax, [edi + 2]
mov esi, eax
mov eax, dword [esp + 0x24]
xor edi, edi
sub eax, dword [ebp + 0x14]
cmp byte [ebp + 0xc], 0
mov dword [ebx], eax
je 0x665e2379
lea esi, [esi]
mov eax, dword [ebp + edi*4 + 0x24]
mov dword [esp], ebp
add edi, 1
mov dword [esp + 4], eax
call dword [ebp + 0x4c]
movzx eax, ax
add eax, 2
add dword [ebx], eax
movzx eax, byte [ebp + 0xc]
cmp eax, edi
jg 0x665e2358
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x40]
mov dword [esp + eax*4 + 0xc4], edi
cmp eax, dword [esp + 0x34]
je 0x665e23d4
add dword [esp + 0x20], 1
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + edi*4 + 0xa4]
mov eax, dword [ebp + 0x3c]
mov dword [esp + esi*4 + 0x150], eax
mov eax, dword [esp + edi*4 + 0xd8]
mov edi, dword [esp + 0x28]
mov dword [esp + esi*4 + 0x168], eax
cmp eax, dword [esp + edi*4 + 0x168]
mov dword [esp + 0x40], eax
cmove esi, edi
add ebx, 4
mov dword [esp + 0x28], esi
jmp 0x665e230d
mov edi, dword [esp + 0x4c]
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x4c], 2
lea ebp, [esp + 0xc4]
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x28], 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x58], edi
mov esi, ecx
mov eax, dword [esp + 0x28]
sub eax, 1
mov dword [esp + 0x54], eax
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x24]
cmp dword [esi], eax
jg 0x665e2430
jmp 0x665e2803
add dword [esi + 4], eax
mov dword [ebp], ebx
cmp edi, dword [esp + 0x24]
jle 0x665e24ee
mov edi, dword [esp + 0x20]
cmp dword [esp + 0x28], edi
jl 0x665e245c
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x20], eax
cmp eax, 6
je 0x665e275c
mov eax, dword [esp + 0x140]
mov dword [esi + 4], 0
mov dword [ebp + 4], eax
mov ecx, dword [ebp]
lea ebx, [ecx - 1]
lea eax, [ebx + ebx]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x14c]
movzx eax, word [eax + ebx*2]
test ax, ax
jne 0x665e248f
mov edx, ebx
lea eax, [esp + 0x140]
mov dword [esp + 0x40], ecx
call fcn.66582a20
mov ecx, dword [esp + 0x40]
mov edi, dword [esi]
movzx eax, ax
mov edx, dword [esp + 0x38]
add eax, 2
sub edi, eax
mov dword [esi], edi
test edx, edx
jne 0x665e2420
xor eax, eax
cmp ecx, dword [esp + 0x140]
jge 0x665e2420
mov eax, dword [esp + 0x14c]
lea edx, [ebx + ebx]
movzx eax, word [eax + edx + 2]
test ax, ax
jne 0x665e24d8
mov edx, ecx
lea eax, [esp + 0x140]
call fcn.66582a20
movzx eax, ax
mov dword [ebp], ebx
add eax, 2
add dword [esi + 4], eax
cmp edi, dword [esp + 0x24]
jg 0x665e2430
cmp dword [esp + 0x140], ebx
jle 0x665e2558
lea esi, [esi]
nop
mov eax, dword [esp + 0x14c]
lea edi, [ebx + ebx]
movzx eax, word [eax + ebx*2]
test ax, ax
jne 0x665e2521
mov edx, ebx
lea eax, [esp + 0x140]
call fcn.66582a20
mov edx, dword [esi]
movzx eax, ax
mov ecx, dword [esp + 0x140]
add eax, 2
add edx, eax
cmp edx, dword [esp + 0x24]
jg 0x665e2787
mov dword [esi], edx
mov edx, dword [esp + 0x38]
add ebx, 1
mov dword [ebp], ebx
test edx, edx
jne 0x665e26fc
cmp ebx, ecx
jl 0x665e26d0
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x58]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x78], edi
mov dword [esp + 0x58], eax
lea eax, [esp + eax*4 + 0xc4]
mov dword [esp + 0x40], eax
mov ebx, dword [esp + 0x58]
test ebx, ebx
je 0x665e280b
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x14c]
mov edi, dword [esp + eax*4 + 0xec]
mov eax, dword [esp + eax*4 + 0xe8]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
mov eax, dword [eax - 4]
lea ebx, [eax - 1]
sub eax, dword [esp + 0x38]
cmp word [edx + eax*2], 0
lea ebp, [eax + eax]
jne 0x665e25d1
mov edx, eax
lea eax, [esp + 0x140]
call fcn.66582a20
mov edx, dword [esp + 0x14c]
xor eax, eax
mov esi, dword [esp + 0x60]
cmp dword [esp + 0x58], esi
mov dword [esp + 0x20], ebp
setne al
add eax, eax
mov dword [esp + 0x54], eax
jmp 0x665e2623
mov edx, dword [esp + 0x14c]
mov eax, dword [esp + 0x20]
movzx ecx, word [edx + eax]
movzx eax, word [edx + esi]
add eax, 2
sub dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
lea edi, [ecx + edi + 2]
sub dword [esp + 0x20], 2
mov dword [eax - 4], ebx
mov eax, ebx
sub eax, 1
js 0x665e267e
mov ebx, eax
cmp word [edx + ebx*2], 0
lea esi, [ebx + ebx]
jne 0x665e263b
mov edx, ebx
lea eax, [esp + 0x140]
call fcn.66582a20
test edi, edi
je 0x665e25f0
mov ebp, dword [esp + 0x1a4]
test ebp, ebp
jne 0x665e2677
mov edx, dword [esp + 0x14c]
mov eax, dword [esp + 0x20]
movzx ecx, word [edx + eax]
movzx eax, word [edx + esi]
mov esi, dword [esp + 0x54]
lea ebp, [ecx + edi + 1]
mov dword [esp + 0x4c], ebp
mov ebp, dword [esp + 0x28]
add esi, eax
sub ebp, esi
cmp dword [esp + 0x4c], ebp
jl 0x665e2603
mov eax, dword [esp + 0x40]
mov ebx, dword [eax - 4]
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x28]
mov dword [esp + esi*4 + 0xec], edi
mov dword [esp + esi*4 + 0xe8], eax
xor eax, eax
cmp esi, 1
je 0x665e26a2
mov eax, dword [esp + 0x40]
mov eax, dword [eax - 8]
sub dword [esp + 0x58], 1
sub dword [esp + 0x40], 4
cmp eax, ebx
jl 0x665e257b
mov dword [esp + 0x10], 0x6667e21c
mov dword [esp + 0xc], 0x11cd3
jmp 0x665e2730
mov eax, dword [esp + 0x14c]
movzx eax, word [eax + edi + 2]
test ax, ax
jne 0x665e26f6
mov edx, ebx
lea eax, [esp + 0x140]
call fcn.66582a20
mov ecx, dword [esp + 0x140]
movzx eax, ax
add eax, 2
sub dword [esi + 4], eax
mov edx, dword [esp + 0x28]
cmp ebx, ecx
jl 0x665e2500
mov dword [esp + 0x68], edx
mov edi, dword [esp + 0x58]
jmp 0x665e2564
mov dword [esp + 0x10], 0x6667e21c
mov dword [esp + 0xc], 0x11c0b
mov dword [esp + 8], str.database_corruption
mov dword [esp + 4], str._s_at_line__d_of___.10s_
mov dword [esp], 0xb
call sym.libsqlite3_0.dll_sqlite3_log
mov dword [esp + 0x80], 0xb
jmp 0x665e1d9d
mov dword [esp + 0x10], 0x6667e21c
mov dword [esp + 0xc], 0x11c88
jmp 0x665e2730
mov dword [esp + 0x4c], ebx
jmp 0x665e216f
add esp, 0x18c
mov eax, 7
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ebx, ecx
jge 0x665e2558
mov edx, dword [esp + 0x54]
xor eax, eax
test edx, edx
je 0x665e279c
mov eax, dword [ebp - 4]
cmp ebx, eax
jle 0x665e2a9d
mov edi, dword [esp + 0x28]
add dword [esp + 0x4c], 1
add esi, 4
add ebp, 4
lea eax, [edi + 1]
cmp dword [esp + 0x20], edi
jle 0x665e2ab2
mov dword [esp + 0x28], eax
jmp 0x665e2401
mov dword [esp + 0x80], 7
jmp 0x665e1db0
test eax, eax
je 0x665e1d9d
mov byte [esp + 0xa4], 0
jmp 0x665e1d9d
mov dword [esp + 0x10], 0x6667e21c
mov dword [esp + 0xc], 0x11c23
jmp 0x665e2730
mov ebx, dword [ebp]
jmp 0x665e24ee
mov eax, dword [esp + 0xa4]
mov edi, dword [esp + 0x78]
mov ebp, 1
mov eax, dword [eax + 0x38]
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x58]
movzx esi, byte [eax]
mov eax, esi
mov byte [esp + 0x4c], al
jmp 0x665e28ce
mov ecx, dword [esp + 0x1a4]
mov eax, ebp
mov dword [esp + 4], 0
lea edx, [esp + 0x128]
test ecx, ecx
cmove eax, dword [esp + 0x84]
lea ecx, [esp + 0x84]
mov dword [esp], eax
mov eax, dword [esp + 0x44]
call fcn.665dfd00
mov dword [esp + 0x80], eax
test eax, eax
jne 0x665e29c5
mov eax, dword [esp + 0x128]
mov edx, esi
lea ebx, [edi + 1]
call fcn.665afc00
mov eax, dword [esp + 0x128]
lea edx, [esp + 0xb0]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x40], edx
mov dword [edx + edi*4], eax
mov edx, dword [esp + 0x140]
mov dword [esp + edi*4 + 0xd8], edx
mov edi, dword [esp + 0x44]
cmp byte [edi + 0x11], 0
jne 0x665e2990
mov edi, ebx
cmp ebx, dword [esp + 0x68]
jge 0x665e29c9
cmp dword [esp + 0x6c], edi
jle 0x665e2838
mov eax, dword [esp + edi*4 + 0xa4]
lea edx, [esp + 0xb0]
lea ebx, [edi + 1]
mov dword [esp + edi*4 + 0xa4], 0
mov dword [esp + 0x40], edx
mov dword [edx + edi*4], eax
mov dword [esp + 0x128], eax
mov eax, dword [eax + 0x48]
call fcn.665dd740
mov edx, dword [esp + 0x128]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x80], eax
mov edx, dword [edx + 0x48]
movsx ecx, word [edx + 0x1e]
mov edx, dword [esp + 0x64]
sub edx, dword [esp + 0x30]
cmp edx, edi
sete dl
movzx edx, dl
add edx, 1
cmp edx, ecx
je 0x665e297a
mov dword [esp + 0x10], 0x6667e21c
mov dword [esp + 0xc], 0x11cf2
mov dword [esp + 8], str.database_corruption
mov dword [esp + 4], str._s_at_line__d_of___.10s_
mov dword [esp], 0xb
call sym.libsqlite3_0.dll_sqlite3_log
mov dword [esp + 0x80], 0xb
mov dword [esp + 0x48], ebx
jmp 0x665e1d9d
test eax, eax
je 0x665e28c2
mov ebx, dword [esp + 0x20]
jmp 0x665e2971
mov edx, dword [eax + 4]
lea eax, [esp + 0x80]
mov ecx, 5
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, edi
call fcn.665e05c0
mov edx, dword [esp + 0x80]
test edx, edx
je 0x665e28c2
jmp 0x665e2982
mov ebx, edi
jmp 0x665e2971
mov eax, dword [esp + 0xb0]
mov edi, dword [esp + 0x28]
lea esi, [esp + 0x100]
mov dword [esp + 0x28], ebx
mov ebx, 1
mov ecx, dword [eax + 4]
mov dword [esp + 0x54], eax
mov eax, dword [eax + 0x48]
mov dword [esp + 0x100], ecx
movzx eax, word [eax + 0x1c]
mov dword [esp + 0x114], ecx
mov word [esp + 0x9a], ax
cmp dword [esp + 0x28], ebx
je 0x665e2aca
mov eax, dword [esp + 0x40]
mov ebp, ecx
mov eax, dword [eax + ebx*4]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x48]
movzx eax, word [eax + 0x1c]
mov dword [esi + 4], edx
mov dword [esp + ebx*4 + 0x114], edx
mov word [esp + ebx*2 + 0x9a], ax
lea eax, [esp + 0x100]
jmp 0x665e2a4a
cmp esi, eax
je 0x665e2a92
mov ebp, dword [eax + 4]
add eax, 4
cmp edx, ebp
jne 0x665e2a40
mov dword [esp + 0x10], 0x6667e21c
mov dword [esp + 0xc], 0x11d20
mov dword [esp + 8], str.database_corruption
mov dword [esp + 4], str._s_at_line__d_of___.10s_
mov dword [esp], 0xb
call sym.libsqlite3_0.dll_sqlite3_log
mov eax, dword [esp + 0x28]
mov dword [esp + 0x80], 0xb
mov dword [esp + 0x48], eax
jmp 0x665e1d9d
add ebx, 1
add esi, 4
jmp 0x665e2a08
mov dword [esp + 0x10], 0x6667e21c
mov dword [esp + 0xc], 0x11ca9
jmp 0x665e2730
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x58]
lea esi, [eax - 1]
mov dword [esp + 0x68], eax
mov dword [esp + 0x60], esi
jmp 0x665e2564
xor esi, esi
xor ebx, ebx
cmp dword [esp + 0x28], 1
mov edx, dword [esp + 0x114]
mov eax, 1
je 0x665e2b33
mov ecx, dword [esp + eax*4 + 0x114]
cmp ecx, edx
jae 0x665e2af0
mov edx, ecx
mov ebx, eax
add eax, 1
cmp dword [esp + 0x28], eax
jne 0x665e2ae1
mov dword [esp + 0x84], edx
mov dword [esp + ebx*4 + 0x114], 0xffffffff
cmp ebx, esi
je 0x665e2b7b
jle 0x665e2b4f
mov eax, dword [esp + 0x44]
mov eax, dword [eax + 0x30]
lea edx, [ebx + eax + 1]
mov eax, dword [esp + ebx*4 + 0xb0]
mov eax, dword [eax + 0x48]
mov word [eax + 0x1c], 0
call fcn.66582420
jmp 0x665e2b4f
mov dword [esp + 0x84], edx
mov dword [esp + 0x114], 0xffffffff
test esi, esi
je 0x665e2e94
xor ebx, ebx
mov eax, dword [esp + 0x40]
movzx edx, word [esp + ebx*2 + 0x9a]
mov ebp, dword [eax + esi*4]
mov eax, dword [ebp + 0x48]
mov word [eax + 0x1c], dx
mov edx, dword [esp + 0x84]
call fcn.66582420
mov eax, dword [esp + 0x84]
mov dword [ebp + 4], eax
lea eax, [esi + 1]
cmp dword [esp + 0x28], eax
je 0x665e2ba4
mov esi, eax
jmp 0x665e2acc
mov ecx, dword [esp + 0x34]
jmp 0x665e225b
lea eax, [esi*4 + 4]
mov dword [esp + 0x24], eax
jmp 0x665e1d69
mov dword [esp + 0x20], eax
mov eax, dword [esp + esi*4 + 0xb0]
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x60], esi
mov edx, dword [eax + 4]
bswap edx
mov dword [ecx], edx
test byte [esp + 0x4c], 8
jne 0x665e2bed
mov ecx, dword [esp + 0x34]
cmp esi, ecx
je 0x665e2bed
lea edx, [esp + 0xac]
jle 0x665e2ec0
mov esi, dword [esp + 0x6c]
mov eax, dword [eax + 0x38]
mov edx, dword [edx + esi*4]
mov edx, dword [edx + 0x38]
mov edx, dword [edx + 8]
mov dword [eax + 8], edx
mov eax, dword [esp + 0x44]
cmp byte [eax + 0x11], 0
je 0x665e2d0d
mov ebp, dword [esp + 0x54]
movzx edx, word [ebp + 0x18]
movzx eax, byte [ebp + 0xc]
add eax, edx
cmp dword [esp + 0x140], 0
mov dword [esp + 0x50], eax
jle 0x665e2d0d
movzx eax, byte [esp + 0x74]
mov dword [esp + 0x68], edi
mov ebx, ebp
xor esi, esi
mov dword [esp + 0x58], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x148]
mov edi, dword [eax + esi*4]
cmp dword [esp + 0x50], esi
jne 0x665e2c89
mov edx, dword [esp + 0x58]
jmp 0x665e2c73
mov eax, dword [esp + 0x40]
mov ebp, dword [eax + edx*4]
movzx ecx, byte [ebp + 0xc]
movzx eax, word [ebp + 0x18]
add eax, ecx
add eax, dword [esp + 0x64]
add dword [esp + 0x50], eax
mov ecx, dword [esp + 0x50]
cmp ecx, esi
jne 0x665e2c85
add edx, 1
cmp edx, dword [esp + 0x20]
jl 0x665e2c52
mov ebp, dword [esp + edx*4 + 0xa4]
jmp 0x665e2c59
mov dword [esp + 0x58], edx
mov eax, dword [esp + 0x4c]
cmp dword [esp + eax*4 + 0xc4], esi
je 0x665e2e4c
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x20]
cmp eax, edx
jge 0x665e2cb6
mov eax, dword [esp + eax*4 + 0x100]
cmp dword [ebx + 4], eax
je 0x665e2f6b
cmp word [esp + 0x5e], 0
je 0x665e2e6c
mov eax, dword [esp + 0x14c]
movzx eax, word [eax + esi*2]
test ax, ax
jne 0x665e2ce0
lea eax, [esp + 0x140]
mov edx, esi
call fcn.66582a20
cmp word [ebx + 0x10], ax
jb 0x665e2f51
mov eax, dword [esp + 0x80]
test eax, eax
jne 0x665e2f44
add esi, 1
cmp dword [esp + 0x140], esi
jg 0x665e2c3c
mov edi, dword [esp + 0x68]
cmp dword [esp + 0x60], 0
je 0x665e2f86
lea eax, [esp + 0x80]
mov dword [esp + 0x50], 0
mov ebp, 1
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x30], edi
sub eax, 1
mov dword [esp + 0x60], eax
jmp 0x665e2d90
mov edx, dword [ebx + 0x38]
mov ecx, dword [esi]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x60]
add dword [esp + 0x50], eax
mov dword [esp + 0xc], ecx
mov ecx, dword [ebx + 4]
add edx, ebp
mov dword [esp], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 8], ecx
mov ecx, esi
mov dword [esp + 4], edi
call fcn.665e1860
mov edx, dword [esp + 0x80]
test edx, edx
jne 0x665e2f44
add ebp, 1
cmp dword [esp + 0x28], ebp
je 0x665e2f82
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x14c]
mov edx, dword [esp + 0x148]
mov ebx, dword [eax + ebp*4 - 4]
mov eax, dword [esp + ebp*4 + 0xc0]
mov esi, dword [edx + eax*4]
lea ecx, [eax*4]
movzx eax, word [edi + eax*2]
mov edi, dword [esp + 0x3c]
add edi, dword [esp + 0x50]
mov word [esp + 0x58], ax
add eax, dword [esp + 0x70]
cmp byte [ebx + 8], 0
je 0x665e2d41
cmp dword [esp + 0x38], 0
je 0x665e32be
lea eax, [esp + 0x128]
mov dword [esp + 8], eax
mov eax, dword [edx + ecx - 4]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [ebx + 0x50]
mov esi, dword [esp + 0x128]
mov ecx, 0x7f
mov edx, dword [esp + 0x12c]
cmp ecx, esi
mov ecx, 0
mov eax, esi
sbb ecx, edx
jae 0x665e32b1
mov ecx, 0x3fff
cmp ecx, esi
mov ecx, 0
sbb ecx, edx
jae 0x665e32e3
lea esi, [edi + 4]
mov ecx, edx
mov edx, eax
mov eax, esi
call fcn.66581dc0
mov esi, edi
add eax, 4
xor edi, edi
jmp 0x665e2d49
add dword [esp + 0x4c], 1
mov eax, dword [esp + 0x4c]
cmp dword [esp + 0x38], 0
mov ebx, dword [esp + eax*4 + 0xb0]
jne 0x665e2c9a
jmp 0x665e2cf9
lea eax, [esp + 0x80]
mov edx, dword [edi]
mov ecx, 5
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
bswap edx
mov dword [esp], eax
mov eax, dword [esp + 0x44]
call fcn.665e05c0
jmp 0x665e2cc2
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x60], esi
mov esi, dword [esp + 0x50]
mov edx, dword [eax + 4]
bswap edx
mov dword [esi], edx
test byte [esp + 0x4c], 8
jne 0x665e2ecc
cmp dword [esp + 0x6c], 1
je 0x665e2ecc
mov dword [esp + 0x20], 1
lea edx, [esp + 0xa0]
jmp 0x665e2bda
mov dword [esp + 0x20], 1
jmp 0x665e2bed
mov edi, dword [esp + 0x64]
mov eax, dword [esp + 0x28]
mov ebp, eax
add ebp, eax
add eax, edi
add eax, eax
mov dword [esp + 0x30], eax
mov ebx, dword [esp + 0x14c]
add ebx, ebp
cmp word [ebx], 0
jne 0x665e2f1a
mov edx, dword [esp + 0x148]
mov eax, dword [esp + 0x144]
mov edx, dword [edx + ebp*2]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [eax + 0x4c]
mov word [ebx], ax
add ebp, 2
cmp dword [esp + 0x30], ebp
jne 0x665e2eed
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x38]
mov dword [esp], esi
mov ecx, edi
call fcn.665b2340
mov dword [esp + 0x80], eax
test eax, eax
je 0x665e31cc
mov eax, dword [esp + 0x20]
mov dword [esp + 0x48], eax
jmp 0x665e1d9d
lea eax, [esp + 0x80]
mov ecx, edi
mov edx, ebp
mov dword [esp], eax
mov eax, ebx
call fcn.665e0760
jmp 0x665e2cea
cmp dword [ebp + 0x38], edi
ja 0x665e2cb6
cmp dword [ebp + 0x3c], edi
ja 0x665e2cf9
jmp 0x665e2cb6
mov edi, dword [esp + 0x30]
mov eax, 1
sub eax, dword [esp + 0x20]
mov dword [esp + 0x7c], edi
mov dword [esp + 0x60], eax
movzx eax, byte [esp + 0x74]
mov dword [esp + 0x68], eax
mov edi, dword [esp + 0x60]
mov eax, edi
mov esi, edi
mov dword [esp + 0x28], edi
sar eax, 0x1f
xor esi, eax
sub esi, eax
cmp byte [esp + esi + 0x8b], 0
mov dword [esp + 0x4c], esi
mov eax, esi
jne 0x665e31e6
mov esi, edi
test edi, edi
js 0x665e3440
mov eax, dword [esp + 0x4c]
lea eax, [eax - 1]
jne 0x665e33b8
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0xc4]
mov dword [esp + 0x30], 0
mov eax, dword [esi + 0x38]
movzx ebx, word [esi + 0x18]
mov ebp, edi
mov dword [esp + 0x58], eax
movzx eax, byte [esi + 9]
mov byte [esp + 0x64], al
lea eax, [edi + edi]
add eax, dword [esi + 0x40]
mov dword [esp + 0x3c], eax
movzx eax, byte [esi + 0xc]
add eax, ebx
mov dword [esp + 0x50], eax
lea eax, [esp + 0x140]
mov dword [esp + 0x38], eax
cmp dword [esp + 0x50], ebp
jg 0x665e3511
movzx eax, byte [esp + 0x64]
mov ecx, dword [esp + 0x58]
lea edx, [ecx + eax + 5]
lea ebp, [ecx + eax + 6]
mov dword [esp + 0x70], eax
movzx eax, byte [edx]
mov dword [esp + 0x74], edx
movzx edx, byte [ebp]
mov dword [esp + 0x78], ebp
shl eax, 8
or eax, edx
sub eax, 1
movzx eax, ax
lea eax, [ecx + eax + 1]
mov dword [esp + 0x128], eax
cmp eax, dword [esp + 0x3c]
jb 0x665e3504
mov edx, dword [esp + 0x30]
cmp dword [esp + 0x28], edx
jl 0x665e334f
cmp byte [esi + 0xc], 0
mov eax, dword [esi + 0x40]
je 0x665e3145
mov dword [esp + 0x50], 0
mov dword [esp + 0x64], edi
jmp 0x665e30fd
mov eax, dword [esp + 0x14c]
add ebx, 1
cmp word [eax + ebp*2], 0
jne 0x665e30b8
mov eax, dword [esp + 0x38]
mov edx, ebp
call fcn.66582a20
mov eax, dword [esp + 0x38]
mov dword [esp + 4], ebp
lea ecx, [esp + 0x128]
mov dword [esp + 8], 1
mov edx, dword [esp + 0x3c]
mov dword [esp + 0xc], eax
mov eax, esi
mov dword [esp], edi
call fcn.665b29a0
test eax, eax
jne 0x665e2ed9
mov eax, dword [esi + 0x40]
add dword [esp + 0x50], 1
movzx edx, byte [esi + 0xc]
mov edi, dword [esp + 0x50]
cmp edi, edx
jge 0x665e3141
mov edi, dword [esp + 0x50]
movzx ebp, word [esi + edi*2 + 0x1c]
add ebp, dword [esp + 0x30]
mov edx, ebp
sub edx, dword [esp + 0x28]
js 0x665e30ec
cmp edx, dword [esp + 0x64]
jge 0x665e30ec
lea edi, [eax + edx*2]
cmp edx, ebx
jge 0x665e309c
mov eax, ebx
mov dword [esp + 4], edi
sub eax, edx
add eax, eax
mov dword [esp + 8], eax
lea eax, [edi + 2]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
jmp 0x665e309c
mov edi, dword [esp + 0x64]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x128]
mov dword [esp + 0xc], eax
mov eax, edi
sub eax, ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x28]
add eax, ebx
add ebx, ebx
mov dword [esp + 4], eax
mov eax, dword [esi + 0x40]
add eax, ebx
mov dword [esp], eax
mov eax, esi
call fcn.665b29a0
test eax, eax
jne 0x665e3504
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x70]
mov eax, edi
mov word [esi + 0x18], di
mov byte [esi + 0xc], 0
mov byte [edx + ecx + 3], ah
movzx eax, word [esi + 0x18]
mov edi, edx
mov byte [edx + ecx + 4], al
mov eax, dword [esp + 0x128]
sub eax, edx
mov edx, dword [esp + 0x74]
mov byte [edx], ah
mov eax, dword [esp + 0x128]
sub eax, edi
mov edi, dword [esp + 0x78]
mov byte [edi], al
mov dword [esp + 0x80], 0
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x24]
sub edi, dword [esp + eax*4 + 0xec]
mov byte [esp + eax + 0x8b], 1
mov dword [esi + 0x14], edi
mov eax, dword [esp + 0x60]
add eax, 1
cmp eax, dword [esp + 0x20]
jge 0x665e31fc
mov dword [esp + 0x60], eax
jmp 0x665e2fa0
cmp dword [esp + 0x1a0], 0
mov edi, dword [esp + 0x7c]
je 0x665e3222
cmp word [edi + 0x18], 0
jne 0x665e3222
mov esi, dword [esp + 0x54]
movzx eax, byte [edi + 9]
cmp eax, dword [esi + 0x14]
jle 0x665e32ff
mov eax, dword [esp + 0x44]
cmp byte [eax + 0x11], 0
je 0x665e3234
cmp word [esp + 0x5e], 0
je 0x665e3251
mov ebx, dword [esp + 0x20]
cmp ebx, dword [esp + 0x6c]
jge 0x665e2f44
cmp dword [esp + 0x80], 0
je 0x665e3296
add ebx, 1
jmp 0x665e3238
lea eax, [esp + 0x80]
mov ebx, dword [esp + 0x48]
mov esi, dword [esp + 0x40]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + ebx*4]
mov edi, dword [esp + 0x4c]
mov ecx, 5
add ebx, 1
mov edx, dword [eax + 0x38]
mov edx, dword [edx + 8]
mov dword [esp + 4], edi
mov eax, dword [eax + 4]
bswap edx
mov dword [esp], eax
mov eax, dword [esp + 0x44]
call fcn.665e05c0
cmp ebx, dword [esp + 0x20]
jne 0x665e3264
jmp 0x665e3234
mov edx, dword [esp + ebx*4 + 0xa4]
mov ecx, dword [edx + 4]
mov eax, dword [edx + 0x34]
call fcn.665e1250
mov dword [esp + 0x80], eax
jmp 0x665e324c
mov byte [edi + 4], al
mov eax, 1
jmp 0x665e2e40
sub esi, 4
cmp word [esp + 0x58], 4
jne 0x665e2d49
mov eax, dword [esp + 0x30]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [eax + 0x4c]
movzx eax, ax
jmp 0x665e2d49
shrd eax, edx, 7
or eax, 0xffffff80
mov byte [edi + 4], al
mov eax, esi
and eax, 0x7f
mov byte [edi + 5], al
mov eax, 2
jmp 0x665e2e40
or edx, 0xffffffff
mov eax, esi
call fcn.665b1ed0
mov dword [esp + 0x80], eax
test eax, eax
jne 0x665e3234
lea ecx, [esp + 0x80]
mov edx, edi
mov eax, esi
call fcn.665e0910
cmp dword [esp + 0x80], 0
jne 0x665e3234
mov ecx, dword [esi + 4]
mov eax, dword [esi + 0x34]
mov edx, esi
call fcn.665e1250
mov dword [esp + 0x80], eax
jmp 0x665e3234
mov ebp, dword [esp + 0x30]
sub ebp, dword [esp + 0x28]
lea eax, [ebx + ebx]
cmp ebp, edi
mov edx, dword [esi + 0x40]
mov dword [esp + 8], eax
cmovg ebp, edi
mov dword [esp + 4], edx
lea eax, [ebp + ebp]
mov dword [esp + 0x50], edx
add eax, edx
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov dword [esp + 8], ebp
lea ecx, [esp + 0x128]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 4], eax
mov eax, esi
mov dword [esp], edx
mov edx, dword [esp + 0x3c]
call fcn.665b29a0
test eax, eax
jne 0x665e3504
add ebx, ebp
jmp 0x665e3081
mov esi, dword [esp + 0x4c]
cmp dword [esp + 0x6c], esi
jle 0x665e34b0
mov edi, dword [esp + 0x68]
add edi, dword [esp + eax*4 + 0xd8]
mov dword [esp + 0x30], edi
mov ecx, dword [esp + 0x68]
add ecx, dword [esp + eax*4 + 0xc4]
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x28], ecx
mov esi, dword [esp + eax*4 + 0xb0]
mov ebp, dword [esp + eax*4 + 0xc4]
mov eax, dword [esi + 0x38]
mov edi, ebp
movzx ebx, word [esi + 0x18]
sub edi, ecx
mov dword [esp + 0x58], eax
movzx eax, byte [esi + 9]
mov byte [esp + 0x64], al
lea eax, [edi + edi]
add eax, dword [esi + 0x40]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x30]
lea edx, [eax + ebx]
movzx eax, byte [esi + 0xc]
add edx, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x50], edx
cmp eax, ecx
jl 0x665e3461
lea eax, [esp + 0x140]
mov dword [esp + 0x38], eax
jmp 0x665e3025
mov edi, eax
lea eax, [eax - 1]
mov edx, dword [esp + edi*4 + 0xc0]
cmp dword [esp + edi*4 + 0xd4], edx
jge 0x665e33b8
lea eax, [esi + 1]
jmp 0x665e31f3
lea eax, [esp + 0x140]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
mov dword [esp], eax
mov dword [esp + 0x38], eax
sub ecx, edx
mov eax, esi
call fcn.665b1b10
mov edx, eax
cmp ebx, eax
jl 0x665e34c0
mov ecx, dword [esi + 0x40]
lea eax, [ebx + ebx]
mov dword [esp + 0x70], edx
mov dword [esp + 8], eax
lea eax, [edx + edx]
add eax, ecx
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memmove
mov edx, dword [esp + 0x70]
sub ebx, edx
jmp 0x665e3025
mov edi, dword [esp + 0x140]
mov dword [esp + 0x30], edi
jmp 0x665e33d5
mov dword [esp + 0x10], 0x6667e21c
mov dword [esp + 0xc], 0x119f3
mov dword [esp + 8], str.database_corruption
mov dword [esp + 4], str._s_at_line__d_of___.10s_
mov dword [esp], 0xb
call sym.libsqlite3_0.dll_sqlite3_log
mov eax, dword [esp + 0x20]
mov dword [esp + 0x80], 0xb
mov dword [esp + 0x48], eax
jmp 0x665e1d9d
test edi, edi
jg 0x665e2edd
jmp 0x665e2f23
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x50]
mov edx, ebp
mov dword [esp], eax
sub ecx, ebp
mov eax, esi
call fcn.665b1b10
sub ebx, eax
jmp 0x665e302f