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

Disassembly:
sub esp, 0x58
push ebx
push ebp
mov ebp, dword [esp + 0x68]
push esi
cmp ebp, 1
push edi
jne 0x40f8e0
mov edi, str.sqlite_temp_master
mov ebx, str.CREATE_TEMP_TABLE_sqlite_temp_master__n__type_text__n__name_text__n__tbl_name_text__n__rootpage_integer__n__sql_text_n_
mov dword [esp + 0x10], edi
jmp 0x40f8f1
mov dword [esp + 0x10], str.sqlite_master
mov ebx, 0x448d80
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x6c]
push esi
call fcn.0040e3f0
mov eax, dword [esp + 0x78]
lea ecx, [esp + 0x34]
push 0
push ecx
lea edx, [esp + 0x2c]
push 3
push edx
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], 0x452ca0
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], 0
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], eax
call fcn.0040f670
add esp, 0x14
test eax, eax
je 0x40f952
push esi
call fcn.0040e3b0
mov eax, dword [esp + 0x30]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
mov eax, dword [esi + 4]
lea ebx, [ebp + ebp*2]
shl ebx, 3
mov dword [esp + 0x18], ebx
mov ecx, dword [eax + ebx]
push ecx
push edi
push esi
call fcn.004189b0
add esp, 0xc
test eax, eax
je 0x40f976
mov byte [eax + 0x34], 1
push esi
call fcn.0040e3b0
mov ecx, dword [esi + 4]
add esp, 4
mov dword [esp + 0x1c], ecx
lea eax, [ecx + ebx + 4]
mov dword [esp + 0x14], eax
mov eax, dword [eax]
test eax, eax
jne 0x40f9aa
cmp ebp, 1
jne 0x40f9a0
mov ecx, dword [ecx + 0x2c]
or byte [ecx + 0x7a], 1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x58
ret
lea edx, [esp + 0x6c]
push edx
push 0
push 0
push 0
push 1
push eax
call fcn.00412550
mov ebp, eax
add esp, 0x18
test ebp, ebp
je 0x40f9ee
cmp ebp, 0x10
je 0x40fa47
push 0
push ebp
call fcn.0040cab0
add esp, 4
push eax
mov eax, dword [esp + 0x7c]
push eax
call fcn.0040dad0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
xor edi, edi
lea ebx, [esp + 0x40]
cmp edi, 0xa
jae 0x40fa16
mov ecx, dword [esp + 0x14]
inc edi
push ebx
push edi
mov edx, dword [ecx]
push edx
call fcn.00416870
mov ebp, eax
add esp, 0xc
add ebx, 4
test ebp, ebp
je 0x40f9f4
jmp 0x40fa1a
test ebp, ebp
je 0x40fa56
push 0
push ebp
call fcn.0040cab0
add esp, 4
push eax
mov eax, dword [esp + 0x7c]
push eax
call fcn.0040dad0
mov ecx, dword [esp + 0x78]
push ecx
call fcn.00412740
add esp, 0x10
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
jmp 0x40fa5a
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x40]
mov eax, dword [edx + ebx + 0x14]
lea edi, [edx + ebx + 0x14]
mov dword [eax], ecx
mov eax, dword [esp + 0x50]
test eax, eax
je 0x40faba
mov ecx, dword [esp + 0x70]
mov edx, dword [esi + 4]
test ecx, ecx
mov ecx, dword [edx + 0x14]
jne 0x40fa9e
push 0
push 6
push str.BINARY
push 1
push esi
mov byte [ecx + 0x79], al
call fcn.0041f370
add esp, 0x14
mov dword [esi + 0x1c], eax
jmp 0x40fac5
xor edx, edx
mov dl, byte [ecx + 0x79]
cmp eax, edx
je 0x40fac5
mov eax, dword [esp + 0x6c]
push eax
call fcn.00412740
push 0
push str.attached_databases_must_use_the_same_text_encoding_as_main_database
jmp 0x40fb29
mov edx, dword [esi + 4]
mov eax, dword [edx + ebx + 0x14]
or byte [eax + 0x7a], 4
mov eax, dword [esi + 4]
mov edx, dword [edi]
mov ecx, dword [eax + 0x14]
mov al, byte [ecx + 0x79]
mov byte [edx + 0x79], al
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x40fae0
mov eax, 0x7d0
mov ecx, dword [edi]
mov dword [ecx + 0x7c], eax
mov edx, dword [edi]
mov ecx, dword [esp + 0x14]
mov eax, dword [edx + 0x7c]
mov edx, dword [ecx]
push eax
push edx
call fcn.00411c60
mov eax, dword [edi]
mov cl, byte [esp + 0x4c]
add esp, 8
mov byte [eax + 0x78], cl
mov eax, dword [edi]
mov cl, byte [eax + 0x78]
test cl, cl
jne 0x40fb10
mov byte [eax + 0x78], 1
mov edx, dword [edi]
cmp byte [edx + 0x78], 4
jbe 0x40fb46
mov eax, dword [esp + 0x6c]
push eax
call fcn.00412740
push 0
push str.unsupported_file_format
mov ecx, dword [esp + 0x80]
push ecx
call fcn.0040dad0
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
cmp ebp, 0x10
jne 0x40fb4f
xor edi, edi
jmp 0x40fbbc
mov eax, dword [esi + 4]
mov edx, dword [esp + 0x10]
push edx
mov ecx, dword [eax + ebx]
push ecx
push str.SELECT_name__rootpage__sql_FROM__q._s
call fcn.004225b0
push esi
mov ebp, eax
call fcn.0040e3f0
lea edx, [esp + 0x30]
push 0
push edx
push fcn.0040f670
push ebp
push esi
call fcn.0040c540
mov edi, eax
add esp, 0x24
cmp edi, 4
jne 0x40fb8e
mov edi, dword [esp + 0x2c]
push esi
call fcn.0040e3b0
push ebp
call fcn.0040d9b0
add esp, 8
test edi, edi
jne 0x40fbaf
mov eax, dword [esp + 0x70]
push eax
push esi
call fcn.00427090
add esp, 8
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.00412740
add esp, 4
call fcn.0040e880
test eax, eax
je 0x40fbed
push 0
push esi
mov edi, 7
call fcn.00418be0
add esp, 8
mov eax, dword [esp + 0x70]
push eax
push esi
call fcn.00418be0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
test edi, edi
jne 0x40fbd5
mov edx, dword [esi + 4]
mov eax, edi
pop edi
pop esi
mov ebx, dword [edx + ebx + 0x14]
pop ebp
or byte [ebx + 0x7a], 1
pop ebx
add esp, 0x58
ret