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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xac
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x50ee91
mov eax, dword [ebp + 0x14]
mov dword [ebx], eax
mov eax, 1
test esi, esi
je 0x50ecfc
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call fcn.00502a5c
cmp eax, 0x80
jg 0x50ed25
cmp eax, dword [ebp + 0x10]
jl 0x50ed56
mov eax, dword [ebp + 0x10]
cmp eax, 0x80
ja 0x50ee64
lea edx, [ebx + 0x50]
mov edi, edx
mov ecx, dword [ebp + 0x10]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x10]
mov dword [ebx + 0x4c], ecx
cmp eax, 0x80
je 0x50ecb2
mov ecx, pe_nt_image_headers32
sub ecx, eax
add edx, eax
xor eax, eax
mov edi, edx
rep stosb byte es:[edi], al
xor eax, eax
lea esi, [ebp - 0x98]
nop
mov dl, byte [ebx + eax + 0x50]
xor edx, 0x36
mov byte [esi + eax], dl
inc eax
cmp eax, 0x80
jne 0x50ecbc
lea edi, [ebx + 0x1c]
mov eax, dword [ebp + 0x18]
mov dword [esp + 8], eax
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], ecx
mov dword [esp], edi
call fcn.004fc8b0
test eax, eax
jne 0x50edc8
xor eax, eax
add esp, 0xac
pop ebx
pop esi
pop edi
leave
ret
test eax, eax
jne 0x50ecb2
lea edi, [ebx + 0x1c]
mov dword [esp + 4], edi
add ebx, 4
mov dword [esp], ebx
call fcn.004fcd54
test eax, eax
setne al
movzx eax, al
add esp, 0xac
pop ebx
pop esi
pop edi
leave
ret
mov dword [esp + 8], str.j____int_sizeof_ctx__key_
mov dword [esp + 4], 0x52
mov dword [esp], str.crypto_hmac_hmac.c
mov dword [ebp - 0xa0], eax
call fcn.004f36c4
mov eax, dword [ebp - 0xa0]
cmp eax, dword [ebp + 0x10]
jge 0x50ec7e
lea edi, [ebx + 4]
mov ecx, dword [ebp + 0x18]
mov dword [esp + 8], ecx
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.004fc8b0
test eax, eax
je 0x50ecef
mov ecx, dword [ebp + 0x10]
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.004fcb4c
test eax, eax
je 0x50ecef
lea eax, [ebx + 0x4c]
mov dword [esp + 8], eax
lea edx, [ebx + 0x50]
mov dword [esp + 4], edx
mov dword [esp], edi
mov dword [ebp - 0xa0], edx
call fcn.004fcb5c
mov ecx, eax
xor eax, eax
test ecx, ecx
mov edx, dword [ebp - 0xa0]
je 0x50ecf1
mov eax, dword [ebx + 0x4c]
jmp 0x50ec9c
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call fcn.00502a5c
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.004fcb4c
test eax, eax
je 0x50ecef
xor eax, eax
lea esi, [esi]
mov dl, byte [ebx + eax + 0x50]
xor edx, 0x5c
mov byte [esi + eax], dl
inc eax
cmp eax, 0x80
jne 0x50edf0
lea ecx, [ebx + 0x34]
mov dword [ebp - 0x9c], ecx
mov eax, dword [ebp + 0x18]
mov dword [esp + 8], eax
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x9c]
mov dword [esp], eax
call fcn.004fc8b0
test eax, eax
je 0x50ecef
mov ecx, dword [ebp + 0x14]
mov dword [esp], ecx
call fcn.00502a5c
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x9c]
mov dword [esp], eax
call fcn.004fcb4c
mov edx, eax
xor eax, eax
test edx, edx
je 0x50ecf1
jmp 0x50ed03
mov dword [esp + 8], str.len_0__len__int_sizeof_ctx__key_
mov dword [esp + 4], 0x5f
mov dword [esp], str.crypto_hmac_hmac.c
mov dword [ebp - 0xa0], eax
call fcn.004f36c4
mov eax, dword [ebp - 0xa0]
jmp 0x50ec8c
mov ecx, dword [ebx]
mov dword [ebp + 0x14], ecx
xor eax, eax
jmp 0x50ec57