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

Disassembly:
sub esp, 0x3c0
mov eax, dword [0x51eed4]
xor eax, esp
mov dword [esp + 0x3b8], eax
mov eax, dword [esp + 0x3c8]
push ebp
push esi
mov esi, ecx
cmp esi, 0x80
push edi
mov edi, edx
mov dword [esp + 0xc], eax
jle 0x4143a9
lea ecx, [esp + 0x1b0]
push ecx
call fcn.004e61a0
lea edx, [esp + 0x1b4]
push edx
push esi
push edi
call fcn.004e5f10
lea eax, [esp + 0x1c0]
push eax
lea ecx, [esp + 0x314]
push ecx
call fcn.004e61d0
lea edx, [esp + 0x1c8]
mov ecx, 0xd0
add esp, 0x18
lea edi, [esp + 0x300]
mov esi, 0x40
mov ebp, ecx
mov eax, edx
mov edi, edi
mov byte [eax], 0
inc eax
sub ebp, 1
jne 0x414390
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x4143a0
lea edx, [esp + 0x10]
push edx
call fcn.004e61a0
add esp, 4
xor eax, eax
test esi, esi
jle 0x4143e4
mov ebp, edi
lea ecx, [esp + 0x280]
sub ebp, ecx
jmp 0x4143d0
lea ecx, [esp + eax + 0x280]
mov dl, byte [ecx + ebp]
xor dl, 0x36
inc eax
cmp eax, esi
mov byte [ecx], dl
jl 0x4143d0
cmp esi, 0x80
jge 0x414406
mov ecx, 0x80
sub ecx, esi
push ecx
lea eax, [esp + esi + 0x284]
push 0x36
push eax
call fcn.004bfe20
add esp, 0xc
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x284]
push 0x80
push eax
call fcn.004e5f10
mov edx, dword [esp + 0x3dc]
lea ecx, [esp + 0x1c]
push ecx
push edx
push ebx
call fcn.004e5f10
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x39c]
push ecx
call fcn.004e61d0
lea edx, [esp + 0x100]
push edx
call fcn.004e61a0
add esp, 0x24
xor eax, eax
test esi, esi
jle 0x414475
lea ecx, [esp + 0x280]
sub edi, ecx
lea ecx, [esp + eax + 0x280]
mov dl, byte [edi + ecx]
xor dl, 0x5c
inc eax
cmp eax, esi
mov byte [ecx], dl
jl 0x414461
cmp esi, 0x80
jge 0x414497
mov ecx, 0x80
sub ecx, esi
push ecx
lea eax, [esp + esi + 0x284]
push 0x5c
push eax
call fcn.004bfe20
add esp, 0xc
lea edx, [esp + 0xe0]
push edx
lea eax, [esp + 0x284]
push 0x80
push eax
call fcn.004e5f10
lea ecx, [esp + 0xec]
push ecx
lea edx, [esp + 0x390]
push 0x40
push edx
call fcn.004e5f10
lea eax, [esp + 0xf8]
push eax
lea ecx, [esp + 0x35c]
push ecx
call fcn.004e61d0
mov eax, dword [esp + 0x2c]
push 0x40
lea edx, [esp + 0x364]
push edx
push eax
call fcn.004c0830
lea edx, [esp + 0x3c]
mov ecx, 0xd0
add esp, 0x2c
mov esi, ecx
mov eax, edx
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x414501
lea ebx, [ebx]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x414510
lea edx, [esp + 0xe0]
mov ecx, 0xd0
mov esi, ecx
mov eax, edx
lea esp, [esp]
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x414530
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x414540
lea edx, [esp + 0x380]
mov ecx, 0x40
mov esi, ecx
mov eax, edx
lea esp, [esp]
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x414560
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x414570
lea edx, [esp + 0x340]
mov ecx, 0x40
mov esi, ecx
mov eax, edx
lea esp, [esp]
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x414590
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x4145a0
lea edx, [esp + 0x280]
mov ecx, 0x80
mov esi, ecx
mov eax, edx
lea esp, [esp]
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x4145c0
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x4145d0
lea edx, [esp + 0x300]
mov ecx, 0x40
mov esi, ecx
mov eax, edx
lea esp, [esp]
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x4145f0
lea esp, [esp]
dec ecx
mov byte [edx], 0
inc edx
test ecx, ecx
jne 0x414600
mov ecx, dword [esp + 0x3c4]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004be1d6
add esp, 0x3c0
ret