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

Disassembly:
sub esp, 0x4c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x5c]
xor ebp, ebp
push edi
xor eax, eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x2c], 0
mov edi, dword [esi]
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x20], eax
cmp byte [edi + 0x49], al
jne 0x646bdc
cmp dword [esi + 0x24], eax
jg 0x646bdc
cmp byte [esi + 0x190], al
je 0x646bbd
cmp byte [esp + 0x88], 2
jne 0x646bdc
cmp byte [edi + 0x9d], al
jne 0x646be5
lea eax, [esi + 4]
push eax
push edi
call fcn.006580b0
add esp, 8
test eax, eax
je 0x646be5
inc dword [esi + 0x24]
mov dword [esi + 0xc], eax
mov ebx, dword [esp + 0x70]
jmp 0x647263
cmp dword [esp + 0x6c], ebp
je 0x646cce
mov ebx, dword [esp + 0x68]
lea eax, [esp + 0x2c]
push eax
push ebx
push dword [esp + 0x6c]
push esi
call fcn.006682d0
add esp, 0x10
mov dword [esp + 0x14], eax
test eax, eax
js 0x646bdc
cmp byte [edi + 0x9d], 0
jne 0x646c47
push dword [esp + 0x6c]
push esi
call fcn.00666f20
add esp, 8
cmp dword [ebx + 4], ebp
jne 0x646c43
test eax, eax
je 0x646c43
mov ecx, dword [edi + 0x10]
mov eax, dword [eax + 0x48]
cmp eax, dword [ecx + 0x1c]
jne 0x646c43
mov eax, 1
mov dword [esp + 0x14], eax
jmp 0x646c47
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
push ecx
push 0x6c6d40
push eax
lea eax, [esp + 0x50]
push esi
push eax
call fcn.0064f4a0
mov ebx, dword [esp + 0x80]
lea eax, [esp + 0x58]
push ebx
push eax
call fcn.0064f610
lea eax, [ebx + 8]
push eax
push 0
push esi
call fcn.0065abd0
mov ebx, eax
add esp, 0x28
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x646bdc
mov edx, dword [esp + 0x14]
cmp edx, 1
jne 0x646cb9
mov eax, dword [edi + 0x10]
mov eax, dword [eax + 0x1c]
cmp eax, dword [ebx + 0x48]
je 0x646cb9
push dword [ebx]
push str.cannot_create_a_TEMP_index_on_non_TEMP_table___s_
push esi
call fcn.00649670
mov ebx, dword [esp + 0x7c]
add esp, 0xc
jmp 0x647263
test byte [ebx + 0x24], 0x20
je 0x646cf2
push ebx
call fcn.00661920
add esp, 4
mov dword [esp + 0x20], eax
jmp 0x646cf2
mov ebx, dword [esi + 0x1b0]
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x646bdc
push dword [ebx + 0x48]
push edi
call fcn.00663ac0
mov edx, eax
add esp, 8
mov dword [esp + 0x14], edx
mov eax, dword [edi + 0x10]
mov ecx, edx
mov ebx, dword [ebx]
shl ecx, 4
push 7
add eax, ecx
mov dword [esp + 0x3c], ecx
push str.sqlite_
push ebx
mov dword [esp + 0x34], eax
call fcn.00604d40
add esp, 0xc
test eax, eax
jne 0x646d51
cmp byte [edi + 0x9d], al
jne 0x646d51
push 9
lea eax, [ebx + 7]
push str.altertab_
push eax
call fcn.00604d40
add esp, 0xc
test eax, eax
je 0x646d51
push ebx
push str.table__s_may_not_be_indexed
push esi
call fcn.00649670
mov ebx, dword [esp + 0x7c]
add esp, 0xc
jmp 0x647263
mov eax, dword [esp + 0x10]
cmp dword [eax + 0xc], ebp
je 0x646d71
push str.views_may_not_be_indexed
push esi
call fcn.00649670
mov ebx, dword [esp + 0x78]
add esp, 8
jmp 0x647263
cmp dword [eax + 0x38], ebp
je 0x646d8d
push str.virtual_tables_may_not_be_indexed
push esi
call fcn.00649670
mov ebx, dword [esp + 0x78]
add esp, 8
jmp 0x647263
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x646e45
push ecx
push edi
call fcn.0065b710
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x646bdc
push eax
push esi
call fcn.00644ce0
add esp, 8
test eax, eax
jne 0x646bdc
cmp byte [edi + 0x9d], al
jne 0x646df4
mov ebx, dword [esp + 0x1c]
push eax
push ebx
push edi
call fcn.0064ed50
add esp, 0xc
test eax, eax
je 0x646df4
push ebx
push str.there_is_already_a_table_named__s
push esi
call fcn.00649670
mov ebx, dword [esp + 0x7c]
add esp, 0xc
jmp 0x647263
mov ebx, dword [esp + 0x28]
push dword [ebx]
push dword [esp + 0x20]
push edi
call fcn.0064ec90
add esp, 0xc
test eax, eax
je 0x646e85
cmp dword [esp + 0x84], ebp
jne 0x646e2f
push dword [esp + 0x1c]
push str.index__s_already_exists
push esi
call fcn.00649670
mov ebx, dword [esp + 0x7c]
add esp, 0xc
jmp 0x647263
push dword [esp + 0x14]
push esi
call fcn.00645b30
mov ebx, dword [esp + 0x78]
add esp, 8
jmp 0x647263
mov eax, dword [eax + 8]
mov ecx, 1
test eax, eax
je 0x646e59
mov eax, dword [eax + 0x14]
inc ecx
test eax, eax
jne 0x646e51
push ecx
push ebx
push str.sqlite_autoindex__s__d
push edi
call fcn.0065af10
add esp, 0x10
mov dword [esp + 0x1c], eax
test eax, eax
je 0x646bdc
cmp byte [esi + 0x190], 0
mov ebx, dword [esp + 0x28]
je 0x646e85
inc byte [eax + 7]
cmp dword [esp + 0x14], 1
mov eax, str.sqlite_temp_master
mov ebx, dword [ebx]
je 0x646e98
mov eax, str.sqlite_master
push ebx
push 0
push eax
push 0x12
push esi
call fcn.00640650
add esp, 0x14
test eax, eax
jne 0x646bdc
mov eax, 1
cmp dword [esp + 0x14], eax
jne 0x646ebf
mov eax, 3
push ebx
mov ebx, dword [esp + 0x14]
push dword [ebx]
push dword [esp + 0x24]
push eax
push esi
call fcn.00640650
add esp, 0x14
test eax, eax
jne 0x646bdc
mov eax, dword [esp + 0x70]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x646f3a
movsx ecx, word [ebx + 0x2a]
mov eax, dword [ebx + 4]
add ecx, ecx
push dword [eax + ecx*8 - 0x10]
lea eax, [esp + 0x40]
push eax
call fcn.00667d80
push 0
lea eax, [esp + 0x48]
push eax
push 0x3b
push edi
call fcn.00649a00
push eax
push 0
push esi
call fcn.0064d930
mov ebx, eax
add esp, 0x24
mov dword [esp + 0x18], ebx
test ebx, ebx
je 0x647263
push dword [esp + 0x80]
push ebx
call fcn.0064de50
add esp, 8
jmp 0x646f4b
push 0x6c6d40
mov ebx, eax
push ebx
push esi
call fcn.0064db10
add esp, 0xc
mov ebx, dword [ebx]
test ebx, ebx
jle 0x646f7b
mov edi, dword [esp + 0x18]
add edi, 4
mov eax, dword [edi]
cmp byte [eax], 0x5e
jne 0x646f6d
push dword [eax + 8]
call fcn.00667910
inc ebp
add esp, 4
add ebp, eax
add edi, 0x18
dec ebx
jne 0x646f58
mov edi, dword [esp + 0x24]
mov dword [esp + 0x30], ebp
push dword [esp + 0x1c]
call fcn.00667910
mov ebp, eax
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x646f97
movzx ecx, word [eax + 0x32]
jmp 0x646f9c
mov ecx, 1
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x34]
inc eax
add eax, ebp
push eax
mov eax, dword [esp + 0x20]
mov ax, word [eax]
add ax, cx
movzx eax, ax
push eax
push edi
call fcn.0063f250
add esp, 0x10
mov ebx, eax
cmp byte [edi + 0x49], 0
jne 0x647251
mov ecx, dword [esp + 0x34]
mov dword [ebx], ecx
lea eax, [ecx + 1]
lea ecx, [ebp + 1]
add eax, ebp
push ecx
push dword [esp + 0x20]
mov dword [esp + 0x3c], eax
push dword [ebx]
call sub.MSVCRT.dll_memcpy
mov eax, dword [esp + 0x80]
xor ecx, ecx
mov edx, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
mov byte [ebx + 0x36], al
movzx eax, byte [esp + 0x88]
setne cl
mov ebp, dword [esp + 0x7c]
and eax, 3
mov dword [ebx + 0xc], edx
and ecx, 1
shl ecx, 3
or ecx, eax
mov eax, dword [ebx + 0x38]
and eax, 0xfffffff4
or ecx, eax
mov dword [ebx + 0x38], ecx
mov eax, dword [edi + 0x10]
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + eax + 0xc]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x18]
mov ax, word [eax]
mov word [ebx + 0x32], ax
test ebp, ebp
je 0x64705e
push 0
push ebp
push 2
push edx
push esi
call fcn.00662800
add esp, 0x14
mov dword [ebx + 0x24], ebp
mov dword [esp + 0x7c], 0
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0xc]
cmp byte [eax + 0x4c], 4
sbb eax, eax
xor ebp, ebp
neg eax
mov dword [esp + 0x28], ebp
dec eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
lea edx, [eax + 4]
mov dword [esp + 0x70], edx
cmp dword [eax], ebp
jle 0x6471ea
mov dword [esp + 0x30], ebp
nop
push dword [edx]
call fcn.006678f0
push 0
push dword [edx]
push 0x20
push dword [esp + 0x20]
push esi
call fcn.00662800
add esp, 0x18
cmp dword [esi + 0x24], 0
jne 0x647251
mov eax, dword [esp + 0x70]
push dword [eax]
call fcn.0064e050
add esp, 4
cmp byte [eax], 0x91
je 0x647116
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 0x1b0]
je 0x647243
cmp dword [ebx + 0x28], 0
jne 0x647102
push 0
push dword [esp + 0x1c]
push edi
call fcn.0064dbe0
add esp, 0xc
mov dword [ebx + 0x28], eax
cmp byte [edi + 0x49], 0
jne 0x647102
mov ecx, dword [esp + 0x30]
add ecx, 4
add eax, ecx
mov dword [esp + 0x70], eax
mov eax, dword [ebx + 4]
mov edx, 0xfffffffe
mov ecx, edx
mov word [eax + ebp*2], cx
and dword [ebx + 0x38], 0xfffffff7
jmp 0x647141
movsx edx, word [eax + 0x20]
mov eax, dword [esp + 0x10]
test edx, edx
jns 0x647128
movsx edx, word [eax + 0x28]
jmp 0x64713a
mov eax, dword [eax + 4]
mov ecx, edx
add ecx, ecx
cmp byte [eax + ecx*8 + 0xc], 0
jne 0x64713a
and dword [ebx + 0x38], 0xfffffff7
mov eax, dword [ebx + 4]
mov word [eax + ebp*2], dx
mov eax, dword [esp + 0x70]
mov eax, dword [eax]
cmp byte [eax], 0x5e
jne 0x647179
mov esi, dword [eax + 8]
push esi
call fcn.00667910
lea edi, [eax + 1]
push edi
push esi
mov esi, dword [esp + 0x40]
push esi
call sub.MSVCRT.dll_memcpy
mov ebp, esi
add esp, 0x10
add esi, edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x60]
jmp 0x64718a
test edx, edx
js 0x64718e
mov eax, dword [esp + 0x10]
add edx, edx
mov eax, dword [eax + 4]
mov ebp, dword [eax + edx*8 + 8]
test ebp, ebp
jne 0x647193
mov ebp, 0x6c1a88
cmp byte [edi + 0x9d], 0
jne 0x6471ae
push ebp
push esi
call fcn.0065aa40
add esp, 8
test eax, eax
je 0x647251
mov eax, dword [ebx + 0x20]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x70]
add dword [esp + 0x30], 0x18
mov dword [eax + ecx*4], ebp
mov ebp, dword [esp + 0x28]
mov cl, byte [edx + 0xc]
add edx, 0x18
mov eax, dword [ebx + 0x1c]
and cl, byte [esp + 0x3c]
mov dword [esp + 0x70], edx
mov byte [eax + ebp], cl
inc ebp
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], ebp
cmp ebp, dword [eax]
jl 0x647090
mov edx, dword [esp + 0x20]
test edx, edx
je 0x6472ee
xor eax, eax
xor edi, edi
cmp ax, word [edx + 0x32]
jae 0x647302
mov esi, dword [esp + 0x28]
jmp 0x647210
mov eax, dword [edx + 4]
mov ecx, dword [ebx + 4]
movsx ebp, word [eax + edi*2]
movzx eax, word [ebx + 0x32]
push ebp
push eax
push ecx
call fcn.0062e4a0
mov edx, dword [esp + 0x2c]
add esp, 0xc
test eax, eax
je 0x6472bb
mov eax, 0xffff
add word [ebx + 0x34], ax
jmp 0x6472db
push str.expressions_prohibited_in_PRIMARY_KEY_and_UNIQUE_constraints
push esi
call fcn.00649670
add esp, 8
test ebx, ebx
je 0x64725f
push ebx
push edi
call fcn.0061b920
add esp, 8
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x7c]
test ebp, ebp
je 0x647275
push ebp
push edi
call fcn.0064cdb0
add esp, 8
test ebx, ebx
je 0x647283
push ebx
push edi
call fcn.006186f0
add esp, 8
push dword [esp + 0x6c]
push edi
call fcn.006668d0
mov ecx, dword [esp + 0x24]
add esp, 8
test ecx, ecx
je 0x647682
cmp dword [edi + 0x1d0], 0
je 0x647653
push ecx
push edi
call fcn.006311f0
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov eax, dword [ebx + 4]
mov word [eax + esi*2], bp
mov eax, dword [edx + 0x20]
mov ecx, dword [ebx + 0x20]
mov eax, dword [eax + edi*4]
mov dword [ecx + esi*4], eax
mov eax, dword [edx + 0x1c]
mov ecx, dword [ebx + 0x1c]
mov al, byte [edi + eax]
mov byte [esi + ecx], al
inc esi
movzx eax, word [edx + 0x32]
inc edi
cmp edi, eax
jl 0x647210
mov esi, dword [esp + 0x60]
jmp 0x647302
mov eax, dword [ebx + 4]
or ecx, 0xffffffff
mov word [eax + ebp*2], cx
mov eax, dword [ebx + 0x20]
mov dword [eax + ebp*4], 0x6c1a88
push ebx
call fcn.00647cb0
add esp, 4
cmp dword [esi + 0x1b0], 0
jne 0x64731d
push ebx
call fcn.00616250
add esp, 4
cmp dword [esp + 0x6c], 0
mov edx, dword [esp + 0x10]
je 0x647376
movzx ecx, word [ebx + 0x34]
movsx eax, word [edx + 0x2a]
cmp ecx, eax
jl 0x647376
or dword [ebx + 0x38], 0x20
xor edi, edi
movsx ebp, word [edx + 0x2a]
test ebp, ebp
jle 0x647376
movzx eax, word [edx + 0x28]
cwde
mov dword [esp + 0x70], eax
jmp 0x647350
cmp edi, eax
je 0x647367
push edi
push ebx
call fcn.00645d70
add esp, 8
test ax, ax
js 0x64736e
mov eax, dword [esp + 0x70]
inc edi
cmp edi, ebp
jl 0x647350
jmp 0x647372
and dword [ebx + 0x38], 0xffffffdf
mov edx, dword [esp + 0x10]
cmp edx, dword [esi + 0x1b0]
jne 0x6473f9
mov ebp, dword [edx + 8]
test ebp, ebp
je 0x6473f9
movzx ecx, word [ebx + 0x32]
lea esp, [esp]
movzx eax, word [ebp + 0x32]
cmp ax, cx
jne 0x6473ea
mov ecx, eax
xor edi, edi
mov dword [esp + 0x70], ecx
test ecx, ecx
jle 0x6473e2
mov edx, dword [ebx + 4]
mov esi, dword [ebp + 4]
sub edx, esi
mov dword [esp + 0x3c], edx
mov ax, word [esi]
cmp ax, word [edx + esi]
jne 0x6473e2
mov eax, dword [ebx + 0x20]
push dword [eax + edi*4]
mov eax, dword [ebp + 0x20]
push dword [eax + edi*4]
call fcn.006678a0
mov ecx, dword [esp + 0x78]
add esp, 8
test eax, eax
jne 0x6473e2
mov edx, dword [esp + 0x3c]
inc edi
add esi, 2
cmp edi, ecx
jl 0x6473b1
cmp edi, ecx
je 0x64742e
movzx ecx, word [ebx + 0x32]
mov ebp, dword [ebp + 0x14]
test ebp, ebp
jne 0x647390
mov esi, dword [esp + 0x60]
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
cmp byte [edi + 0x9d], 0
je 0x6474a5
mov eax, dword [ebx + 0x18]
push ebx
push dword [ebx]
add eax, 0x18
push eax
call fcn.006578f0
add esp, 0xc
test eax, eax
je 0x647483
push edi
call fcn.0065b8c0
add esp, 4
jmp 0x647251
mov al, byte [ebp + 0x36]
mov cl, byte [ebx + 0x36]
cmp al, cl
je 0x647460
cmp al, 0xa
je 0x647454
cmp cl, 0xa
je 0x647454
push 0
push str.conflicting_ON_CONFLICT_clauses_specified
push dword [esp + 0x68]
call fcn.00649670
add esp, 0xc
cmp byte [ebp + 0x36], 0xa
jne 0x647460
mov al, byte [ebx + 0x36]
mov byte [ebp + 0x36], al
cmp byte [esp + 0x88], 2
mov edi, dword [esp + 0x24]
jne 0x647251
mov eax, dword [ebp + 0x38]
and eax, 0xfffffffe
or eax, 2
mov dword [ebp + 0x38], eax
jmp 0x647251
or dword [edi + 0x18], 1
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x10]
test eax, eax
je 0x6475fb
mov eax, dword [edi + 0x98]
mov dword [ebx + 0x2c], eax
jmp 0x6475f7
test byte [edx + 0x24], 0x20
je 0x6474b7
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x6475fb
inc dword [esi + 0x2c]
mov ebp, dword [esi + 8]
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x70], eax
test ebp, ebp
jne 0x6474ec
cmp dword [esi + 0x78], ebp
jne 0x6474d9
mov eax, dword [esi]
test byte [eax + 0x44], 8
jne 0x6474d9
mov byte [esi + 0x17], 1
push esi
call fcn.0066c560
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x647251
push dword [esp + 0x14]
push 1
push esi
call fcn.006410b0
push 0xa6
push ebp
call fcn.0066bae0
push 2
push dword [esp + 0x88]
mov dword [ebx + 0x2c], eax
push dword [esp + 0x30]
push 0x87
push ebp
call fcn.0066bc10
add esp, 0x28
cmp dword [esp + 0x78], 0
je 0x647568
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi + 0x188]
add eax, dword [esi + 0x184]
mov ecx, dword [ecx]
sub eax, ecx
cmp byte [ecx + eax - 1], 0x3b
jne 0x647544
dec eax
cmp dword [esp + 0x74], 0
mov edx, 0x6aad7b
je 0x647555
mov edx, str._UNIQUE
push ecx
push eax
push edx
push str.CREATE_s_INDEX__.s
push edi
call fcn.0065af10
add esp, 0x14
jmp 0x64756a
xor eax, eax
mov ecx, dword [esp + 0x38]
push eax
push dword [esp + 0x74]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x18]
push dword [eax]
mov eax, dword [edi + 0x10]
push dword [ebx]
push str.sqlite_master
push dword [ecx + eax]
push str.INSERT_INTO__Q._s_VALUES_index__Q__Q__d__Q__
push esi
call fcn.0065b780
push dword [esp + 0x80]
push edi
call fcn.00647820
add esp, 0x28
cmp dword [esp + 0x6c], 0
je 0x6475e7
push dword [esp + 0x70]
push ebx
push esi
call fcn.00661b80
push dword [esp + 0x20]
push esi
call fcn.00644c30
push dword [ebx]
push str.name_q_AND_typeindex
push edi
call fcn.0065af10
push eax
push dword [esp + 0x38]
push ebp
call fcn.0066bea0
push 0x97
push ebp
call fcn.0066bae0
add esp, 0x34
push dword [ebx + 0x2c]
push ebp
call fcn.006736b0
mov edx, dword [esp + 0x18]
add esp, 8
mov eax, dword [esp + 0x6c]
cmp byte [edi + 0x9d], 0
jne 0x64760c
test eax, eax
jne 0x647251
cmp dword [esp + 0x74], 5
jne 0x647645
mov ecx, dword [edx + 8]
test ecx, ecx
je 0x647645
cmp byte [ecx + 0x36], 5
je 0x647645
cmp dword [ecx + 0x14], 0
je 0x647637
mov eax, dword [ecx + 0x14]
cmp byte [eax + 0x36], 5
je 0x647637
mov ecx, eax
cmp dword [ecx + 0x14], 0
jne 0x647626
mov eax, dword [ecx + 0x14]
mov dword [ebx + 0x14], eax
mov dword [ecx + 0x14], ebx
jmp 0x64725f
mov eax, dword [edx + 8]
mov dword [ebx + 0x14], eax
mov dword [edx + 8], ebx
jmp 0x64725f
cmp ecx, dword [edi + 0x128]
jb 0x647679
cmp ecx, dword [edi + 0x12c]
jae 0x647679
mov eax, dword [edi + 0x124]
mov dword [ecx], eax
mov dword [edi + 0x124], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
push ecx
call fcn.006014a0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret