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

Disassembly:
sub esp, 0x54
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x68]
xor eax, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
mov ebx, dword [edi]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x18], eax
cmp byte [ebx + 0x1e], al
jne 0x4979a1
cmp byte [edi + 0x210], al
jne 0x4979a1
push edi
call fcn.004a3c0f
pop ecx
test eax, eax
jne 0x4979a1
mov esi, dword [esp + 0x74]
test esi, esi
je 0x4979aa
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x74]
push dword [esp + 0x74]
push edi
call fcn.004a7578
mov ebp, eax
add esp, 0x10
mov dword [esp + 0x14], ebp
test ebp, ebp
js 0x4979a1
cmp byte [ebx + 0x7c], 0
jne 0x497957
push esi
push edi
call fcn.004a69ba
pop ecx
pop ecx
mov ecx, dword [esp + 0x70]
cmp dword [ecx + 4], 0
jne 0x497957
test eax, eax
je 0x497957
mov ecx, dword [ebx + 8]
mov eax, dword [eax + 0x44]
push 1
cmp eax, dword [ecx + 0x1c]
pop eax
cmove ebp, eax
mov dword [esp + 0x14], ebp
push dword [esp + 0x1c]
lea eax, [esp + 0x58]
push str.index
push ebp
push edi
push eax
call fcn.0049be2a
add esp, 0x14
test eax, eax
je 0x497980
lea eax, [esp + 0x54]
push esi
push eax
call fcn.0049bec2
pop ecx
pop ecx
push dword [esi + 8]
push dword [esi + 0xc]
push 0
push edi
call fcn.0049f57f
mov esi, eax
mov dword [esp + 0x34], eax
add esp, 0x10
test esi, esi
je 0x4979a1
cmp byte [ebx + 0x1e], 0
je 0x4979c9
mov ebp, dword [esp + 0x78]
jmp 0x498097
mov esi, dword [edi + 0x1fc]
mov dword [esp + 0x24], esi
test esi, esi
je 0x4979a1
push dword [esi + 0x44]
push ebx
call fcn.004a4ffd
pop ecx
mov ebp, eax
pop ecx
mov dword [esp + 0x14], ebp
mov eax, dword [ebx + 8]
mov ecx, ebp
shl ecx, 4
add eax, ecx
mov dword [esp + 0x3c], ecx
push 7
mov dword [esp + 0x2c], eax
mov eax, dword [esi]
push str.sqlite_
push eax
mov dword [esp + 0x44], eax
call fcn.0047b93b
add esp, 0xc
test eax, eax
jne 0x497a25
mov eax, dword [esi]
push 9
add eax, 7
push str.altertab_
push eax
call fcn.004bd26c
add esp, 0xc
test eax, eax
je 0x497a25
push dword [esp + 0x38]
push str.table__s_may_not_be_indexed
push edi
call fcn.00499475
add esp, 0xc
jmp 0x4979a1
cmp dword [esi + 0x1c], 0
je 0x497a3d
push str.views_may_not_be_indexed
push edi
call fcn.00499475
pop ecx
pop ecx
jmp 0x4979a1
test byte [esi + 0x22], 0x10
je 0x497a4a
push str.virtual_tables_may_not_be_indexed
jmp 0x497a30
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x497adc
push eax
push ebx
call fcn.0049fd66
mov dword [esp + 0x18], eax
pop ecx
pop ecx
test eax, eax
je 0x4979a1
push eax
push edi
call fcn.0049690f
pop ecx
pop ecx
test eax, eax
jne 0x4979a1
cmp byte [ebx + 0x7c], al
jne 0x497aa1
push eax
push dword [esp + 0x14]
push ebx
call fcn.0049b9a6
add esp, 0xc
test eax, eax
je 0x497aa1
push dword [esp + 0x10]
push str.there_is_already_a_table_named__s
jmp 0x497a17
mov eax, dword [esp + 0x28]
push dword [eax]
push dword [esp + 0x14]
push ebx
call fcn.0049b925
add esp, 0xc
test eax, eax
je 0x497b0a
cmp dword [esp + 0x8c], 0
jne 0x497ad0
push dword [esp + 0x10]
push str.index__s_already_exists
jmp 0x497a17
push ebp
push edi
call fcn.0049714a
jmp 0x497a36
mov eax, dword [esi + 0x10]
xor ecx, ecx
inc ecx
jmp 0x497ae8
mov eax, dword [eax + 0x20]
inc ecx
test eax, eax
jne 0x497ae4
mov eax, dword [esi]
push ecx
push eax
push str.sqlite_autoindex__s__d
push ebx
call fcn.0049f6a7
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
je 0x4979a1
mov eax, dword [esp + 0x28]
mov edx, str.sqlite_master
cmp ebp, 1
mov ecx, dword [eax]
mov eax, str.sqlite_temp_master
push ecx
push 0
cmovne eax, edx
mov dword [esp + 0x40], ecx
push eax
push 0x12
push edi
call fcn.00493ab1
add esp, 0x14
test eax, eax
jne 0x4979a1
push 3
pop ecx
push dword [esp + 0x38]
xor edx, edx
push dword [esi]
inc edx
push dword [esp + 0x18]
cmp ebp, edx
mov eax, edx
cmove eax, ecx
push eax
push edi
call fcn.00493ab1
add esp, 0x14
test eax, eax
jne 0x4979a1
mov ebp, dword [esp + 0x78]
mov dword [esp + 0x20], ebp
test ebp, ebp
jne 0x497bc0
imul ecx, dword [esi + 8], 0x18
mov eax, dword [esi + 0xc]
mov eax, dword [ecx + eax - 0x18]
push eax
mov dword [esp + 0x50], eax
call fcn.004a7151
push ebp
push ebp
push edi
mov dword [esp + 0x60], eax
call fcn.0049b0b1
mov ebp, eax
mov dword [esp + 0x30], eax
add esp, 0x10
test ebp, ebp
je 0x498097
push 0
lea eax, [esp + 0x50]
push eax
push ebp
push edi
call fcn.0049b311
mov ecx, dword [ebp + 0xc]
add esp, 0x10
mov al, byte [esp + 0x88]
mov byte [ecx + 0xc], al
mov edx, dword [ebp]
mov dword [esp + 0x38], edx
test edx, edx
jle 0x497c07
mov ebp, dword [ebp + 0xc]
mov ecx, edx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x30], ecx
mov eax, dword [ebp]
test eax, eax
je 0x497bf5
mov eax, dword [eax + 0x14]
test eax, eax
je 0x497bf5
push dword [eax]
call fcn.004a7151
pop ecx
mov ecx, dword [esp + 0x30]
inc ebx
add ebx, eax
add ebp, 0x14
dec ecx
mov dword [esp + 0x30], ecx
jne 0x497bd8
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x34]
push dword [esp + 0x10]
call fcn.004a7151
mov ecx, eax
imul eax, edx, 0xd
mov dword [esp + 0x34], ecx
add eax, ecx
mov ecx, dword [esp + 0x1c]
add ecx, 0x35
add eax, ecx
push eax
push ebx
call fcn.0049833a
add esp, 0xc
mov ebp, eax
cmp byte [ebx + 0x1e], 0
mov dword [esp + 0x48], ebp
jne 0x49807c
mov ecx, dword [esp + 0x38]
lea eax, [ebp + 0x30]
mov dword [ebp + 0xc], eax
lea eax, [eax + ecx*4]
add eax, 4
mov dword [ebp + 0x2c], eax
lea eax, [eax + ecx*4]
mov dword [ebp + 8], eax
lea eax, [eax + ecx*4]
add ecx, eax
mov dword [ebp + 0x28], eax
mov eax, dword [esp + 0x30]
mov dword [ebp], ecx
lea edx, [eax + 1]
add edx, ecx
inc eax
push eax
push dword [esp + 0x14]
mov dword [esp + 0x34], edx
push ecx
call fcn.004be9f0
mov ecx, dword [esp + 0x2c]
add esp, 0xc
cmp dword [esp + 0x1c], 0
mov edx, dword [esp + 0x3c]
mov dword [ebp + 0x10], esi
mov eax, dword [ecx]
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x7c]
mov byte [ebp + 0x18], al
sete al
mov byte [ebp + 0x19], al
mov eax, dword [ebx + 8]
mov eax, dword [edx + eax + 0xc]
mov dword [ebp + 0x24], eax
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0xc]
cmp byte [eax + 0x4c], 4
sbb eax, eax
xor edx, edx
neg eax
mov dword [esp + 0x30], edx
dec eax
mov dword [esp + 0x4c], eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x18], eax
cmp dword [ecx], edx
jle 0x497ddc
mov eax, dword [esi + 0xc]
xor ecx, ecx
mov dword [esp + 0x44], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x38], eax
test eax, eax
jle 0x497d2b
mov esi, dword [esp + 0x44]
mov edi, ecx
mov ebp, dword [esp + 0x18]
mov ebx, eax
push dword [esi]
push dword [ebp + 4]
call fcn.004a7112
pop ecx
pop ecx
test eax, eax
je 0x497d0b
inc edi
add esi, 0x18
cmp edi, ebx
jl 0x497cf3
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x48]
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x68]
mov ecx, dword [esp + 0x28]
cmp ecx, eax
jge 0x497eb5
mov eax, dword [ebp + 8]
mov dword [eax + edx*4], ecx
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
test eax, eax
je 0x497d75
mov edx, dword [eax + 0x14]
test edx, edx
je 0x497d75
push dword [edx]
call fcn.004a7151
lea esi, [eax + 1]
push esi
push dword [edx]
push dword [esp + 0x38]
call fcn.004be9f0
mov ecx, dword [esp + 0x3c]
add esp, 0x10
mov eax, ecx
add ecx, esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x2c], ecx
jmp 0x497d8c
mov eax, dword [esi + 0xc]
imul ecx, ecx, 0x18
mov eax, dword [ecx + eax + 0x10]
mov dword [esp + 0x28], eax
test eax, eax
jne 0x497d90
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [esp + 0x28], eax
cmp byte [ebx + 0x7c], 0
jne 0x497da7
push eax
push edi
call fcn.0049f50e
pop ecx
pop ecx
test eax, eax
je 0x49807c
mov edx, dword [esp + 0x30]
mov eax, dword [ebp + 0x2c]
mov ecx, dword [esp + 0x28]
mov dword [eax + edx*4], ecx
mov eax, dword [esp + 0x18]
add dword [esp + 0x18], 0x14
mov cl, byte [eax + 0xc]
mov eax, dword [ebp + 0x28]
and cl, byte [esp + 0x4c]
mov byte [edx + eax], cl
inc edx
mov eax, dword [esp + 0x20]
mov dword [esp + 0x30], edx
cmp edx, dword [eax]
jl 0x497cd3
push ebp
call fcn.0049849d
pop ecx
cmp esi, dword [edi + 0x1fc]
jne 0x497e7f
mov edx, dword [esi + 0x10]
mov dword [esp + 0x18], edx
test edx, edx
je 0x497e7f
mov eax, dword [ebp + 4]
cmp dword [edx + 4], eax
jne 0x497e74
xor eax, eax
mov dword [esp + 0x30], eax
cmp eax, dword [edx + 4]
jge 0x497e6f
mov eax, dword [ebp + 8]
mov ebx, dword [edx + 8]
sub eax, ebx
mov edi, dword [esp + 0x30]
mov esi, eax
mov dword [esp + 0x4c], eax
lea ecx, [ebx + edi*4]
mov eax, dword [ecx]
cmp eax, dword [esi + ecx]
jne 0x497e58
mov eax, dword [edx + 0x2c]
mov ecx, dword [eax + edi*4]
mov eax, dword [ebp + 0x2c]
cmp ecx, dword [eax + edi*4]
je 0x497e4e
push dword [eax + edi*4]
push ecx
call fcn.004a7112
pop ecx
pop ecx
test eax, eax
jne 0x497e58
mov edx, dword [esp + 0x18]
inc edi
mov dword [esp + 0x30], edi
cmp edi, dword [edx + 4]
jl 0x497e23
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x68]
mov ebx, dword [esp + 0x34]
mov esi, dword [esp + 0x24]
cmp eax, dword [edx + 4]
je 0x497ed7
mov eax, dword [ebp + 4]
mov edx, dword [edx + 0x20]
mov dword [esp + 0x18], edx
test edx, edx
jne 0x497e01
cmp byte [ebx + 0x7c], 0
je 0x497f35
push ebp
push dword [ebp]
call fcn.004a7151
pop ecx
push eax
mov eax, dword [ebp + 0x24]
push dword [ebp]
add eax, 0x18
push eax
call fcn.0049daaf
add esp, 0x10
test eax, eax
je 0x497f17
xor eax, eax
inc eax
mov byte [ebx + 0x1e], al
jmp 0x49807c
mov eax, dword [esp + 0x18]
push dword [eax + 4]
push dword [esi]
push str.table__s_has_no_column_named__s
push edi
call fcn.00499475
xor eax, eax
add esp, 0x10
inc eax
mov byte [edi + 0x12], al
jmp 0x49807c
mov al, byte [edx + 0x18]
mov cl, byte [ebp + 0x18]
cmp al, cl
je 0x49807c
cmp al, 0x63
je 0x497f02
cmp cl, 0x63
je 0x497f02
push 0
push str.conflicting_ON_CONFLICT_clauses_specified
push edi
call fcn.00499475
mov edx, dword [esp + 0x24]
add esp, 0xc
cmp byte [edx + 0x18], 0x63
jne 0x49807c
mov al, byte [ebp + 0x18]
mov byte [edx + 0x18], al
jmp 0x49807c
or dword [ebx + 0xc], 0x200
mov eax, dword [esp + 0x74]
test eax, eax
je 0x49804f
mov eax, dword [ebx + 0x78]
mov dword [ebp + 0x14], eax
jmp 0x49804b
inc dword [edi + 0x48]
mov eax, dword [edi + 0x48]
push edi
mov dword [esp + 0x6c], eax
call fcn.0049d9c4
mov dword [esp + 0x38], eax
pop ecx
test eax, eax
je 0x49807c
push dword [esp + 0x14]
xor eax, eax
inc eax
push eax
push edi
call fcn.00494412
push dword [esp + 0x74]
push dword [esp + 0x24]
push 0x68
push dword [esp + 0x4c]
call fcn.004a9403
add esp, 0x1c
cmp dword [esp + 0x80], 0
je 0x497fb9
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x84]
push dword [ecx]
mov eax, dword [eax]
sub eax, dword [ecx]
mov ecx, str._UNIQUE
inc eax
cmp dword [esp + 0x80], 0
push eax
mov eax, 0x4d7950
cmovne eax, ecx
push eax
push str.CREATE_s_INDEX__.s
push ebx
call fcn.0049f6a7
add esp, 0x14
jmp 0x497fbb
xor eax, eax
cmp dword [esp + 0x14], 1
mov edx, str.sqlite_master
push eax
push dword [esp + 0x6c]
mov ecx, str.sqlite_temp_master
mov dword [esp + 0x40], eax
push dword [esi]
mov eax, dword [ebx + 8]
cmovne ecx, edx
push dword [ebp]
push ecx
mov ecx, dword [esp + 0x50]
push dword [ecx + eax]
push str.INSERT_INTO__Q._s_VALUES_index__Q__Q__d__Q__
push edi
call fcn.0049fd90
push dword [esp + 0x58]
push ebx
call fcn.00498232
mov eax, dword [esp + 0x9c]
add esp, 0x28
test eax, eax
je 0x49804f
push dword [esp + 0x68]
push ebp
push edi
call fcn.004a3d50
push dword [esp + 0x20]
push edi
call fcn.004968c4
push dword [ebp]
push str.name_q_AND_typeindex
push ebx
call fcn.0049f6a7
mov edi, dword [esp + 0x54]
push eax
push dword [esp + 0x38]
push edi
call fcn.004a9569
push 0
push 0x81
push edi
call fcn.004a93ea
add esp, 0x38
mov eax, dword [esp + 0x74]
cmp byte [ebx + 0x7c], 0
jne 0x498059
test eax, eax
jne 0x49807c
cmp dword [esp + 0x7c], 5
jne 0x49806d
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x49806d
cmp byte [ecx + 0x18], 5
jne 0x4980cc
mov eax, dword [esi + 0x10]
mov dword [ebp + 0x20], eax
mov dword [esi + 0x10], ebp
mov dword [esp + 0x40], ebp
xor ebp, ebp
test ebp, ebp
je 0x498093
push dword [ebp + 0x1c]
push ebx
call fcn.00498232
push ebp
push ebx
call fcn.00498232
add esp, 0x10
mov ebp, dword [esp + 0x20]
push ebp
push ebx
call fcn.0049b1c9
push dword [esp + 0x7c]
push ebx
call fcn.004a66b6
push dword [esp + 0x20]
push ebx
call fcn.00498232
mov eax, dword [esp + 0x58]
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov eax, dword [ecx + 0x20]
cmp byte [eax + 0x18], 5
je 0x4980d2
mov ecx, eax
cmp dword [ecx + 0x20], 0
jne 0x4980c1
mov eax, dword [ecx + 0x20]
mov dword [ebp + 0x20], eax
mov dword [ecx + 0x20], ebp
jmp 0x498076