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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [0x55e2f4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x19c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x198], ebx
mov dword [ebp - 0x1a4], eax
push edi
cmp esi, 0x40
jle 0x4be73c
lea eax, [ebp - 0x194]
push eax
call fcn.004db330
lea eax, [ebp - 0x194]
push eax
push esi
push ebx
call fcn.004dc510
lea eax, [ebp - 0x194]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.004dc410
lea ebx, [ebp - 0x80]
mov esi, 0x14
lea eax, [ebp - 0x194]
mov dword [ebp - 0x198], ebx
mov ecx, 0x5c
mov dword [ebp + 0xc], esi
add esp, 0x18
mov edi, ecx
mov edx, eax
mov byte [edx], 0
lea edx, [edx + 1]
sub edi, 1
jne 0x4be726
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4be731
lea eax, [ebp - 0xdc]
push eax
call fcn.004db330
add esp, 4
xor edx, edx
test esi, esi
jle 0x4be7e7
cmp esi, 0x20
jb 0x4be7cb
lea eax, [ebx - 1]
add eax, esi
lea edi, [ebp - 0x44]
lea ecx, [ebp + esi - 0x45]
cmp edi, eax
ja 0x4be76e
cmp ecx, ebx
jae 0x4be7cb
mov eax, esi
and eax, 0x8000001f
jns 0x4be77c
dec eax
or eax, 0xffffffe0
inc eax
movaps xmm1, xmmword [str.6666666666666666S]
lea edi, [ebp - 0x44]
mov ecx, esi
sub edi, ebx
sub ecx, eax
lea esi, [ebp - 0x34]
sub esi, ebx
mov eax, ebx
mov dword [ebp - 0x1a0], esi
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x1a0]
movups xmm0, xmmword [eax]
add edx, 0x20
lea eax, [eax + 0x20]
pxor xmm0, xmm1
movups xmmword [edi + eax - 0x20], xmm0
movups xmm0, xmmword [eax - 0x10]
pxor xmm0, xmm1
movups xmmword [ebx + eax - 0x20], xmm0
cmp edx, ecx
jl 0x4be7a2
mov ebx, dword [ebp - 0x198]
cmp edx, esi
jge 0x4be7e7
mov edi, ebx
lea eax, [ebp - 0x44]
sub edi, eax
lea ecx, [ebp - 0x44]
add ecx, edx
inc edx
mov al, byte [edi + ecx]
xor al, 0x36
mov byte [ecx], al
cmp edx, esi
jl 0x4be7d6
cmp esi, 0x40
jge 0x4be80b
mov ecx, 0x40
lea edi, [ebp - 0x44]
sub ecx, esi
add edi, esi
mov edx, ecx
mov eax, 0x36363636
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebp - 0xdc]
push eax
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004dc510
lea eax, [ebp - 0xdc]
push eax
push dword [ebp + 0x14]
push dword [ebp - 0x19c]
call fcn.004dc510
lea eax, [ebp - 0xdc]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.004dc410
lea eax, [ebp - 0x138]
push eax
call fcn.004db330
add esp, 0x24
xor edx, edx
test esi, esi
jle 0x4be8f3
cmp esi, 0x20
jb 0x4be8d9
lea eax, [ebx - 1]
add eax, esi
lea edi, [ebp - 0x44]
lea ecx, [ebp + esi - 0x45]
cmp edi, eax
ja 0x4be874
cmp ecx, ebx
jae 0x4be8d9
mov eax, esi
and eax, 0x8000001f
jns 0x4be882
dec eax
or eax, 0xffffffe0
inc eax
movaps xmm1, xmmword [0x52d3b0]
lea edi, [ebp - 0x44]
mov ecx, esi
sub edi, ebx
sub ecx, eax
lea esi, [ebp - 0x34]
sub esi, ebx
mov eax, ebx
mov dword [ebp - 0x19c], esi
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x19c]
nop dword [eax + eax]
movups xmm0, xmmword [eax]
add edx, 0x20
lea eax, [eax + 0x20]
pxor xmm0, xmm1
movups xmmword [eax + edi - 0x20], xmm0
movups xmm0, xmmword [eax - 0x10]
pxor xmm0, xmm1
movups xmmword [eax + ebx - 0x20], xmm0
cmp edx, ecx
jl 0x4be8b0
mov ebx, dword [ebp - 0x198]
cmp edx, esi
jge 0x4be8f3
lea eax, [ebp - 0x44]
sub ebx, eax
lea ecx, [ebp - 0x44]
add ecx, edx
inc edx
mov al, byte [ebx + ecx]
xor al, 0x5c
mov byte [ecx], al
cmp edx, esi
jl 0x4be8e2
cmp esi, 0x40
jge 0x4be917
mov ecx, 0x40
lea edi, [ebp - 0x44]
sub ecx, esi
add edi, esi
mov edx, ecx
mov eax, 0x5c5c5c5c
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004dc510
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x58]
push 0x14
push eax
call fcn.004dc510
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x6c]
push eax
call fcn.004dc410
mov eax, dword [ebp + 0x1c]
mov ecx, 0x14
add esp, 0x20
cmp eax, ecx
cmovg eax, ecx
test eax, eax
jle 0x4be972
push eax
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x1a4]
call fcn.004e4130
add esp, 0xc
lea eax, [ebp - 0xdc]
mov ecx, 0x5c
mov esi, ecx
mov edx, eax
mov byte [edx], 0
lea edx, [edx + 1]
sub esi, 1
jne 0x4be981
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4be990
lea eax, [ebp - 0x138]
mov ecx, 0x5c
mov esi, ecx
mov edx, eax
nop word [eax + eax]
mov byte [edx], 0
lea edx, [edx + 1]
sub esi, 1
jne 0x4be9b0
nop dword [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4be9c0
lea eax, [ebp - 0x58]
mov ecx, 0x14
mov esi, ecx
mov edx, eax
mov byte [edx], 0
lea edx, [edx + 1]
sub esi, 1
jne 0x4be9d7
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4be9e2
lea eax, [ebp - 0x6c]
mov ecx, 0x14
mov esi, ecx
mov edx, eax
nop dword [eax]
mov byte [edx], 0
lea edx, [edx + 1]
sub esi, 1
jne 0x4bea00
nop dword [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4bea10
lea eax, [ebp - 0x44]
mov ecx, 0x40
mov esi, ecx
mov edx, eax
mov byte [edx], 0
lea edx, [edx + 1]
sub esi, 1
jne 0x4bea27
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4bea32
lea eax, [ebp - 0x80]
mov ecx, 0x14
mov esi, ecx
mov edx, eax
nop dword [eax]
mov byte [edx], 0
lea edx, [edx + 1]
sub esi, 1
jne 0x4bea50
pop edi
pop esi
pop ebx
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4bea60
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1f40
mov esp, ebp
pop ebp
ret