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

Disassembly:
sub esp, 0x1d4
mov eax, dword [0x5513d4]
xor eax, esp
mov dword [esp + 0x1d0], eax
mov eax, dword [esp + 0x1e0]
mov ecx, dword [esp + 0x1f4]
mov edx, dword [esp + 0x1f0]
push ebx
mov ebx, dword [esp + 0x1e0]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1ec]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1f0]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x1fc]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp + 0x10], ecx
push ebp
mov ebp, dword [esp + 0x1e0]
push esi
push edi
cmp ebx, 0x40
jbe 0x46ade2
lea eax, [esp + 0xf8]
push eax
call fcn.0049bea0
push ebx
push ebp
lea eax, [esp + 0x100]
push eax
call fcn.0049bef0
lea eax, [esp + 0x1a0]
push eax
lea eax, [esp + 0xfc]
push eax
call fcn.0049bd80
mov eax, dword [esp + 0x10]
lea ebp, [esp + 0x1a0]
mov edx, dword [esp + 0x14]
mov ebx, 0x20
mov ecx, 0x40
test eax, eax
je 0x46adff
cmp byte [edx], 0
je 0x46adff
mov ecx, 0x1a
lea edi, [esp + 0x28]
mov esi, eax
rep movsd dword es:[edi], dword [esi]
jmp 0x46ae73
xor edx, edx
test ebx, ebx
je 0x46ae2a
mov esi, ebp
lea eax, [esp + 0x160]
sub esi, eax
lea ecx, [esp + 0x160]
add ecx, edx
inc edx
mov al, byte [esi + ecx]
xor al, 0x36
mov byte [ecx], al
cmp edx, ebx
jb 0x46ae10
mov ecx, 0x40
cmp ebx, 0x40
jae 0x46ae4d
sub ecx, ebx
lea edi, [esp + 0x160]
mov edx, ecx
add edi, ebx
shr ecx, 2
mov eax, 0x36363636
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x28]
push eax
call fcn.0049bea0
push 0x40
lea eax, [esp + 0x164]
push eax
lea eax, [esp + 0x30]
push eax
call fcn.0049bef0
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
test eax, eax
je 0x46ae8c
cmp byte [edx], 0
jne 0x46ae8c
mov ecx, 0x1a
lea esi, [esp + 0x28]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov byte [edx], 1
push dword [esp + 0x1f4]
lea eax, [esp + 0x2c]
push dword [esp + 0x24]
push eax
call fcn.0049bef0
lea eax, [esp + 0x1c0]
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.0049bd80
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46aed6
mov edx, dword [esp + 0x1c]
cmp byte [edx], 0
je 0x46aed6
mov ecx, 0x1a
lea edi, [esp + 0x90]
mov esi, eax
rep movsd dword es:[edi], dword [esi]
jmp 0x46af4e
xor edx, edx
test ebx, ebx
je 0x46aefa
lea eax, [esp + 0x160]
sub ebp, eax
lea ecx, [esp + 0x160]
add ecx, edx
inc edx
mov al, byte [ecx + ebp]
xor al, 0x5c
mov byte [ecx], al
cmp edx, ebx
jb 0x46aee5
cmp ebx, 0x40
jae 0x46af22
mov ecx, 0x40
lea edi, [esp + 0x160]
sub ecx, ebx
add edi, ebx
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, [esp + 0x90]
push eax
call fcn.0049bea0
push 0x40
lea eax, [esp + 0x164]
push eax
lea eax, [esp + 0x98]
push eax
call fcn.0049bef0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x46af6a
cmp byte [edx], 0
jne 0x46af6a
mov ecx, 0x1a
lea esi, [esp + 0x90]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov byte [edx], 1
push 0x20
lea eax, [esp + 0x1c4]
push eax
lea eax, [esp + 0x98]
push eax
call fcn.0049bef0
push dword [esp + 0x24]
lea eax, [esp + 0x94]
push eax
call fcn.0049bd80
mov ecx, dword [esp + 0x1e0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00502f8e
add esp, 0x1d4
ret 0x24