Function at 0x100a4660
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x1014a7b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
add ecx, ecx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x3c], eax
mov eax, dword [edi]
mov dword [ebp - 0x2c], edi
mov eax, dword [eax + 0x10]
mov esi, dword [eax + ecx*8]
mov eax, 1
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x34], eax
lea ecx, [ecx]
push eax
push str.sqlite_stat_d
lea eax, [ebp - 0x1c]
push eax
push 0x18
call fcn.10076e40
mov ecx, dword [edi]
lea ebx, [ebp - 0x1c]
add esp, 0x10
mov dword [ebp - 0x24], ecx
xor edi, edi
mov dword [ebp - 0x28], ebx
cmp dword [ecx + 0x14], edi
jle 0x100a4752
lea ebx, [ebx]
mov eax, edi
mov ecx, edi
xor eax, 1
cmp edi, 2
cmovl ecx, eax
mov dword [ebp - 0x30], ecx
test esi, esi
je 0x100a47cd
mov bl, byte [esi]
mov edx, ecx
mov ecx, dword [ebp - 0x24]
add edx, edx
mov eax, esi
mov ecx, dword [ecx + 0x10]
mov edx, dword [ecx + edx*8]
movzx ecx, bl
movzx esi, byte [ecx + 0x1011c160]
movzx ecx, byte [edx]
movzx ecx, byte [ecx + 0x1011c160]
sub esi, ecx
jne 0x100a473f
sub edx, dword [ebp - 0x20]
mov dword [ebp - 0x38], edx
test bl, bl
je 0x100a47bc
movzx ecx, byte [edx + eax + 1]
inc eax
movzx edx, byte [ecx + 0x1011c160]
mov bl, byte [eax]
movzx ecx, bl
movzx esi, byte [ecx + 0x1011c160]
sub esi, edx
mov edx, dword [ebp - 0x38]
je 0x100a4717
mov ebx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
inc edi
mov esi, dword [ebp - 0x20]
cmp edi, dword [ecx + 0x14]
jl 0x100a46d0
mov dl, byte [ebx]
movzx eax, dl
movzx eax, byte [eax + 0x1011c160]
sub eax, 0x73
jne 0x100a4795
mov esi, str.sqlite_master
sub esi, ebx
lea ebx, [ebx]
test dl, dl
je 0x100a481d
movzx eax, byte [esi + ebx + 1]
inc ebx
movzx ecx, byte [eax + 0x1011c160]
mov dl, byte [ebx]
movzx eax, dl
movzx eax, byte [eax + 0x1011c160]
sub eax, ecx
je 0x100a4770
mov edi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x34], eax
cmp eax, 4
jle 0x100a46a0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100ee6a0
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x100a473f
mov ecx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
add ecx, ecx
mov eax, dword [eax + 0x10]
mov eax, dword [eax + ecx*8 + 0xc]
lea ecx, [ebp - 0x30]
push ecx
add eax, 8
push ebx
push eax
call fcn.1008b600
add esp, 0xc
test eax, eax
je 0x100a4742
cmp dword [eax + 8], 0
je 0x100a4742
push dword [ebp - 0x3c]
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x1c]
push dword [ebp - 0x40]
push eax
push esi
push str.DELETE_FROM__Q._s_WHERE__s_Q
push edi
call fcn.100b5b50
add esp, 0x18
jmp 0x100a4798
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov eax, dword [ecx + 0x10]
mov edx, dword [eax + 0x10]
test esi, esi
jne 0x100a4833
neg edx
sbb edx, edx
jmp 0x100a4888
test edx, edx
je 0x100a4795
movzx eax, byte [edx]
mov edi, esi
movzx ecx, byte [eax + 0x1011c160]
mov bl, byte [edi]
movzx eax, bl
movzx eax, byte [eax + 0x1011c160]
sub eax, ecx
jne 0x100a4881
sub edx, edi
lea esp, [esp]
test bl, bl
je 0x100a4881
movzx eax, byte [edx + esi + 1]
inc esi
movzx ecx, byte [eax + 0x1011c160]
mov bl, byte [esi]
movzx eax, bl
movzx eax, byte [eax + 0x1011c160]
sub eax, ecx
je 0x100a4860
mov ecx, dword [ebp - 0x24]
mov edx, eax
mov esi, edi
test edx, edx
jne 0x100a4795
mov ebx, str.sqlite_temp_master
jmp 0x100a46bc