Function at 0x56a020
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x1c
call fcn.005f62e0
cmp dword [esp + 0x24], 0
push ebp
push esi
push edi
mov dword [esp + 0xc], 0
jle 0x56a31b
mov edi, dword [esp + 0x38]
test edi, edi
jle 0x56a31b
mov ebp, dword [esp + 0x3c]
cmp edi, ebp
jg 0x56a2f1
cmp ebp, 0xb
jl 0x56a2f1
push 0xc2
push str.crypto_rsa_rsa_pk1.c
push ebp
call fcn.004c0940
mov esi, eax
add esp, 0xc
test esi, esi
je 0x56a31b
mov edx, dword [esp + 0x34]
push ebx
add edx, edi
mov ebx, ebp
add esi, ebp
nop dword [eax]
mov eax, edi
mov dword [esp + 0x18], esi
not eax
lea ecx, [edi - 1]
shr eax, 0x1f
dec esi
shr ecx, 0x1f
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 ebx, 1
jne 0x56a090
mov eax, dword [esp + 0x18]
mov edi, 2
mov dword [esp + 0x1c], esi
movzx ebx, byte [eax]
movzx eax, byte [esi]
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 + edi]
mov eax, ebx
dec edx
not eax
shr edx, 0x1f
neg edx
and eax, edx
or ebx, edx
mov dword [esp + 0x18], eax
not eax
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
and ecx, edi
and eax, dword [esp + 0x10]
inc edi
or eax, ecx
mov dword [esp + 0x10], eax
cmp edi, ebp
jl 0x56a0e3
mov edi, dword [esp + 0x34]
mov edx, ebp
sub edx, eax
mov ebx, dword [esp + 0x14]
dec edx
mov ecx, edi
sub ecx, edx
mov dword [esp + 0x18], edx
xor ecx, edx
mov eax, edx
mov edx, dword [esp + 0x10]
xor eax, edi
or ecx, eax
xor ecx, edi
shr ecx, 0x1f
dec ecx
lea eax, [edx - 0xa]
or eax, edx
xor eax, edx
lea edx, [ebp - 0xb]
shr eax, 0x1f
dec eax
mov dword [esp + 0x24], edx
and ecx, eax
mov eax, edx
and ebx, ecx
xor eax, edi
mov ecx, edx
mov dword [esp + 0x14], ebx
sub ecx, edi
xor ecx, edi
or ecx, eax
xor ecx, edx
shr ecx, 0x1f
neg ecx
mov dword [esp + 0x34], ecx
not ecx
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x20]
and eax, edx
and ecx, edi
mov edi, 1
or ecx, eax
mov dword [esp + 0x10], ecx
cmp edx, edi
jle 0x56a21f
mov eax, ebp
sub eax, dword [esp + 0x18]
add eax, 0xfffffff5
mov dword [esp + 0x28], eax
and eax, edi
mov ebx, ebp
sub ebx, edi
lea ecx, [eax - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
dec ecx
cmp ebx, 0xb
jle 0x56a202
movzx ebp, cl
lea eax, [esi + 0xb]
mov dword [esp + 0x34], ebp
add ebx, 0xfffffff5
mov esi, dword [esp + 0x34]
not ebp
nop
mov dword [esp + 0x34], esi
lea eax, [eax + 1]
mov dword [esp + 0x20], ebp
mov ecx, dword [esp + 0x34]
mov dl, byte [eax + edi - 1]
and dl, cl
mov ecx, dword [esp + 0x20]
and cl, byte [eax - 1]
or cl, dl
mov byte [eax - 1], cl
sub ebx, 1
jne 0x56a1d0
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
mov edx, dword [esp + 0x24]
mov eax, esi
add edi, edi
add eax, 0xb
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
cmp edi, edx
jl 0x56a1a2
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
jmp 0x56a226
lea eax, [esi + 0xb]
mov dword [esp + 0x34], eax
xor edx, edx
test ecx, ecx
jle 0x56a28b
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
shr ecx, 0x1f
neg edi
mov dword [esp + 0x24], ecx
mov eax, edi
inc edi
shr eax, 0x1f
xor al, cl
or al, cl
neg al
movzx ecx, al
movzx eax, bl
and ecx, eax
mov dword [esp + 0x34], ecx
not ecx
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x34]
mov cl, byte [edx + ebp]
and cl, al
mov eax, dword [esp + 0x28]
and al, byte [edx + esi]
or al, cl
mov ecx, dword [esp + 0x24]
mov byte [edx + esi], al
inc edx
cmp edx, dword [esp + 0x10]
jl 0x56a245
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
push pe_nt_image_headers32
push str.crypto_rsa_rsa_pk1.c
push ebp
push esi
call fcn.004c0a60
call fcn.004c22a0
push str.RSA_padding_check_PKCS1_type_2
push 0x10f
push str.crypto_rsa_rsa_pk1.c
call fcn.004c23a0
push 0
push 0x9f
push 4
call fcn.004c24b0
mov eax, ebx
and eax, 1
push eax
call fcn.004dabb0
add esp, 0x2c
mov dword [esp + 0x34], ebx
not ebx
mov dword [esp + 0x28], ebx
mov ecx, dword [esp + 0x34]
and ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
pop ebx
pop edi
pop esi
or eax, ecx
pop ebp
add esp, 0x1c
ret
call fcn.004c22a0
push str.RSA_padding_check_PKCS1_type_2
push 0xbe
push str.crypto_rsa_rsa_pk1.c
call fcn.004c23a0
push 0
push 0x9f
push 4
call fcn.004c24b0
add esp, 0x18
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x1c
ret