Function at 0x4a1950
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [0x5387c0]
test eax, eax
mov dword [esp + 0x20], 0
jne 0x4a1c27
push 0xdf
push str..crypto_randmd_rand.c
push 0x12
push 9
call fcn.0046efd0
add esp, 0x10
mov ebp, dword [0x5387e0]
mov dword [esp + 0x28], ebp
lea eax, [esp + 0x28]
mov ebp, dword [0x5387e4]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], ebp
mov esi, 0x538c30
cld
mov ecx, 5
lea edi, [esp + 0x40]
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [0x5387f0]
mov esi, dword [esp + 0x84]
lea ecx, [ebx + esi]
cmp ecx, 0x3fe
jle 0x4a1bba
mov eax, ecx
mov edi, 0x3ff
cdq
idiv edi
mov dword [0x5387f0], edx
mov dword [0x5387d0], 0x3ff
mov eax, 0x66666667
imul dword [esp + 0x84]
mov edi, dword [esp + 0x84]
sar edx, 3
sar edi, 0x1f
sub edx, edi
lea eax, [edx + edx*4]
shl eax, 2
mov ecx, dword [esp + 0x84]
sub ecx, eax
test ecx, ecx
jle 0x4a1a14
inc edx
lea esi, [ebp + edx]
mov ebp, dword [esp + 0x20]
test ebp, ebp
mov dword [0x5387e4], esi
je 0x4a1c0c
sub esp, 0xc
lea ebp, [esp + 0x3c]
push ebp
call fcn.004780d0
mov dword [esp + 0x34], 0
add esp, 0x10
mov edx, dword [esp + 0x84]
cmp dword [esp + 0x24], edx
jge 0x4a1b52
lea esi, [esi]
lea edi, [edi]
mov edi, dword [esp + 0x84]
sub edi, dword [esp + 0x24]
cmp edi, 0x14
jle 0x4a1a75
mov edi, 0x14
push esi
push 0
sub esp, 8
call fcn.00479630
pop edx
pop ecx
push eax
push ebp
call fcn.00478120
add esp, 0xc
push 0x14
lea ecx, [esp + 0x48]
push ecx
push ebp
lea esi, [ebx + edi - 0x3ff]
call fcn.004782c0
add esp, 0x10
test esi, esi
jle 0x4a1be3
mov edx, edi
sub edx, esi
push eax
push edx
lea eax, [ebx + 0x538810]
push eax
push ebp
call fcn.004782c0
add esp, 0xc
push esi
push 0x538810
push ebp
call fcn.004782c0
add esp, 0xc
push edi
mov esi, dword [esp + 0x88]
push esi
push ebp
call fcn.004782c0
add esp, 0xc
push 8
mov edx, dword [esp + 0x24]
push edx
push ebp
call fcn.004782c0
add esp, 0xc
push 0
lea eax, [esp + 0x48]
push eax
push ebp
call fcn.004782e0
lea ecx, [esp + 0x38]
mov dword [esp + 0x2c], ecx
xor ecx, ecx
inc dword [esp + 0x3c]
add dword [esp + 0x90], edi
add esp, 0x10
cmp ecx, edi
jge 0x4a1b3c
nop
lea esi, [esi]
mov edx, ebx
mov al, byte [esp + ecx + 0x40]
inc ebx
xor byte [edx + 0x538810], al
cmp ebx, 0x3fe
jle 0x4a1b37
xor ebx, ebx
inc ecx
cmp ecx, edi
jl 0x4a1b20
add dword [esp + 0x24], 0x14
mov edi, dword [esp + 0x84]
cmp dword [esp + 0x24], edi
jl 0x4a1a60
sub esp, 0xc
push ebp
call fcn.004783a0
add esp, 0x10
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x4a1bf1
xor edx, edx
lea esi, [esi]
mov cl, byte [esp + edx + 0x40]
xor byte [edx + 0x538c30], cl
inc edx
cmp edx, 0x13
jle 0x4a1b70
fld qword [0x538790]
fld dword [0x523d00]
fucomp st(1)
fnstsw ax
test ah, 0x45
jne 0x4a1c7c
fadd qword [esp + 0x88]
fstp qword [0x538790]
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x4a1c8a
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x5387d0]
cmp eax, 0x3fe
mov dword [0x5387f0], ecx
jg 0x4a19e5
cmp ecx, eax
jle 0x4a19e5
mov dword [0x5387d0], ecx
jmp 0x4a19e5
push eax
push edi
lea esi, [ebx + 0x538810]
push esi
jmp 0x4a1ac7
push 0x12a
push str..crypto_randmd_rand.c
push 0x12
push 9
call fcn.0046efd0
add esp, 0x10
jmp 0x4a1b6a
push 0xff
push str..crypto_randmd_rand.c
push 0x12
push 0xa
call fcn.0046efd0
add esp, 0x10
jmp 0x4a1a2a
push 0xd8
push str..crypto_randmd_rand.c
push 0x13
push 5
call fcn.0046efd0
call fcn.0046ec60
add esp, 0x10
cmp eax, dword [0x5387b0]
sete dl
and edx, 0xff
mov dword [esp + 0x20], edx
push 0xda
push str..crypto_randmd_rand.c
push 0x13
push 6
call fcn.0046efd0
add esp, 0x10
mov ebp, dword [esp + 0x20]
test ebp, ebp
jne 0x4a1982
jmp 0x4a196c
fstp st(0)
mov ebp, dword [esp + 0x20]
test ebp, ebp
jne 0x4a1bb2
push 0x135
push str..crypto_randmd_rand.c
push 0x12
push 0xa
call fcn.0046efd0
add esp, 0x10
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret