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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x8d3fc4]
xor eax, esp
mov dword [esp + 0x68], eax
and dword [esp + 0x18], 0
mov eax, edx
push ebx
mov ebx, ecx
mov dword [esp + 8], eax
mov ecx, dword [ebp + 8]
xor edx, edx
push esi
inc edx
mov dword [esp + 0x30], eax
mov esi, dword [ebx + 0x18]
push edi
mov byte [ebx + 0xb1], dl
or esi, 0xffffffbf
cmp eax, 1
mov dword [esp + 0x28], ebx
mov eax, dword [ebp + 0xc]
mov edx, str.sqlite_master
mov edi, str.sqlite_temp_master
mov dword [esp + 0x3c], eax
cmove edx, edi
mov dword [esp + 0x14], ecx
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], 0x8617c4
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], ebx
mov dword [esp + 0x48], edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
call fcn.00498c50
and dword [ebx + 0x18], esi
add esp, 0x10
mov edi, dword [esp + 0x38]
test edi, edi
jne 0x499191
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx + 0x10]
shl ecx, 4
mov dword [esp + 0x18], ecx
lea esi, [eax + ecx]
mov ecx, dword [esi + 4]
mov dword [esp + 0x1c], esi
test ecx, ecx
jne 0x498f76
mov eax, dword [eax + 0x1c]
inc ecx
or word [eax + 0x4e], cx
jmp 0x4991b0
call fcn.004606c4
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x498f88
cmp byte [ecx + 8], 0
jne 0x498fb8
push 0
xor edx, edx
call fcn.00462cc8
mov edi, eax
pop ecx
test edi, edi
je 0x498fb1
mov ecx, edi
call fcn.004ba589
mov ecx, dword [esp + 0x14]
mov edx, ebx
push eax
call fcn.004512d5
pop ecx
jmp 0x499185
xor eax, eax
inc eax
mov dword [esp + 0x24], eax
xor edi, edi
lea ebx, [esp + 0x48]
mov ecx, dword [esi + 4]
inc edi
push ebx
mov edx, edi
call fcn.00468c7c
add ebx, 4
pop ecx
cmp edi, 5
jl 0x498fbe
mov ebx, dword [esp + 0x28]
mov eax, dword [ebx + 0x20]
and eax, 0x2000000
or eax, 0
je 0x498fef
xor eax, eax
lea edi, [esp + 0x48]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov ecx, dword [esi + 0xc]
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x10]
mov dword [ecx], eax
mov eax, dword [esp + 0x58]
test eax, eax
je 0x499020
test edi, edi
jne 0x49907f
test byte [ebx + 0x18], 0x40
jne 0x49907f
and al, 3
push 1
pop ecx
movzx edx, al
cmove edx, ecx
mov ecx, ebx
call fcn.0048c7b5
mov ecx, dword [esi + 0xc]
mov al, byte [ebx + 0x54]
mov byte [ecx + 0x4d], al
mov edx, dword [esi + 0xc]
cmp dword [edx + 0x50], 0
jne 0x499059
mov ecx, dword [esp + 0x50]
call fcn.00454df8
test eax, eax
mov ecx, 0xfffff830
cmove eax, ecx
mov dword [edx + 0x50], eax
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 4]
mov edx, dword [edx + 0x50]
call fcn.00462728
mov edx, dword [esi + 0xc]
mov ecx, dword [esp + 0x4c]
mov byte [edx + 0x4c], cl
mov eax, dword [esi + 0xc]
cmp byte [eax + 0x4c], 0
jne 0x499072
xor edx, edx
inc edx
mov byte [eax + 0x4c], dl
mov eax, dword [esi + 0xc]
cmp byte [eax + 0x4c], 4
jbe 0x4990a2
push str.unsupported_file_format
jmp 0x49908c
and eax, 3
cmp al, byte [ebx + 0x54]
je 0x499020
push str.attached_databases_must_use_the_same_text_encoding_as_main_database
mov ecx, dword [esp + 0x18]
mov edx, ebx
call fcn.004512d5
xor eax, eax
pop ecx
lea edi, [eax + 1]
jmp 0x499176
test edi, edi
jne 0x4990b5
cmp ecx, 4
jl 0x4990b5
mov eax, dword [ebx + 0x24]
and dword [ebx + 0x20], 0xfffffffd
mov dword [ebx + 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 [ebx + 0x10]
push dword [eax + ecx]
push str.SELECTFROM__w_._s_ORDER_BY_rowid
push ebx
call fcn.00452d1e
mov esi, dword [ebx + 0x16c]
lea ecx, [esp + 0x3c]
and dword [ebx + 0x16c], 0
push 0
push ecx
push fcn.00498c50
push eax
push ebx
mov dword [esp + 0x44], eax
call fcn.00494c90
mov edx, dword [esp + 0x44]
mov edi, eax
add esp, 0x24
mov dword [ebx + 0x16c], esi
test edi, edi
cmove edi, dword [esp + 0x38]
test edx, edx
je 0x499120
mov ecx, ebx
call fcn.00450d17
test edi, edi
jne 0x49912f
mov edx, dword [esp + 0x10]
mov ecx, ebx
call fcn.004859e3
cmp byte [ebx + 0x57], 0
je 0x499148
push 7
pop edi
mov ecx, ebx
call fcn.004871e7
mov esi, dword [ebx + 0x10]
add esi, dword [esp + 0x18]
jmp 0x499176
test edi, edi
je 0x49915e
mov eax, dword [ebx + 0x20]
and eax, 0x8000000
or eax, 0
je 0x499172
cmp edi, 7
je 0x499172
mov eax, dword [ebx + 0x10]
mov ecx, dword [esp + 0x18]
mov eax, dword [eax + ecx + 0xc]
xor ecx, ecx
inc ecx
or word [eax + 0x4e], cx
xor edi, edi
mov esi, dword [esp + 0x1c]
cmp dword [esp + 0x24], 0
je 0x499185
mov ecx, dword [esi + 4]
call fcn.00463838
mov ecx, dword [esi + 4]
call fcn.00460736
test edi, edi
je 0x4991b0
cmp edi, 7
je 0x49919e
cmp edi, 0xc0a
jne 0x4991a5
mov ecx, ebx
call fcn.004512ff
mov edx, dword [esp + 0x10]
mov ecx, ebx
call fcn.00487191
mov ecx, dword [esp + 0x74]
mov eax, edi
pop edi
pop esi
mov byte [ebx + 0xb1], 0
pop ebx
xor ecx, esp
call fcn.00700c25
mov esp, ebp
pop ebp
ret