Function at 0x50fee0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x613384]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x48], eax
test edi, edi
je 0x5100be
mov ecx, dword [edi]
test ecx, ecx
je 0x5100be
mov ebx, dword [edi + 8]
mov dword [ebp - 0x54], ebx
test ebx, ebx
je 0x5100be
movzx eax, byte [ecx + 9]
push esi
mov esi, dword [ebp + 0x10]
cmp esi, eax
jbe 0x50ff7a
push edi
call fcn.005104f0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x51009d
push esi
push dword [ebp - 0x48]
push edi
call fcn.00510590
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x51009d
lea eax, [ebp - 0x44]
push eax
push edi
call fcn.0050fa50
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x51009d
mov ecx, dword [edi]
lea eax, [ebp - 0x44]
mov ebx, dword [edi + 8]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x54], ebx
movzx esi, byte [ecx + 8]
movzx eax, byte [ecx + 9]
push eax
push 0x36
push ebx
lea ecx, [eax + ebx]
mov dword [ebp - 0x4c], ecx
call fcn.00546c70
mov eax, dword [edi]
movzx eax, byte [eax + 9]
push eax
push 0x5c
push dword [ebp - 0x4c]
call fcn.00546c70
xor ecx, ecx
add esp, 0x18
mov dword [ebp - 0x50], ecx
test esi, esi
je 0x510079
mov edx, dword [ebp - 0x4c]
cmp esi, 0x10
jb 0x510052
lea eax, [edx - 1]
mov dword [ebp - 0x50], ecx
add eax, esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x48]
lea ebx, [eax - 1]
add ebx, esi
mov dword [ebp - 0x5c], ebx
cmp edx, ebx
mov ebx, dword [ebp - 0x54]
ja 0x50ffdc
cmp dword [ebp - 0x58], eax
jae 0x510055
lea ecx, [ebx - 1]
add ecx, esi
mov dword [ebp - 0x60], ecx
cmp edx, ecx
mov ecx, 0
ja 0x50fff2
cmp dword [ebp - 0x58], ebx
jae 0x510055
cmp ebx, dword [ebp - 0x5c]
ja 0x50fffc
cmp dword [ebp - 0x60], eax
jae 0x510055
mov ecx, dword [ebp - 0x48]
mov eax, esi
sub ecx, ebx
and eax, 0xfffffff0
mov dword [ebp - 0x60], ecx
mov ecx, edx
mov edx, dword [ebp - 0x60]
sub ecx, ebx
mov dword [ebp - 0x5c], ecx
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x58], eax
mov eax, ebx
mov ebx, dword [ebp - 0x5c]
nop
movups xmm1, xmmword [edx + eax]
add ecx, 0x10
lea eax, [eax + 0x10]
movups xmm0, xmmword [eax - 0x10]
pxor xmm0, xmm1
movups xmmword [eax - 0x10], xmm0
movups xmm0, xmmword [ebx + eax - 0x10]
pxor xmm1, xmm0
movups xmmword [ebx + eax - 0x10], xmm1
cmp ecx, dword [ebp - 0x58]
jb 0x510020
mov ebx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp - 0x48]
cmp ecx, esi
jae 0x510079
add ecx, eax
sub ebx, eax
sub edx, eax
sub esi, dword [ebp - 0x50]
movzx eax, byte [ecx]
lea ecx, [ecx + 1]
xor byte [ebx + ecx - 1], al
movzx eax, byte [ecx - 1]
xor byte [edx + ecx - 1], al
sub esi, 1
jne 0x510062
push edi
call fcn.005104f0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x51009d
mov eax, dword [edi]
movzx eax, byte [eax + 9]
push eax
push dword [ebp - 0x54]
push edi
call fcn.00510590
add esp, 0xc
mov ebx, eax
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.0050f8d0
add esp, 8
mov eax, ebx
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00544c5a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xffffaf00
pop edi
xor ecx, ebp
pop ebx
call fcn.00544c5a
mov esp, ebp
pop ebp
ret