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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x51df40]
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 0x499f9c
mov ecx, dword [edi]
test ecx, ecx
je 0x499f9c
cmp dword [edi + 8], 0
je 0x499f9c
movzx eax, byte [ecx + 9]
push esi
mov esi, dword [ebp + 0x10]
cmp esi, eax
jbe 0x499e53
push edi
call fcn.0049a280
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x499f7b
push esi
push dword [ebp - 0x5c]
push edi
call fcn.0049a330
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x499f7b
lea eax, [ebp - 0x44]
push eax
push edi
call fcn.00499b50
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x499f7b
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 0x499f57
cmp esi, 0x10
jb 0x499f29
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 0x499eb4
cmp ecx, ebx
jae 0x499f29
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 0x499ecb
cmp dword [ebp - 0x48], ecx
jae 0x499f29
cmp ecx, dword [ebp - 0x64]
ja 0x499ed5
cmp dword [ebp - 0x60], ebx
jae 0x499f29
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 0x499ef0
mov edi, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x4c], eax
cmp eax, esi
jae 0x499f57
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 0x499f40
push edi
call fcn.0049a280
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x499f7b
mov eax, dword [edi]
movzx eax, byte [eax + 9]
push eax
push dword [ebp - 0x54]
push edi
call fcn.0049a330
add esp, 0xc
mov ebx, eax
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004a0f10
add esp, 8
mov eax, ebx
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xffffaf00
pop edi
xor ecx, ebp
pop ebx
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret