Function at 0x477ed0
Capabilities:
Authenticate hmac
Encode data using xor
Hash data using sha256

Disassembly:
sub esp, 0x1e4
mov eax, dword [0x4e2204]
xor eax, esp
mov dword [esp + 0x1dc], eax
mov eax, dword [esp + 0x1e8]
push ebx
mov ebx, dword [esp + 0x1f0]
push ebp
push esi
push edi
mov esi, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
cmp ebx, 0xffffffff
jne 0x477f13
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x477f08
sub eax, edx
mov ebx, eax
push 0xc0
lea edx, [esp + 0x12c]
push 0
push edx
call fcn.004a16b0
mov eax, esi
add esp, 0xc
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x477f30
sub eax, edx
cmp eax, 0x40
jbe 0x477f52
push str.Security___Exiting_due_to_invalid_key_n
call fcn.0049d024
add esp, 4
push 0
call fcn.004a0908
push eax
lea eax, [esp + 0x12c]
push esi
push eax
call fcn.004a8520
add esp, 0xc
xor eax, eax
mov cl, byte [esp + eax + 0x128]
xor cl, 0x5c
mov byte [esp + eax + 0x168], cl
mov dl, byte [esp + eax + 0x128]
xor dl, 0x36
mov byte [esp + eax + 0x1a8], dl
inc eax
cmp eax, 0x40
jb 0x477f66
xor esi, esi
pxor xmm0, xmm0
mov dword [esp + 0xc0], esi
mov dword [esp + 0xc4], esi
lea ebp, [esi + 0x40]
mov dword [esp + 0xa0], 0x6a09e667
mov dword [esp + 0xa4], 0xbb67ae85
mov dword [esp + 0xa8], 0x3c6ef372
mov dword [esp + 0xac], 0xa54ff53a
mov dword [esp + 0xb0], 0x510e527f
mov dword [esp + 0xb4], 0x9b05688c
mov dword [esp + 0xb8], 0x1f83d9ab
mov dword [esp + 0xbc], 0x5be0cd19
movq qword [esp + 0x108], xmm0
movq qword [esp + 0x110], xmm0
movq qword [esp + 0x118], xmm0
movq qword [esp + 0x120], xmm0
lea edi, [esp + 0x1a8]
and esi, 0x3f
jmp 0x478030
mov al, byte [edi]
mov byte [esp + esi + 0xc8], al
inc esi
inc edi
add dword [esp + 0xc0], 1
adc dword [esp + 0xc4], 0
dec ebp
cmp esi, 0x40
jne 0x47805f
lea edx, [esp + 0xa0]
xor esi, esi
call fcn.00477a80
test ebp, ebp
ja 0x478030
mov ecx, dword [esp + 0x10]
push ebx
push ecx
lea esi, [esp + 0xa8]
call fcn.00477b40
xor eax, eax
mov edi, esi
call fcn.00477b80
mov ebx, eax
xor eax, eax
pxor xmm0, xmm0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
lea ebp, [eax + 0x40]
and eax, 0x3f
mov dword [esp + 0x18], 0x6a09e667
mov dword [esp + 0x1c], 0xbb67ae85
mov dword [esp + 0x20], 0x3c6ef372
mov dword [esp + 0x24], 0xa54ff53a
mov dword [esp + 0x28], 0x510e527f
mov dword [esp + 0x2c], 0x9b05688c
mov dword [esp + 0x30], 0x1f83d9ab
mov dword [esp + 0x34], 0x5be0cd19
movq qword [esp + 0x80], xmm0
movq qword [esp + 0x88], xmm0
movq qword [esp + 0x90], xmm0
movq qword [esp + 0x98], xmm0
lea edi, [esp + 0x168]
mov esi, eax
mov dl, byte [edi]
mov byte [esp + esi + 0x40], dl
inc esi
inc edi
add dword [esp + 0x38], 1
adc dword [esp + 0x3c], 0
dec ebp
cmp esi, 0x40
jne 0x478124
lea edx, [esp + 0x18]
xor esi, esi
call fcn.00477a80
test ebp, ebp
ja 0x478101
mov esi, dword [esp + 0x38]
mov ebp, 0x20
mov edi, ebx
and esi, 0x3f
mov al, byte [edi]
mov byte [esp + esi + 0x40], al
inc esi
inc edi
add dword [esp + 0x38], 1
adc dword [esp + 0x3c], 0
dec ebp
cmp esi, 0x40
jne 0x478159
lea edx, [esp + 0x18]
xor esi, esi
call fcn.00477a80
test ebp, ebp
ja 0x478136
mov eax, dword [esp + 0x14]
lea edi, [esp + 0x18]
call fcn.00477b80
mov ecx, dword [esp + 0x1ec]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0049ca20
add esp, 0x1e4
ret