Function at 0x474d08
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x98], esi
push edi
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x474d4e
lea edx, [ebx + 4]
mov edi, 0x10
lea esi, [ebx + 0x80]
mov ecx, dword [edx]
lea edx, [edx + 4]
mov eax, dword [esi]
lea esi, [esi - 4]
mov dword [edx - 4], eax
mov dword [esi + 4], ecx
dec edi
jne 0x474d35
mov esi, dword [ebp - 0x98]
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jle 0x474f7d
lea eax, [ebx + 4]
add esi, 2
mov dword [ebp - 0xac], eax
lea ebx, [ecx - 1]
mov eax, dword [ebp + 0x14]
shr ebx, 4
mov dword [ebp - 0xa0], esi
lea edi, [eax + 2]
sub eax, dword [ebp - 0x98]
add eax, 0xfffffffe
mov dword [ebp - 0x9c], edi
inc ebx
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0x98], ebx
mov eax, dword [ebp - 0xa4]
movzx ecx, byte [esi + eax]
movzx eax, byte [edi - 1]
shl ecx, 8
or ecx, eax
mov esi, dword [ebp - 0xac]
movzx eax, byte [edi]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 3]
mov dword [ebp - 0x94], ecx
movzx ecx, byte [edi + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 5]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 7]
mov dword [ebp - 0x90], ecx
movzx ecx, byte [edi + 6]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 8]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 9]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 0xb]
mov dword [ebp - 0x8c], ecx
movzx ecx, byte [edi + 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 0xc]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 0xd]
shl ecx, 8
or ecx, eax
xor edi, edi
mov dword [ebp - 0x88], ecx
jmp 0x474e38
mov ecx, dword [ebp + edi*4 - 0x88]
lea esi, [esi + 4]
xor ecx, dword [ebp + edi*4 - 0x8c]
xor ecx, dword [ebp + edi*4 - 0x90]
xor ecx, dword [esi - 4]
mov eax, ecx
mov dword [ebp - 0xa8], ecx
shr eax, 0x18
mov ebx, ecx
shr ecx, 8
shr ebx, 0x10
mov dl, byte [eax + sym.P_Interface.bpl__Sqlitetable3_key]
movzx eax, bl
movzx edx, dl
shl edx, 8
mov bl, byte [eax + sym.P_Interface.bpl__Sqlitetable3_key]
movzx eax, cl
mov cl, byte [eax + sym.P_Interface.bpl__Sqlitetable3_key]
mov eax, dword [ebp - 0xa8]
movzx eax, al
mov ch, byte [eax + sym.P_Interface.bpl__Sqlitetable3_key]
movzx eax, bl
or edx, eax
movzx eax, cl
shl edx, 8
or edx, eax
movzx eax, ch
shl edx, 8
or edx, eax
mov ecx, edx
mov eax, edx
ror ecx, 0xe
rol eax, 0xa
xor ecx, eax
mov eax, edx
ror eax, 8
xor ecx, eax
mov eax, edx
rol eax, 2
xor ecx, eax
xor ecx, dword [ebp + edi*4 - 0x94]
xor ecx, edx
mov dword [ebp + edi*4 - 0x84], ecx
inc edi
cmp edi, 0x20
jb 0x474e38
mov esi, dword [ebp - 0xa0]
mov ecx, dword [ebp - 8]
mov eax, ecx
shr eax, 0x18
mov edi, dword [ebp - 0x9c]
mov byte [esi - 2], al
add edi, 0x10
mov eax, ecx
mov byte [esi + 1], cl
shr eax, 0x10
mov byte [esi - 1], al
mov eax, ecx
mov ecx, dword [ebp - 0xc]
shr eax, 8
mov byte [esi], al
mov eax, ecx
shr eax, 0x18
mov byte [esi + 2], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 3], al
mov eax, ecx
shr eax, 8
mov byte [esi + 4], al
mov byte [esi + 5], cl
mov ecx, dword [ebp - 0x10]
mov eax, ecx
shr eax, 0x18
mov byte [esi + 6], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 7], al
mov eax, ecx
shr eax, 8
mov byte [esi + 8], al
mov byte [esi + 9], cl
mov ecx, dword [ebp - 0x14]
mov eax, ecx
shr eax, 0x18
mov byte [esi + 0xa], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xb], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0xc], al
mov byte [esi + 0xd], cl
add esi, 0x10
dec dword [ebp - 0x98]
mov dword [ebp - 0x9c], edi
mov dword [ebp - 0xa0], esi
jne 0x474d93
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret