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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x7c6ee4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x64], edi
mov ebx, edx
test edi, edi
je 0x40a41a
mov eax, dword [edi]
test eax, eax
je 0x40a41a
cmp dword [edi + 8], 0
je 0x40a41a
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [eax + 0xc]
jbe 0x40a294
push dword [edi + 4]
mov eax, dword [eax + 0x10]
call eax
mov eax, dword [edi]
push esi
push ebx
push dword [edi + 4]
mov eax, dword [eax + 0x14]
call eax
mov eax, dword [edi]
lea ecx, [ebp - 0x44]
push ecx
push dword [edi + 4]
mov eax, dword [eax + 0x18]
call eax
mov eax, dword [edi]
lea ebx, [ebp - 0x44]
add esp, 0x18
mov dword [ebp - 0x50], ebx
mov esi, dword [eax + 8]
mov dword [ebp + 8], esi
mov ecx, dword [edi + 8]
mov eax, dword [eax + 0xc]
push eax
push 0x36
push ecx
mov dword [ebp - 0x4c], ecx
lea ebx, [ecx + eax]
call fcn.0050c5b0
mov eax, dword [edi]
push dword [eax + 0xc]
push 0x5c
push ebx
call fcn.0050c5b0
add esp, 0x18
mov dword [ebp - 0x48], 0
test esi, esi
je 0x40a3d7
mov ecx, dword [ebp - 0x50]
cmp esi, 0x20
jb 0x40a3aa
lea eax, [ecx - 1]
mov dword [ebp - 0x48], 0
lea edx, [ebx - 1]
add eax, esi
add edx, esi
cmp ebx, eax
ja 0x40a2f1
cmp edx, ecx
jae 0x40a3aa
mov edx, dword [ebp - 0x4c]
lea eax, [edx - 1]
add eax, esi
cmp ebx, eax
ja 0x40a30a
lea eax, [ebx - 1]
add eax, esi
cmp eax, edx
jae 0x40a3ad
lea eax, [ecx - 1]
add eax, esi
cmp edx, eax
ja 0x40a320
lea eax, [edx - 1]
add eax, esi
cmp eax, ecx
jae 0x40a3ad
mov eax, esi
mov edi, edx
and eax, 0xffffffe0
sub edi, ecx
mov dword [ebp - 0x54], eax
mov esi, ebx
sub esi, ecx
mov dword [ebp - 0x58], edi
mov eax, ecx
mov dword [ebp - 0x5c], esi
mov ecx, edx
mov esi, edi
sub ecx, ebx
lea edx, [ebx + 0x10]
mov dword [ebp - 0x60], ecx
mov ecx, dword [ebp - 0x54]
movups xmm0, xmmword [eax]
mov edi, dword [ebp - 0x5c]
lea eax, [eax + 0x20]
movups xmm1, xmmword [esi + eax - 0x20]
add dword [ebp - 0x48], 0x20
lea edx, [edx + 0x20]
pxor xmm1, xmm0
movups xmmword [esi + eax - 0x20], xmm1
movups xmm1, xmmword [edi + eax - 0x20]
movups xmm0, xmmword [eax - 0x20]
pxor xmm1, xmm0
movups xmmword [edi + eax - 0x20], xmm1
mov edi, dword [ebp - 0x60]
movups xmm0, xmmword [eax - 0x10]
movups xmm1, xmmword [edi + edx - 0x20]
pxor xmm1, xmm0
movups xmmword [edi + edx - 0x20], xmm1
mov edi, dword [ebp - 0x64]
movups xmm1, xmmword [eax - 0x10]
movups xmm0, xmmword [edx - 0x20]
pxor xmm1, xmm0
movups xmmword [edx - 0x20], xmm1
cmp dword [ebp - 0x48], ecx
jb 0x40a347
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
cmp eax, esi
jae 0x40a3d7
add eax, ecx
sub edx, ecx
sub ebx, ecx
sub esi, dword [ebp - 0x48]
nop dword [eax]
movzx ecx, byte [eax]
lea eax, [eax + 1]
xor byte [eax + edx - 1], cl
movzx ecx, byte [eax - 1]
xor byte [eax + ebx - 1], cl
sub esi, 1
jne 0x40a3c0
mov eax, 0x40
lea ecx, [ebp - 0x44]
pop esi
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x40a3e0
mov eax, dword [edi]
push dword [edi + 4]
mov eax, dword [eax + 0x10]
call eax
mov eax, dword [edi]
push dword [eax + 0xc]
mov eax, dword [eax + 0x14]
push dword [ebp - 0x4c]
push dword [edi + 4]
call eax
add esp, 0x10
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050b38b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xffffaf00
pop edi
xor ecx, ebp
pop ebx
call fcn.0050b38b
mov esp, ebp
pop ebp
ret