Function at 0x51adb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ba67e
mov eax, dword fs:[0]
push eax
sub esp, 0x91c
mov eax, dword [0x68683c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
mov ecx, edi
mov dword [ebp - 0x8e8], eax
mov dword [ebp - 0x90c], edi
mov dword [ebp - 0x8f4], esi
call fcn.0041b6b0
lea ecx, [ebp - 0x378]
call fcn.005165e0
lea ecx, [ebp - 0xe8]
mov dword [ebp - 4], 0
call fcn.00516a20
lea ecx, [ebp - 0x8e0]
mov byte [ebp - 4], 1
call fcn.005190e0
push ebx
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 2
mov dword [ebp - 0xe0], 1
call fcn.0041e780
lea ecx, [ebp - 0xd4]
call fcn.004078c0
push esi
add eax, eax
lea ecx, [ebp - 0x8e0]
push ecx
lea edx, [ebp - 0xe8]
add eax, eax
push edx
add eax, eax
mov ebx, 3
push 0
lea ecx, [ebp - 0x378]
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0xdc], ebx
call fcn.00519ea0
lea ecx, [ebp - 0x928]
call fcn.0041b9a0
mov eax, dword [ebp - 0x8e8]
push eax
lea ecx, [ebp - 0x928]
mov byte [ebp - 4], bl
call fcn.0041e780
lea ecx, [ebp - 0x928]
call fcn.004078c0
mov ebx, eax
cmp ebx, 0x10
jb 0x51b0bc
test bl, 7
jne 0x51b0bc
shr ebx, 3
dec ebx
lea esi, [ebx*8]
push esi
push 0
mov ecx, edi
mov dword [ebp - 0x8e8], ebx
mov dword [ebp - 0x908], esi
call fcn.0041c700
lea ecx, [ebp - 0x928]
call fcn.0041b6d0
mov ecx, edi
mov ebx, eax
call fcn.0041b6d0
mov ecx, dword [ebx]
mov edi, dword [ebx + 4]
push esi
add ebx, 8
push ebx
push eax
mov dword [ebp - 0x8ec], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], edi
call sub.MSVCR100.dll_memcpy
mov edx, dword [ebp - 0x8ec]
lea eax, [esi + edx - 8]
add esp, 0xc
mov dword [ebp - 0x8f0], 5
mov dword [ebp - 0x8ec], eax
mov ebx, dword [ebp - 0x8e8]
mov esi, dword [ebp - 0x8ec]
mov eax, ebx
cmp eax, 1
jl 0x51afc6
imul byte [ebp - 0x8f0]
mov byte [ebp - 0x8e1], al
mov dl, byte [ebp - 0x8e1]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x904], ecx
mov ecx, dword [esi]
add dl, bl
mov eax, edi
shr eax, 0x18
xor dl, al
lea eax, [ebp - 0x904]
mov dword [ebp - 0x8fc], ecx
mov ecx, eax
mov dword [ebp - 0x900], edi
push eax
mov byte [ebp - 0x8fd], dl
mov edx, dword [esi + 4]
push ecx
lea ecx, [ebp - 0x378]
mov dword [ebp - 0x8f8], edx
call fcn.00518140
mov eax, dword [ebp - 0x8fc]
mov ecx, dword [ebp - 0x8f8]
mov edx, dword [ebp - 0x904]
mov edi, dword [ebp - 0x900]
mov dword [esi], eax
mov dword [esi + 4], ecx
dec ebx
sub esi, 8
mov dword [ebp - 0x18], edx
cmp ebx, 1
jge 0x51af53
dec dword [ebp - 0x8f0]
jns 0x51af34
mov dword [ebp - 0x14], edi
mov edi, dword [ebp - 0x90c]
mov ecx, edi
mov bl, 1
call fcn.004078c0
cmp eax, dword [ebp - 0x908]
je 0x51b016
mov esi, dword [ebp - 0x8f4]
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Output_is_not_the_expected_size.
mov ecx, esi
call eax
mov ecx, edi
call fcn.004078c0
push eax
push str.outNumBytes
mov ecx, esi
call fcn.00459e10
jmp 0x51b040
xor eax, eax
mov cl, 0xa6
lea ebx, [ebx]
cmp byte [ebp + eax - 0x18], cl
jne 0x51b02e
inc eax
cmp eax, 8
jl 0x51b020
jmp 0x51b042
mov ecx, dword [ebp - 0x8f4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.KEK_is_not_the_correct_key.
call eax
xor bl, bl
lea ecx, [ebp - 0x928]
mov byte [ebp - 4], 2
call fcn.0041c170
lea ecx, [ebp - 0x8e0]
mov byte [ebp - 4], 1
call fcn.00516960
mov dword [ebp - 0xe8], vtable._ckSymSettings.0
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 9
call fcn.0041c170
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 8
call fcn.0041c170
lea ecx, [ebp - 0xb4]
mov byte [ebp - 4], 7
call fcn.0041c170
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 0
call fcn.0041c170
lea ecx, [ebp - 0x378]
mov dword [ebp - 4], 0xffffffff
call fcn.00516660
mov al, bl
jmp 0x51b14c
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Key_data_must_be_a_multiple_of_8_bytes_in_length.
mov ecx, esi
call eax
push ebx
push str.keyDataLen
mov ecx, esi
call fcn.00459e10
lea ecx, [ebp - 0x928]
mov byte [ebp - 4], 2
call fcn.0041c170
lea ecx, [ebp - 0x8e0]
mov byte [ebp - 4], 1
call fcn.00516960
mov dword [ebp - 0xe8], vtable._ckSymSettings.0
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 6
call fcn.0041c170
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 5
call fcn.0041c170
lea ecx, [ebp - 0xb4]
mov byte [ebp - 4], 4
call fcn.0041c170
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 0
call fcn.0041c170
lea ecx, [ebp - 0x378]
mov dword [ebp - 4], 0xffffffff
call fcn.00516660
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005a6cf8
mov esp, ebp
pop ebp
ret