Function at 0x4e7e80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x5d5440]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
add ecx, ecx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebx]
push esi
push edi
mov dword [ebp - 0x24], ebx
mov eax, dword [eax + 0x10]
mov edi, dword [eax + ecx*8]
mov eax, 1
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x34], eax
nop dword [eax]
push eax
push str.sqlite_stat_d
lea eax, [ebp - 0x1c]
push eax
push 0x18
call fcn.0049a1f0
mov edx, dword [ebx]
lea esi, [ebp - 0x1c]
add esp, 0x10
mov dword [ebp - 0x2c], edx
xor eax, eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x30], eax
cmp dword [edx + 0x14], eax
jle 0x4e7f6d
nop dword [eax]
mov ebx, eax
xor ebx, 1
cmp eax, 2
cmovge ebx, eax
test edi, edi
je 0x4e7fdb
mov eax, dword [edx + 0x10]
mov ecx, ebx
add ecx, ecx
mov esi, edi
mov edx, dword [eax + ecx*8]
mov al, byte [edi]
movzx ecx, al
movzx edi, byte [ecx + 0x5a58e8]
movzx ecx, byte [edx]
movzx ecx, byte [ecx + 0x5a58e8]
sub edi, ecx
jne 0x4e7f58
sub edx, dword [ebp - 0x28]
mov dword [ebp - 0x38], edx
nop
test al, al
je 0x4e7fce
movzx ecx, byte [edx + esi + 1]
inc esi
movzx edx, byte [ecx + 0x5a58e8]
mov al, byte [esi]
movzx ecx, al
movzx edi, byte [ecx + 0x5a58e8]
sub edi, edx
mov edx, dword [ebp - 0x38]
je 0x4e7f30
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
inc eax
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
cmp eax, dword [edx + 0x14]
jl 0x4e7ef0
mov dl, byte [esi]
movzx eax, dl
cmp byte [eax + 0x5a58e8], 0x73
jne 0x4e7fa7
mov edi, str.sqlite_master
sub edi, esi
test dl, dl
je 0x4e801d
movzx eax, byte [edi + esi + 1]
inc esi
movzx ecx, byte [eax + 0x5a58e8]
mov dl, byte [esi]
movzx eax, dl
movzx eax, byte [eax + 0x5a58e8]
sub eax, ecx
je 0x4e7f82
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x34], eax
cmp eax, 4
jle 0x4e7ec0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046748e
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x4e7f58
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x10]
shl ebx, 4
push 0
push esi
mov eax, dword [ebx + eax + 0xc]
add eax, 8
push eax
call fcn.004b99c0
add esp, 0xc
mov eax, dword [eax + 8]
test eax, eax
je 0x4e7f5b
push dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
push dword [ebp - 0x40]
push eax
push edi
push str.DELETE_FROM__Q._s_WHERE__s_Q
push ebx
call fcn.004ff460
add esp, 0x18
jmp 0x4e7faa
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x28]
mov eax, dword [eax + 0x10]
mov edx, dword [eax + 0x10]
test edi, edi
jne 0x4e8033
neg edx
sbb edx, edx
jmp 0x4e8083
test edx, edx
je 0x4e7fa7
movzx eax, byte [edx]
mov esi, edi
mov bl, byte [edi]
movzx ecx, byte [eax + 0x5a58e8]
movzx eax, bl
movzx eax, byte [eax + 0x5a58e8]
sub eax, ecx
jne 0x4e8081
sub edx, edi
nop dword [eax]
test bl, bl
je 0x4e8081
movzx eax, byte [edx + esi + 1]
inc esi
movzx ecx, byte [eax + 0x5a58e8]
mov bl, byte [esi]
movzx eax, bl
movzx eax, byte [eax + 0x5a58e8]
sub eax, ecx
je 0x4e8060
mov edx, eax
test edx, edx
jne 0x4e7fa7
mov edx, dword [ebp - 0x2c]
mov esi, str.sqlite_temp_master
jmp 0x4e7edc