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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14c
mov eax, dword [0x1011d004]
xor eax, esp
mov dword [esp + 0x148], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
push 0x40
push eax
mov dword [esp + 0x18], eax
mov edi, ecx
mov dword [esp + 0x1c], eax
xor ebx, ebx
mov dword [esp + 0x74], eax
mov dword [esp + 0x154], eax
mov byte [esp + 0x158], al
lea eax, [esp + 0x80]
push eax
mov dword [esp + 0x5c], edx
mov dword [esp + 0x44], edi
mov dword [esp + 0x74], esi
mov dword [esp + 0x24], ebx
call sub.VCRUNTIME140.dll_memset
mov eax, dword [edi + 0x34]
add esp, 0xc
mov dword [esp + 0x28], eax
test esi, esi
jne 0x10022016
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.10105304
mov esp, ebp
pop ebp
ret
movzx edx, word [edi + 0x18]
movzx ecx, byte [edi + 0xc]
lea esi, [ecx + edx]
cmp esi, 2
jae 0x1002202c
mov dword [esp + 0x44], ebx
jmp 0x1002205b
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x1002203a
mov dword [esp + 0x44], ebx
jmp 0x10022051
cmp eax, esi
jne 0x1002204c
mov eax, dword [ebp + 0x10]
add esi, 0xfffffffe
add esi, eax
mov dword [esp + 0x44], esi
jmp 0x10022054
dec eax
mov dword [esp + 0x44], eax
mov eax, dword [ebp + 0x10]
mov esi, 2
sub esi, eax
lea eax, [esi + 1]
mov dword [esp + 0x5c], esi
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x44]
sub eax, ecx
lea ecx, [eax + esi]
cmp ecx, edx
jne 0x1002207c
movzx ecx, byte [edi + 9]
add ecx, 8
jmp 0x10022090
mov eax, dword [edi + 0x40]
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [edi + 0x1a]
movzx ecx, cx
and ecx, eax
add ecx, dword [edi + 0x38]
xor eax, eax
mov dword [esp + 0x54], ecx
mov edi, dword [ecx]
bswap edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x4c], edi
test eax, eax
jne 0x1002216d
mov eax, dword [esp + 0x28]
cmp edi, dword [eax + 0x30]
jbe 0x100220de
push 0x10110a2c
push 0x108c2
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
jmp 0x10022165
mov eax, dword [eax]
lea ecx, [esp + 0x20]
push 0
push ecx
push edi
push eax
mov eax, dword [eax + 0xdc]
call eax
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10022169
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 8]
mov dword [esp + esi*4 + 0xb8], eax
cmp byte [eax], 0
jne 0x10022163
mov ecx, dword [edx + 8]
cmp edi, dword [ecx + 4]
je 0x1002213e
mov eax, dword [edx + 4]
cmp edi, 1
mov dword [ecx + 0x38], eax
mov eax, dword [esp + 0x28]
mov dword [ecx + 0x34], eax
setne al
dec al
mov dword [ecx + 0x48], edx
and al, 0x64
mov dword [ecx + 4], edi
mov byte [ecx + 9], al
mov eax, dword [esp + esi*4 + 0xb8]
mov ecx, eax
call fcn.1001bb90
mov dword [esp + 0x10], eax
test eax, eax
je 0x10022163
mov ecx, dword [esp + esi*4 + 0xb8]
test ecx, ecx
je 0x10022169
call fcn.1001bf90
mov eax, dword [esp + 0x10]
jmp 0x10022169
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
lea edi, [esi*4]
test eax, eax
jne 0x1002337a
mov ecx, dword [esp + edi + 0xb8]
cmp dword [ecx + 0x14], eax
jge 0x1002219d
call fcn.1001b950
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
test eax, eax
jne 0x100222e4
mov ecx, dword [esp + edi + 0xb8]
movzx ecx, word [ecx + 0x18]
add ecx, 4
add ebx, ecx
mov ecx, esi
dec esi
mov dword [esp + 0x30], ebx
test ecx, ecx
je 0x100222f0
mov edi, dword [esp + 0x38]
mov dl, byte [edi + 0xc]
test dl, dl
je 0x10022214
mov eax, dword [esp + 0x44]
movzx ecx, word [edi + 0x1c]
add eax, esi
cmp eax, ecx
jne 0x10022214
mov eax, dword [edi + 0x24]
push eax
mov dword [esp + esi*4 + 0x144], eax
mov edi, dword [eax]
mov eax, dword [esp + 0x3c]
bswap edi
push eax
mov dword [esp + 0x2c], edi
mov eax, dword [eax + 0x4c]
mov dword [esp + 0x54], edi
call eax
mov ecx, dword [esp + 0x40]
add esp, 8
movzx eax, ax
mov dword [esp + esi*4 + 0xd8], eax
mov eax, dword [esp + 0x10]
mov byte [ecx + 0xc], 0
jmp 0x100220a5
mov ecx, dword [esp + 0x44]
movzx eax, dl
sub ecx, eax
mov eax, dword [edi + 0x40]
add ecx, esi
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [edi + 0x1a]
movzx ebx, cx
and ebx, eax
add ebx, dword [edi + 0x38]
push ebx
mov dword [esp + esi*4 + 0x144], ebx
mov eax, dword [ebx]
bswap eax
mov dword [esp + 0x28], eax
mov edi, eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x3c]
push eax
mov eax, dword [eax + 0x4c]
call eax
movzx edx, ax
add esp, 8
mov eax, dword [esp + 0x28]
mov dword [esp + 0x34], edx
mov dword [esp + esi*4 + 0xd8], edx
test byte [eax + 0x18], 0xc
je 0x100222b3
mov eax, dword [esp + 0x38]
mov ecx, ebx
sub ecx, dword [eax + 0x38]
lea eax, [edx + ecx]
mov edx, dword [esp + 0x28]
cmp eax, dword [edx + 0x28]
mov edx, dword [esp + 0x34]
jg 0x100222b3
mov eax, dword [esp + 0x68]
push edx
add eax, ecx
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x44]
add esp, 0xc
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x34]
sub eax, dword [ecx + 0x38]
add eax, ebx
mov dword [esp + esi*4 + 0x140], eax
mov ebx, dword [esp + 0x38]
lea eax, [esp + 0x14]
push eax
push edx
mov edx, dword [esp + 0x4c]
mov ecx, ebx
movzx eax, byte [ebx + 0xc]
sub edx, eax
add edx, esi
call fcn.10020ec0
mov eax, dword [esp + 0x1c]
add esp, 8
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x10], eax
jmp 0x100220a5
lea eax, [esi*4]
jmp 0x1002337d
mov eax, dword [esp + 0x28]
lea esi, [ebx + 3]
and esi, 0xfffffffc
mov eax, dword [eax + 0x24]
lea ecx, [esi + esi*2]
lea eax, [eax + ecx*2]
cdq
push edx
push eax
call fcn.100049e0
add esp, 8
mov dword [esp + 0x80], eax
test eax, eax
jne 0x10022326
mov dword [esp + 0x10], 7
jmp 0x100233f3
mov ecx, dword [esp + 0xb8]
lea eax, [eax + esi*4]
mov dword [esp + 0x84], eax
lea eax, [eax + esi*2]
mov dword [esp + 0x20], eax
mov dword [esp + 0x7c], ecx
movzx eax, byte [ecx + 8]
shl ax, 2
movzx eax, ax
mov dword [esp + 0x60], eax
mov al, byte [ecx + 2]
mov byte [esp + 0xf], al
movzx eax, al
mov dword [esp + 0x70], eax
xor eax, eax
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x3c], eax
jle 0x10022588
xor ebx, ebx
shl eax, 2
mov dword [esp + 0x30], eax
mov edi, dword [esp + eax + 0xb8]
mov dword [esp + 0x48], edi
movzx eax, word [edi + 0x18]
mov edx, dword [edi + 0x38]
movzx esi, word [edi + 0x12]
mov dword [esp + 0x34], eax
add esi, edx
movzx eax, word [edi + 0x1a]
mov ecx, eax
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x40], esi
mov ecx, dword [eax + 0x38]
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x10022709
movzx eax, byte [edi + 0xc]
add eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x84]
add eax, eax
push eax
mov eax, dword [esp + 0x7c]
push 0
lea eax, [ecx + eax*2]
push eax
call sub.VCRUNTIME140.dll_memset
mov al, byte [edi + 0xc]
add esp, 0xc
test al, al
je 0x10022476
movzx edx, word [edi + 0x1c]
cmp dword [esp + 0x34], edx
jb 0x100226de
test edx, edx
je 0x1002243c
mov edi, dword [esp + 0x78]
mov ax, word [esi]
add esi, 2
mov ch, al
mov cl, ah
mov eax, dword [esp + 0x64]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0x80]
add ecx, dword [esp + 0x2c]
mov dword [eax + edi*4], ecx
inc edi
sub edx, 1
jne 0x10022403
mov dword [esp + 0x78], edi
mov edi, dword [esp + 0x48]
mov dword [esp + 0x40], esi
mov al, byte [edi + 0xc]
xor edx, edx
test al, al
je 0x10022476
mov esi, dword [esp + 0x78]
lea ecx, [edi + 0x24]
nop dword [eax]
mov edi, dword [esp + 0x80]
lea ecx, [ecx + 4]
mov eax, dword [ecx - 4]
inc edx
mov dword [edi + esi*4], eax
inc esi
mov edi, dword [esp + 0x48]
movzx eax, byte [edi + 0xc]
cmp edx, eax
jl 0x10022450
mov dword [esp + 0x78], esi
mov esi, dword [esp + 0x40]
movzx eax, word [edi + 0x12]
add eax, dword [esp + 0x2c]
movzx ecx, word [edi + 0x18]
mov edx, dword [esp + 0x78]
lea eax, [eax + ecx*2]
mov dword [esp + 0x64], eax
cmp esi, eax
jae 0x100224c4
mov edi, eax
mov ax, word [esi]
add esi, 2
mov ch, al
mov cl, ah
mov eax, dword [esp + 0x58]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0x80]
add ecx, dword [esp + 0x2c]
mov dword [eax + edx*4], ecx
inc edx
cmp esi, edi
jb 0x10022493
mov edi, dword [esp + 0x48]
mov dword [esp + 0x78], edx
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
mov dword [esp + ecx + 0x114], edx
cmp eax, dword [esp + 0x5c]
jge 0x10022579
cmp byte [esp + 0xf], 0
jne 0x10022579
movzx eax, word [esp + ecx + 0xd8]
mov ecx, dword [esp + 0x84]
mov esi, dword [esp + 0x20]
push eax
add esi, ebx
add ebx, eax
mov word [ecx + edx*2], ax
mov eax, dword [esp + 0x34]
push dword [esp + eax + 0x144]
push esi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x6c]
add esp, 0xc
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x84]
movzx eax, ax
add eax, esi
mov esi, dword [esp + 0x80]
mov dword [esi + edx*4], eax
mov eax, dword [esp + 0x60]
sub word [ecx + edx*2], ax
cmp byte [edi + 8], 0
jne 0x10022551
mov eax, dword [edi + 0x38]
mov ecx, dword [esi + edx*4]
mov eax, dword [eax + 8]
mov dword [ecx], eax
jmp 0x10022570
cmp word [ecx + edx*2], 4
jae 0x10022570
mov eax, dword [esp + 0x20]
nop dword [eax]
mov byte [eax + ebx], 0
inc ebx
inc word [ecx + edx*2]
cmp word [ecx + edx*2], 4
jb 0x10022560
mov eax, dword [esp + 0x1c]
inc edx
mov dword [esp + 0x78], edx
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x3c]
jl 0x10022371
mov eax, dword [esp + 0x60]
xor ebx, ebx
movzx edi, ax
xor edx, edx
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], edx
mov eax, dword [eax + 0x28]
add eax, 0xfffffff4
add edi, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x48], edi
test eax, eax
jle 0x1002269a
nop word [eax + eax]
mov esi, dword [esp + edx*4 + 0xb8]
mov ecx, dword [esp + edx*4 + 0x114]
mov dword [esp + 0x58], ecx
mov eax, dword [esi + 0x3c]
mov dword [esp + ebx*4 + 0x88], eax
mov dword [esp + ebx*4 + 0xa0], ecx
test ebx, ebx
je 0x100225f5
cmp ecx, dword [esp + ebx*4 + 0x9c]
jne 0x100225f5
dec ebx
mov dword [esp + 0x1c], ebx
cmp byte [esp + 0xf], 0
jne 0x10022619
mov eax, dword [esp + 0x38]
inc ebx
mov dword [esp + 0x1c], ebx
mov eax, dword [eax + 0x3c]
mov dword [esp + ebx*4 + 0x88], eax
lea eax, [ecx + 1]
mov dword [esp + ebx*4 + 0xa0], eax
sub edi, dword [esi + 0x14]
lea eax, [esp + 0xd8]
cmp byte [esi + 0xc], 0
lea eax, [eax + edx*4]
mov dword [esp + 0x5c], eax
mov dword [eax], edi
mov dword [esp + 0x20], 0
jbe 0x10022679
lea ebx, [esi + 0x24]
nop dword [eax]
push dword [ebx]
mov eax, dword [esi + 0x4c]
push esi
call eax
mov ecx, dword [esp + 0x28]
lea ebx, [ebx + 4]
movzx eax, ax
inc ecx
add eax, 2
mov dword [esp + 0x28], ecx
add edi, eax
add esp, 8
movzx eax, byte [esi + 0xc]
cmp ecx, eax
jl 0x10022640
mov eax, dword [esp + 0x5c]
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x30]
mov dword [eax], edi
mov eax, dword [esp + 0x3c]
inc ebx
mov edi, dword [esp + 0x48]
mov dword [esp + edx*4 + 0xec], ecx
inc edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x1c], ebx
cmp edx, eax
jl 0x100225c0
mov ebx, dword [esp + 0x78]
mov esi, eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x34], 0
test eax, eax
jle 0x100228d0
mov edx, 1
xor ecx, ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], ecx
lea eax, [esp + 0xd8]
add eax, ecx
mov dword [esp + 0x5c], eax
mov edi, dword [eax]
cmp edi, dword [esp + 0x48]
jle 0x10022806
jmp 0x1002273d
push 0x10110a2c
push 0x11efd
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10023390
push 0x10110a2c
push 0x11ee5
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10023390
lea eax, [esp + 0xd8]
add eax, ecx
cmp edx, esi
jl 0x10022769
inc edx
mov dword [esp + 0x40], edx
cmp edx, 5
jg 0x10022983
mov ebx, dword [esp + 0x78]
mov dword [esp + ecx + 0xdc], 0
mov edi, dword [eax]
mov dword [esp + ecx + 0xf0], ebx
jmp 0x1002276d
mov ebx, dword [esp + 0x78]
mov esi, dword [esp + ecx + 0xec]
mov edx, dword [esp + 0x84]
lea ecx, [esi - 1]
mov dword [esp + 0x58], ecx
movzx eax, word [edx + ecx*2]
test ax, ax
jne 0x100227a0
mov edx, ecx
lea ecx, [esp + 0x78]
call fcn.10021260
mov edx, dword [esp + 0x84]
movzx eax, ax
mov ecx, dword [esp + 0x5c]
movzx eax, ax
add eax, 2
sub edi, eax
cmp byte [esp + 0xf], 0
mov dword [ecx], edi
jne 0x100227da
cmp esi, ebx
jge 0x100227d8
movzx eax, word [edx + esi*2]
test ax, ax
jne 0x100227d0
mov edx, esi
lea ecx, [esp + 0x78]
call fcn.10021260
movzx eax, ax
movzx eax, ax
add eax, 2
jmp 0x100227da
xor eax, eax
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x40]
add dword [esp + ecx + 0xdc], eax
mov eax, dword [esp + 0x58]
mov dword [esp + ecx + 0xec], eax
cmp edi, dword [esp + 0x48]
jg 0x10022734
mov ebx, dword [esp + 0x78]
mov esi, dword [esp + ecx + 0xec]
cmp esi, ebx
jge 0x100228ad
mov edx, dword [esp + 0x84]
nop dword [eax]
movzx eax, word [edx + esi*2]
test ax, ax
jne 0x10022842
mov edx, esi
lea ecx, [esp + 0x78]
call fcn.10021260
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x84]
movzx eax, ax
movzx eax, ax
add eax, 2
add edi, eax
cmp edi, dword [esp + 0x48]
jg 0x10022958
inc esi
mov dword [esp + ecx + 0xd8], edi
cmp byte [esp + 0xf], 0
mov dword [esp + ecx + 0xec], esi
jne 0x1002289a
cmp esi, ebx
jge 0x10022898
movzx eax, word [edx + esi*2]
test ax, ax
jne 0x1002288c
mov edx, esi
lea ecx, [esp + 0x78]
call fcn.10021260
mov edx, dword [esp + 0x84]
movzx eax, ax
mov ecx, dword [esp + 0x2c]
movzx eax, ax
add eax, 2
jmp 0x1002289a
xor eax, eax
sub dword [esp + ecx + 0xdc], eax
cmp esi, ebx
jl 0x10022820
mov edx, dword [esp + 0x1c]
mov esi, edx
mov dword [esp + 0x40], esi
mov eax, dword [esp + 0x34]
add ecx, 4
inc eax
mov dword [esp + 0x2c], ecx
inc edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], edx
cmp eax, esi
jl 0x100226c3
lea eax, [esi - 1]
mov ecx, eax
mov dword [esp + 0x1c], eax
test ecx, ecx
jle 0x10022ad7
shl ecx, 2
lea eax, [esp + 0xd8]
add eax, ecx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x74], eax
mov edi, dword [eax]
lea eax, [esp + ecx + 0xd4]
mov dword [esp + 0x140], eax
mov eax, dword [eax]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0xec]
sub eax, 4
mov dword [esp + 0x30], eax
mov eax, dword [eax + ecx]
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x20], eax
lea esi, [eax - 1]
mov edx, esi
sub edx, dword [esp + 0x70]
inc edx
cmp word [ecx + edx*2], 0
lea eax, [ecx + edx*2]
mov dword [esp + 0x34], eax
jne 0x1002294f
lea ecx, [esp + 0x78]
call fcn.10021260
mov ecx, dword [esp + 0x84]
mov ebx, dword [esp + 0x34]
jmp 0x100229e7
cmp esi, ebx
jge 0x100228a9
cmp dword [esp + 0x34], 0
jle 0x10022970
mov eax, dword [esp + ecx + 0xe8]
jmp 0x10022972
xor eax, eax
cmp esi, eax
jle 0x100229ae
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x40]
jmp 0x100228b3
push 0x10110a2c
push 0x11f62
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10023390
push 0x10110a2c
push 0x11f83
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10023390
mov ecx, dword [esp + 0x84]
cmp word [ecx + esi*2], 0
mov dword [esp + 0x64], esi
mov dword [esp + 0x58], esi
jne 0x10022a01
mov edx, esi
lea ecx, [esp + 0x78]
call fcn.10021260
test edi, edi
je 0x10022a4e
cmp dword [ebp + 0x10], 0
mov eax, dword [esp + 0x20]
mov edx, eax
jne 0x10022a93
mov ecx, dword [esp + 0x40]
mov eax, 2
mov ebx, dword [esp + 0x34]
dec ecx
cmp dword [esp + 0x1c], ecx
mov ecx, 0
cmove eax, ecx
mov ecx, dword [esp + 0x2c]
sub ecx, eax
mov eax, dword [esp + 0x84]
movzx eax, word [eax + esi*2]
sub ecx, eax
movzx eax, word [ebx]
add eax, 2
add eax, edi
cmp eax, ecx
jg 0x10022a93
movzx eax, word [ebx]
mov ecx, 0xfffffffe
mov edx, dword [esp + 0x64]
add eax, 2
add edi, eax
sub ebx, 2
mov eax, dword [esp + 0x84]
mov dword [esp + 0x34], ebx
movzx eax, word [eax + esi*2]
sub ecx, eax
mov eax, dword [esp + 0x5c]
add dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax], esi
sub esi, 1
mov eax, dword [esp + 0x58]
mov dword [esp + 0x20], eax
jns 0x100229e0
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x140]
mov ebx, dword [esp + 0x78]
mov dword [eax], edi
mov eax, dword [esp + 0x2c]
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
cmp ecx, 1
jbe 0x10022ac4
mov esi, dword [esp + 0x30]
lea eax, [ecx*4]
mov eax, dword [esi + eax - 4]
jmp 0x10022ac6
xor eax, eax
cmp edx, eax
jle 0x10022b48
dec ecx
mov dword [esp + 0x1c], ecx
test ecx, ecx
jg 0x100228e1
mov eax, dword [esp + 0xb8]
xor esi, esi
mov eax, dword [eax + 0x38]
movzx eax, byte [eax]
mov dword [esp + 0x30], eax
lea eax, [esi + 1]
cmp dword [esp + 0x40], esi
jle 0x10022caf
nop word [eax + eax]
cmp esi, dword [esp + 0x3c]
jge 0x10022bda
mov edi, dword [esp + esi*4 + 0xb8]
mov dword [esp + esi*4 + 0xc4], edi
mov dword [esp + esi*4 + 0xb8], 0
mov dword [esp + 0x20], edi
mov ecx, dword [edi + 0x48]
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x10022b77
mov eax, dword [edx + 0x1c]
cmp eax, dword [ecx + 0x18]
jb 0x10022b77
cmp dword [edx + 0x68], 0
je 0x10022b73
call fcn.10014590
jmp 0x10022ba0
push 0x10110a2c
push 0x11fad
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10023390
xor edx, edx
jmp 0x10022ba2
mov eax, dword [edx + 0x2c]
mov dword [esp + 0x10], eax
test eax, eax
je 0x10022b86
mov edx, eax
jmp 0x10022ba6
mov eax, dword [edx + 0x9c]
cmp eax, dword [edx + 0xa8]
jbe 0x10022b9b
call fcn.10015ed0
jmp 0x10022ba0
call fcn.10015c60
mov edx, eax
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x50]
xor ecx, ecx
sub eax, dword [esp + 0x44]
inc dword [esp + 0x18]
cmp esi, eax
mov eax, dword [edi + 0x48]
sete cl
mov dword [esp + 0x14], edx
inc ecx
movsx eax, word [eax + 0x1e]
cmp eax, ecx
jne 0x10022c7c
test edx, edx
jne 0x10023390
jmp 0x10022c6b
cmp dword [ebp + 0x10], 0
lea edx, [esp + 0x20]
mov ecx, dword [esp + 0x24]
cmovne ecx, eax
lea eax, [esp + 0x4c]
push 0
push ecx
mov ecx, dword [esp + 0x30]
push eax
call fcn.10020050
mov edx, eax
add esp, 0xc
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
test edx, edx
jne 0x10023390
mov edi, dword [esp + 0x20]
mov ecx, edi
mov edx, dword [esp + 0x30]
call fcn.1001bcb0
mov ecx, dword [esp + 0x28]
inc dword [esp + 0x18]
mov dword [esp + esi*4 + 0xc4], edi
mov dword [esp + esi*4 + 0x114], ebx
cmp byte [ecx + 0x11], 0
je 0x10022c63
mov edx, dword [edi + 4]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x3c]
push dword [eax + 4]
push 5
call fcn.1001a970
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10023390
mov edi, dword [esp + 0x4c]
mov dword [esp + 0x24], edi
inc esi
cmp esi, dword [esp + 0x40]
jge 0x10022caf
mov eax, 1
jmp 0x10022b00
test edx, edx
jne 0x10023390
push 0x10110a2c
push 0x11fce
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10023390
mov ebx, dword [esp + 0x18]
xor ecx, ecx
test ebx, ebx
jle 0x10022dbb
nop dword [eax]
mov eax, dword [esp + ecx*4 + 0xc4]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x48]
mov dword [esp + ecx*4 + 0x128], edx
mov dword [esp + ecx*4 + 0x100], edx
mov ax, word [eax + 0x1c]
mov word [esp + ecx*2 + 0x140], ax
xor eax, eax
test ecx, ecx
jle 0x10022d02
nop dword [eax]
cmp dword [esp + eax*4 + 0x128], edx
je 0x10022e82
inc eax
cmp eax, ecx
jl 0x10022cf0
inc ecx
cmp ecx, ebx
jl 0x10022cc0
mov eax, dword [esp + 0x18]
xor ebx, ebx
mov dword [esp + 0x50], ebx
xor esi, esi
lea ecx, [esi + 1]
cmp eax, ecx
jle 0x10022d48
mov ebx, dword [esp + 0x18]
xor edi, edi
lea edx, [ecx*4]
mov eax, dword [esp + edx + 0x100]
cmp eax, dword [esp + edi + 0x100]
jae 0x10022d3b
mov esi, ecx
mov edi, edx
inc ecx
cmp ecx, ebx
jl 0x10022d20
mov ebx, dword [esp + 0x50]
mov eax, dword [esp + 0x18]
mov edi, dword [esp + esi*4 + 0x100]
mov dword [esp + esi*4 + 0x100], 0xffffffff
cmp esi, ebx
je 0x10022daa
jle 0x10022d7f
mov eax, dword [esp + 0x28]
mov edx, dword [eax + 0x30]
mov eax, dword [esp + esi*4 + 0xc4]
inc edx
add edx, esi
mov ecx, dword [eax + 0x48]
xor eax, eax
mov word [ecx + 0x1c], ax
call fcn.1000ff60
mov eax, dword [esp + ebx*4 + 0xc4]
mov edx, edi
mov ecx, dword [eax + 0x48]
mov ax, word [esp + esi*2 + 0x140]
mov word [ecx + 0x1c], ax
call fcn.1000ff60
mov eax, dword [esp + ebx*4 + 0xc4]
mov dword [eax + 4], edi
mov eax, dword [esp + 0x18]
inc ebx
mov dword [esp + 0x50], ebx
cmp ebx, eax
jl 0x10022d11
mov ebx, dword [esp + 0x18]
test byte [esp + 0x30], 8
mov eax, dword [esp + ebx*4 + 0xc0]
mov ecx, dword [esp + 0x54]
mov eax, dword [eax + 4]
bswap eax
mov dword [ecx], eax
jne 0x10022e04
mov ecx, dword [esp + 0x3c]
cmp ecx, ebx
je 0x10022e04
lea edx, [esp + 0xb8]
lea eax, [esp + 0xc4]
cmovge eax, edx
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [eax + 0x38]
mov eax, dword [esp + ebx*4 + 0xc0]
mov ecx, dword [eax + 0x38]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x28]
cmp byte [eax + 0x11], 0
je 0x10022fc8
mov esi, dword [esp + 0xc4]
xor edx, edx
xor edi, edi
mov dword [esp + 0x54], 0
mov dword [esp + 0x4c], edx
movzx eax, byte [esi + 0xc]
movzx ebx, word [esi + 0x18]
add ebx, eax
mov eax, dword [esp + 0x78]
test eax, eax
jle 0x10022fd1
mov dword [esp + 0x50], edx
mov dword [esp + 0x24], esi
nop word [eax + eax]
mov ecx, dword [esp + 0x80]
mov ecx, dword [ecx + edx*4]
mov dword [esp + 0x20], ecx
cmp edx, ebx
jne 0x10022ecf
xor eax, eax
cmp byte [esp + 0xf], al
sete al
mov dword [esp + 0x140], eax
inc edi
cmp edi, dword [esp + 0x18]
jge 0x10022ead
mov esi, dword [esp + edi*4 + 0xc4]
jmp 0x10022eb4
push 0x10110a2c
push 0x11ffc
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10023390
mov esi, dword [esp + edi*4 + 0xb8]
movzx eax, word [esi + 0x18]
add eax, dword [esp + 0x140]
movzx ecx, byte [esi + 0xc]
add ecx, eax
add ebx, ecx
cmp edx, ebx
je 0x10022e72
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x50]
cmp edx, dword [esp + ecx + 0xec]
mov ecx, dword [esp + 0x20]
jne 0x10022f0a
mov edx, dword [esp + 0x54]
inc edx
mov dword [esp + 0x54], edx
shl edx, 2
cmp byte [esp + 0xf], 0
mov dword [esp + 0x50], edx
mov edx, dword [esp + edx + 0xc4]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x4c]
je 0x10022fb7
cmp edi, dword [esp + 0x18]
jge 0x10022f2e
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 4]
cmp eax, dword [esp + edi*4 + 0x128]
jne 0x10022f2e
cmp ecx, dword [esi + 0x38]
jb 0x10022f2e
cmp ecx, dword [esi + 0x3c]
jb 0x10022fb3
cmp word [esp + 0x60], 0
jne 0x10022f60
mov edx, dword [ecx]
lea eax, [esp + 0x14]
mov ecx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
bswap edx
push dword [eax + 4]
push 5
call fcn.1001a970
mov eax, dword [esp + 0x20]
add esp, 0xc
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x84]
movzx eax, word [eax + edx*2]
test ax, ax
jne 0x10022f7c
lea ecx, [esp + 0x78]
call fcn.10021260
movzx eax, ax
mov ecx, dword [esp + 0x24]
cmp ax, word [ecx + 0x10]
jbe 0x10022fa3
lea eax, [esp + 0x14]
mov edx, esi
push eax
push dword [esp + 0x24]
call fcn.1001aeb0
mov edx, dword [esp + 0x1c]
add esp, 8
mov dword [esp + 0x10], edx
jmp 0x10022fa7
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x10023390
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x78]
inc edx
mov dword [esp + 0x4c], edx
cmp edx, eax
jl 0x10022e50
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0xc4]
jmp 0x10022fd5
mov ebx, dword [esp + 0x18]
lea eax, [ebx - 1]
xor edi, edi
test eax, eax
jle 0x1002316e
mov eax, dword [esp + edi*4 + 0xc4]
mov ecx, dword [esp + 0x80]
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x24], eax
mov eax, dword [esp + edi*4 + 0xec]
mov esi, dword [ecx + eax*4]
lea ecx, [ecx + eax*4]
mov dword [esp + 0x140], ecx
mov ecx, dword [esp + 0x84]
movzx edx, bx
mov ebx, dword [esp + 0x6c]
add ebx, dword [esp + 0x68]
movzx eax, word [ecx + eax*2]
mov ecx, dword [esp + 0x24]
add edx, eax
cmp byte [ecx + 8], 0
mov ecx, dword [esp + 0x140]
jne 0x10023046
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x38]
mov eax, dword [esi]
mov dword [ecx + 8], eax
jmp 0x100230ee
cmp byte [esp + 0xf], 0
je 0x100230d5
lea eax, [esp + 0x128]
push eax
mov eax, dword [esp + 0x28]
push dword [ecx - 4]
push eax
mov eax, dword [eax + 0x50]
call eax
mov edx, dword [esp + 0x138]
add esp, 0xc
mov ecx, dword [esp + 0x128]
mov esi, ebx
test edx, edx
ja 0x100230c1
jb 0x10023084
cmp ecx, 0x7f
ja 0x10023096
mov eax, 1
and cl, 0x7f
mov byte [ebx + 4], cl
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x100230ee
test edx, edx
ja 0x100230c1
jb 0x100230a4
cmp ecx, 0x3fff
ja 0x100230c1
mov eax, ecx
and cl, 0x7f
shrd eax, edx, 7
mov byte [ebx + 5], cl
or al, 0x80
mov byte [ebx + 4], al
mov eax, 2
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x100230ee
push edx
push ecx
lea ecx, [ebx + 4]
call fcn.10009990
add esp, 8
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x100230ee
sub esi, 4
cmp eax, 4
jne 0x100230ee
mov eax, dword [esp + 0x38]
push esi
push eax
mov eax, dword [eax + 0x4c]
call eax
add esp, 8
movzx edx, ax
add dword [esp + 0x6c], edx
xor eax, eax
cmp dword [esp + 0xa0], edi
jg 0x1002310f
nop dword [eax]
cmp eax, 6
jge 0x1002310f
inc eax
cmp dword [esp + eax*4 + 0xa0], edi
jle 0x10023100
mov ecx, dword [esp + eax*4 + 0x88]
cmp ecx, esi
jb 0x10023125
lea eax, [edx + esi]
cmp ecx, eax
jb 0x100231c5
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 4]
push ebx
push edx
mov edx, dword [esp + 0x54]
push esi
lea edx, [edx + edi]
call fcn.10020fe0
mov eax, dword [esp + 0x28]
add esp, 0x14
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10023390
mov ebx, dword [esp + 0x18]
inc edi
lea eax, [ebx - 1]
cmp edi, eax
jl 0x10022fe2
mov esi, dword [esp + 0xc4]
mov edi, 1
sub edi, ebx
mov dword [esp + 0x54], edi
cmp edi, ebx
jge 0x10023286
mov eax, edi
lea ebx, [esp + 0x14c]
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
add ebx, ecx
cmp byte [ebx], 0
jne 0x1002326e
test edi, edi
jns 0x100231b4
mov eax, dword [esp + ecx*4 + 0x110]
cmp eax, dword [esp + ecx*4 + 0xe8]
jl 0x1002326e
test ecx, ecx
jne 0x100231f0
mov esi, dword [esp + 0xec]
xor edx, edx
xor eax, eax
jmp 0x10023225
push 0x10110a2c
push 0x12099
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.sqlite3.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10023390
cmp ecx, dword [esp + 0x3c]
jge 0x10023208
xor edx, edx
cmp byte [esp + 0xf], dl
sete dl
add edx, dword [esp + ecx*4 + 0x110]
jmp 0x1002320c
mov edx, dword [esp + 0x78]
mov esi, dword [esp + ecx*4 + 0xec]
xor eax, eax
cmp byte [esp + 0xf], al
sete al
add eax, dword [esp + ecx*4 + 0xe8]
sub esi, eax
lea edi, [ecx*4]
lea ecx, [esp + 0x78]
push ecx
mov ecx, dword [esp + edi + 0xc8]
push esi
push eax
call fcn.100219e0
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10023390
mov eax, dword [esp + edi + 0xc4]
mov ecx, dword [esp + 0x48]
sub ecx, dword [esp + edi + 0xd8]
mov edi, dword [esp + 0x54]
mov byte [ebx], 1
mov dword [eax + 0x14], ecx
mov ebx, dword [esp + 0x18]
inc edi
mov dword [esp + 0x54], edi
cmp edi, ebx
jl 0x10023181
mov esi, dword [esp + 0xc4]
cmp dword [ebp + 0xc], 0
je 0x100232ef
mov edi, dword [esp + 0x38]
cmp word [edi + 0x18], 0
jne 0x100232ef
movzx eax, byte [edi + 9]
cmp eax, dword [esi + 0x14]
jg 0x100232ef
or edx, 0xffffffff
mov ecx, esi
call fcn.1001b060
mov ecx, dword [esp + 0xc4]
mov edx, edi
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
call fcn.10021ec0
mov edx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x10], edx
test edx, edx
jne 0x10023348
mov ecx, dword [esp + 0xc4]
mov edx, ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x34]
call fcn.10020650
mov edx, eax
add esp, 4
mov dword [esp + 0x10], edx
jmp 0x10023348
mov ecx, dword [esp + 0x28]
cmp byte [ecx + 0x11], 0
je 0x10023344
cmp word [esp + 0x60], 0
jne 0x10023344
xor esi, esi
test ebx, ebx
jle 0x10023344
nop word [eax + eax]
mov eax, dword [esp + esi*4 + 0xc4]
lea edx, [esp + 0x14]
push edx
push dword [eax + 4]
mov eax, dword [eax + 0x38]
push 5
mov edx, dword [eax + 8]
bswap edx
call fcn.1001a970
mov ecx, dword [esp + 0x34]
inc esi
add esp, 0xc
cmp esi, ebx
jl 0x10023310
mov edx, dword [esp + 0x14]
mov dword [esp + 0x10], edx
jmp 0x10023348
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x3c]
mov esi, ebx
cmp ebx, edi
jge 0x10023390
mov ecx, dword [esp + esi*4 + 0xb8]
test edx, edx
jne 0x1002336f
push dword [ecx + 4]
mov edx, ecx
mov ecx, dword [ecx + 0x34]
call fcn.10020650
add esp, 4
mov edx, eax
inc esi
cmp esi, edi
jl 0x10023352
mov dword [esp + 0x10], edx
jmp 0x10023390
lea eax, [edi + 4]
push eax
lea eax, [esp + 0xbc]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ebx, dword [esp + 0x80]
test ebx, ebx
je 0x100233f3
cmp dword [0x1011d0f8], 0
je 0x100233e9
mov eax, dword [0x1011f3e8]
test eax, eax
je 0x100233b7
push eax
call dword [0x1011d148]
add esp, 4
push ebx
call dword [0x1011d124]
sub dword [0x1011f200], eax
add esp, 4
dec dword [0x1011f224]
push ebx
call dword [0x1011d11c]
mov eax, dword [0x1011f3e8]
add esp, 4
test eax, eax
je 0x100233f3
push eax
call dword [0x1011d150]
jmp 0x100233f0
push ebx
call dword [0x1011d11c]
add esp, 4
xor ebx, ebx
cmp dword [esp + 0x3c], ebx
jle 0x10023467
nop dword [eax + eax]
mov edx, dword [esp + ebx*4 + 0xb8]
test edx, edx
je 0x10023460
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x10023459
mov ecx, dword [edx + 0x14]
dec dword [ecx + 0x80]
mov eax, dword [ecx + 0x90]
mov dword [edx + 0x10], eax
mov esi, dword [ecx + 0x40]
mov dword [ecx + 0x90], edx
push dword [edx + 4]
mov eax, dword [edx + 0x18]
push dword [ecx + 0xac]
mov edi, dword [esi]
dec eax
push dword [ecx + 0xa8]
push 0
push eax
call fcn.101062f0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x10023460
mov ecx, edx
call fcn.1000fd00
inc ebx
cmp ebx, dword [esp + 0x3c]
jl 0x10023400
xor ebx, ebx
cmp dword [esp + 0x18], ebx
jle 0x100234d7
nop
mov edx, dword [esp + ebx*4 + 0xc4]
test edx, edx
je 0x100234d0
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x100234c9
mov ecx, dword [edx + 0x14]
dec dword [ecx + 0x80]
mov eax, dword [ecx + 0x90]
mov dword [edx + 0x10], eax
mov esi, dword [ecx + 0x40]
mov dword [ecx + 0x90], edx
push dword [edx + 4]
mov eax, dword [edx + 0x18]
push dword [ecx + 0xac]
mov edi, dword [esi]
dec eax
push dword [ecx + 0xa8]
push 0
push eax
call fcn.101062f0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x100234d0
mov ecx, edx
call fcn.1000fd00
inc ebx
cmp ebx, dword [esp + 0x18]
jl 0x10023470
mov ecx, dword [esp + 0x154]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10105304
mov esp, ebp
pop ebp
ret