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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
cmp dword [ebp + 8], 0
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov dword [esp + 0x28], edx
push esi
push edi
mov dword [esp + 0x18], ebx
mov edi, dword [ebx]
mov dword [esp + 0x10], edi
jne 0x1006c07d
test eax, eax
je 0x1006cbb8
mov esi, dword [ebx + 0xf4]
test esi, esi
je 0x1006cbb8
test eax, eax
jne 0x1006c0f3
mov eax, dword [esi]
push 0x5f
push eax
mov dword [esp + 0x2c], eax
call fcn.10105d70
mov edi, eax
add esp, 8
test edi, edi
je 0x1006c0ec
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
push 0
mov byte [edi], 0
call fcn.10068950
add esp, 4
mov byte [edi], 0x5f
mov edi, dword [esp + 0x10]
test eax, eax
je 0x1006c0f0
cmp byte [eax + 0x2b], 1
jne 0x1006c0f0
push dword [esp + 0x24]
mov edx, eax
mov ecx, edi
call fcn.1006bfc0
add esp, 4
test eax, eax
mov eax, dword [ebp + 0x10]
je 0x1006c0f3
or dword [esi + 0x1c], 0x1000
jmp 0x1006c0f3
mov edi, dword [esp + 0x10]
mov eax, dword [ebp + 0x10]
cmp byte [edi + 0xb1], 0
je 0x1006c122
test eax, eax
jne 0x1006c1de
cmp byte [esi + 0x2b], al
je 0x1006c1c4
cmp dword [edi + 0xac], eax
jne 0x1006c1de
mov eax, dword [edi + 0xac]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0xc]
test eax, 0x10000
je 0x1006c19c
or dword [esi + 0x1c], 0x10000
xor ecx, ecx
xor edi, edi
cmp cx, word [esi + 0x22]
jge 0x1006c198
mov dword [esp + 0x24], ecx
mov edx, dword [esi + 4]
add edx, ecx
mov ecx, dword [edx + 4]
test cl, 0xf0
je 0x1006c1f3
mov eax, ecx
and al, 0xf0
cmp al, 0x10
jne 0x1006c15e
mov byte [edx + 8], 0x41
test byte [edx + 0xe], 1
je 0x1006c181
movsx eax, word [esi + 0x20]
cmp eax, edi
je 0x1006c181
test cl, 0xf
jne 0x1006c181
and ecx, 0xfffffff2
or ecx, 2
mov dword [edx + 4], ecx
or dword [esi + 0x1c], 0x800
mov ecx, dword [esp + 0x24]
inc edi
movsx eax, word [esi + 0x22]
add ecx, 0x10
mov dword [esp + 0x24], ecx
cmp edi, eax
jl 0x1006c141
mov eax, dword [ebp + 0xc]
mov edi, dword [esp + 0x10]
test al, al
jns 0x1006c26b
mov eax, dword [esi + 0x1c]
test al, 8
je 0x1006c23f
push str.AUTOINCREMENT_not_allowed_on_WITHOUT_ROWID_tables
push ebx
call fcn.10020b80
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0xac]
mov dword [esi + 0x14], eax
cmp eax, 1
jne 0x1006c122
or dword [esi + 0x1c], eax
jmp 0x1006c122
push 0x101315db
push ebx
call fcn.10020b80
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test byte [edx + 0xe], 4
mov edi, dword [edx]
je 0x1006c227
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1006c200
sub ecx, edx
lea eax, [ecx + 1]
add eax, edi
push eax
push edi
push dword [esi]
push str.unknown_datatype_for__s._s:___s_
push ebx
call fcn.10020b80
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push dword [esi]
push str.missing_datatype_for__s._s
push ebx
call fcn.10020b80
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test al, 4
jne 0x1006c25a
push dword [esi]
push str.PRIMARY_KEY_missing_on_table__s
push ebx
call fcn.10020b80
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or eax, 0x280
mov edx, esi
mov ecx, ebx
mov dword [esi + 0x1c], eax
call fcn.1006bb10
mov ecx, dword [esi + 0x3c]
mov dword [esp + 0x14], 0xffff8000
test ecx, ecx
je 0x1006c29c
mov eax, dword [edi + 0x10]
xor edx, edx
add eax, 0xc
mov dword [esp + 0x14], edx
cmp dword [eax], ecx
je 0x1006c29c
nop word [eax + eax]
lea eax, [eax + 0x10]
inc edx
cmp dword [eax], ecx
jne 0x1006c290
mov dword [esp + 0x14], edx
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1006c2cf
push eax
push 0
push 4
mov edx, esi
mov ecx, ebx
call fcn.10055f60
add esp, 0xc
cmp dword [ebx + 0x24], 0
je 0x1006c2cf
mov edx, dword [esi + 0x10]
test edx, edx
je 0x1006c2c8
mov ecx, edi
call fcn.10058a60
mov dword [esi + 0x10], 0
test byte [esi + 0x1c], 0x60
je 0x1006c3e0
xor edx, edx
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], ecx
cmp ax, word [esi + 0x22]
jge 0x1006c3c4
xor edi, edi
mov dword [esp + 0x24], edi
nop word [eax + eax]
mov eax, dword [esi + 4]
test byte [edi + eax + 0xe], 0x60
je 0x1006c3d9
movzx eax, word [edi + eax + 0xc]
test ax, ax
jne 0x1006c31c
xor eax, eax
jmp 0x1006c340
cmp byte [esi + 0x2b], 0
je 0x1006c326
xor eax, eax
jmp 0x1006c340
mov ecx, dword [esi + 0x34]
test ecx, ecx
jne 0x1006c331
xor eax, eax
jmp 0x1006c340
cmp dword [ecx], eax
jge 0x1006c339
xor eax, eax
jmp 0x1006c340
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*4 - 0xc]
push 0
push eax
push 8
mov edx, esi
mov ecx, ebx
call fcn.10055f60
add esp, 0xc
test eax, eax
je 0x1006c3a0
mov ecx, dword [esp + 0x10]
push 0
push 0x34
call fcn.1001d1c0
mov edi, eax
add esp, 8
test edi, edi
je 0x1006c389
push 0x34
push 0
push edi
call fcn.10106200
add esp, 0xc
mov byte [edi], 0x79
or eax, 0xffffffff
mov dword [edi + 0x18], 1
mov word [edi + 0x22], ax
mov eax, dword [esi + 4]
mov edx, esi
push edi
mov edi, dword [esp + 0x28]
mov ecx, ebx
add eax, edi
push eax
call fcn.10069180
add esp, 8
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
movsx eax, word [esi + 0x22]
inc ecx
add edi, 0x10
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], edi
cmp ecx, eax
jl 0x1006c300
test edx, edx
jne 0x1006c3e0
push str.must_have_at_least_one_non_generated_column
push ebx
call fcn.10020b80
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
inc edx
mov dword [esp + 0x20], edx
jmp 0x1006c3a8
movsx edx, word [esi + 0x22]
xor eax, eax
mov ecx, dword [esi + 4]
xor edi, edi
mov dword [esp + 0x20], eax
cmp edx, 2
jl 0x1006c42e
movsx ebx, word [esi + 0x22]
add edx, 0xfffffffe
shr edx, 1
inc edx
mov eax, edx
neg eax
lea ebx, [ebx + eax*2]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x18]
nop dword [eax]
movzx eax, byte [ecx + 9]
add edi, eax
movzx eax, byte [ecx + 0x19]
add dword [esp + 0x20], eax
add ecx, 0x20
sub edx, 1
jne 0x1006c410
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
test edx, edx
jle 0x1006c438
movzx ecx, byte [ecx + 9]
jmp 0x1006c43a
xor ecx, ecx
add eax, edi
add eax, ecx
cmp word [esi + 0x20], 0
push 0
lea ecx, [eax + 1]
cmovge ecx, eax
shl ecx, 2
push ecx
call fcn.10022070
mov edi, dword [esi + 8]
add esp, 8
mov word [esi + 0x28], ax
test edi, edi
je 0x1006c470
mov ecx, edi
call fcn.1006b980
mov edi, dword [edi + 0x14]
test edi, edi
jne 0x1006c462
mov edi, dword [esp + 0x10]
mov al, byte [edi + 0xb1]
test al, al
jne 0x1006cb2a
mov edi, dword [ebx + 8]
test edi, edi
jne 0x1006c4ab
cmp dword [ebx + 0x78], edi
jne 0x1006c49a
mov eax, dword [ebx]
test byte [eax + 0x50], 8
jne 0x1006c49a
mov byte [ebx + 0x17], 1
mov ecx, ebx
call fcn.1003f600
mov edi, eax
test edi, edi
je 0x1006cbb8
mov ecx, dword [edi + 0x6c]
cmp dword [edi + 0x70], ecx
jg 0x1006c4ca
push 0
push 0
push 0
mov edx, 0x7a
mov ecx, edi
call fcn.1003f7e0
add esp, 0xc
jmp 0x1006c4fd
lea eax, [ecx + 1]
mov dword [edi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x68]
mov dword [eax + ecx*4], 0x7a
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov al, byte [esi + 0x2b]
mov edx, str.TABLE
test al, al
mov ecx, str.VIEW
cmove ecx, edx
mov edx, str.table
mov dword [esp + 0x28], ecx
mov ecx, str.view
cmove ecx, edx
cmp dword [ebp + 0x10], 0
mov dword [esp + 0x2c], ecx
je 0x1006c9cd
cmp byte [ebx + 0xd8], 0
je 0x1006c548
inc dword [ebx + 0x24]
mov dword [ebx + 0xc], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x2c]
mov ecx, ebx
inc eax
mov dword [esp + 0x1c], eax
inc eax
mov dword [esp + 0x20], eax
inc eax
mov dword [ebx + 0x2c], eax
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x78]
test eax, eax
cmovne ecx, eax
mov byte [ecx + 0x15], 1
mov ecx, dword [edi + 0x6c]
mov edx, dword [ebx + 0x60]
cmp dword [edi + 0x70], ecx
jg 0x1006c58e
push dword [esp + 0x14]
mov ecx, edi
push edx
push 1
mov edx, 0x71
call fcn.1003f7e0
add esp, 0xc
jmp 0x1006c5c1
mov ebx, dword [esp + 0x18]
lea eax, [ecx + 1]
mov dword [edi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x68]
mov dword [eax + ecx*4 + 8], edx
mov edx, dword [esp + 0x14]
mov dword [eax + ecx*4], 0x71
mov dword [eax + ecx*4 + 4], 1
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [edi + 0x6c]
test eax, eax
jle 0x1006c5d8
lea ecx, [eax + eax*4]
mov edx, 0x10
mov eax, dword [edi + 0x68]
mov word [eax + ecx*4 - 0x12], dx
mov dword [ebx + 0x28], 2
mov eax, dword [edi + 0x6c]
lea edx, [eax + 1]
mov dword [esp + 0x28], edx
cmp dword [edi + 0x70], eax
jg 0x1006c606
push edx
push 0
push dword [esp + 0x24]
mov edx, 0xb
mov ecx, edi
call fcn.1003f7e0
add esp, 0xc
jmp 0x1006c636
mov ebx, dword [esp + 0x1c]
lea ecx, [eax + eax*4]
mov eax, dword [edi + 0x68]
mov dword [edi + 0x6c], edx
mov dword [eax + ecx*4 + 4], ebx
mov ebx, dword [esp + 0x18]
mov dword [eax + ecx*4], 0xb
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
cmp dword [ebx + 0x24], 0
jne 0x1006cbb8
mov edx, dword [ebp + 0x10]
mov ecx, ebx
push 0x41
call fcn.1008e940
add esp, 4
test eax, eax
je 0x1006cbb8
movzx ecx, word [eax + 0x22]
mov word [esi + 0x24], cx
mov word [esi + 0x22], cx
mov ecx, dword [eax + 4]
mov dword [esi + 4], ecx
xor ecx, ecx
mov word [eax + 0x22], cx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x210], 0
jne 0x1006c685
add dword [eax + 0x18], 0xffffffff
jne 0x1006c68c
mov edx, eax
call fcn.100693f0
mov eax, dword [esp + 0x1c]
mov ecx, ebx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x38], 0xd
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
call fcn.10095790
add esp, 4
cmp dword [ebx + 0x24], 0
jne 0x1006cbb8
mov ecx, dword [edi + 0x6c]
cmp dword [edi + 0x70], ecx
jg 0x1006c6f6
push 0
push 0
push dword [esp + 0x24]
mov edx, 0x44
mov ecx, edi
call fcn.1003f7e0
add esp, 0xc
jmp 0x1006c729
mov edx, dword [esp + 0x1c]
lea eax, [ecx + 1]
mov dword [edi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x68]
mov dword [eax + ecx*4], 0x44
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [edi + 0xc]
mov byte [eax + 0x13], 0
mov eax, dword [edi + 0xc]
mov dword [eax + 0x1c], 0
mov eax, dword [edi]
mov edx, dword [edi + 0x6c]
cmp byte [eax + 0x57], 0
je 0x1006c74c
mov eax, 0x10143a28
jmp 0x1006c75c
mov eax, dword [esp + 0x28]
lea ecx, [eax + eax*4]
mov eax, dword [edi + 0x68]
lea eax, [eax + ecx*4]
add eax, 0xfffffff4
mov dword [eax], edx
mov edx, dword [edi + 0x6c]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], edx
cmp dword [edi + 0x70], edx
jg 0x1006c78c
push 0
push 0
push eax
mov edx, 0xc
mov ecx, edi
call fcn.1003f7e0
add esp, 0xc
mov dword [esp + 0x1c], eax
jmp 0x1006c7bf
lea eax, [edx + 1]
mov dword [edi + 0x6c], eax
lea ecx, [edx + edx*4]
mov eax, dword [edi + 0x68]
mov edx, dword [esp + 0x28]
mov dword [eax + ecx*4], 0xc
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [edi + 0x6c]
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [esp + 0x28], eax
cmp dword [edi + 0x70], ecx
jg 0x1006c7ea
push dword [esp + 0x20]
mov ecx, edi
push edx
push eax
mov edx, 0x61
call fcn.1003f7e0
add esp, 0xc
jmp 0x1006c81d
mov ebx, dword [esp + 0x28]
lea eax, [ecx + 1]
mov dword [edi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x68]
mov dword [eax + ecx*4 + 8], edx
mov edx, dword [esp + 0x20]
mov dword [eax + ecx*4 + 4], ebx
mov ebx, dword [esp + 0x18]
mov dword [eax + ecx*4], 0x61
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
push 0
mov edx, esi
mov ecx, edi
call fcn.1007b8b0
mov ecx, dword [edi + 0x6c]
add esp, 4
cmp dword [edi + 0x70], ecx
jg 0x1006c850
push 0
push dword [esp + 0x28]
mov edx, 0x7f
mov ecx, edi
push 1
call fcn.1003f7e0
mov edx, dword [esp + 0x30]
add esp, 0xc
jmp 0x1006c883
mov edx, dword [esp + 0x24]
lea eax, [ecx + 1]
mov dword [edi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x68]
mov dword [eax + ecx*4], 0x7f
mov dword [eax + ecx*4 + 4], 1
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [edi + 0x6c]
cmp dword [edi + 0x70], ecx
jg 0x1006c8a3
push edx
push dword [esp + 0x24]
mov edx, 0x80
mov ecx, edi
push 1
call fcn.1003f7e0
add esp, 0xc
jmp 0x1006c8d6
mov ebx, dword [esp + 0x20]
lea eax, [ecx + 1]
mov dword [edi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x68]
mov dword [eax + ecx*4 + 8], ebx
mov ebx, dword [esp + 0x18]
mov dword [eax + ecx*4], 0x80
mov dword [eax + ecx*4 + 4], 1
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [edi + 0x6c]
cmp dword [edi + 0x70], ecx
jg 0x1006c8fb
push 0
push dword [esp + 0x20]
mov edx, 9
mov ecx, edi
push 0
call fcn.1003f7e0
mov edx, dword [esp + 0x28]
add esp, 0xc
jmp 0x1006c92e
mov edx, dword [esp + 0x1c]
lea eax, [ecx + 1]
mov dword [edi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x68]
mov dword [eax + ecx*4], 9
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [edi + 0x6c]
mov dword [esp + 0x28], eax
mov eax, dword [edi]
cmp byte [eax + 0x57], 0
je 0x1006c944
mov eax, 0x10143a20
jmp 0x1006c94d
mov eax, dword [edi + 0x68]
lea ecx, [edx + edx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x28]
mov dword [eax + 8], ecx
mov ecx, dword [edi + 0x6c]
cmp dword [edi + 0x70], ecx
jg 0x1006c987
push 0
push 0
push 1
mov edx, 0x7a
mov ecx, edi
call fcn.1003f7e0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
mov edx, esi
call fcn.1006b680
mov ecx, eax
mov dword [esp + 0x24], ecx
jmp 0x1006ca10
lea eax, [ecx + 1]
mov edx, esi
mov dword [edi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x68]
mov dword [eax + ecx*4], 0x7a
mov dword [eax + ecx*4 + 4], 1
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esp + 0x10]
call fcn.1006b680
mov ecx, eax
mov dword [esp + 0x24], ecx
jmp 0x1006ca10
cmp dword [ebp + 0xc], 0
lea edx, [ebx + 0xcc]
jne 0x1006c9dc
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, eax
sub ecx, dword [ebx + 0xc4]
cmp byte [eax], 0x3b
je 0x1006c9ee
add ecx, dword [edx + 4]
push dword [ebx + 0xc4]
push ecx
push dword [esp + 0x30]
push str.CREATE__s__.s
push dword [esp + 0x20]
call fcn.1001fbf0
add esp, 0x14
mov dword [esp + 0x24], eax
mov ecx, eax
push dword [ebx + 0x5c]
mov eax, dword [esi]
mov edx, dword [esp + 0x18]
push ecx
push dword [ebx + 0x60]
shl edx, 4
push eax
push eax
mov eax, dword [esp + 0x24]
push dword [esp + 0x40]
mov dword [esp + 0x38], edx
mov eax, dword [eax + 0x10]
push dword [edx + eax]
push str.UPDATE__Q.sqlite_master_SET_type_s__name_Q__tbl_name_Q__rootpage_d__sql_Q_WHERE_rowid_d
push ebx
call fcn.10068830
add esp, 0x24
push dword [esp + 0x24]
push dword [esp + 0x14]
call fcn.1001ce80
mov eax, dword [ebx]
add esp, 8
mov edx, dword [esp + 0x20]
mov ecx, dword [ebx + 8]
mov dword [esp + 0x28], ecx
mov eax, dword [eax + 0x10]
mov eax, dword [eax + edx + 0xc]
mov edx, dword [eax]
mov eax, dword [ecx + 0x6c]
inc edx
mov dword [esp + 0x2c], eax
cmp dword [ecx + 0x70], eax
jg 0x1006ca8b
push edx
push 1
push dword [esp + 0x1c]
mov edx, 0x64
call fcn.1003f7e0
add esp, 0xc
jmp 0x1006cac4
mov ebx, dword [esp + 0x14]
inc eax
mov dword [ecx + 0x6c], eax
mov eax, dword [esp + 0x2c]
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x68]
mov dword [eax + ecx*4 + 4], ebx
mov ebx, dword [esp + 0x18]
mov dword [eax + ecx*4], 0x64
mov dword [eax + ecx*4 + 8], 1
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
test byte [esi + 0x1c], 8
je 0x1006caf7
cmp byte [ebx + 0xd8], 0
jne 0x1006caf7
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x10]
add ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0xc]
cmp dword [eax + 0x48], 0
jne 0x1006caf7
push dword [ecx]
push str.CREATE_TABLE__Q.sqlite_sequence_name_seq_
push ebx
call fcn.10068830
add esp, 0xc
push 0
push ecx
push dword [esi]
push str.tbl_name_q_AND_type_trigger
push dword [esp + 0x20]
call fcn.1001fbf0
mov edx, dword [esp + 0x28]
add esp, 0x10
mov ecx, edi
push eax
call fcn.1003fcb0
mov edi, dword [esp + 0x18]
add esp, 8
mov al, byte [edi + 0xb1]
test al, al
je 0x1006cb91
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi]
push esi
lea ecx, [ecx + 8]
call fcn.10022320
add esp, 4
test eax, eax
je 0x1006cb4d
mov ecx, edi
call fcn.1001d570
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0xf4], 0
mov ecx, str.sqlite_sequence
or dword [edi + 0x18], 1
mov eax, dword [esi]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1006cb82
test dl, dl
je 0x1006cb7e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1006cb82
add eax, 2
add ecx, 2
test dl, dl
jne 0x1006cb62
xor eax, eax
jmp 0x1006cb87
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1006cb91
mov eax, dword [esi + 0x3c]
mov dword [eax + 0x48], esi
cmp dword [ebp + 0x10], 0
jne 0x1006cbb8
cmp byte [esi + 0x2b], 0
jne 0x1006cbb8
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
test eax, eax
jne 0x1006cbac
mov eax, dword [ebp + 8]
mov eax, dword [eax]
sub eax, dword [ebx + 0xc4]
add eax, 0xd
mov dword [esi + 0x2c], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret