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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x17c
mov eax, dword [0x4d77ac]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
mov esi, edx
mov dword [ebp - 0x17c], ebx
push edi
cmp dword [ebx], 2
mov dword [ebp - 0x170], esi
jne 0x40bd16
mov eax, dword [ebx + 4]
mov edx, 0x20
mov dword [ebp - 0x16c], eax
mov ecx, esi
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x16c]
push 4
push eax
call fcn.0040b340
lea edi, [ebp - 0x67]
mov dword [ebx + 4], 0
mov ecx, edi
mov eax, 1
sub eax, ecx
add esp, 0xc
mov dword [ebp - 0x16c], eax
xor esi, esi
mov ebx, dword [ebp - 0x16c]
mov eax, 0xfffffffe
sub eax, ecx
xor edx, edx
mov dword [ebp - 0x178], eax
or eax, 0xffffffff
sub eax, ecx
mov dword [ebp - 0x174], eax
nop
movzx eax, byte [edi - 1]
mov ecx, esi
and ecx, 3
add esi, 4
shl ecx, 3
shl eax, cl
lea ecx, [ebx + edi]
and ecx, 3
xor edx, eax
movzx eax, byte [edi]
shl ecx, 3
shl eax, cl
mov ecx, dword [ebp - 0x178]
xor edx, eax
movzx eax, byte [edi + 1]
add ecx, edi
and ecx, 3
shl ecx, 3
shl eax, cl
mov ecx, dword [ebp - 0x174]
xor edx, eax
movzx eax, byte [edi + 2]
add ecx, edi
and ecx, 3
add edi, 4
shl ecx, 3
shl eax, cl
xor edx, eax
cmp esi, 0x20
jb 0x40bcb0
mov ebx, dword [ebp - 0x17c]
mov esi, dword [ebp - 0x170]
mov dword [ebx + 4], edx
cmp dword [ebx], 3
jne 0x40bf35
lea eax, [esi + 0x1f]
xor edx, edx
lea ecx, [ebp - 0x48]
cmp ecx, eax
ja 0x40bd4c
lea eax, [ebp - 0x29]
cmp eax, esi
jb 0x40bd4c
mov edi, esi
mov eax, ecx
sub edi, eax
lea ecx, [ebp - 0x48]
add ecx, edx
inc edx
mov al, byte [edi + ecx]
xor al, 0x36
mov byte [ecx], al
cmp edx, 0x20
jb 0x40bd38
jmp 0x40bd6f
movdqu xmm0, xmmword [esi]
pxor xmm0, xmmword [0x4cbd40]
movdqu xmmword [ebp - 0x48], xmm0
movdqu xmm0, xmmword [esi + 0x10]
pxor xmm0, xmmword [0x4cbd40]
movdqu xmmword [ebp - 0x38], xmm0
movdqa xmm0, xmmword [0x4cbd40]
lea edx, [ebp - 0x48]
movdqu xmmword [ebp - 0x28], xmm0
push 0x40
movdqu xmmword [ebp - 0x18], xmm0
mov dword [ebp - 0xf8], 0x6a09e667
lea ecx, [ebp - 0xf8]
xorps xmm0, xmm0
mov dword [ebp - 0xf4], 0xbb67ae85
mov dword [ebp - 0xf0], 0x3c6ef372
mov dword [ebp - 0xec], 0xa54ff53a
mov dword [ebp - 0xe8], 0x510e527f
mov dword [ebp - 0xe4], 0x9b05688c
mov dword [ebp - 0xe0], 0x1f83d9ab
mov dword [ebp - 0xdc], 0x5be0cd19
movlpd qword [ebp - 0xd8], xmm0
call fcn.004177e0
add esp, 4
lea edx, [ebx + 4]
lea ecx, [ebp - 0xf8]
push 0x20
call fcn.004177e0
add esp, 4
lea edx, [ebp - 0x88]
lea ecx, [ebp - 0xf8]
call fcn.00417b10
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x168], 0x6a09e667
lea eax, [esi + 0x1f]
mov dword [ebp - 0x164], 0xbb67ae85
xorps xmm0, xmm0
mov dword [ebp - 0x160], 0x3c6ef372
xor edx, edx
mov dword [ebp - 0x15c], 0xa54ff53a
mov dword [ebp - 0x158], 0x510e527f
mov dword [ebp - 0x154], 0x9b05688c
mov dword [ebp - 0x150], 0x1f83d9ab
mov dword [ebp - 0x14c], 0x5be0cd19
movlpd qword [ebp - 0x148], xmm0
cmp ecx, eax
ja 0x40be99
lea eax, [ebp - 0x29]
cmp eax, esi
jb 0x40be99
mov eax, ecx
sub esi, eax
lea ecx, [ebp - 0x48]
add ecx, edx
inc edx
mov al, byte [esi + ecx]
xor al, 0x5c
mov byte [ecx], al
cmp edx, 0x20
jb 0x40be85
jmp 0x40bed8
movdqa xmm1, xmmword [0x4cbd70]
lea eax, [ebp - 0x48]
lea ecx, [ebp - 0x38]
sub eax, esi
sub ecx, esi
jmp 0x40beb0
movdqu xmm0, xmmword [esi]
add edx, 0x20
lea esi, [esi + 0x20]
pxor xmm0, xmm1
movdqu xmmword [eax + esi - 0x20], xmm0
movdqu xmm0, xmmword [esi - 0x10]
pxor xmm0, xmm1
movdqu xmmword [ecx + esi - 0x20], xmm0
cmp edx, 0x20
jb 0x40beb0
movdqa xmm0, xmmword [0x4cbd70]
lea edx, [ebp - 0x48]
push 0x40
lea ecx, [ebp - 0x168]
movdqu xmmword [ebp - 0x28], xmm0
movdqu xmmword [ebp - 0x18], xmm0
call fcn.004177e0
add esp, 4
lea edx, [ebp - 0x88]
lea ecx, [ebp - 0x168]
push 0x20
call fcn.004177e0
add esp, 4
lea edx, [ebp - 0x68]
lea ecx, [ebp - 0x168]
call fcn.00417b10
movdqu xmm0, xmmword [ebp - 0x68]
movdqu xmmword [ebx + 4], xmm0
movdqu xmm0, xmmword [ebp - 0x58]
movdqu xmmword [ebx + 0x14], xmm0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00493864
mov esp, ebp
pop ebp
ret