Function at 0x531a80
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8c
fld qword [ebp + 0x10]
fstp qword [ebp - 0x68]
mov edx, dword [0x6dbc40]
test edx, edx
jne 0x531d96
mov dword [esp + 0xc], 0xe1
mov dword [esp + 8], str.crypto_rand_md_rand.c
mov dword [esp + 4], 0x12
mov dword [esp], 9
call fcn.004f3704
mov dword [ebp - 0x60], 0
mov ebx, dword [0x6dbc58]
mov eax, dword [0x6dbc5c]
mov dword [ebp - 0x20], eax
mov eax, dword [0x6dbc60]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x1c], eax
lea edx, [ebp - 0x3c]
mov dword [ebp - 0x7c], edx
mov esi, 0x6dbc64
mov ecx, 5
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0xc]
add eax, ebx
mov dword [0x6dbc58], eax
cmp eax, 0x3fe
jle 0x531d20
mov cx, 0x3ff
cdq
idiv ecx
mov dword [0x6dbc58], edx
mov dword [0x6dbc78], 0x3ff
mov edx, 0x66666667
mov eax, dword [ebp + 0xc]
imul edx
sar edx, 3
mov eax, dword [ebp + 0xc]
sar eax, 0x1f
sub edx, eax
mov ecx, dword [ebp - 0x5c]
lea ecx, [edx + ecx]
lea eax, [edx + edx*4]
shl eax, 2
mov edx, dword [ebp + 0xc]
sub edx, eax
test edx, edx
setg al
movzx eax, al
lea eax, [ecx + eax]
mov dword [0x6dbc60], eax
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x531d6d
lea esi, [ebp - 0x54]
mov dword [esp], esi
call fcn.004fc860
mov edi, dword [ebp + 0xc]
test edi, edi
jle 0x531ca3
mov dword [ebp - 0x5c], 0
nop
mov edi, dword [ebp + 0xc]
sub edi, dword [ebp - 0x5c]
cmp edi, 0x14
jle 0x531b94
mov edi, 0x14
call fcn.004efb20
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.004fc8b0
mov dword [esp + 8], 0x14
lea eax, [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.004fcb4c
lea edx, [ebx + edi - 0x3ff]
test edx, edx
jle 0x531c88
mov eax, edi
sub eax, edx
mov dword [esp + 8], eax
lea eax, [ebx + 0x6dbc80]
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [ebp - 0x6c], edx
call fcn.004fcb4c
mov edx, dword [ebp - 0x6c]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x6dbc80
mov dword [esp], esi
call fcn.004fcb4c
mov dword [esp + 8], edi
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.004fcb4c
mov dword [esp + 8], 8
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.004fcb4c
mov dword [esp + 8], 0
lea edx, [ebp - 0x3c]
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.004fcb5c
inc dword [ebp - 0x1c]
test edi, edi
jle 0x531c74
xor eax, eax
lea esi, [esi]
mov dl, byte [ebx + 0x6dbc80]
xor dl, byte [ebp + eax - 0x3c]
mov byte [ebx + 0x6dbc80], dl
inc ebx
cmp ebx, 0x3fe
jle 0x531c6f
xor ebx, ebx
inc eax
cmp eax, edi
jne 0x531c54
add dword [ebp - 0x5c], 0x14
mov eax, dword [ebp - 0x5c]
cmp dword [ebp + 0xc], eax
jle 0x531ca3
add dword [ebp + 8], edi
jmp 0x531b84
mov dword [esp + 8], edi
lea eax, [ebx + 0x6dbc80]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.004fcb4c
jmp 0x531c07
mov dword [esp], esi
call fcn.004fcbe8
mov ebx, dword [ebp - 0x60]
test ebx, ebx
je 0x531d44
xor eax, eax
mov dl, byte [ebp + eax - 0x3c]
xor byte [eax + 0x6dbc64], dl
inc eax
cmp eax, 0x14
jne 0x531cb8
fld qword [0x6dbc50]
fld dword [0x69d4e8]
fucomp st(1)
fnstsw ax
test ah, 0x45
jne 0x531ce8
fadd qword [ebp - 0x68]
fstp qword [0x6dbc50]
jmp 0x531cea
fstp st(0)
mov ecx, dword [ebp - 0x60]
test ecx, ecx
jne 0x531d15
mov dword [esp + 0xc], 0x13f
mov dword [esp + 8], str.crypto_rand_md_rand.c
mov dword [esp + 4], 0x12
mov dword [esp], 0xa
call fcn.004f3704
add esp, 0x8c
pop ebx
pop esi
pop edi
leave
ret
mov edx, dword [0x6dbc78]
cmp edx, 0x3fe
jg 0x531b24
cmp eax, edx
jle 0x531b24
mov dword [0x6dbc78], eax
jmp 0x531b24
mov dword [esp + 0xc], 0x134
mov dword [esp + 8], str.crypto_rand_md_rand.c
mov dword [esp + 4], 0x12
mov dword [esp], 9
call fcn.004f3704
jmp 0x531cb6
mov dword [esp + 0xc], 0x101
mov dword [esp + 8], str.crypto_rand_md_rand.c
mov dword [esp + 4], 0x12
mov dword [esp], 0xa
call fcn.004f3704
jmp 0x531b65
lea ebx, [ebp - 0x28]
mov dword [esp], ebx
call fcn.004f330c
mov dword [esp + 0xc], 0xda
mov dword [esp + 8], str.crypto_rand_md_rand.c
mov dword [esp + 4], 0x13
mov dword [esp], 5
call fcn.004f3704
mov dword [esp + 4], ebx
mov dword [esp], 0x6dbc44
call fcn.004f335c
mov ebx, eax
mov dword [esp + 0xc], 0xdc
mov dword [esp + 8], str.crypto_rand_md_rand.c
mov dword [esp + 4], 0x13
mov dword [esp], 6
call fcn.004f3704
test ebx, ebx
jne 0x531aa0
mov dword [ebp - 0x60], 1
jmp 0x531acb