Function at 0x1007e960
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x1012d034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
shl edx, 4
mov eax, dword [edi]
mov dword [ebp - 0x20], edi
mov eax, dword [eax + 0x10]
mov esi, dword [edx + eax]
mov eax, 1
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x30], eax
lea ebx, [ebx]
push eax
push str.sqlite_stat_d
lea eax, [ebp - 0x1c]
push eax
push 0x18
call fcn.10040340
mov ecx, dword [edi]
lea ebx, [ebp - 0x1c]
add esp, 0x10
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x38], eax
xor edi, edi
mov dword [ebp - 0x28], ebx
test eax, eax
jle 0x1007ea47
mov ecx, edi
cmp edi, 2
jge 0x1007e9d7
xor ecx, 1
mov dword [ebp - 0x34], ecx
jmp 0x1007e9da
mov dword [ebp - 0x34], edi
test esi, esi
je 0x1007eab6
mov ebx, dword [ebp - 0x20]
mov edx, ecx
add edx, edx
mov eax, esi
mov ecx, dword [ebx]
mov bl, byte [esi]
mov ecx, dword [ecx + 0x10]
mov edx, dword [ecx + edx*8]
movzx ecx, bl
movzx esi, byte [ecx + 0x101069e0]
movzx ecx, byte [edx]
movzx ecx, byte [ecx + 0x101069e0]
sub esi, ecx
jne 0x1007ea3b
sub edx, dword [ebp - 0x24]
mov dword [ebp - 0x2c], edx
test bl, bl
je 0x1007eaac
movzx ecx, byte [edx + eax + 1]
inc eax
movzx edx, byte [ecx + 0x101069e0]
mov bl, byte [eax]
movzx ecx, bl
movzx esi, byte [ecx + 0x101069e0]
sub esi, edx
mov edx, dword [ebp - 0x2c]
je 0x1007ea13
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x24]
inc edi
cmp edi, dword [ebp - 0x38]
jl 0x1007e9c8
mov dl, byte [ebx]
movzx eax, dl
movzx eax, byte [eax + 0x101069e0]
sub eax, 0x73
jne 0x1007ea85
mov esi, str.sqlite_master
sub esi, ebx
nop
test dl, dl
je 0x1007eb08
movzx eax, byte [esi + ebx + 1]
inc ebx
movzx ecx, byte [eax + 0x101069e0]
mov dl, byte [ebx]
movzx eax, dl
movzx eax, byte [eax + 0x101069e0]
sub eax, ecx
je 0x1007ea60
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
mov esi, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x30], eax
cmp eax, 4
jle 0x1007e9a0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100ebd7b
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x1007ea3b
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x44]
mov ecx, dword [ebp - 0x34]
push eax
add ecx, ecx
mov eax, dword [edx]
mov edx, ebx
mov eax, dword [eax + 0x10]
mov ecx, dword [eax + ecx*8 + 0xc]
add ecx, 8
call fcn.10042990
add esp, 4
test eax, eax
je 0x1007ea3e
cmp dword [eax + 8], 0
je 0x1007ea3e
push dword [ebp - 0x40]
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x1c]
push dword [ebp - 0x3c]
push eax
push esi
push str.DELETE_FROM__Q._s_WHERE__s_Q
push edi
call fcn.1007b630
add esp, 0x18
jmp 0x1007ea88
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x24]
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
mov edx, dword [eax + 0x10]
test esi, esi
jne 0x1007eb20
neg edx
sbb edx, edx
jmp 0x1007eb67
test edx, edx
je 0x1007eb7c
movzx eax, byte [edx]
mov edi, esi
movzx ecx, byte [eax + 0x101069e0]
mov bl, byte [edi]
movzx eax, bl
movzx eax, byte [eax + 0x101069e0]
sub eax, ecx
jne 0x1007eb63
sub edx, edi
test bl, bl
je 0x1007eb63
movzx eax, byte [edx + esi + 1]
inc esi
movzx ecx, byte [eax + 0x101069e0]
mov bl, byte [esi]
movzx eax, bl
movzx eax, byte [eax + 0x101069e0]
sub eax, ecx
je 0x1007eb42
mov edx, eax
mov esi, edi
test edx, edx
jne 0x1007ea85
mov eax, dword [ebp - 0x38]
mov ebx, str.sqlite_temp_master
jmp 0x1007e9bf
mov edi, ecx
jmp 0x1007ea88