Function at 0x51f620
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x10
call fcn.00488be0
cmp dword [esp + 0x18], 0
push esi
mov dword [esp + 4], 0
jle 0x51f8aa
mov esi, dword [esp + 0x24]
test esi, esi
jle 0x51f8aa
push edi
mov edi, dword [esp + 0x2c]
cmp esi, edi
jg 0x51f886
cmp edi, 0xb
jl 0x51f886
push ebp
push 0xb2
push str.crypto_rsa_rsa_pk1.c
push edi
call fcn.004c88b0
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x51f69c
push 0xb4
push str.crypto_rsa_rsa_pk1.c
push 0x41
push 0x71
push 4
call fcn.004bdd70
add esp, 0x14
or eax, 0xffffffff
pop ebp
pop edi
pop esi
add esp, 0x10
ret
mov edx, dword [esp + 0x28]
push ebx
add edx, esi
mov ebx, edi
add ebp, edi
mov eax, esi
mov dword [esp + 0x18], ebp
not eax
lea ecx, [esi - 1]
shr eax, 0x1f
dec ebp
shr ecx, 0x1f
and ecx, eax
dec ecx
mov eax, ecx
and eax, 1
sub edx, eax
sub esi, eax
mov al, byte [edx]
and al, cl
mov byte [ebp], al
sub ebx, 1
jne 0x51f6a7
mov eax, dword [esp + 0x18]
mov esi, 2
movzx ebx, byte [eax]
movzx eax, byte [ebp]
xor ebx, 2
dec ebx
dec eax
shr ebx, 0x1f
shr eax, 0x1f
neg ebx
neg eax
and ebx, eax
mov dword [esp + 0x14], ebx
xor ebx, ebx
movzx edx, byte [esi + ebp]
mov ecx, ebx
dec edx
not ecx
shr edx, 0x1f
neg edx
and ecx, edx
or ebx, edx
mov eax, ecx
and ecx, esi
not eax
inc esi
and eax, dword [esp + 0x10]
or eax, ecx
mov dword [esp + 0x10], eax
cmp esi, edi
jl 0x51f6f8
mov esi, dword [esp + 0x28]
mov edx, edi
sub edx, eax
mov ebx, dword [esp + 0x14]
dec edx
mov ecx, esi
sub ecx, edx
mov dword [esp + 0x18], edx
xor ecx, edx
mov eax, edx
mov edx, dword [esp + 0x10]
xor eax, esi
or ecx, eax
xor ecx, esi
shr ecx, 0x1f
dec ecx
lea eax, [edx - 0xa]
or eax, edx
xor eax, edx
lea edx, [edi - 0xb]
shr eax, 0x1f
dec eax
mov dword [esp + 0x10], edx
and ecx, eax
mov eax, edx
and ebx, ecx
xor eax, esi
mov ecx, edx
mov dword [esp + 0x14], ebx
sub ecx, esi
xor ecx, esi
or ecx, eax
xor ecx, edx
shr ecx, 0x1f
neg ecx
mov eax, ecx
not eax
and eax, esi
mov esi, 1
mov dword [esp + 0x28], eax
mov eax, edx
and eax, ecx
mov ecx, dword [esp + 0x28]
or ecx, eax
mov dword [esp + 0x28], ecx
cmp edx, esi
jle 0x51f7f3
mov eax, edi
sub eax, dword [esp + 0x18]
add eax, 0xfffffff5
mov dword [esp + 0x1c], eax
and eax, esi
sub edi, esi
lea ebx, [eax - 1]
not eax
shr ebx, 0x1f
shr eax, 0x1f
and ebx, eax
dec ebx
cmp edi, 0xb
jle 0x51f7dd
mov ch, bl
lea eax, [ebp + 0xb]
not ch
add edi, 0xfffffff5
mov dl, byte [eax + esi]
lea eax, [eax + 1]
mov cl, byte [eax - 1]
and dl, bl
and cl, ch
or dl, cl
mov byte [eax - 1], dl
sub edi, 1
jne 0x51f7c2
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x34]
add esi, esi
mov eax, dword [esp + 0x1c]
cmp esi, edx
jl 0x51f7a1
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
xor edx, edx
test ecx, ecx
jle 0x51f83d
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
shr eax, 0x1f
neg esi
mov dword [esp + 0x1c], eax
nop
mov ecx, esi
inc esi
shr ecx, 0x1f
xor cl, al
or cl, al
mov al, byte [edx + ebp + 0xb]
neg cl
and cl, bl
and al, cl
not cl
and cl, byte [edx + edi]
or al, cl
mov byte [edx + edi], al
inc edx
mov eax, dword [esp + 0x1c]
cmp edx, dword [esp + 0x28]
jl 0x51f810
mov edi, dword [esp + 0x34]
push 0xfa
push str.crypto_rsa_rsa_pk1.c
push edi
push ebp
call fcn.004c89c0
push 0xfb
push str.crypto_rsa_rsa_pk1.c
push 0x9f
push 0x71
push 4
call fcn.004bdd70
mov eax, ebx
and eax, 1
push eax
call fcn.004bdfc0
add esp, 0x28
mov eax, ebx
and eax, dword [esp + 0x18]
not ebx
or eax, ebx
pop ebx
pop ebp
pop edi
pop esi
add esp, 0x10
ret
push 0xae
push str.crypto_rsa_rsa_pk1.c
push 0x9f
push 0x71
push 4
call fcn.004bdd70
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
add esp, 0x10
ret
or eax, 0xffffffff
pop esi
add esp, 0x10
ret