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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14c
mov eax, dword [0x102d2008]
xor eax, esp
mov dword [esp + 0x148], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, ecx
push esi
push edi
xor edi, edi
mov dword [esp + 0x20], eax
mov ecx, dword [eax + 0x34]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x14], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x14c], edi
mov byte [esp + 0x150], 0
mov dword [esp + 0xd0], edi
mov dword [esp + 0xd8], edi
mov dword [esp + 0x38], ecx
test ebx, ebx
jne 0x1007fa6c
lea eax, [ebx + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.1010eeaf
mov esp, ebp
pop ebp
ret
movzx ebx, word [eax + 0x18]
movzx ecx, byte [eax + 0xc]
lea esi, [ecx + ebx]
cmp esi, 2
jae 0x1007fa80
xor edx, edx
jmp 0x1007fa9d
test edx, edx
je 0x1007fa93
cmp edx, esi
jne 0x1007fa92
mov eax, dword [ebp + 0x10]
lea edx, [eax - 2]
add edx, esi
jmp 0x1007fa96
dec edx
mov eax, dword [ebp + 0x10]
mov esi, 2
sub esi, eax
lea eax, [esi + 1]
mov dword [esp + 0x50], edx
mov dword [esp + 0x3c], eax
mov eax, edx
sub eax, ecx
mov dword [esp + 0x58], esi
lea ecx, [eax + esi]
cmp ecx, ebx
jne 0x1007fac9
mov eax, dword [esp + 0x20]
movzx ecx, byte [eax + 9]
mov eax, dword [eax + 0x38]
add ecx, 8
add ecx, eax
jmp 0x1007fae4
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x40]
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [edx + 0x1a]
movzx ecx, cx
and ecx, eax
add ecx, dword [edx + 0x38]
mov edx, dword [ecx]
lea ebx, [esp + 0x12c]
push 0
bswap edx
mov dword [esp + 0x50], ecx
lea ebx, [ebx + esi*4]
mov ecx, dword [esp + 0x3c]
push 0
push ebx
mov dword [esp + 0x68], edx
mov dword [esp + 0x40], edx
call fcn.10079a20
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
test eax, eax
jne 0x1007fcad
nop
mov ecx, dword [ebx]
mov edx, esi
mov dword [esp + 0x48], edx
cmp dword [ecx + 0x14], 0
jge 0x1007fb45
call fcn.10079510
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
test eax, eax
jne 0x1007fd3e
mov edx, esi
mov eax, esi
dec esi
test eax, eax
je 0x1007fd78
mov eax, dword [esp + 0x20]
mov bl, byte [eax + 0xc]
test bl, bl
je 0x1007fba5
movzx ecx, word [eax + 0x1c]
mov eax, dword [esp + 0x50]
add eax, esi
cmp eax, ecx
jne 0x1007fba5
mov edx, dword [esp + 0x20]
lea ebx, [esi*4]
mov eax, dword [edx + 0x24]
push eax
mov dword [esp + ebx + 0x64], eax
push edx
mov ecx, dword [eax]
mov eax, dword [edx + 0x4c]
bswap ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x3c], ecx
call eax
movzx eax, ax
mov dword [esp + ebx + 0x84], eax
mov eax, dword [esp + 0x28]
mov byte [eax + 0xc], 0
jmp 0x1007fc7c
movzx eax, bl
mov ecx, edx
mov ebx, dword [esp + 0x20]
sub ecx, eax
add ecx, dword [esp + 0x50]
mov eax, dword [ebx + 0x40]
mov ax, word [eax + ecx*2 - 2]
mov ch, al
mov cl, ah
movzx eax, word [ebx + 0x1a]
movzx ecx, cx
and ecx, eax
mov eax, dword [ebx + 0x38]
add eax, ecx
lea ebx, [edx*4 - 4]
push eax
mov dword [esp + 0x20], eax
mov dword [esp + ebx + 0x64], eax
mov ecx, dword [eax]
mov eax, dword [esp + 0x24]
bswap ecx
push eax
mov dword [esp + 0x64], ecx
mov eax, dword [eax + 0x4c]
mov dword [esp + 0x3c], ecx
call eax
mov ecx, dword [esp + 0x40]
add esp, 8
movzx eax, ax
mov dword [esp + 0x24], eax
mov dword [esp + ebx + 0x7c], eax
test byte [ecx + 0x18], 0xc
je 0x1007fc58
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, ecx
sub edx, dword [edi + 0x38]
mov edi, dword [esp + 0x38]
add eax, edx
cmp eax, dword [edi + 0x28]
mov edi, 0
jg 0x1007fd4a
push dword [esp + 0x24]
mov eax, dword [esp + 0x70]
push ecx
add eax, edx
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x2c]
add esp, 0xc
mov eax, dword [esp + 0x6c]
sub eax, dword [ecx + 0x38]
add eax, dword [esp + 0x1c]
mov dword [esp + ebx + 0x60], eax
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x50]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x4c]
dec edx
push eax
mov eax, dword [esp + 0x28]
movzx eax, byte [eax + 0xc]
sub ecx, eax
add edx, ecx
mov ecx, dword [esp + 0x28]
call fcn.1007ec10
mov edx, dword [esp + 0x64]
lea eax, [esp + 0x134]
mov ecx, dword [esp + 0x40]
add esp, 8
add ebx, eax
push 0
push 0
push ebx
call fcn.10079a20
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
test eax, eax
je 0x1007fb20
lea eax, [esi*4 + 4]
push eax
lea eax, [esp + 0x130]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor ebx, ebx
cmp dword [esp + 0x3c], ebx
jle 0x10080db3
nop dword [eax]
nop word [eax + eax]
mov edx, dword [esp + ebx*4 + 0x12c]
test edx, edx
je 0x10080da8
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x10080da1
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.10180ab0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x10080da8
lea eax, [esi*4]
jmp 0x1007fcb4
push 0x102b4224
push 0x126a3
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
lea eax, [ebx + 4]
jmp 0x1007fcb4
mov eax, dword [esp + 0x38]
mov esi, dword [eax + 0x24]
mov eax, 0xaaaaaaab
lea ecx, [esi - 8]
mul ecx
mov ebx, edx
shr ebx, 2
add ebx, 4
imul ebx, dword [esp + 0x3c]
add ebx, 3
and ebx, 0xfffffffc
lea eax, [ebx + ebx*2]
add eax, eax
mov dword [esp + 0x28], eax
add eax, esi
cdq
push edx
push eax
call fcn.100656f0
mov esi, eax
add esp, 8
mov dword [esp + 0xd8], esi
test esi, esi
jne 0x1007fdcc
mov dword [esp + 0x10], 7
jmp 0x1007fcc7
mov ecx, dword [esp + 0x12c]
lea eax, [esi + ebx*4]
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0x28]
add eax, esi
mov dword [esp + 0xd4], ecx
mov dword [esp + 0x28], eax
movzx eax, byte [ecx + 8]
shl ax, 2
movzx eax, ax
mov dword [esp + 0x48], eax
mov al, byte [ecx + 3]
mov byte [esp + 0xf], al
movzx eax, al
mov dword [esp + 0xa4], eax
xor eax, eax
mov dword [esp + 0x44], eax
cmp dword [esp + 0x3c], eax
jle 0x1008005f
nop
shl eax, 2
mov dword [esp + 0x54], eax
mov ebx, dword [esp + eax + 0x12c]
mov dword [esp + 0x30], ebx
movzx eax, word [ebx + 0x18]
mov edx, dword [ebx + 0x38]
movzx esi, word [ebx + 0x12]
mov dword [esp + 0x1c], eax
add esi, edx
movzx eax, word [ebx + 0x1a]
mov ecx, eax
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x12c]
mov dword [esp + 0x74], ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x40], esi
mov ecx, dword [eax + 0x38]
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x100801d9
movzx eax, byte [ebx + 0xc]
add eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xdc]
add eax, eax
push eax
mov eax, dword [esp + 0xd4]
push 0
lea eax, [ecx + eax*2]
push eax
call sub.VCRUNTIME140.dll_memset
mov al, byte [ebx + 0xc]
add esp, 0xc
test al, al
je 0x1007ff36
movzx edx, word [ebx + 0x1c]
cmp dword [esp + 0x1c], edx
jb 0x100801ae
test edx, edx
je 0x1007fefe
mov edi, dword [esp + 0xd0]
mov ebx, dword [esp + 0x24]
nop dword [eax]
mov ax, word [esi]
add esi, 2
mov ch, al
mov cl, ah
mov eax, dword [esp + 0x74]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0xd8]
add ecx, ebx
mov dword [eax + edi*4], ecx
inc edi
sub edx, 1
jne 0x1007fec0
mov ebx, dword [esp + 0x30]
mov dword [esp + 0xd0], edi
mov edi, dword [esp + 0x14]
mov dword [esp + 0x40], esi
mov al, byte [ebx + 0xc]
xor edx, edx
test al, al
je 0x1007ff36
mov edi, dword [esp + 0xd0]
lea ecx, [ebx + 0x24]
mov esi, dword [esp + 0xd8]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
mov dword [esi + edi*4], eax
inc edx
movzx eax, byte [ebx + 0xc]
inc edi
cmp edx, eax
jl 0x1007ff15
mov esi, dword [esp + 0x40]
mov dword [esp + 0xd0], edi
mov edi, dword [esp + 0x14]
movzx eax, word [ebx + 0x12]
xor edx, edx
movzx ecx, word [ebx + 0x18]
add eax, dword [esp + 0x24]
lea eax, [eax + ecx*2]
xor ecx, ecx
mov ebx, eax
sub ebx, esi
inc ebx
shr ebx, 1
cmp esi, eax
cmova ebx, ecx
test ebx, ebx
je 0x1007ff95
mov edi, dword [esp + 0xd0]
mov ax, word [esi]
lea esi, [esi + 2]
mov ch, al
inc edx
mov cl, ah
mov eax, dword [esp + 0x78]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0xd8]
add ecx, dword [esp + 0x24]
mov dword [eax + edi*4], ecx
inc edi
cmp edx, ebx
jb 0x1007ff60
mov dword [esp + 0xd0], edi
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x44]
mov ebx, dword [esp + 0xd0]
mov dword [esp + edx + 0xbc], ebx
cmp eax, dword [esp + 0x58]
jge 0x10080050
cmp byte [esp + 0xf], 0
jne 0x10080050
movzx eax, word [esp + edx + 0x7c]
mov ecx, dword [esp + 0xdc]
mov esi, dword [esp + 0x28]
push eax
push dword [esp + edx + 0x64]
add esi, edi
mov word [ecx + ebx*2], ax
add edi, eax
push esi
mov dword [esp + 0x20], edi
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x54]
add esp, 0xc
mov edx, dword [esp + 0xdc]
movzx eax, cx
add eax, esi
mov esi, dword [esp + 0xd8]
mov dword [esi + ebx*4], eax
mov eax, dword [esp + 0x30]
sub word [edx + ebx*2], cx
cmp byte [eax + 8], 0
jne 0x1008001f
mov eax, dword [eax + 0x38]
mov ecx, dword [esi + ebx*4]
mov eax, dword [eax + 8]
mov dword [ecx], eax
jmp 0x10080044
cmp word [edx + ebx*2], 4
jae 0x10080044
mov eax, dword [esp + 0x28]
nop word [eax + eax]
mov byte [eax + edi], 0
inc edi
inc word [edx + ebx*2]
cmp word [edx + ebx*2], 4
jb 0x10080030
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x44]
inc ebx
mov dword [esp + 0xd0], ebx
inc eax
mov dword [esp + 0x44], eax
cmp eax, dword [esp + 0x3c]
jl 0x1007fe20
mov eax, dword [esp + 0x48]
xor ecx, ecx
movzx edi, ax
xor ebx, ebx
mov eax, dword [esp + 0x38]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x30], ebx
mov eax, dword [eax + 0x28]
add eax, 0xfffffff4
add edi, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x44], edi
test eax, eax
jle 0x1008016a
nop
mov esi, dword [esp + ebx*4 + 0x12c]
mov edx, dword [esp + ebx*4 + 0xbc]
mov dword [esp + 0x54], edx
mov eax, dword [esi + 0x3c]
mov dword [esp + ecx*4 + 0xe0], eax
mov dword [esp + ecx*4 + 0xf8], edx
test ecx, ecx
je 0x100800c5
cmp edx, dword [esp + ecx*4 + 0xf4]
jne 0x100800c5
dec ecx
mov dword [esp + 0x14], ecx
cmp byte [esp + 0xf], 0
jne 0x100800e9
mov eax, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x14], ecx
mov eax, dword [eax + 0x3c]
mov dword [esp + ecx*4 + 0xe0], eax
lea eax, [edx + 1]
mov dword [esp + ecx*4 + 0xf8], eax
sub edi, dword [esi + 0x14]
lea eax, [esp + 0x7c]
cmp byte [esi + 0xc], 0
lea eax, [eax + ebx*4]
mov dword [esp + 0x58], eax
mov dword [eax], edi
mov dword [esp + 0x28], 0
jbe 0x10080149
lea ebx, [esi + 0x24]
nop word [eax + eax]
push dword [ebx]
mov eax, dword [esi + 0x4c]
push esi
call eax
mov ecx, dword [esp + 0x30]
lea ebx, [ebx + 4]
movzx eax, ax
inc ecx
add eax, 2
mov dword [esp + 0x30], ecx
add edi, eax
add esp, 8
movzx eax, byte [esi + 0xc]
cmp ecx, eax
jl 0x10080110
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x54]
mov ebx, dword [esp + 0x30]
mov dword [eax], edi
mov eax, dword [esp + 0x3c]
inc ecx
mov edi, dword [esp + 0x44]
mov dword [esp + ebx*4 + 0x90], edx
inc ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], ecx
cmp ebx, eax
jl 0x10080090
mov ebx, dword [esp + 0xd0]
mov edi, eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x1c], 0
test eax, eax
jle 0x100803b3
mov edx, 1
xor ecx, ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], ecx
lea eax, [esp + 0x7c]
add eax, ecx
mov dword [esp + 0x58], eax
mov esi, dword [eax]
cmp esi, dword [esp + 0x44]
jle 0x100802e2
jmp 0x1008020a
push 0x102b4224
push 0x126fe
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10080d84
push 0x102b4224
push 0x126e6
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10080d84
lea eax, [esp + 0x7c]
add eax, ecx
cmp edx, edi
jl 0x10080239
inc edx
mov dword [esp + 0x40], edx
cmp edx, 5
jg 0x10080463
mov ebx, dword [esp + 0xd0]
mov dword [esp + ecx + 0x80], 0
mov esi, dword [eax]
mov dword [esp + ecx + 0x94], ebx
jmp 0x10080240
mov ebx, dword [esp + 0xd0]
mov edi, dword [esp + ecx + 0x90]
mov edx, dword [esp + 0xdc]
lea ecx, [edi - 1]
mov dword [esp + 0x54], ecx
movzx eax, word [edx + ecx*2]
test ax, ax
jne 0x10080276
mov edx, ecx
lea ecx, [esp + 0xd0]
call fcn.1007efb0
mov edx, dword [esp + 0xdc]
movzx eax, ax
mov ecx, dword [esp + 0x58]
movzx eax, ax
add eax, 2
sub esi, eax
cmp byte [esp + 0xf], 0
mov dword [ecx], esi
jne 0x100802b3
cmp edi, ebx
jge 0x100802b1
movzx eax, word [edx + edi*2]
test ax, ax
jne 0x100802a9
mov edx, edi
lea ecx, [esp + 0xd0]
call fcn.1007efb0
movzx eax, ax
movzx eax, ax
add eax, 2
jmp 0x100802b3
xor eax, eax
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x40]
add dword [esp + ecx + 0x80], eax
mov eax, dword [esp + 0x54]
mov dword [esp + ecx + 0x90], eax
cmp esi, dword [esp + 0x44]
jg 0x10080204
mov ebx, dword [esp + 0xd0]
mov edi, dword [esp + ecx + 0x90]
cmp edi, ebx
jge 0x10080390
mov edx, dword [esp + 0xdc]
nop dword [eax + eax]
movzx eax, word [edx + edi*2]
test ax, ax
jne 0x10080325
mov edx, edi
lea ecx, [esp + 0xd0]
call fcn.1007efb0
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0xdc]
movzx eax, ax
movzx eax, ax
add eax, 2
add esi, eax
cmp esi, dword [esp + 0x44]
jg 0x10080438
inc edi
mov dword [esp + ecx + 0x7c], esi
cmp byte [esp + 0xf], 0
mov dword [esp + ecx + 0x90], edi
jne 0x1008037d
cmp edi, ebx
jge 0x1008037b
movzx eax, word [edx + edi*2]
test ax, ax
jne 0x1008036f
mov edx, edi
lea ecx, [esp + 0xd0]
call fcn.1007efb0
mov edx, dword [esp + 0xdc]
movzx eax, ax
mov ecx, dword [esp + 0x24]
movzx eax, ax
add eax, 2
jmp 0x1008037d
xor eax, eax
sub dword [esp + ecx + 0x80], eax
cmp edi, ebx
jl 0x10080300
mov edx, dword [esp + 0x14]
mov edi, edx
mov dword [esp + 0x40], edi
mov eax, dword [esp + 0x1c]
add ecx, 4
inc eax
mov dword [esp + 0x24], ecx
inc edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edx
cmp eax, edi
jl 0x10080196
lea eax, [edi - 1]
mov ecx, eax
mov dword [esp + 0x14], eax
test ecx, ecx
jle 0x100805be
shl ecx, 2
lea eax, [esp + 0x7c]
add eax, ecx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x74], eax
mov edi, dword [eax]
lea eax, [esp + ecx + 0x78]
mov dword [esp + 0x60], eax
mov eax, dword [eax]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x90]
sub eax, 4
mov dword [esp + 0x30], eax
mov eax, dword [eax + ecx]
mov ecx, dword [esp + 0xdc]
mov dword [esp + 0x28], eax
lea esi, [eax - 1]
mov edx, esi
sub edx, dword [esp + 0xa4]
inc edx
cmp word [ecx + edx*2], 0
lea eax, [ecx + edx*2]
mov dword [esp + 0x1c], eax
jne 0x1008042f
lea ecx, [esp + 0xd0]
call fcn.1007efb0
mov ecx, dword [esp + 0xdc]
mov ebx, dword [esp + 0x1c]
jmp 0x100804c7
cmp edi, ebx
jge 0x1008038c
cmp dword [esp + 0x1c], 0
jle 0x10080450
mov eax, dword [esp + ecx + 0x8c]
jmp 0x10080452
xor eax, eax
cmp edi, eax
jle 0x1008048e
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x40]
jmp 0x10080396
push 0x102b4224
push 0x12763
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10080d84
push 0x102b4224
push 0x12784
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10080d84
mov ecx, dword [esp + 0xdc]
cmp word [ecx + esi*2], 0
mov dword [esp + 0x78], esi
mov dword [esp + 0x54], esi
jne 0x100804e4
mov edx, esi
lea ecx, [esp + 0xd0]
call fcn.1007efb0
test edi, edi
je 0x10080531
cmp dword [ebp + 0x10], 0
mov eax, dword [esp + 0x28]
mov edx, eax
jne 0x10080576
mov ecx, dword [esp + 0x40]
mov eax, 2
mov ebx, dword [esp + 0x1c]
dec ecx
cmp dword [esp + 0x14], ecx
mov ecx, 0
cmove eax, ecx
mov ecx, dword [esp + 0x24]
sub ecx, eax
mov eax, dword [esp + 0xdc]
movzx eax, word [eax + esi*2]
sub ecx, eax
movzx eax, word [ebx]
add eax, 2
add eax, edi
cmp eax, ecx
jg 0x10080576
movzx eax, word [ebx]
mov ecx, 0xfffffffe
mov edx, dword [esp + 0x78]
add eax, 2
add edi, eax
sub ebx, 2
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x1c], ebx
movzx eax, word [eax + esi*2]
sub ecx, eax
mov eax, dword [esp + 0x58]
add dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax], esi
sub esi, 1
mov eax, dword [esp + 0x54]
mov dword [esp + 0x28], eax
jns 0x100804c0
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0xd0]
mov dword [eax], edi
mov eax, dword [esp + 0x24]
mov dword [ecx], eax
mov ecx, dword [esp + 0x14]
cmp ecx, 1
jle 0x100805a7
mov esi, dword [esp + 0x30]
lea eax, [ecx*4]
mov eax, dword [eax + esi - 4]
jmp 0x100805a9
xor eax, eax
cmp edx, eax
jle 0x10080628
dec ecx
mov dword [esp + 0x14], ecx
test ecx, ecx
jg 0x100803c4
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 0x12c]
xor esi, esi
mov eax, dword [eax + 0x38]
movzx eax, byte [eax]
mov dword [esp + 0x30], eax
lea eax, [esi + 1]
test edi, edi
jle 0x10080736
nop dword [eax]
cmp esi, dword [esp + 0x3c]
jge 0x10080695
mov eax, dword [esp + esi*4 + 0x12c]
mov dword [esp + esi*4 + 0x138], eax
mov dword [esp + esi*4 + 0x12c], 0
mov dword [esp + 0x28], eax
mov ecx, dword [eax + 0x48]
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x10080657
mov eax, dword [edx + 0x18]
cmp eax, dword [ecx + 0x18]
jb 0x10080657
cmp dword [edx + 0x60], 0
je 0x10080653
call fcn.10072870
jmp 0x1008067c
push 0x102b4224
push 0x127ae
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10080d84
xor eax, eax
jmp 0x1008067c
mov eax, dword [edx + 0x28]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10080680
mov eax, dword [edx + 0x94]
cmp eax, dword [edx + 0x98]
jbe 0x10080677
call fcn.10074180
jmp 0x1008067c
call fcn.10073f50
mov dword [esp + 0x10], eax
inc dword [esp + 0x2c]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x10080d84
jmp 0x10080728
cmp dword [ebp + 0x10], 0
lea edx, [esp + 0x28]
mov ecx, dword [esp + 0x5c]
cmovne ecx, eax
lea eax, [esp + 0x34]
push 0
push ecx
mov ecx, dword [esp + 0x40]
push eax
call fcn.1007d990
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
test eax, eax
jne 0x10080d84
mov edi, dword [esp + 0x28]
mov ecx, edi
mov edx, dword [esp + 0x30]
call fcn.10079850
mov ecx, dword [esp + 0x38]
inc dword [esp + 0x2c]
mov dword [esp + esi*4 + 0x138], edi
mov dword [esp + esi*4 + 0xbc], ebx
cmp byte [ecx + 0x11], 0
je 0x1008071c
mov edx, dword [edi + 4]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x24]
push dword [eax + 4]
push 5
call fcn.10078510
mov eax, dword [esp + 0x24]
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10080d84
mov edx, dword [esp + 0x34]
mov edi, dword [esp + 0x40]
mov dword [esp + 0x5c], edx
inc esi
mov eax, 1
cmp esi, edi
jl 0x100805e0
mov ebx, dword [esp + 0x2c]
xor ecx, ecx
test ebx, ebx
jle 0x10080787
mov eax, dword [esp + ecx*4 + 0x138]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x48]
mov dword [esp + ecx*4 + 0x110], edx
mov dword [esp + ecx*4 + 0xa8], edx
mov ax, word [eax + 0x1c]
mov word [esp + ecx*2 + 0x60], ax
xor eax, eax
test ecx, ecx
jle 0x10080782
nop word [eax + eax]
cmp dword [esp + eax*4 + 0x110], edx
je 0x100808e4
inc eax
cmp eax, ecx
jl 0x10080770
inc ecx
cmp ecx, ebx
jl 0x10080740
xor edi, edi
test ebx, ebx
jle 0x10080822
xor esi, esi
lea edx, [esi + 1]
cmp ebx, edx
jle 0x100807ba
nop word [eax + eax]
mov eax, dword [esp + edx*4 + 0xa8]
mov ecx, edx
cmp eax, dword [esp + esi*4 + 0xa8]
cmovae ecx, esi
inc edx
mov esi, ecx
cmp edx, ebx
jl 0x100807a0
mov ebx, dword [esp + esi*4 + 0xa8]
mov dword [esp + esi*4 + 0xa8], 0xffffffff
cmp esi, edi
je 0x10080815
jle 0x100807f1
mov eax, dword [esp + 0x38]
mov edx, dword [eax + 0x30]
mov eax, dword [esp + esi*4 + 0x138]
inc edx
add edx, esi
mov ecx, dword [eax + 0x48]
xor eax, eax
mov word [ecx + 0x1c], ax
call fcn.1006e5a0
mov eax, dword [esp + edi*4 + 0x138]
mov edx, ebx
mov ecx, dword [eax + 0x48]
mov ax, word [esp + esi*2 + 0x60]
mov word [ecx + 0x1c], ax
call fcn.1006e5a0
mov eax, dword [esp + edi*4 + 0x138]
mov dword [eax + 4], ebx
mov ebx, dword [esp + 0x2c]
inc edi
cmp edi, ebx
jl 0x10080791
test byte [esp + 0x30], 8
mov eax, dword [esp + ebx*4 + 0x134]
mov ecx, dword [esp + 0x4c]
mov eax, dword [eax + 4]
bswap eax
mov dword [ecx], eax
jne 0x1008086b
mov ecx, dword [esp + 0x3c]
cmp ecx, ebx
je 0x1008086b
lea edx, [esp + 0x12c]
lea eax, [esp + 0x138]
cmovge eax, edx
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [eax + 0x38]
mov eax, dword [esp + ebx*4 + 0x134]
mov ecx, dword [eax + 0x38]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x38]
cmp byte [eax + 0x11], 0
je 0x10080a2e
mov esi, dword [esp + 0x138]
xor edi, edi
xor ebx, ebx
mov dword [esp + 0x4c], 0
movzx eax, byte [esi + 0xc]
movzx edx, word [esi + 0x18]
add edx, eax
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x1c], edx
test eax, eax
jle 0x10080a37
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], esi
mov ecx, dword [esp + 0xd8]
mov ecx, dword [ecx + ebx*4]
mov dword [esp + 0x30], ecx
cmp ebx, edx
jne 0x10080935
xor eax, eax
cmp byte [esp + 0xf], al
sete al
mov dword [esp + 0x60], eax
inc edi
cmp edi, dword [esp + 0x2c]
jge 0x1008090f
mov esi, dword [esp + edi*4 + 0x138]
jmp 0x10080916
push 0x102b4224
push 0x127f8
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 0x10], 0xb
jmp 0x10080d84
mov esi, dword [esp + edi*4 + 0x12c]
movzx eax, word [esi + 0x18]
add eax, dword [esp + 0x60]
movzx ecx, byte [esi + 0xc]
add ecx, eax
add edx, ecx
cmp ebx, edx
je 0x100808d4
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x1c], edx
mov ecx, dword [esp + 0x28]
cmp ebx, dword [esp + ecx + 0x90]
mov ecx, dword [esp + 0x30]
jne 0x10080970
mov edx, dword [esp + 0x4c]
inc edx
mov dword [esp + 0x4c], edx
shl edx, 2
cmp byte [esp + 0xf], 0
mov dword [esp + 0x28], edx
mov edx, dword [esp + edx + 0x138]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x1c]
je 0x10080a21
cmp edi, dword [esp + 0x2c]
jge 0x10080994
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 4]
cmp eax, dword [esp + edi*4 + 0x110]
jne 0x10080994
cmp ecx, dword [esi + 0x38]
jb 0x10080994
cmp ecx, dword [esi + 0x3c]
jb 0x10080a1a
cmp word [esp + 0x48], 0
jne 0x100809c2
mov edx, dword [ecx]
lea eax, [esp + 0x18]
mov ecx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x38]
bswap edx
push dword [eax + 4]
push 5
call fcn.10078510
mov eax, dword [esp + 0x24]
add esp, 0xc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xdc]
movzx eax, word [eax + ebx*2]
test ax, ax
jne 0x100809e3
mov edx, ebx
lea ecx, [esp + 0xd0]
call fcn.1007efb0
movzx eax, ax
mov ecx, dword [esp + 0x34]
cmp ax, word [ecx + 0x10]
jbe 0x10080a0a
lea eax, [esp + 0x18]
mov edx, esi
push eax
push dword [esp + 0x34]
call fcn.10078a70
mov eax, dword [esp + 0x20]
add esp, 8
mov dword [esp + 0x10], eax
jmp 0x10080a0e
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x10080d84
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0xd0]
inc ebx
cmp ebx, eax
jl 0x100808b1
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x138]
jmp 0x10080a3b
mov ebx, dword [esp + 0x2c]
lea eax, [ebx - 1]
xor edi, edi
test eax, eax
jle 0x10080b9b
nop dword [eax + eax]
mov eax, dword [esp + edi*4 + 0x90]
mov edx, dword [esp + 0xd8]
mov esi, dword [edx + eax*4]
lea edx, [edx + eax*4]
mov ecx, dword [esp + edi*4 + 0x138]
mov ebx, dword [esp + 0x70]
add ebx, dword [esp + 0x6c]
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0xdc]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x48]
movzx eax, word [edx + eax*2]
movzx edx, cx
mov ecx, dword [esp + 0x34]
add edx, eax
cmp byte [ecx + 8], 0
jne 0x10080aa6
mov ecx, dword [ecx + 0x38]
mov eax, dword [esi]
mov dword [ecx + 8], eax
jmp 0x10080b4e
cmp byte [esp + 0xf], 0
je 0x10080b35
lea eax, [esp + 0x110]
push eax
mov eax, dword [esp + 0x64]
push dword [eax - 4]
mov eax, dword [ecx + 0x50]
push ecx
call eax
mov edx, dword [esp + 0x120]
add esp, 0xc
mov ecx, dword [esp + 0x110]
mov esi, ebx
test edx, edx
ja 0x10080b21
jb 0x10080ae4
cmp ecx, 0x7f
ja 0x10080af6
mov eax, 1
and cl, 0x7f
mov byte [ebx + 4], cl
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x10080b4e
test edx, edx
ja 0x10080b21
jb 0x10080b04
cmp ecx, 0x3fff
ja 0x10080b21
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 0x10080b4e
push edx
push ecx
lea ecx, [ebx + 4]
call fcn.10069470
add esp, 8
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x10080b4e
sub esi, 4
cmp eax, 4
jne 0x10080b52
mov eax, dword [esp + 0x20]
push esi
push eax
mov eax, dword [eax + 0x4c]
call eax
add esp, 8
movzx edx, ax
mov ecx, dword [esp + 0x34]
add dword [esp + 0x70], edx
lea eax, [esp + 0x18]
push eax
push dword [ecx + 4]
mov ecx, dword [esp + 0x28]
push ebx
push edx
mov edx, dword [esp + 0x60]
push esi
lea edx, [edx + edi]
call fcn.1007ed30
mov esi, dword [esp + 0x2c]
add esp, 0x14
mov dword [esp + 0x10], esi
test esi, esi
jne 0x10080d84
mov ebx, dword [esp + 0x2c]
inc edi
lea eax, [ebx - 1]
cmp edi, eax
jl 0x10080a50
mov esi, dword [esp + 0x138]
mov edi, 1
sub edi, ebx
mov dword [esp + 0x4c], edi
cmp edi, ebx
jge 0x10080c8d
nop
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 0x10080c75
test edi, edi
jns 0x10080be3
mov eax, dword [esp + ecx*4 + 0xb8]
cmp eax, dword [esp + ecx*4 + 0x8c]
jl 0x10080c75
test ecx, ecx
jne 0x10080bf4
mov esi, dword [esp + 0x90]
xor edx, edx
xor eax, eax
jmp 0x10080c2c
cmp ecx, dword [esp + 0x3c]
jge 0x10080c0c
xor edx, edx
cmp byte [esp + 0xf], dl
sete dl
add edx, dword [esp + ecx*4 + 0xb8]
jmp 0x10080c13
mov edx, dword [esp + 0xd0]
mov esi, dword [esp + ecx*4 + 0x90]
xor eax, eax
cmp byte [esp + 0xf], al
sete al
add eax, dword [esp + ecx*4 + 0x8c]
sub esi, eax
lea edi, [ecx*4]
lea ecx, [esp + 0xd0]
push ecx
mov ecx, dword [esp + edi + 0x13c]
push esi
push eax
call fcn.1007f3c0
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
test eax, eax
jne 0x10080d84
mov eax, dword [esp + edi + 0x138]
mov ecx, dword [esp + 0x44]
sub ecx, dword [esp + edi + 0x7c]
mov edi, dword [esp + 0x4c]
mov byte [ebx], 1
mov dword [eax + 0x14], ecx
mov ebx, dword [esp + 0x2c]
inc edi
mov dword [esp + 0x4c], edi
cmp edi, ebx
jl 0x10080bb0
mov esi, dword [esp + 0x138]
cmp dword [ebp + 0xc], 0
je 0x10080cfc
mov edi, dword [esp + 0x20]
cmp word [edi + 0x18], 0
jne 0x10080cfc
movzx eax, byte [edi + 9]
cmp eax, dword [esi + 0x14]
jg 0x10080cfc
or edx, 0xffffffff
mov ecx, esi
call fcn.10078b30
mov ecx, dword [esp + 0x138]
mov edx, edi
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
call fcn.1007f920
mov eax, dword [esp + 0x1c]
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10080d4c
mov ecx, dword [esp + 0x138]
mov edx, ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x34]
call fcn.1007e270
add esp, 4
mov dword [esp + 0x10], eax
jmp 0x10080d4c
mov ecx, dword [esp + 0x38]
cmp byte [ecx + 0x11], 0
je 0x10080d48
cmp word [esp + 0x48], 0
jne 0x10080d48
xor esi, esi
test ebx, ebx
jle 0x10080d48
mov eax, dword [esp + esi*4 + 0x138]
lea edx, [esp + 0x18]
push edx
push dword [eax + 4]
mov eax, dword [eax + 0x38]
push 5
mov edx, dword [eax + 8]
bswap edx
call fcn.10078510
mov ecx, dword [esp + 0x44]
inc esi
add esp, 0xc
cmp esi, ebx
jl 0x10080d14
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
jmp 0x10080d4c
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x3c]
mov esi, ebx
cmp ebx, edi
jge 0x10080d84
nop word [eax + eax]
mov ecx, dword [esp + esi*4 + 0x12c]
test eax, eax
jne 0x10080d7b
push dword [ecx + 4]
mov edx, ecx
mov ecx, dword [ecx + 0x34]
call fcn.1007e270
add esp, 4
inc esi
cmp esi, edi
jl 0x10080d60
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xd8]
test eax, eax
je 0x1007fcc7
push eax
call sym.BasicSQLite.dll_sqlite3_free
add esp, 4
jmp 0x1007fcc7
mov ecx, edx
call fcn.1006e3b0
inc ebx
cmp ebx, dword [esp + 0x3c]
jl 0x1007fce0
xor ebx, ebx
cmp dword [esp + 0x2c], ebx
jle 0x10080e21
nop
mov edx, dword [esp + ebx*4 + 0x138]
test edx, edx
je 0x10080e1a
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x10080e13
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.10180ab0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x10080e1a
mov ecx, edx
call fcn.1006e3b0
inc ebx
cmp ebx, dword [esp + 0x2c]
jl 0x10080dc0
mov ecx, dword [esp + 0x154]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1010eeaf
mov esp, ebp
pop ebp
ret