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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x475010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x2c], eax
test edi, edi
je 0x415d4c
mov ecx, dword [edi]
test ecx, ecx
je 0x415d4c
mov esi, dword [edi + 8]
mov dword [ebp - 0x34], esi
test esi, esi
je 0x415d4c
movzx eax, byte [ecx + 9]
push ebx
mov ebx, dword [ebp + 0x10]
cmp ebx, eax
jbe 0x415b8e
push edi
call fcn.00416080
mov esi, eax
add esp, 4
test esi, esi
jne 0x415d2b
mov esi, dword [ebp - 0x2c]
push ebx
push esi
push edi
call fcn.004160e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x415d2b
lea eax, [ebp - 0x24]
push eax
push edi
call fcn.004156b0
mov esi, eax
add esp, 8
test esi, esi
jne 0x415d2b
mov ecx, dword [edi]
lea eax, [ebp - 0x24]
mov esi, dword [edi + 8]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x34], esi
movzx ebx, byte [ecx + 8]
movzx eax, byte [ecx + 9]
push eax
push 0x36
push esi
lea ecx, [eax + esi]
mov dword [ebp - 0x28], ecx
call fcn.00424dd0
mov eax, dword [edi]
movzx eax, byte [eax + 9]
push eax
push 0x5c
push dword [ebp - 0x28]
call fcn.00424dd0
add esp, 0x18
xor eax, eax
test ebx, ebx
je 0x415c9a
mov edx, dword [ebp - 0x28]
cmp ebx, 0x10
jb 0x415c6e
lea ecx, [edx - 1]
add ecx, ebx
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x2c]
lea esi, [ecx - 1]
add esi, ebx
mov dword [ebp - 0x3c], esi
cmp edx, esi
mov esi, dword [ebp - 0x34]
ja 0x415bee
cmp dword [ebp - 0x38], ecx
jae 0x415c71
lea edi, [esi - 1]
add edi, ebx
mov dword [ebp - 0x30], edi
cmp edx, edi
mov edi, dword [ebp - 0x40]
ja 0x415c02
cmp dword [ebp - 0x38], esi
jae 0x415c71
cmp esi, dword [ebp - 0x3c]
ja 0x415c0c
cmp dword [ebp - 0x30], ecx
jae 0x415c71
mov edx, ebx
and edx, 0xfffffff0
mov dword [ebp - 0x38], edx
mov edx, ecx
sub edx, esi
mov dword [ebp - 0x30], edx
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
sub edx, esi
mov dword [ebp - 0x3c], edx
mov edx, esi
mov edi, dword [ebp - 0x3c]
nop dword [eax + eax]
movups xmm2, xmmword [ecx + edx]
add eax, 0x10
lea edx, [edx + 0x10]
movups xmm0, xmmword [edx - 0x10]
movaps xmm1, xmm2
pxor xmm1, xmm0
movups xmm0, xmmword [edi + edx - 0x10]
movups xmmword [edx - 0x10], xmm1
pxor xmm2, xmm0
movups xmmword [edi + edx - 0x10], xmm2
cmp eax, dword [ebp - 0x38]
jb 0x415c30
mov edi, dword [ebp - 0x40]
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
cmp eax, ebx
jae 0x415c9a
jmp 0x415c71
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x28], esi
add ecx, eax
mov esi, dword [ebp - 0x2c]
sub edx, esi
sub dword [ebp - 0x28], esi
sub ebx, eax
mov esi, dword [ebp - 0x28]
movzx eax, byte [ecx]
lea ecx, [ecx + 1]
xor byte [esi + ecx - 1], al
movzx eax, byte [ecx - 1]
xor byte [edx + ecx - 1], al
sub ebx, 1
jne 0x415c83
mov eax, dword [edi]
test eax, eax
je 0x415d26
mov eax, dword [eax + 4]
sub eax, 3
je 0x415cd3
sub eax, 2
je 0x415cc4
sub eax, 1
jne 0x415d26
push eax
push dword [edi + 4]
call fcn.0041ba20
add esp, 8
jmp 0x415cde
push 1
push dword [edi + 4]
call fcn.0041ba20
add esp, 8
jmp 0x415cde
push dword [edi + 4]
call fcn.00416dd0
add esp, 4
mov esi, eax
test esi, esi
jne 0x415d2b
mov eax, dword [edi]
movzx ecx, byte [eax + 9]
test eax, eax
je 0x415d26
mov eax, dword [eax + 4]
sub eax, 3
je 0x415d13
sub eax, 2
je 0x415d00
sub eax, 1
jne 0x415d26
push ecx
push dword [ebp - 0x34]
push dword [edi + 4]
call fcn.0041bb00
add esp, 0xc
mov esi, eax
jmp 0x415d2b
push ecx
push dword [ebp - 0x34]
push dword [edi + 4]
call fcn.00416e20
add esp, 0xc
mov esi, eax
jmp 0x415d2b
mov esi, 0xffffaf00
lea eax, [ebp - 0x24]
push 0x20
push eax
call fcn.0041ac10
add esp, 8
mov eax, esi
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423606
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xffffaf00
pop edi
xor ecx, ebp
pop esi
call fcn.00423606
mov esp, ebp
pop ebp
ret