Function at 0x513350
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xc
call fcn.0042c540
cmp dword [esp + 0x14], 0
push edi
mov dword [esp + 4], 0
jl 0x5135ab
mov edi, dword [esp + 0x20]
test edi, edi
js 0x5135ab
push ebx
mov ebx, dword [esp + 0x28]
cmp edi, ebx
jg 0x513587
cmp ebx, 0xb
jl 0x513587
push esi
push 0xe3
push str..crypto_rsa_rsa_pk1.c
push ebx
call fcn.004be4b0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x5133cc
push 0xe5
push str..crypto_rsa_rsa_pk1.c
push 0x41
push 0x71
push 4
call fcn.004cbeb0
add esp, 0x14
or eax, 0xffffffff
pop esi
pop ebx
pop edi
add esp, 0xc
ret
mov edx, dword [esp + 0x24]
add esi, ebx
add edx, edi
mov dword [esp + 0x10], esi
push ebp
test ebx, ebx
jle 0x513409
mov ebp, ebx
nop
mov eax, edi
lea ecx, [edi - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
dec esi
and ecx, eax
dec ecx
mov eax, ecx
and eax, 1
sub edx, eax
sub edi, eax
mov al, byte [edx]
and al, cl
mov byte [esi], al
sub ebp, 1
jne 0x5133e0
mov dword [esp + 0x14], esi
movzx eax, byte [esi + 1]
mov edi, 2
movzx ecx, byte [esi]
xor eax, 2
lea ebp, [eax - 1]
not eax
shr eax, 0x1f
shr ebp, 0x1f
and ebp, eax
lea eax, [ecx - 1]
shr eax, 0x1f
not ecx
shr ecx, 0x1f
neg ebp
and eax, ecx
neg eax
and ebp, eax
mov dword [esp + 0x18], ebp
cmp ebx, edi
jle 0x513478
xor ebp, ebp
movzx eax, byte [edi + esi]
mov ecx, ebp
not ecx
lea edx, [eax - 1]
not eax
shr eax, 0x1f
shr edx, 0x1f
and edx, eax
neg edx
and ecx, edx
or ebp, edx
mov eax, ecx
and ecx, edi
not eax
inc edi
and eax, dword [esp + 0x10]
or eax, ecx
mov dword [esp + 0x10], eax
cmp edi, ebx
jl 0x513442
mov ebp, dword [esp + 0x18]
jmp 0x51347a
xor eax, eax
mov edi, dword [esp + 0x24]
lea edx, [eax + 1]
mov ecx, edi
mov eax, ebx
sub eax, edx
sub ecx, eax
xor ecx, eax
xor eax, edi
or ecx, eax
xor ecx, edi
mov edi, dword [esp + 0x10]
shr ecx, 0x1f
dec ecx
lea eax, [edi - 0xa]
or eax, edi
xor eax, edi
shr eax, 0x1f
dec eax
and ecx, eax
mov eax, dword [esp + 0x24]
and ebp, ecx
mov ecx, ebx
sub ecx, eax
and edx, ebp
xor ecx, eax
xor eax, ebx
or ecx, eax
mov eax, ebx
xor ecx, ebx
shr ecx, 0x1f
neg ecx
mov edi, ecx
and ecx, ebx
not edi
and edi, dword [esp + 0x24]
or edi, ecx
mov ecx, ebp
not ecx
mov dword [esp + 0x24], edi
sub eax, edi
mov dword [esp + 0x18], ecx
and eax, ecx
mov ecx, ebx
or eax, edx
xor edx, edx
sub ecx, eax
mov dword [esp + 0x10], ecx
lea edi, [eax + esi]
cmp dword [esp + 0x24], edx
jle 0x513542
mov esi, dword [esp + 0x24]
mov ebx, ebp
mov eax, edx
xor eax, ecx
lea ecx, [eax - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
neg ecx
mov eax, ecx
xor ecx, ebx
and eax, esi
and ebx, ecx
mov esi, dword [esp + 0x20]
sub edi, eax
movzx ecx, bl
mov al, byte [edx + edi]
and al, cl
not cl
and cl, byte [edx + esi]
or al, cl
mov ecx, esi
mov esi, dword [esp + 0x24]
mov byte [edx + ecx], al
inc edx
mov ecx, dword [esp + 0x10]
cmp edx, esi
jl 0x5134f8
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x30]
push ebx
push esi
call fcn.00401360
push esi
call fcn.004be3e0
push 0x12d
push str..crypto_rsa_rsa_pk1.c
push 0x9f
push 0x71
push 4
call fcn.004cbeb0
mov ecx, ebp
and ecx, 1
push ecx
call fcn.004cc270
and ebp, dword [esp + 0x34]
add esp, 0x24
or ebp, dword [esp + 0x18]
mov eax, ebp
pop ebp
pop esi
pop ebx
pop edi
add esp, 0xc
ret
push 0xdf
push str..crypto_rsa_rsa_pk1.c
push 0x9f
push 0x71
push 4
call fcn.004cbeb0
add esp, 0x14
or eax, 0xffffffff
pop ebx
pop edi
add esp, 0xc
ret
or eax, 0xffffffff
pop edi
add esp, 0xc
ret