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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x541a34]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x60], edi
mov ebx, edx
test edi, edi
je 0x410b7b
mov eax, dword [edi]
test eax, eax
je 0x410b7b
cmp dword [edi + 8], 0
je 0x410b7b
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [eax + 0xc]
jbe 0x410a31
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 - 0x54], ebx
mov esi, dword [eax + 8]
mov ecx, dword [edi + 8]
mov eax, dword [eax + 0xc]
push eax
push 0x36
push ecx
mov dword [ebp - 0x48], ecx
lea ebx, [ecx + eax]
call fcn.004d6720
mov eax, dword [edi]
push dword [eax + 0xc]
push 0x5c
push ebx
call fcn.004d6720
xor ecx, ecx
add esp, 0x18
mov dword [ebp - 0x58], ecx
test esi, esi
je 0x410b38
mov edx, dword [ebp - 0x54]
cmp esi, 0x10
jb 0x410b0c
mov dword [ebp - 0x58], ecx
lea eax, [ebx - 1]
lea ecx, [edx - 1]
add eax, esi
add ecx, esi
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x5c], ecx
cmp ebx, ecx
mov ecx, 0
ja 0x410a8f
cmp eax, edx
jae 0x410b0c
mov eax, dword [ebp - 0x48]
lea edi, [eax - 1]
add edi, esi
mov dword [ebp - 0x50], edi
cmp ebx, edi
mov edi, dword [ebp - 0x60]
ja 0x410aa6
cmp dword [ebp - 0x4c], eax
jae 0x410b0f
cmp eax, dword [ebp - 0x5c]
ja 0x410ab0
cmp dword [ebp - 0x50], edx
jae 0x410b0f
mov ecx, dword [ebp - 0x48]
mov eax, esi
sub ecx, edx
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x50], ecx
and eax, 0xf
sub dword [ebp - 0x4c], eax
mov ecx, ebx
sub ecx, edx
mov eax, edx
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x5c], ecx
mov ecx, dword [ebp - 0x58]
mov edi, dword [ebp - 0x5c]
movups xmm0, xmmword [eax]
add ecx, 0x10
lea eax, [eax + 0x10]
movups xmm1, xmmword [edx + eax - 0x10]
pxor xmm1, xmm0
movups xmmword [edx + eax - 0x10], xmm1
movups xmm1, xmmword [edi + eax - 0x10]
movups xmm0, xmmword [eax - 0x10]
pxor xmm1, xmm0
movups xmmword [edi + eax - 0x10], xmm1
cmp ecx, dword [ebp - 0x4c]
jb 0x410ad5
mov edi, dword [ebp - 0x60]
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x58], ecx
mov eax, dword [ebp - 0x48]
cmp ecx, esi
jae 0x410b38
sub eax, edx
add ecx, edx
sub ebx, edx
mov dword [ebp - 0x50], eax
sub esi, dword [ebp - 0x58]
mov edx, eax
movzx eax, byte [ecx]
lea ecx, [ecx + 1]
xor byte [ecx + edx - 1], al
movzx eax, byte [ecx - 1]
xor byte [ecx + ebx - 1], al
sub esi, 1
jne 0x410b21
mov eax, 0x40
lea ecx, [ebp - 0x44]
pop esi
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x410b41
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 - 0x48]
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.004d219c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xffffaf00
pop edi
xor ecx, ebp
pop ebx
call fcn.004d219c
mov esp, ebp
pop ebp
ret