Function at 0x56a510
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebp, dword [esp + 0x80]
mov ebx, dword [esp + 0x90]
mov edx, dword [esp + 0x8c]
mov dword [esp], edx
call fcn.004d9e00
mov esi, eax
test eax, eax
js 0x56a7ac
cmp ebx, 0xffffffff
je 0x56a8b0
cmp ebx, 0xfffffffe
je 0x56a552
jl 0x56a870
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call fcn.004bcaa0
dec eax
and eax, 7
mov dword [esp + 0x2c], eax
mov dword [esp], ebp
call fcn.004d4540
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x2c]
test edx, edx
jne 0x56a590
mov edx, dword [esp + 0x84]
mov byte [edx], 0
inc edx
mov dword [esp + 0x84], edx
dec eax
mov dword [esp + 0x30], eax
cmp ebx, 0xfffffffe
je 0x56a7e0
lea eax, [esi + ebx + 1]
cmp dword [esp + 0x30], eax
jle 0x56a780
test ebx, ebx
jle 0x56a7f1
mov dword [esp + 8], 0xda
mov dword [esp + 4], str.rsa_pss.c
mov dword [esp], ebx
call fcn.004b8170
mov edi, eax
test eax, eax
je 0x56a8f0
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.004bf010
test eax, eax
jle 0x56a8e0
mov eax, dword [esp + 0x30]
sub eax, esi
dec eax
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x84]
add edx, eax
mov dword [esp + 0x38], edx
lea ebp, [esp + 0x48]
mov dword [esp], ebp
call fcn.004d1550
mov dword [esp + 8], 0
mov edx, dword [esp + 0x8c]
mov dword [esp + 4], edx
mov dword [esp], ebp
call fcn.004d1650
mov dword [esp + 8], 8
mov dword [esp + 4], 0x611ef6
mov dword [esp], ebp
call fcn.004d1950
mov dword [esp + 8], esi
mov eax, dword [esp + 0x88]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004d1950
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], ebp
call fcn.004d1950
mov dword [esp + 8], 0
mov edx, dword [esp + 0x38]
mov dword [esp + 4], edx
mov dword [esp], ebp
call fcn.004d20c0
mov dword [esp], ebp
call fcn.004d1a50
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], esi
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x84]
mov dword [esp], edx
call fcn.00560110
test eax, eax
jne 0x56a7c0
mov eax, dword [esp + 0x30]
sub eax, ebx
sub eax, esi
mov edx, dword [esp + 0x84]
lea ecx, [edx + eax - 2]
xor byte [ecx], 1
test ebx, ebx
jle 0x56a75b
inc ecx
mov dword [esp + 0x28], ecx
add eax, dword [esp + 0x84]
lea edx, [eax - 1]
mov dword [esp + 0x34], edx
mov esi, ebx
shr esi, 2
lea ebp, [esi*4]
lea ecx, [edi + 4]
cmp edx, ecx
setae dl
lea ecx, [eax + 3]
cmp edi, ecx
setae cl
or edx, ecx
cmp ebx, 6
seta cl
and edx, ecx
mov ecx, dword [esp + 0x34]
or ecx, edi
and ecx, 3
sete cl
test dl, cl
je 0x56a921
test ebp, ebp
je 0x56a921
xor ecx, ecx
nop
mov edx, dword [edi + ecx*4]
xor dword [eax + ecx*4 - 1], edx
inc ecx
cmp esi, ecx
ja 0x56a730
mov eax, ebp
add dword [esp + 0x28], ebp
cmp ebx, ebp
je 0x56a75b
mov ecx, dword [esp + 0x28]
sub ecx, eax
lea esi, [esi]
mov dl, byte [edi + eax]
xor byte [ecx + eax], dl
inc eax
cmp ebx, eax
jg 0x56a750
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x56a8c0
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x30]
mov byte [edx + eax - 1], 0xbc
mov eax, 1
jmp 0x56a7c2
mov dword [esp + 0x10], 0xd5
mov dword [esp + 0xc], str.rsa_pss.c
mov dword [esp + 8], 0x6e
mov dword [esp + 4], 0x7d
mov dword [esp], 4
call fcn.004b2280
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
test edi, edi
je 0x56a7ae
mov dword [esp], edi
mov dword [esp + 0x24], eax
call fcn.004b8660
mov eax, dword [esp + 0x24]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [esp + 0x30]
sub ebx, esi
sub ebx, 2
test ebx, ebx
jg 0x56a5af
mov eax, dword [esp + 0x30]
sub eax, esi
dec eax
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x84]
add edx, eax
mov dword [esp + 0x38], edx
lea ebp, [esp + 0x48]
mov dword [esp], ebp
call fcn.004d1550
mov dword [esp + 8], 0
mov edx, dword [esp + 0x8c]
mov dword [esp + 4], edx
mov dword [esp], ebp
call fcn.004d1650
mov dword [esp + 8], 8
mov dword [esp + 4], 0x611ef6
mov dword [esp], ebp
call fcn.004d1950
mov dword [esp + 8], esi
mov eax, dword [esp + 0x88]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004d1950
xor edi, edi
test ebx, ebx
je 0x56a663
jmp 0x56a653
mov dword [esp + 0x10], 0xc3
mov dword [esp + 0xc], str.rsa_pss.c
mov dword [esp + 8], 0x88
mov dword [esp + 4], 0x7d
mov dword [esp], 4
call fcn.004b2280
jmp 0x56a7ac
mov ebx, eax
jmp 0x56a552
mov ecx, 8
sub ecx, dword [esp + 0x2c]
mov eax, 0xff
sar eax, cl
mov edx, dword [esp + 0x84]
and byte [edx], al
jmp 0x56a76e
xor eax, eax
jmp 0x56a7c6
mov dword [esp + 0x10], 0xde
mov dword [esp + 0xc], str.rsa_pss.c
mov dword [esp + 8], 0x41
mov dword [esp + 4], 0x7d
mov dword [esp], 4
call fcn.004b2280
jmp 0x56a7ac
xor eax, eax
jmp 0x56a746