Function at 0x46ea70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x577018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
add edx, edx
push ebx
mov dword [ebp - 0x44], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
push esi
mov eax, dword [ebx]
push edi
mov dword [ebp - 0x20], ebx
mov eax, dword [eax + 0x10]
mov eax, dword [eax + edx*8]
mov dword [ebp - 0x30], eax
mov eax, 1
mov dword [ebp - 0x38], eax
nop dword [eax]
push eax
push str.sqlite_stat_d
lea eax, [ebp - 0x1c]
push eax
push 0x18
call fcn.004271b0
mov edi, dword [ebx]
lea esi, [ebp - 0x1c]
add esp, 0x10
mov dword [ebp - 0x34], edi
lea eax, [edi + 0x10]
mov dword [ebp - 0x2c], eax
xor ebx, ebx
mov dword [ebp - 0x28], esi
cmp dword [edi + 0x14], ebx
jle 0x46eb6e
mov edx, dword [ebp - 0x30]
mov edi, ebx
xor edi, 1
cmp ebx, 2
cmovge edi, ebx
test edx, edx
je 0x46ebd2
mov eax, dword [eax]
mov ecx, edi
add ecx, ecx
mov esi, edx
mov eax, dword [eax + ecx*8]
mov dword [ebp - 0x24], eax
mov al, byte [edx]
movzx ecx, al
movzx edx, byte [ecx + 0x554bc0]
mov ecx, dword [ebp - 0x24]
movzx ecx, byte [ecx]
movzx ecx, byte [ecx + 0x554bc0]
sub edx, ecx
jne 0x46eb58
mov ecx, dword [ebp - 0x24]
sub ecx, esi
mov dword [ebp - 0x24], ecx
nop dword [eax]
test al, al
je 0x46ebcc
movzx ecx, byte [ecx + esi + 1]
inc esi
movzx edx, byte [ecx + 0x554bc0]
mov al, byte [esi]
movzx ecx, al
movzx ecx, byte [ecx + 0x554bc0]
sub ecx, edx
mov ecx, dword [ebp - 0x24]
je 0x46eb30
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x34]
inc ebx
lea eax, [edi + 0x10]
mov dword [ebp - 0x2c], eax
cmp ebx, dword [edi + 0x14]
jl 0x46eae0
mov dl, byte [esi]
movzx eax, dl
cmp byte [eax + 0x554bc0], 0x73
jne 0x46eba8
mov edi, str.sqlite_master
sub edi, esi
test dl, dl
je 0x46ec14
movzx eax, byte [edi + esi + 1]
inc esi
movzx ecx, byte [eax + 0x554bc0]
mov dl, byte [esi]
movzx eax, dl
movzx eax, byte [eax + 0x554bc0]
sub eax, ecx
je 0x46eb83
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
cmp eax, 4
jle 0x46eab0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00517154
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
add edi, edi
push 0
mov edx, esi
mov ecx, dword [eax + edi*8 + 0xc]
add ecx, 8
call fcn.00429130
add esp, 4
mov eax, dword [eax + 8]
test eax, eax
je 0x46eb5b
push dword [ebp - 0x40]
mov ebx, dword [ebp - 0x20]
lea eax, [ebp - 0x1c]
push dword [ebp - 0x44]
push eax
push dword [ebp - 0x30]
push str.DELETE_FROM__Q._s_WHERE__s_Q
push ebx
call fcn.0046ad80
add esp, 0x18
jmp 0x46ebab
mov ecx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x30]
add ecx, 0x10
mov dword [ebp - 0x2c], ecx
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
test edi, edi
jne 0x46ec2f
neg edx
sbb edx, edx
jmp 0x46ec78
test edx, edx
je 0x46eba8
movzx eax, byte [edx]
mov esi, edi
mov bl, byte [edi]
movzx ecx, byte [eax + 0x554bc0]
movzx eax, bl
movzx eax, byte [eax + 0x554bc0]
sub eax, ecx
jne 0x46ec76
sub edx, edi
test bl, bl
je 0x46ec76
movzx eax, byte [edx + esi + 1]
inc esi
movzx ecx, byte [eax + 0x554bc0]
mov bl, byte [esi]
movzx eax, bl
movzx eax, byte [eax + 0x554bc0]
sub eax, ecx
je 0x46ec55
mov edx, eax
test edx, edx
jne 0x46eba8
mov eax, dword [ebp - 0x2c]
mov esi, str.sqlite_temp_master
mov edi, dword [ebp - 0x34]
jmp 0x46ead2