Function at 0x521120
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x2c
call fcn.004347b0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
mov edx, ecx
push ebx
push ebp
xor ebx, ebx
xor ebp, ebp
test eax, eax
push ecx
cmovne edx, eax
mov dword [esp + 0x1c], edx
call fcn.004cef40
add esp, 4
mov dword [esp + 8], eax
test eax, eax
js 0x521407
push edi
mov edi, dword [esp + 0x50]
cmp edi, 0xffffffff
jne 0x5211a0
mov edi, eax
push esi
mov esi, dword [esp + 0x40]
push dword [esi + 0x10]
call fcn.004b8790
dec eax
and eax, 7
push esi
mov dword [esp + 0x20], eax
call fcn.004bd750
add esp, 8
mov edx, eax
mov dword [esp + 0x1c], edx
cmp dword [esp + 0x18], ebx
jne 0x5211d0
mov ecx, dword [esp + 0x44]
mov byte [ecx], bl
inc ecx
dec edx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x1c], edx
jmp 0x5211d8
cmp edi, 0xfffffffe
jne 0x5211a7
jmp 0x521164
jge 0x521164
push 0xdb
push str..crypto_rsa_rsa_pss.c
push 0x88
push 0x94
push 4
call fcn.004c3260
add esp, 0x14
mov eax, ebx
pop edi
pop ebp
pop ebx
add esp, 0x2c
ret
mov eax, dword [esp + 0x44]
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x10]
lea eax, [ecx + 2]
cmp edx, eax
jge 0x521208
push 0xe7
push str..crypto_rsa_rsa_pss.c
push 0x6e
push 0x94
push 4
call fcn.004c3260
add esp, 0x14
mov eax, ebx
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x2c
ret
mov esi, edx
sub esi, ecx
cmp edi, 0xfffffffe
jne 0x521256
lea edi, [esi - 2]
test edi, edi
jle 0x52127d
push 0xf2
push str..crypto_rsa_rsa_pss.c
push edi
call fcn.004b5840
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x52126b
push 0xf5
push str..crypto_rsa_rsa_pss.c
push 0x41
push 0x94
push 4
call fcn.004c3260
add esp, 0x14
mov eax, ebx
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x2c
ret
lea eax, [esi - 2]
cmp edi, eax
jle 0x521214
push 0xee
push str..crypto_rsa_rsa_pss.c
push 0x6e
jmp 0x52123d
push edi
push ebp
call fcn.004c0400
add esp, 8
test eax, eax
jle 0x5213f8
mov eax, dword [esp + 0x50]
lea ecx, [esi - 1]
add eax, ecx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x24]
push eax
call fcn.004bc840
push 0
push dword [esp + 0x54]
lea eax, [esp + 0x30]
push eax
call fcn.004bc420
add esp, 0x10
test eax, eax
je 0x5213f8
push 8
lea eax, [esp + 0x28]
push 0x5b3aa8
push eax
call fcn.004bc5d0
add esp, 0xc
test eax, eax
je 0x5213f8
push dword [esp + 0x10]
lea eax, [esp + 0x28]
push dword [esp + 0x4c]
push eax
call fcn.004bc5d0
add esp, 0xc
test eax, eax
je 0x5213f8
test edi, edi
je 0x521303
push edi
lea eax, [esp + 0x28]
push ebp
push eax
call fcn.004bc5d0
add esp, 0xc
test eax, eax
je 0x5213f8
push 0
push dword [esp + 0x18]
lea eax, [esp + 0x2c]
push eax
call fcn.004bc380
add esp, 0xc
test eax, eax
je 0x5213f8
lea eax, [esp + 0x24]
push eax
call fcn.004bc5e0
push dword [esp + 0x24]
lea eax, [esi - 1]
push dword [esp + 0x18]
push dword [esp + 0x20]
push eax
push dword [esp + 0x64]
call fcn.0050a920
add esp, 0x18
test eax, eax
jne 0x5213f8
mov edx, dword [esp + 0x50]
sub esi, edi
xor byte [esi + edx - 2], 1
lea ecx, [esi + edx]
dec ecx
test edi, edi
jle 0x5213d2
xor edx, edx
cmp edi, 0x20
jb 0x5213b9
lea eax, [ebp - 1]
lea esi, [ecx - 1]
add eax, edi
add esi, edi
cmp ecx, eax
ja 0x521378
cmp esi, ebp
jae 0x5213b9
mov eax, edi
and eax, 0x8000001f
jns 0x521386
dec eax
or eax, 0xffffffe0
inc eax
mov esi, edi
sub esi, eax
nop word [eax + eax]
movups xmm0, xmmword [ecx]
movups xmm1, xmmword [edx + ebp]
pxor xmm1, xmm0
movups xmmword [ecx], xmm1
movups xmm1, xmmword [edx + ebp + 0x10]
add edx, 0x20
movups xmm0, xmmword [ecx + 0x10]
pxor xmm1, xmm0
movups xmmword [ecx + 0x10], xmm1
add ecx, 0x20
cmp edx, esi
jl 0x521390
cmp edx, edi
jge 0x5213ce
nop dword [eax]
mov al, byte [edx + ebp]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
inc edx
cmp edx, edi
jl 0x5213c0
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x5213ea
mov ecx, 8
sub ecx, eax
mov eax, 0xff
sar eax, cl
and byte [edx], al
mov eax, dword [esp + 0x1c]
mov ebx, 1
mov byte [eax + edx - 1], 0xbc
test ebp, ebp
je 0x521405
push ebp
call fcn.004b5770
add esp, 4
pop esi
pop edi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x2c
ret