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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x62aabc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x5c], ebx
test edi, edi
je 0x4af76c
mov ecx, dword [edi]
test ecx, ecx
je 0x4af76c
cmp dword [edi + 8], 0
je 0x4af76c
movzx eax, byte [ecx + 9]
push esi
mov esi, dword [ebp + 0x10]
cmp esi, eax
jbe 0x4af623
push edi
call fcn.004afa40
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4af74b
push esi
push dword [ebp - 0x5c]
push edi
call fcn.004afaf0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4af74b
lea eax, [ebp - 0x44]
push eax
push edi
call fcn.004af300
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4af74b
mov ecx, dword [edi]
lea ebx, [ebp - 0x44]
mov dword [ebp - 0x5c], ebx
movzx esi, byte [ecx + 8]
mov edx, dword [edi + 8]
movzx ecx, byte [ecx + 9]
push ecx
push 0x36
push edx
lea eax, [ecx + edx]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x50], eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [edi]
movzx eax, byte [eax + 9]
push eax
push 0x5c
push dword [ebp - 0x50]
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
xor eax, eax
test esi, esi
je 0x4af727
cmp esi, 0x10
jb 0x4af6f9
mov edx, dword [ebp - 0x50]
lea edi, [ebx - 1]
add edi, esi
mov dword [ebp - 0x64], edi
lea ecx, [edx - 1]
add ecx, esi
cmp edx, edi
mov edi, dword [ebp - 0x58]
mov dword [ebp - 0x48], ecx
ja 0x4af684
cmp ecx, ebx
jae 0x4af6f9
mov ecx, dword [ebp - 0x54]
lea edi, [ecx - 1]
add edi, esi
mov dword [ebp - 0x60], edi
cmp edx, edi
mov edi, dword [ebp - 0x58]
ja 0x4af69b
cmp dword [ebp - 0x48], ecx
jae 0x4af6f9
cmp ecx, dword [ebp - 0x64]
ja 0x4af6a5
cmp dword [ebp - 0x60], ebx
jae 0x4af6f9
mov dword [ebp - 0x48], esi
mov edx, ebx
and dword [ebp - 0x48], 0xfffffff0
sub edx, ecx
mov ebx, dword [ebp - 0x4c]
mov edi, edx
mov dword [ebp - 0x60], edx
nop dword [eax + eax]
movups xmm2, xmmword [edi + ecx]
add eax, 0x10
lea ecx, [ecx + 0x10]
movups xmm0, xmmword [ecx - 0x10]
movaps xmm1, xmm2
pxor xmm1, xmm0
movups xmm0, xmmword [ecx + ebx - 0x10]
movups xmmword [ecx - 0x10], xmm1
pxor xmm2, xmm0
movups xmmword [ecx + ebx - 0x10], xmm2
cmp eax, dword [ebp - 0x48]
jb 0x4af6c0
mov edi, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x4c], eax
cmp eax, esi
jae 0x4af727
mov edx, dword [ebp - 0x54]
lea ecx, [ebx + eax]
sub edx, ebx
mov dword [ebp - 0x4c], edx
mov edx, dword [ebp - 0x50]
sub edx, ebx
mov ebx, dword [ebp - 0x4c]
sub esi, eax
nop
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 0x4af710
push edi
call fcn.004afa40
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4af74b
mov eax, dword [edi]
movzx eax, byte [eax + 9]
push eax
push dword [ebp - 0x54]
push edi
call fcn.004afaf0
add esp, 0xc
mov ebx, eax
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004b66d0
add esp, 8
mov eax, ebx
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054f742
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xffffaf00
pop edi
xor ecx, ebp
pop ebx
call fcn.0054f742
mov esp, ebp
pop ebp
ret