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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e4
mov eax, dword [0x685680]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, edx
mov dword [ebp - 0x1e0], eax
mov eax, dword [ebp + 0x10]
mov edi, 0x40
mov ebx, ecx
mov dword [ebp - 0x1dc], eax
cmp esi, edi
jbe 0x4ad10a
push 0x128
lea eax, [ebp - 0x1d0]
push 0
push eax
call fcn.005d1b40
movq xmm0, qword [0x64f490]
movq qword [ebp - 0xd0], xmm0
movq xmm0, qword [0x64f498]
movq qword [ebp - 0xc8], xmm0
movq xmm0, qword [0x64f4a0]
movq qword [ebp - 0xc0], xmm0
movq xmm0, qword [0x64f4a8]
push esi
mov edx, ebx
lea ecx, [ebp - 0x1d0]
movq qword [ebp - 0xb8], xmm0
call fcn.004ace70
add esp, 0x10
lea edx, [ebp - 0x48]
push 0x20
push ecx
lea ecx, [ebp - 0x1d0]
call fcn.004b2000
xorps xmm0, xmm0
add esp, 8
movq qword [ebp - 0x28], xmm0
movq qword [ebp - 0x20], xmm0
movq qword [ebp - 0x18], xmm0
movq qword [ebp - 0x10], xmm0
jmp 0x4ad131
push esi
lea eax, [ebp - 0x48]
push ebx
push eax
call fcn.005cfcf0
add esp, 0xc
cmp esi, edi
jae 0x4ad131
mov eax, edi
sub eax, esi
push eax
lea eax, [ebp - 0x48]
add eax, esi
push 0
push eax
call fcn.005d1b40
add esp, 0xc
xor ecx, ecx
mov al, byte [ebp + ecx - 0x48]
xor al, 0x36
mov byte [ebp + ecx - 0x88], al
inc ecx
cmp ecx, edi
jl 0x4ad133
push 0x128
lea eax, [ebp - 0x1d0]
push 0
push eax
call fcn.005d1b40
movq xmm0, qword [0x64f490]
mov eax, dword [ebp - 0xac]
movq qword [ebp - 0xd0], xmm0
movq xmm0, qword [0x64f498]
movq qword [ebp - 0xc8], xmm0
movq xmm0, qword [0x64f4a0]
mov ecx, eax
add eax, 0x40
movq qword [ebp - 0xc0], xmm0
movq xmm0, qword [0x64f4a8]
and ecx, 0x3f
add esp, 0xc
movq qword [ebp - 0xb8], xmm0
mov ebx, edi
lea edx, [ebp - 0x88]
mov dword [ebp - 0x1d8], ecx
mov dword [ebp - 0xac], eax
cmp eax, 0x40
jae 0x4ad1c8
inc dword [ebp - 0xb0]
test ecx, ecx
je 0x4ad220
mov esi, edi
sub esi, ecx
cmp esi, ebx
cmova esi, edi
push esi
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x1d0]
add eax, ecx
push eax
call fcn.005cfcf0
mov eax, dword [ebp - 0x1d8]
lea edx, [ebp - 0x88]
add edx, esi
add eax, esi
add esp, 0xc
sub ebx, esi
mov dword [ebp - 0x1d4], edx
cmp eax, 0x40
jne 0x4ad21c
lea ecx, [ebp - 0x1d0]
call fcn.004b19f0
mov edx, dword [ebp - 0x1d4]
cmp ebx, edi
jb 0x4ad264
mov eax, ebx
shr eax, 6
mov dword [ebp - 0x1d8], eax
jmp 0x4ad230
mov esi, edx
mov ecx, 0x10
lea edi, [ebp - 0x1d0]
rep movsd dword es:[edi], dword [esi]
add edx, 0x40
lea ecx, [ebp - 0x1d0]
mov dword [ebp - 0x1d4], edx
sub ebx, 0x40
call fcn.004b19f0
dec dword [ebp - 0x1d8]
mov edx, dword [ebp - 0x1d4]
jne 0x4ad230
test ebx, ebx
je 0x4ad27e
push ebx
push dword [ebp - 0x1d4]
lea eax, [ebp - 0x1d0]
push eax
call fcn.005cfcf0
add esp, 0xc
push dword [ebp + 0xc]
mov edx, dword [ebp - 0x1e0]
lea ecx, [ebp - 0x1d0]
call fcn.004ace70
add esp, 4
lea edx, [ebp - 0xa8]
push 0x20
push ecx
lea ecx, [ebp - 0x1d0]
call fcn.004b2000
add esp, 8
xor ecx, ecx
mov edi, edi
mov al, byte [ebp + ecx - 0x48]
xor al, 0x5c
mov byte [ebp + ecx - 0x88], al
inc ecx
cmp ecx, 0x40
jl 0x4ad2b0
push 0x128
lea eax, [ebp - 0x1d0]
push 0
push eax
call fcn.005d1b40
movq xmm0, qword [0x64f490]
mov eax, dword [ebp - 0xac]
movq qword [ebp - 0xd0], xmm0
movq xmm0, qword [0x64f498]
movq qword [ebp - 0xc8], xmm0
movq xmm0, qword [0x64f4a0]
mov ebx, 0x40
mov edi, eax
add eax, ebx
movq qword [ebp - 0xc0], xmm0
movq xmm0, qword [0x64f4a8]
add esp, 0xc
and edi, 0x3f
movq qword [ebp - 0xb8], xmm0
lea edx, [ebp - 0x88]
mov dword [ebp - 0xac], eax
cmp eax, ebx
jae 0x4ad341
inc dword [ebp - 0xb0]
test edi, edi
je 0x4ad397
mov eax, ebx
mov esi, eax
sub esi, edi
cmp esi, eax
cmova esi, eax
push esi
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x1d0]
add eax, edi
push eax
call fcn.005cfcf0
lea edx, [ebp - 0x88]
add edx, esi
lea eax, [esi + edi]
add esp, 0xc
sub ebx, esi
mov dword [ebp - 0x1d4], edx
cmp eax, 0x40
jne 0x4ad392
lea ecx, [ebp - 0x1d0]
call fcn.004b19f0
mov edx, dword [ebp - 0x1d4]
cmp ebx, 0x40
jb 0x4ad3d6
mov eax, ebx
shr eax, 6
mov dword [ebp - 0x1d8], eax
mov esi, edx
mov ecx, 0x10
lea edi, [ebp - 0x1d0]
rep movsd dword es:[edi], dword [esi]
add edx, 0x40
lea ecx, [ebp - 0x1d0]
mov dword [ebp - 0x1d4], edx
sub ebx, 0x40
call fcn.004b19f0
dec dword [ebp - 0x1d8]
mov edx, dword [ebp - 0x1d4]
jne 0x4ad3a2
test ebx, ebx
je 0x4ad3f0
push ebx
push dword [ebp - 0x1d4]
lea eax, [ebp - 0x1d0]
push eax
call fcn.005cfcf0
add esp, 0xc
mov eax, dword [ebp - 0xac]
mov ebx, 0x20
mov esi, eax
add eax, ebx
and esi, 0x3f
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0xac], eax
cmp eax, ebx
jae 0x4ad418
inc dword [ebp - 0xb0]
test esi, esi
je 0x4ad4be
mov edi, 0x40
mov eax, ebx
sub edi, esi
cmp edi, eax
cmova edi, eax
push edi
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0x1d0]
add eax, esi
push eax
call fcn.005cfcf0
lea edx, [ebp - 0xa8]
add edx, edi
lea eax, [edi + esi]
add esp, 0xc
sub ebx, edi
mov dword [ebp - 0x1d4], edx
cmp eax, 0x40
jne 0x4ad470
lea ecx, [ebp - 0x1d0]
call fcn.004b19f0
mov edx, dword [ebp - 0x1d4]
cmp ebx, 0x40
jb 0x4ad4b4
mov eax, ebx
shr eax, 6
mov dword [ebp - 0x1d8], eax
mov esi, edx
mov ecx, 0x10
lea edi, [ebp - 0x1d0]
rep movsd dword es:[edi], dword [esi]
add edx, 0x40
lea ecx, [ebp - 0x1d0]
mov dword [ebp - 0x1d4], edx
sub ebx, 0x40
call fcn.004b19f0
dec dword [ebp - 0x1d8]
mov edx, dword [ebp - 0x1d4]
jne 0x4ad480
test ebx, ebx
je 0x4ad4cf
mov ecx, dword [ebp - 0x1d4]
push ebx
push ecx
lea eax, [ebp - 0x1d0]
push eax
call fcn.005cfcf0
add esp, 0xc
push dword [ebp + 0x14]
mov edx, dword [ebp - 0x1dc]
push ecx
lea ecx, [ebp - 0x1d0]
call fcn.004b2000
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.005cd355
mov esp, ebp
pop ebp
ret