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

Disassembly:
sub esp, 0x58
mov eax, dword [0x100955e4]
xor eax, esp
mov dword [esp + 0x54], eax
push ebx
push ebp
mov ebp, dword [esp + 0x68]
mov eax, str.sqlite_temp_master
mov dword [esp + 0xc], ebp
mov dword [esp + 0x1c], 0
push esi
mov esi, dword [esp + 0x70]
mov dword [esp + 0x18], esi
push edi
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x18], edi
mov byte [edi + 0xa5], 1
cmp ebp, 1
je 0x1004a158
mov eax, str.sqlite_master
mov dword [esp + 0x20], eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x40]
push 0
push eax
lea eax, [esp + 0x30]
mov dword [esp + 0x4c], 0x1008c930
push 3
push eax
mov dword [esp + 0x58], str.CREATE_TABLE_x_type_text_name_text_tbl_name_text_rootpage_int_sql_text_
mov dword [esp + 0x5c], 0
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], 0
mov dword [esp + 0x3c], esi
mov dword [esp + 0x4c], 0
call fcn.10049ee0
mov ebx, dword [esp + 0x44]
add esp, 0x10
test ebx, ebx
jne 0x1004a31c
mov ebx, ebp
mov ebp, dword [edi + 0x10]
shl ebx, 4
mov dword [esp + 0x10], ebx
mov eax, dword [ebx + ebp + 4]
test eax, eax
jne 0x1004a1e1
mov eax, dword [ebp + 0x1c]
or word [eax + 0x4e], 1
xor eax, eax
jmp 0x1004a36f
cmp byte [eax + 9], 0
je 0x1004a1f9
inc dword [eax + 0xc]
cmp byte [eax + 0xa], 0
jne 0x1004a1f9
push eax
call fcn.10017080
add esp, 4
mov eax, dword [ebx + ebp + 4]
cmp byte [eax + 8], 0
jne 0x1004a234
push 0
push 0
push eax
call fcn.10037bc0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x1004a22c
push ebx
call fcn.10008070
push eax
push edi
push esi
call fcn.10058250
add esp, 0x10
jmp 0x1004a2f7
mov dword [esp + 0x24], 1
mov edi, dword [esp + 0x10]
lea ebx, [esp + 0x50]
xor esi, esi
mov edi, edi
push ebx
inc esi
push esi
push dword [edi + ebp + 4]
call fcn.10038d90
add esp, 0xc
add ebx, 4
cmp esi, 5
jl 0x1004a240
mov edi, dword [esp + 0x18]
mov eax, dword [edi + 0x20]
and eax, 0x2000000
or eax, 0
je 0x1004a284
xor esi, esi
mov ecx, esi
mov dword [esp + 0x50], esi
mov edx, esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], edx
jmp 0x1004a290
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x58]
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x10]
mov eax, dword [ebx + ebp + 0xc]
mov dword [eax], esi
mov esi, dword [esp + 0x14]
test edx, edx
je 0x1004a389
test esi, esi
jne 0x1004a2bb
and dl, 3
jne 0x1004a2b1
mov dl, 1
mov byte [edi + 0x4e], dl
mov bl, dl
jmp 0x1004a398
mov bl, byte [edi + 0x4e]
movzx eax, bl
cmp edx, eax
je 0x1004a398
push str.attached_databases_must_use_the_same_text_encoding_as_main_database
push edi
push dword [esp + 0x24]
call fcn.10058250
add esp, 0xc
mov ebx, 1
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x24], 0
je 0x1004a2f7
push dword [ecx + ebp + 4]
call fcn.100381b0
add esp, 4
mov eax, dword [esp + 0x10]
mov eax, dword [eax + ebp + 4]
cmp byte [eax + 9], 0
je 0x1004a314
add dword [eax + 0xc], 0xffffffff
jne 0x1004a314
push eax
call fcn.100719e0
add esp, 4
mov ebp, dword [esp + 0x14]
test ebx, ebx
je 0x1004a36d
cmp ebx, 7
je 0x1004a329
cmp ebx, 0xc0a
jne 0x1004a363
cmp byte [edi + 0x51], 0
jne 0x1004a363
cmp byte [edi + 0x52], 0
jne 0x1004a363
cmp dword [edi + 0xb8], 0
mov byte [edi + 0x51], 1
jle 0x1004a34c
mov dword [edi + 0x110], 1
inc dword [edi + 0x118]
mov eax, dword [edi + 0xf0]
test eax, eax
je 0x1004a363
mov dword [eax + 0xc], 7
push ebp
push edi
call fcn.10053c10
add esp, 8
mov eax, ebx
mov ecx, dword [esp + 0x64]
mov byte [edi + 0xa5], 0
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100843e0
add esp, 0x58
ret
mov eax, dword [edi + 0x10]
mov eax, dword [ebx + eax + 0xc]
or word [eax + 0x4e], 4
mov bl, byte [edi + 0x4e]
mov eax, dword [esp + 0x10]
mov eax, dword [eax + ebp + 0xc]
mov byte [eax + 0x4d], bl
mov ebx, dword [esp + 0x10]
mov eax, dword [ebx + ebp + 0xc]
cmp dword [eax + 0x50], 0
jne 0x1004a3e9
test ecx, ecx
jns 0x1004a3c8
cmp ecx, 0x80000000
jne 0x1004a3c4
mov ecx, 0x7fffffff
jmp 0x1004a3cf
neg ecx
test ecx, ecx
jne 0x1004a3cf
mov ecx, 0xfffff830
mov dword [eax + 0x50], ecx
mov eax, dword [ebx + ebp + 0xc]
push dword [eax + 0x50]
push dword [ebx + ebp + 4]
call fcn.1003a8c0
mov eax, dword [ebx + ebp + 0xc]
add esp, 8
mov ecx, dword [esp + 0x54]
mov byte [eax + 0x4c], cl
mov eax, dword [ebx + ebp + 0xc]
cmp byte [eax + 0x4c], 0
jne 0x1004a402
mov byte [eax + 0x4c], 1
mov eax, dword [ebx + ebp + 0xc]
cmp byte [eax + 0x4c], 4
jbe 0x1004a412
push str.unsupported_file_format
jmp 0x1004a2ce
test esi, esi
jne 0x1004a425
cmp ecx, 4
jl 0x1004a425
mov eax, dword [edi + 0x24]
and dword [edi + 0x20], 0xfffffffd
mov dword [edi + 0x24], eax
mov eax, dword [edi + 0x10]
push dword [esp + 0x20]
push dword [ebx + eax]
push str.SELECT_name__rootpage__sql_FROM___w_._s_ORDER_BY_rowid
push edi
call fcn.1004d0a0
mov esi, dword [edi + 0x140]
lea ecx, [esp + 0x38]
push 0
push ecx
push fcn.10049ee0
push eax
push edi
mov dword [esp + 0x3c], eax
mov dword [edi + 0x140], 0
call sym.sqlite3.dll_sqlite3_exec
mov ebx, eax
mov dword [edi + 0x140], esi
add esp, 0x24
test ebx, ebx
jne 0x1004a474
mov ebx, dword [esp + 0x34]
push dword [esp + 0x18]
push edi
call fcn.1003dd80
add esp, 8
test ebx, ebx
jne 0x1004a492
push dword [esp + 0x14]
push edi
call fcn.100361b0
add esp, 8
cmp byte [edi + 0x51], 0
je 0x1004a4a8
push edi
mov ebx, 7
call fcn.10053b90
add esp, 4
jmp 0x1004a4ac
test ebx, ebx
je 0x1004a4bd
mov eax, dword [edi + 0x20]
and eax, 0x8000000
or eax, 0
je 0x1004a2e0
mov eax, dword [edi + 0x10]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + eax + 0xc]
or word [eax + 0x4e], 1
xor ebx, ebx
jmp 0x1004a2e4