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

Disassembly:
sub esp, 0x40
push ebx
mov ebx, eax
mov eax, dword [esp + 0x48]
mov eax, dword [eax]
push ebp
xor ebp, ebp
cmp byte [eax + 0x1e], 0
push esi
push edi
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x28], ebp
jne 0x58f981
mov ecx, dword [esp + 0x54]
cmp byte [ecx + 0x214], 0
jne 0x58f981
mov esi, eax
cmp byte [esi + 0x7c], 0
mov edi, ecx
jne 0x58f366
lea edx, [edi + 8]
push edx
call fcn.00589b40
add esp, 4
cmp eax, ebp
je 0x58f366
add dword [edi + 0x40], 1
mov dword [edi + 4], eax
jmp 0x58f981
cmp dword [esp + 0x5c], ebp
je 0x58f4dd
mov edx, dword [esp + 0x58]
push edi
lea ecx, [esp + 0x24]
mov eax, ebx
call fcn.005539d0
add esp, 4
cmp eax, ebp
mov dword [esp + 0x18], eax
jl 0x58f981
mov edi, dword [esp + 0x5c]
mov ebp, esi
cmp byte [ebp + 0x7c], 0
mov esi, dword [esp + 0x54]
jne 0x58f3c7
push esi
mov eax, edi
call fcn.0058ad40
add esp, 4
cmp dword [ebx + 4], 0
jne 0x58f3c7
test eax, eax
je 0x58f3c7
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x40]
cmp edx, dword [ecx + 0x1c]
jne 0x58f3c7
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
push 0x60cc90
lea ecx, [esp + 0x48]
call fcn.005456c0
add esp, 8
test eax, eax
je 0x58f3ef
push edi
push ecx
call fcn.0055b670
add esp, 8
mov edx, dword [edi + 0xc]
mov ebx, dword [edi + 8]
push edx
push 0
mov eax, esi
call fcn.0058a380
add esp, 8
test eax, eax
mov dword [esp + 0x14], eax
je 0x58f981
mov eax, ebp
cmp byte [eax + 0x1e], 0
jne 0x58f981
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov ebp, dword [ecx + 8]
mov edi, dword [ebx]
shl eax, 4
push 7
add ebp, eax
push str.sqlite_
push edi
mov dword [esp + 0x44], eax
mov dword [esp + 0x30], ebp
call fcn.0053ec50
add esp, 0xc
test eax, eax
jne 0x58f527
mov eax, 9
mov ecx, str.altertab_
lea edx, [edi + 7]
lea ecx, [ecx]
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x58f47c
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x58f460
test eax, eax
je 0x58f50a
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x58f4cb
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x58f506
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x58f4cb
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x58f506
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x58f4cb
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x58f506
movzx esi, byte [edx]
movzx edx, byte [ecx]
sub esi, edx
je 0x58f506
test esi, esi
mov ebp, dword [esp + 0x24]
mov eax, 1
jg 0x58f50c
or eax, 0xffffffff
jmp 0x58f50c
mov edi, dword [edi + 0x200]
cmp edi, ebp
mov dword [esp + 0x14], edi
je 0x58f981
mov ecx, dword [esp + 0x10]
mov ebx, edi
mov esi, dword [ebx + 0x40]
call fcn.005466b0
mov dword [esp + 0x18], eax
jmp 0x58f41e
mov ebp, dword [esp + 0x24]
xor eax, eax
test eax, eax
je 0x58f527
push edi
mov edi, dword [esp + 0x58]
push str.table__s_may_not_be_indexed
call fcn.00550e70
add esp, 8
jmp 0x58f981
cmp dword [ebx + 0x18], 0
je 0x58f543
mov edi, dword [esp + 0x54]
push str.views_may_not_be_indexed
call fcn.00550e70
add esp, 4
jmp 0x58f981
test byte [ebx + 0x1e], 0x10
je 0x58f55f
mov edi, dword [esp + 0x54]
push str.virtual_tables_may_not_be_indexed
call fcn.00550e70
add esp, 4
jmp 0x58f981
mov eax, dword [esp + 0x20]
test eax, eax
je 0x58f603
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0054dcb0
add esp, 4
test eax, eax
mov dword [esp + 0x1c], eax
je 0x58f981
mov esi, eax
mov eax, dword [esp + 0x54]
call fcn.00553a60
test eax, eax
jne 0x58f981
mov esi, dword [esp + 0x10]
cmp byte [esi + 0x7c], al
mov edi, dword [esp + 0x1c]
jne 0x58f5ca
push eax
push edi
push esi
call fcn.00545750
add esp, 0xc
test eax, eax
je 0x58f5ca
push edi
mov edi, dword [esp + 0x58]
push str.there_is_already_a_table_named__s
call fcn.00550e70
add esp, 8
jmp 0x58f981
mov edx, dword [ebp]
push edx
push edi
mov ecx, esi
call fcn.00545860
add esp, 8
test eax, eax
je 0x58f639
cmp dword [esp + 0x74], 0
jne 0x58f981
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x54]
push eax
push str.index__s_already_exists
call fcn.00550e70
add esp, 8
jmp 0x58f981
mov eax, dword [ebx + 0x10]
test eax, eax
mov ecx, 1
je 0x58f61a
nop
mov eax, dword [eax + 0x20]
add ecx, 1
test eax, eax
jne 0x58f610
mov esi, dword [esp + 0x10]
push ecx
push edi
push str.sqlite_autoindex__s__d
call fcn.00550c10
add esp, 0xc
test eax, eax
mov dword [esp + 0x1c], eax
je 0x58f981
mov esi, dword [ebp]
mov ebx, 1
cmp dword [esp + 0x18], ebx
mov eax, str.sqlite_temp_master
je 0x58f651
mov eax, str.sqlite_master
push esi
push 0
push eax
mov eax, dword [esp + 0x60]
push 0x12
call fcn.00553690
add esp, 0x10
test eax, eax
jne 0x58f981
cmp dword [esp + 0x18], ebx
mov eax, ebx
jne 0x58f678
mov eax, 3
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x1c]
push esi
push edx
push ecx
push eax
mov eax, dword [esp + 0x64]
call fcn.00553690
add esp, 0x10
test eax, eax
jne 0x58f981
mov edi, dword [esp + 0x60]
test edi, edi
jne 0x58f6f9
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 8]
lea edx, [eax + eax*2]
mov eax, dword [ecx + 0xc]
mov ecx, dword [eax + edx*8 - 0x18]
mov dword [esp + 0x30], ecx
call fcn.0053eb20
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x54]
xor ecx, ecx
xor edx, edx
call fcn.00552e20
test eax, eax
mov dword [esp + 0x60], eax
je 0x58f981
mov ecx, dword [esp + 0x54]
push edi
mov edi, eax
push ecx
lea edx, [esp + 0x38]
mov ecx, edi
call fcn.0054d130
mov edx, dword [edi + 0xc]
mov al, byte [esp + 0x78]
add esp, 8
mov byte [edx + 0xc], al
mov esi, dword [edi]
test esi, esi
jle 0x58f72b
mov edi, dword [edi + 0xc]
mov edx, esi
mov eax, dword [edi]
test eax, eax
je 0x58f724
mov eax, dword [eax + 0x14]
test eax, eax
je 0x58f724
mov ecx, dword [eax]
call fcn.0053eb20
mov ecx, dword [esp + 0x28]
lea eax, [ecx + eax + 1]
mov dword [esp + 0x28], eax
add edi, 0x14
sub edx, ebx
jne 0x58f704
mov ecx, dword [esp + 0x1c]
call fcn.0053eb20
mov edx, dword [esp + 0x28]
mov ecx, esi
imul ecx, ecx, 0xd
mov ebx, eax
mov eax, dword [esp + 0x10]
add ecx, ebx
lea edi, [ecx + edx + 0x39]
call fcn.0054fc90
mov ebp, eax
mov eax, dword [esp + 0x10]
cmp byte [eax + 0x1e], 0
jne 0x58f965
mov edx, dword [esp + 0x1c]
lea eax, [ebp + 0x34]
mov dword [ebp + 0x2c], eax
lea eax, [eax + esi*4]
mov dword [ebp + 8], eax
lea eax, [eax + esi*4]
mov dword [ebp + 0xc], eax
lea eax, [eax + esi*4 + 4]
mov dword [ebp + 0x28], eax
add eax, esi
lea ecx, [eax + ebx + 1]
add ebx, 1
push ebx
push edx
push eax
mov dword [ebp], eax
mov dword [esp + 0x38], ecx
call fcn.005c3170
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x6c]
mov dword [ebp + 0x10], eax
mov edx, dword [ecx]
mov al, byte [esp + 0x70]
add esp, 0xc
cmp dword [esp + 0x20], 0
mov dword [ebp + 4], edx
mov edx, dword [esp + 0x10]
sete cl
mov byte [ebp + 0x18], al
mov byte [ebp + 0x19], cl
mov eax, dword [edx + 8]
mov ecx, dword [esp + 0x38]
mov edx, dword [eax + ecx + 0xc]
mov eax, dword [esp + 0x24]
mov dword [ebp + 0x24], edx
mov ecx, dword [eax + 0xc]
cmp byte [ecx + 0x48], 4
mov eax, dword [esp + 0x60]
mov edx, dword [eax + 0xc]
sbb ebx, ebx
neg ebx
xor edi, edi
sub ebx, 1
cmp dword [eax], edi
mov dword [esp + 0x28], edx
jle 0x58f8f4
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 4]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0xc]
xor esi, esi
cmp dword [ecx + 8], esi
mov dword [esp + 0x24], edx
jle 0x58f838
mov edi, edi
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
mov ecx, dword [esp + 0x30]
call fcn.0053ec00
test eax, eax
je 0x58f834
mov ecx, dword [esp + 0x14]
add dword [esp + 0x24], 0x18
add esi, 1
cmp esi, dword [ecx + 8]
jl 0x58f810
mov ecx, dword [esp + 0x14]
cmp esi, dword [ecx + 8]
jge 0x58f944
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x28]
mov dword [edx + edi*4], esi
mov eax, dword [eax]
test eax, eax
je 0x58f883
mov eax, dword [eax + 0x14]
test eax, eax
je 0x58f883
mov ecx, dword [eax]
call fcn.0053eb20
mov esi, eax
add esi, 1
push esi
push ecx
mov ecx, dword [esp + 0x34]
push ecx
call fcn.005c3170
mov eax, dword [esp + 0x38]
add esp, 0xc
mov dword [esp + 0x24], eax
add eax, esi
mov dword [esp + 0x2c], eax
jmp 0x58f8a2
mov eax, dword [ecx + 0xc]
lea edx, [esi + esi*2]
mov eax, dword [eax + edx*8 + 0x10]
test eax, eax
mov dword [esp + 0x24], eax
jne 0x58f8a2
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x2c]
mov eax, dword [edx]
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x10]
cmp byte [ecx + 0x7c], 0
jne 0x58f8c5
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x24]
push edx
call fcn.00571940
add esp, 4
test eax, eax
je 0x58f965
mov eax, dword [ebp + 0x2c]
mov ecx, dword [esp + 0x24]
mov dword [eax + edi*4], ecx
mov eax, dword [esp + 0x28]
mov dl, byte [eax + 0xc]
mov ecx, dword [ebp + 0x28]
and dl, bl
mov byte [edi + ecx], dl
mov edx, dword [esp + 0x60]
add edi, 1
add eax, 0x14
cmp edi, dword [edx]
mov dword [esp + 0x28], eax
jl 0x58f7f1
mov edx, ebp
call fcn.00545b10
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x54]
cmp eax, dword [esi + 0x200]
jne 0x58f9f8
mov ebx, dword [eax + 0x10]
test ebx, ebx
je 0x58f9f8
lea ebx, [ebx]
mov eax, dword [ebx + 4]
cmp eax, dword [ebp + 4]
jne 0x58f9ed
xor esi, esi
test eax, eax
jle 0x58f9e4
mov edi, dword [ebp + 8]
mov ecx, dword [ebx + 8]
sub ecx, edi
mov dword [esp + 0x30], ecx
jmp 0x58f9b9
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov edi, dword [esp + 0x54]
push eax
push edx
push str.table__s_has_no_column_named__s
call fcn.00550e70
add esp, 0xc
mov byte [edi + 0x12], 1
test ebp, ebp
je 0x58f981
mov ecx, dword [ebp + 0x1c]
mov esi, dword [esp + 0x10]
push ecx
push esi
call fcn.0053e910
push ebp
push esi
call fcn.0053e910
add esp, 0x10
mov edx, dword [esp + 0x60]
mov esi, dword [esp + 0x10]
push edx
mov edi, esi
call fcn.00545040
mov eax, dword [esp + 0x60]
push eax
call fcn.00545c50
mov ecx, dword [esp + 0x24]
push ecx
push esi
call fcn.0053e910
mov eax, dword [esp + 0x4c]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov ecx, dword [esp + 0x30]
lea eax, [edi + esi*4]
mov ecx, dword [ecx + eax]
cmp ecx, dword [eax]
jne 0x58f9e4
mov edx, dword [ebx + 0x2c]
mov ecx, dword [edx + esi*4]
mov eax, dword [ebp + 0x2c]
mov edx, dword [eax + esi*4]
cmp ecx, edx
je 0x58f9dc
call fcn.0053ec00
test eax, eax
jne 0x58f9e4
add esi, 1
cmp esi, dword [ebx + 4]
jl 0x58f9b5
cmp esi, dword [ebx + 4]
je 0x58fa2b
mov esi, dword [esp + 0x54]
mov ebx, dword [ebx + 0x20]
test ebx, ebx
jne 0x58f920
mov edi, dword [esp + 0x10]
cmp byte [edi + 0x7c], 0
je 0x58fa89
mov ecx, dword [ebp]
push ebp
call fcn.0053eb20
push ecx
mov ecx, dword [ebp + 0x24]
add ecx, 0x14
call fcn.00549ba0
add esp, 8
test eax, eax
je 0x58fa6a
mov byte [edi + 0x1e], 1
jmp 0x58f965
mov al, byte [ebx + 0x18]
mov cl, byte [ebp + 0x18]
cmp al, cl
je 0x58f965
cmp al, 0x63
je 0x58fa55
cmp cl, 0x63
je 0x58fa55
mov edi, dword [esp + 0x54]
push 0
push str.conflicting_ON_CONFLICT_clauses_specified
call fcn.00550e70
add esp, 8
cmp byte [ebx + 0x18], 0x63
jne 0x58f965
mov cl, byte [ebp + 0x18]
mov byte [ebx + 0x18], cl
jmp 0x58f965
or dword [edi + 0xc], 0x200
cmp dword [esp + 0x5c], 0
je 0x58fc75
mov edx, edi
mov eax, dword [edx + 0x78]
mov dword [ebp + 0x14], eax
jmp 0x58fc75
add dword [esi + 0x48], 1
mov ecx, dword [esi + 0x48]
mov edi, esi
mov dword [esp + 0x2c], ecx
call fcn.00555dd0
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x28], ebx
je 0x58f965
mov edi, dword [esp + 0x18]
push 1
mov eax, esi
call fcn.0056c7b0
mov esi, dword [ebx + 0xc]
add esp, 4
cmp dword [ebx + 0x10], esi
jg 0x58facc
mov edi, ebx
call fcn.0054c1a0
test eax, eax
jne 0x58fafc
mov eax, dword [ebx + 0x14]
add dword [ebx + 0xc], 1
mov ecx, dword [esp + 0x18]
lea edx, [esi + esi*4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x2c]
mov dword [eax + 4], ecx
xor ecx, ecx
mov byte [eax], 0x61
mov byte [eax + 3], 0
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov byte [ebx + 0x62], cl
cmp dword [esp + 0x68], 0
je 0x58fb3d
cmp dword [esp + 0x64], 0
mov eax, 0x63a990
je 0x58fb14
mov eax, str._UNIQUE
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
mov esi, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x70]
mov edx, dword [edx]
sub edx, dword [ecx]
add edx, 1
push edx
push eax
push str.CREATE_s_INDEX__.s
call fcn.00550c10
add esp, 0x10
mov esi, eax
jmp 0x58fb3f
xor esi, esi
cmp dword [esp + 0x18], 1
mov eax, str.sqlite_temp_master
je 0x58fb50
mov eax, str.sqlite_master
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x54]
push esi
push ecx
mov ecx, dword [edx]
mov edx, dword [ebp]
push ecx
mov ecx, dword [esp + 0x44]
push edx
push eax
mov eax, dword [edi + 8]
mov edx, dword [eax + ecx]
push edx
push str.INSERT_INTO__Q._s_VALUES_index__Q__Q__d__Q__
call fcn.00553720
push esi
push edi
call fcn.0053e910
add esp, 0x24
cmp dword [esp + 0x5c], 0
je 0x58fc75
mov eax, dword [esp + 0x2c]
push eax
push ebp
call fcn.00586500
mov ecx, dword [esp + 0x20]
push ecx
mov esi, ebx
call fcn.0054dd40
mov edx, dword [ebp]
push edx
push str.name_q
mov esi, edi
call fcn.00550c10
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x3c]
mov esi, dword [eax + 0xc]
add esp, 0x14
cmp dword [eax + 0x10], esi
mov ebx, eax
jg 0x58fbe4
mov edi, ebx
call fcn.0054c1a0
test eax, eax
je 0x58fbe4
mov esi, 1
xor edx, edx
jmp 0x58fc10
mov ecx, dword [ebx + 0x14]
add dword [ebx + 0xc], 1
mov edx, dword [esp + 0x18]
lea eax, [esi + esi*4]
lea eax, [ecx + eax*4]
mov dword [eax + 4], edx
xor edx, edx
mov byte [eax], 0x63
mov byte [eax + 3], 0
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], dl
mov byte [ebx + 0x62], dl
mov ecx, dword [ebx + 0x14]
cmp ecx, edx
mov edi, dword [ebx]
mov eax, esi
je 0x58fc5b
cmp byte [edi + 0x1e], 0
jne 0x58fc5b
cmp esi, edx
jge 0x58fc2b
mov eax, dword [ebx + 0xc]
sub eax, 1
lea eax, [eax + eax*4]
lea esi, [ecx + eax*4]
movsx eax, byte [esi + 1]
mov ecx, dword [esi + 0x10]
call fcn.0054c490
mov eax, dword [esp + 0x54]
xor ecx, ecx
cmp eax, ecx
mov dword [esi + 0x10], ecx
jne 0x58fc52
mov dword [esi + 0x10], ecx
mov byte [esi + 1], cl
jmp 0x58fc67
mov dword [esi + 0x10], eax
mov byte [esi + 1], 0xff
jmp 0x58fc67
mov ecx, dword [esp + 0x54]
or eax, 0xffffffff
call fcn.0054c490
push 0
push 0x7a
mov eax, ebx
call fcn.0054c2d0
add esp, 8
mov ecx, dword [esp + 0x10]
cmp byte [ecx + 0x7c], 0
jne 0x58fc8a
cmp dword [esp + 0x5c], 0
jne 0x58f965
mov ecx, dword [esp + 0x14]
mov edx, 5
cmp dword [esp + 0x64], edx
jne 0x58fcd2
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x58fcd2
cmp byte [eax + 0x18], dl
je 0x58fcd2
cmp dword [eax + 0x20], 0
je 0x58fcc0
jmp 0x58fcb0
mov ecx, dword [eax + 0x20]
cmp byte [ecx + 0x18], dl
je 0x58fcc0
mov eax, ecx
cmp dword [eax + 0x20], 0
jne 0x58fcb0
mov edx, dword [eax + 0x20]
mov dword [ebp + 0x20], edx
mov dword [eax + 0x20], ebp
mov dword [esp + 0x3c], ebp
jmp 0x58f981
mov eax, dword [ecx + 0x10]
mov dword [ebp + 0x20], eax
mov dword [ecx + 0x10], ebp
mov dword [esp + 0x3c], ebp
jmp 0x58f981