Function at 0x10021faf
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0x64
pop eax
call fcn.1005ead0
mov eax, dword [0x100a4120]
xor eax, dword [ebp + 4]
xor ecx, ecx
cmp dword [ebp + 0x18], 0xffffffff
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 8]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], eax
jne 0x10022027
mov dword [ebp + 0x18], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push dword [edi + 0x10]
call sym.LIBEAY32.dll_BN_num_bits
mov esi, eax
dec esi
and esi, 7
push edi
mov dword [ebp - 0xc], esi
call sym.LIBEAY32.dll_RSA_size
mov ebx, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, esi
mov edx, 0xff
shl edx, cl
mov cl, byte [ebx]
test cl, dl
je 0x10022049
push 0
push 0
push 0x85
push 0x7e
push 4
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x14
jmp 0x100221ca
push 0xfffffffffffffffe
pop eax
cmp dword [ebp + 0x18], eax
je 0x10021fd9
jge 0x10021fdc
push ecx
push ecx
push 0x88
push 0x7e
push 4
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x14
jmp 0x100221cd
xor edx, edx
cmp dword [ebp - 0xc], edx
jne 0x10022052
inc ebx
dec eax
mov ecx, dword [ebp - 8]
mov esi, dword [ebp + 0x18]
lea esi, [ecx + esi + 2]
cmp eax, esi
jge 0x10022066
push edx
push edx
push 0x6d
jmp 0x10022016
cmp byte [eax + ebx - 1], 0xbc
je 0x10022076
push edx
push edx
push 0x86
jmp 0x10022016
sub eax, ecx
dec eax
mov edi, eax
push 0x7b
lea eax, [edi + ebx]
push str..crypto_rsa_rsa_pss.c
push edi
mov dword [ebp - 0x14], eax
call sym.LIBEAY32.dll_CRYPTO_malloc
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1002209d
push eax
push eax
push 0x41
jmp 0x10022116
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp - 0x14]
push edi
push esi
call sym.LIBEAY32.dll_PKCS1_MGF1
add esp, 0x14
test edi, edi
jle 0x100220c3
mov eax, esi
sub ebx, esi
mov ecx, edi
mov dl, byte [ebx + eax]
xor byte [eax], dl
inc eax
dec ecx
jne 0x100220ba
xor ebx, ebx
cmp dword [ebp - 0xc], ebx
je 0x100220d9
push 8
pop ecx
sub ecx, dword [ebp - 0xc]
mov eax, 0xff
sar eax, cl
and byte [esi], al
cmp byte [esi], 0
jne 0x100220ec
lea eax, [edi - 1]
cmp ebx, eax
jge 0x100220ec
inc ebx
cmp byte [ebx + esi], 0
je 0x100220e1
mov al, byte [ebx + esi]
inc ebx
cmp al, 1
je 0x100220ff
push 0
push 0
push 0x87
jmp 0x10022116
xor eax, eax
cmp dword [ebp + 0x18], eax
jl 0x10022127
mov ecx, edi
sub ecx, ebx
cmp ecx, dword [ebp + 0x18]
je 0x10022127
push eax
push eax
push 0x88
push 0x7e
push 4
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x14
jmp 0x100221bf
lea eax, [ebp - 0x24]
push eax
call sym.LIBEAY32.dll_EVP_MD_CTX_init
push 0
push dword [ebp + 0x10]
lea eax, [ebp - 0x24]
push eax
call sym.LIBEAY32.dll_EVP_DigestInit_ex
push 8
lea eax, [ebp - 0x24]
push 0x1007842c
push eax
call sym.LIBEAY32.dll_EVP_DigestUpdate
push dword [ebp - 8]
lea eax, [ebp - 0x24]
push dword [ebp + 0xc]
push eax
call sym.LIBEAY32.dll_EVP_DigestUpdate
add esp, 0x28
sub edi, ebx
je 0x10022174
push edi
add ebx, esi
lea eax, [ebp - 0x24]
push ebx
push eax
call sym.LIBEAY32.dll_EVP_DigestUpdate
add esp, 0xc
xor edi, edi
push edi
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x24]
push eax
call sym.LIBEAY32.dll_EVP_DigestFinal
lea eax, [ebp - 0x24]
push eax
call sym.LIBEAY32.dll_EVP_MD_CTX_cleanup
push dword [ebp - 8]
lea eax, [ebp - 0x64]
push dword [ebp - 0x14]
push eax
call sub.MSVCR70.dll_memcmp
add esp, 0x1c
test eax, eax
je 0x100221b8
push edi
push edi
push 0x68
push 0x7e
push 4
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x14
mov dword [ebp - 0x10], edi
jmp 0x100221bf
mov dword [ebp - 0x10], 1
test esi, esi
je 0x100221ca
push esi
call sym.LIBEAY32.dll_CRYPTO_free
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
mov eax, dword [ebp - 0x10]
call fcn.1005eb3e
leave
ret