#include <SQLite.au3>
#include <Array.au3>
_SQLite_Startup()
_SQLite_Open(@ScriptDir & "\sync_config_original.db")
Local $hQuery, $aRow, $Arraydb[1][3]
_SQLite_Query(-1, "SELECT * FROM data;", $hQuery)
While _SQLite_FetchData($hQuery, $aRow, False, False) = $SQLITE_OK
$Arraydb[0][0] += 1
ReDim $Arraydb[$Arraydb[0][0] + 1][3]
$Arraydb[$Arraydb[0][0]][0] = $aRow[0]
$Arraydb[$Arraydb[0][0]][1] = $aRow[1]
$Arraydb[$Arraydb[0][0]][2] = $aRow[2]
If $aRow[0] = "feature_switch" Or $aRow[0] = "tango_storage" Then $Arraydb[$Arraydb[0][0]][2] = _base64decode($aRow[2])
WEnd
_SQLite_QueryFinalize($hQuery)
_SQLite_Close()
_SQLite_Shutdown()
_ArrayDisplay($Arraydb)
Func _base64decode($sb64string)
Local $a_call = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sb64string, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0)
If @error Or Not $a_call[0] Then Return SetError(1, 0, "")
Local $a = DllStructCreate("byte[" & $a_call[5] & "]")
$a_call = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sb64string, "dword", 0, "dword", 1, "struct*", $a, "dword*", $a_call[5], "ptr", 0, "ptr", 0)
If @error Or Not $a_call[0] Then Return SetError(2, 0, "")
Return DllStructGetData($a, 1)
EndFunc ;==>_base64decode