Function at 0x40b580
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [0x4820d4]
sub esp, 0x88
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x40b63f
push 0x69
push str.K:CampurRSA_LibRSALibrary_Source_code_RSA_Windows_32_bit_md_rand.c
push 0x12
push 5
call fcn.00408660
call fcn.00408640
mov ebp, dword [0x4820d8]
xor ecx, ecx
cmp ebp, eax
push 0x6b
sete cl
push str.K:CampurRSA_LibRSALibrary_Source_code_RSA_Windows_32_bit_md_rand.c
mov esi, ecx
push 0x12
push 6
mov dword [esp + 0x34], esi
call fcn.00408660
add esp, 0x20
test esi, esi
jne 0x40b5e9
push 0x70
push str.K:CampurRSA_LibRSALibrary_Source_code_RSA_Windows_32_bit_md_rand.c
push 0x11
push 9
call fcn.00408660
add esp, 0x10
mov eax, dword [0x4820bc]
mov edx, dword [0x4820c0]
mov ebx, dword [0x4820c4]
mov ecx, 5
mov esi, 0x4820a4
lea edi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0xa0]
mov ebp, eax
add eax, esi
mov dword [esp + 0x1c], edx
cmp eax, 0x3ff
mov dword [esp + 0x20], ebx
mov dword [0x4820bc], eax
jl 0x40b649
cdq
mov ecx, 0x3ff
idiv ecx
mov dword [0x4820b8], ecx
mov dword [0x4820bc], edx
jmp 0x40b660
mov dword [esp + 0x14], 0
jmp 0x40b5d6
mov ecx, dword [0x4820b8]
cmp ecx, 0x3ff
jge 0x40b660
cmp eax, ecx
jle 0x40b660
mov dword [0x4820b8], eax
mov eax, esi
mov ecx, 0x14
cdq
idiv ecx
xor ecx, ecx
mov eax, 0x66666667
mov edi, dword [esp + 0x14]
test edx, edx
setg cl
imul esi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
add edx, ebx
add edx, ecx
test edi, edi
mov dword [0x4820c4], edx
jne 0x40b6aa
push 0x90
push str.K:CampurRSA_LibRSALibrary_Source_code_RSA_Windows_32_bit_md_rand.c
push 0x11
push 0xa
call fcn.00408660
add esp, 0x10
test esi, esi
jle 0x40b7cb
mov ecx, esi
add esi, 0x13
mov eax, 0xcccccccd
mov ebx, dword [esp + 0x9c]
mul esi
shr edx, 4
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], edx
jmp 0x40b6d6
mov ecx, dword [esp + 0x10]
cmp ecx, 0x14
mov esi, ecx
jle 0x40b6e2
mov esi, 0x14
lea ecx, [esp + 0x38]
push ecx
call fcn.0040df10
lea edx, [esp + 0x28]
push 0x14
lea eax, [esp + 0x40]
push edx
push eax
call fcn.0040db00
lea edi, [esi + ebp - 0x3ff]
add esp, 0x10
test edi, edi
jle 0x40b736
mov ecx, esi
lea edx, [ebp + 0x481c90]
sub ecx, edi
lea eax, [esp + 0x38]
push ecx
push edx
push eax
call fcn.0040db00
push edi
lea ecx, [esp + 0x48]
push 0x481c90
push ecx
call fcn.0040db00
add esp, 0x18
jmp 0x40b74b
lea edx, [ebp + 0x481c90]
push esi
lea eax, [esp + 0x3c]
push edx
push eax
call fcn.0040db00
add esp, 0xc
push esi
lea ecx, [esp + 0x3c]
push ebx
push ecx
call fcn.0040db00
lea edx, [esp + 0x28]
push 8
lea eax, [esp + 0x48]
push edx
push eax
call fcn.0040db00
lea ecx, [esp + 0x50]
lea edx, [esp + 0x3c]
push ecx
push edx
call fcn.0040ddb0
mov edi, dword [esp + 0x40]
add esp, 0x20
inc edi
add ebx, esi
xor eax, eax
mov dword [esp + 0x20], edi
test esi, esi
jle 0x40b7ad
mov cl, byte [esp + eax + 0x24]
mov dl, byte [ebp + 0x481c90]
xor dl, cl
mov byte [ebp + 0x481c90], dl
inc ebp
cmp ebp, 0x3ff
jl 0x40b7a8
xor ebp, ebp
inc eax
cmp eax, esi
jl 0x40b78b
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
sub ecx, 0x14
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
jne 0x40b6d2
mov edi, dword [esp + 0x14]
lea edx, [esp + 0x38]
push 0x60
push edx
call fcn.00408dd0
add esp, 8
test edi, edi
jne 0x40b7f4
push 0xba
push str.K:CampurRSA_LibRSALibrary_Source_code_RSA_Windows_32_bit_md_rand.c
push 0x11
push 9
call fcn.00408660
add esp, 0x10
xor eax, eax
mov cl, byte [esp + eax + 0x24]
mov bl, byte [eax + 0x4820a4]
xor bl, cl
mov byte [eax + 0x4820a4], bl
inc eax
cmp eax, 0x14
jb 0x40b7f6
fld qword [0x4820c8]
fcomp qword [0x472410]
fnstsw ax
test ah, 1
je 0x40b834
fld qword [0x4820c8]
fadd qword [esp + 0xa4]
fstp qword [0x4820c8]
test edi, edi
pop edi
pop esi
pop ebp
pop ebx
jne 0x40b852
push 0xc5
push str.K:CampurRSA_LibRSALibrary_Source_code_RSA_Windows_32_bit_md_rand.c
push 0x11
push 0xa
call fcn.00408660
add esp, 0x10
add esp, 0x88
ret