Function at 0x52ffd0
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x64b65c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8c0
push ebx
push esi
push edi
mov edi, dword [esp + 0x8e4]
mov ecx, edi
call fcn.004dd9e0
lea ecx, [esp + 0xe4]
call fcn.0052de00
lea ecx, [esp + 0x54]
mov dword [esp + 0x8d4], 0
call fcn.0052e400
lea ecx, [esp + 0x374]
mov byte [esp + 0x8d4], 1
call fcn.0052e270
mov eax, dword [esp + 0x8dc]
lea ecx, [esp + 0x64]
push eax
mov byte [esp + 0x8d8], 2
mov dword [esp + 0x5c], 1
call fcn.004de6c0
lea ecx, [esp + 0x64]
call fcn.005a8750
mov esi, dword [esp + 0x8e8]
lea ecx, [esp + 0x374]
push esi
lea edx, [esp + 0x58]
push ecx
push edx
shl eax, 3
push 0
lea ecx, [esp + 0xf4]
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], 3
call fcn.005302f0
lea ecx, [esp + 0x38]
call fcn.004dfe70
mov eax, dword [esp + 0x8e0]
lea ecx, [esp + 0x38]
push eax
mov byte [esp + 0x8d8], 3
call fcn.004de6c0
lea ecx, [esp + 0x38]
call fcn.005a8750
mov ebx, eax
cmp ebx, 0x10
jb 0x530265
test bl, 7
jne 0x530265
shr ebx, 3
dec ebx
push ebp
mov dword [esp + 0x20], ebx
mov ecx, edi
shl ebx, 3
push ebx
push 0
mov dword [esp + 0x40], ebx
call fcn.004e0ed0
lea ecx, [esp + 0x3c]
call fcn.004dda10
mov ecx, edi
mov esi, eax
call fcn.004dda10
mov ebp, dword [esi]
mov edx, dword [esi + 4]
mov ecx, ebx
mov dword [esp + 0x34], eax
mov edi, eax
mov eax, ecx
add esi, 8
mov dword [esp + 0x14], ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 5
and ecx, 3
mov dword [esp + 0x18], edx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x1c], eax
lea edi, [ebx + ecx - 8]
mov ebx, dword [esp + 0x20]
mov esi, edi
mov ecx, ebx
cmp ecx, 1
jl 0x53019e
imul cl
mov byte [esp + 0x13], al
mov al, byte [esp + 0x1b]
mov dword [esp + 0x28], edx
mov dl, byte [esp + 0x13]
mov dword [esp + 0x24], ebp
add dl, bl
xor dl, al
mov byte [esp + 0x2b], dl
mov eax, dword [esi]
mov dword [esp + 0x2c], eax
mov ecx, dword [esi + 4]
lea edx, [esp + 0x24]
lea eax, [esp + 0x24]
mov dword [esp + 0x30], ecx
push edx
push eax
lea ecx, [esp + 0xf0]
call fcn.00531a70
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov dword [esi], ecx
mov eax, dword [esp + 0x30]
mov dword [esp + 0x18], edx
mov dword [esi + 4], eax
sub esi, 8
dec ebx
cmp ebx, 1
jge 0x530141
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x1c], eax
jns 0x53012e
mov edi, dword [esp + 0x8e8]
mov dword [esp + 0x14], ebp
mov ecx, edi
mov bl, 1
call fcn.005a8750
mov ecx, dword [esp + 0x38]
pop ebp
cmp eax, ecx
je 0x5301ef
mov esi, dword [esp + 0x8e8]
push str.Output_is_not_the_expected_size.
mov ecx, esi
mov edx, dword [esi]
call dword [edx + 0x14]
mov ecx, edi
call fcn.005a8750
push eax
push str.outNumBytes
mov ecx, esi
call fcn.004effe0
jmp 0x530212
xor eax, eax
mov cl, 0xa6
cmp byte [esp + eax + 0x10], cl
jne 0x530201
inc eax
cmp eax, 8
jl 0x5301f3
jmp 0x530214
mov ecx, dword [esp + 0x8e8]
push str.KEK_is_not_the_correct_key.
mov eax, dword [ecx]
call dword [eax + 0x14]
xor bl, bl
lea ecx, [esp + 0x38]
mov byte [esp + 0x8d4], 2
call fcn.004e0890
lea ecx, [esp + 0x374]
mov byte [esp + 0x8d4], 1
call fcn.0052e310
lea ecx, [esp + 0x54]
mov byte [esp + 0x8d4], 0
call fcn.0052e4c0
lea ecx, [esp + 0xe4]
mov dword [esp + 0x8d4], 0xffffffff
call fcn.0052dea0
mov al, bl
jmp 0x5302cd
mov edx, dword [esi]
push str.Key_data_must_be_a_multiple_of_8_bytes_in_length.
mov ecx, esi
call dword [edx + 0x14]
push ebx
push str.keyDataLen
mov ecx, esi
call fcn.004effe0
lea ecx, [esp + 0x38]
mov byte [esp + 0x8d4], 2
call fcn.004e0890
lea ecx, [esp + 0x374]
mov byte [esp + 0x8d4], 1
call fcn.0052e310
lea ecx, [esp + 0x54]
mov byte [esp + 0x8d4], 0
call fcn.0052e4c0
lea ecx, [esp + 0xe4]
mov dword [esp + 0x8d4], 0xffffffff
call fcn.0052dea0
xor al, al
mov ecx, dword [esp + 0x8cc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x8cc
ret