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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x4e2040]
xor eax, esp
mov dword [esp + 0x68], eax
and dword [esp + 0x18], 0
mov eax, edx
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], eax
mov ecx, dword [ebp + 8]
xor edx, edx
inc edx
mov dword [esp + 0x34], eax
mov ebx, str.sqlite_temp_master
mov dword [esp + 0x28], edi
mov esi, dword [edi + 0x18]
mov byte [edi + 0xb1], dl
or esi, 0xffffffbf
cmp eax, 1
mov dword [esp + 0x14], ecx
mov eax, dword [ebp + 0xc]
mov edx, str.sqlite_master
cmove edx, ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x20], edx
lea eax, [esp + 0x5c]
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], edx
xor edx, edx
push edx
push eax
lea eax, [esp + 0x34]
mov dword [esp + 0x64], str.table
push 5
push eax
mov dword [esp + 0x78], 0x4d3d5c
mov dword [esp + 0x7c], str.CREATE_TABLE_x_type_text_name_text_tbl_name_text_rootpage_int_sql_text_
mov dword [esp + 0x80], edx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x48], edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
call fcn.00485ddd
and dword [edi + 0x18], esi
add esp, 0x10
mov ebx, dword [esp + 0x38]
test ebx, ebx
jne 0x486327
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 0x10]
shl ecx, 4
mov dword [esp + 0x18], ecx
lea esi, [eax + ecx]
mov edx, dword [esi + 4]
mov dword [esp + 0x1c], esi
test edx, edx
jne 0x4860f0
mov eax, dword [eax + 0x1c]
xor ecx, ecx
inc ecx
or word [eax + 0x4e], cx
jmp 0x486346
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov dword [ecx + 4], eax
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x486105
cmp byte [ecx + 8], 0
jne 0x486135
push 0
xor edx, edx
call fcn.00450398
mov ebx, eax
pop ecx
test ebx, ebx
je 0x48612e
mov ecx, ebx
call fcn.004a6d8c
mov ecx, dword [esp + 0x14]
mov edx, edi
push eax
call fcn.0043f451
pop ecx
jmp 0x486327
xor eax, eax
inc eax
mov dword [esp + 0x24], eax
xor ebx, ebx
lea edi, [esp + 0x48]
mov ecx, dword [esi + 4]
inc ebx
push edi
mov edx, ebx
call fcn.00456455
add edi, 4
pop ecx
cmp ebx, 5
jl 0x48613b
mov edi, dword [esp + 0x28]
mov eax, dword [edi + 0x20]
and eax, 0x2000000
or eax, 0
je 0x486172
push 0x14
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.004b21c0
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov eax, dword [esp + 0x48]
mov dword [ecx], eax
mov eax, dword [esp + 0x58]
test eax, eax
je 0x4861aa
cmp dword [esp + 0x10], 0
jne 0x486218
test byte [edi + 0x18], 0x40
jne 0x486218
and al, 3
mov ecx, edi
movzx edx, al
push 1
pop eax
cmove edx, eax
call fcn.00479ca1
mov ecx, dword [esi + 0xc]
mov al, byte [edi + 0x54]
mov byte [ecx + 0x4d], al
mov ebx, dword [esi + 0xc]
cmp dword [ebx + 0x50], 0
jne 0x4861e0
mov ecx, dword [esp + 0x50]
call fcn.00442ddf
test eax, eax
mov ecx, 0xfffff830
cmove eax, ecx
mov dword [ebx + 0x50], eax
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 4]
mov edx, dword [edx + 0x50]
call fcn.0044fee0
mov ecx, dword [esi + 0xc]
xor ebx, ebx
mov al, byte [esp + 0x4c]
inc ebx
mov byte [ecx + 0x4c], al
mov eax, dword [esi + 0xc]
cmp byte [eax + 0x4c], 0
jne 0x4861f9
mov byte [eax + 0x4c], bl
mov eax, dword [esi + 0xc]
cmp byte [eax + 0x4c], 4
jbe 0x48623b
mov ecx, dword [esp + 0x14]
mov edx, edi
push str.unsupported_file_format
call fcn.0043f451
pop ecx
jmp 0x486314
and eax, 3
cmp al, byte [edi + 0x54]
je 0x4861aa
mov ecx, dword [esp + 0x14]
mov edx, edi
push str.attached_databases_must_use_the_same_text_encoding_as_main_database
call fcn.0043f451
xor eax, eax
pop ecx
lea ebx, [eax + 1]
jmp 0x486314
cmp dword [esp + 0x10], 0
jne 0x486253
cmp dword [esp + 0x4c], 4
jl 0x486253
mov eax, dword [edi + 0x24]
and dword [edi + 0x20], 0xfffffffd
mov dword [edi + 0x24], eax
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x18]
push dword [esp + 0x20]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x30]
mov dword [esp + 0x48], eax
mov eax, dword [edi + 0x10]
push dword [eax + ecx]
push str.SELECTFROM__w_._s_ORDER_BY_rowid
push edi
call fcn.00440d10
mov esi, dword [edi + 0x16c]
lea ecx, [esp + 0x3c]
and dword [edi + 0x16c], 0
push 0
push ecx
push fcn.00485ddd
push eax
push edi
mov dword [esp + 0x44], eax
call fcn.00481fce
mov edx, dword [esp + 0x44]
mov ebx, eax
add esp, 0x24
mov dword [edi + 0x16c], esi
test ebx, ebx
cmove ebx, dword [esp + 0x38]
test edx, edx
je 0x4862be
mov ecx, edi
call fcn.0043eeff
test ebx, ebx
jne 0x4862cd
mov edx, dword [esp + 0x10]
mov ecx, edi
call fcn.00472e9b
cmp byte [edi + 0x57], 0
je 0x4862e6
push 7
pop ebx
mov ecx, edi
call fcn.004745f2
mov esi, dword [edi + 0x10]
add esi, dword [esp + 0x18]
jmp 0x486314
test ebx, ebx
je 0x4862fc
mov eax, dword [edi + 0x20]
and eax, 0x8000000
or eax, 0
je 0x486310
cmp ebx, 7
je 0x486310
mov eax, dword [edi + 0x10]
mov ecx, dword [esp + 0x18]
mov eax, dword [eax + ecx + 0xc]
xor ecx, ecx
inc ecx
or word [eax + 0x4e], cx
xor ebx, ebx
mov esi, dword [esp + 0x1c]
cmp dword [esp + 0x24], 0
je 0x486323
mov ecx, dword [esi + 4]
call fcn.00450eee
test ebx, ebx
je 0x486346
cmp ebx, 7
je 0x486334
cmp ebx, 0xc0a
jne 0x48633b
mov ecx, edi
call fcn.0043f47b
mov edx, dword [esp + 0x10]
mov ecx, edi
call fcn.0047458e
mov ecx, dword [esp + 0x74]
mov eax, ebx
mov byte [edi + 0xb1], 0
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b0ce6
mov esp, ebp
pop ebp
ret