Function at 0x50e5c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x10], 0
jne 0x50e5dc
mov eax, 1
mov esp, ebp
pop ebp
ret
push ebx
call fcn.004fb500
mov ebx, eax
test ebx, ebx
je 0x50e8e0
push 0x50ea40
push 0x6a389c
call fcn.0050e460
add esp, 8
neg eax
sbb eax, eax
test dword [0x6a38a4], eax
je 0x50e8e0
cmp dword [0x6a38a0], 0
push esi
je 0x50e64f
call sub.KERNEL32.dll_GetCurrentThreadId
push dword [0x6a3898]
mov esi, eax
call fcn.0050e440
push esi
push dword [0x6a3878]
call fcn.0050e380
push dword [0x6a3898]
mov esi, eax
mov dword [ebp - 4], esi
call fcn.0050e4d0
add esp, 0x10
test esi, esi
jne 0x50e664
jmp 0x50e656
mov dword [ebp - 4], 0
push dword [0x6a3894]
call fcn.0050e440
add esp, 4
mov eax, dword [0x6a387c]
mov ecx, dword [ebp + 0xc]
movups xmm0, xmmword [0x6a3864]
push edi
mov edi, dword [0x6a3448]
add ecx, edi
mov dword [ebp - 0x18], eax
mov eax, dword [0x6a3880]
mov dword [ebp - 0x14], eax
mov eax, dword [0x6a3874]
mov dword [ebp - 0x1c], eax
mov dword [0x6a3448], ecx
movups xmmword [ebp - 0x2c], xmm0
cmp ecx, 0x3ff
jb 0x50e6cd
mov eax, 0x401005
mov dword [0x6a3444], 0x3ff
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 9
imul eax, eax, 0x3ff
sub ecx, eax
mov dword [0x6a3448], ecx
jmp 0x50e6e3
mov eax, dword [0x6a3444]
cmp eax, 0x3ff
jae 0x50e6e3
cmp ecx, eax
cmova eax, ecx
mov dword [0x6a3444], eax
mov ecx, dword [ebp + 0xc]
mov eax, 0x66666667
imul ecx
sar edx, 3
mov esi, edx
shr esi, 0x1f
add esi, edx
lea eax, [esi + esi*4]
shl eax, 2
sub ecx, eax
xor eax, eax
test ecx, ecx
setg al
add eax, esi
mov esi, dword [ebp - 4]
add dword [0x6a3880], eax
test esi, esi
jne 0x50e723
push dword [0x6a3894]
call fcn.0050e4d0
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], 0
test eax, eax
jle 0x50e852
mov dword [ebp - 0xc], eax
mov ecx, 0x14
nop dword [eax]
cmp eax, 0x14
mov esi, eax
push 0
cmovg esi, ecx
call fcn.004fb890
push eax
push ebx
call fcn.004fb010
add esp, 0xc
test eax, eax
je 0x50e8de
push 0x14
lea eax, [ebp - 0x2c]
push eax
push ebx
call fcn.004fb1c0
add esp, 0xc
test eax, eax
je 0x50e8de
lea ecx, [edi - 0x3ff]
add ecx, esi
lea edx, [edi + 0x6a3450]
test ecx, ecx
jle 0x50e7b1
mov eax, esi
sub eax, ecx
push eax
push edx
push ebx
call fcn.004fb1c0
add esp, 0xc
test eax, eax
je 0x50e8de
lea eax, [edi - 0x3ff]
add eax, esi
push eax
push 0x6a3450
jmp 0x50e7b3
push esi
push edx
push ebx
call fcn.004fb1c0
add esp, 0xc
test eax, eax
je 0x50e8de
push esi
push dword [ebp + 8]
push ebx
call fcn.004fb1c0
add esp, 0xc
test eax, eax
je 0x50e8de
push 8
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.004fb1c0
add esp, 0xc
test eax, eax
je 0x50e8de
push 0
lea eax, [ebp - 0x2c]
push eax
push ebx
call fcn.004faf70
add esp, 0xc
test eax, eax
je 0x50e8de
inc dword [ebp - 0x14]
xor ecx, ecx
add dword [ebp + 8], esi
test esi, esi
jle 0x50e82f
mov al, byte [ebp + ecx - 0x2c]
xor byte [edi + 0x6a3450], al
lea eax, [edi + 1]
xor edi, edi
cmp eax, 0x3ff
cmovl edi, eax
inc ecx
cmp ecx, esi
jl 0x50e813
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
add ecx, 0x14
sub eax, 0x14
mov dword [ebp - 8], ecx
cmp ecx, dword [ebp + 0xc]
mov ecx, 0x14
mov dword [ebp - 0xc], eax
jl 0x50e740
mov esi, dword [ebp - 4]
test esi, esi
jne 0x50e870
push dword [0x6a3894]
call fcn.0050e440
add esp, 4
nop dword [eax]
nop dword [eax + eax]
movups xmm1, xmmword [0x6a3864]
xor ecx, ecx
mov edx, 4
movups xmm0, xmmword [ebp - 0x2c]
pxor xmm1, xmm0
movups xmmword [0x6a3864], xmm1
nop dword [eax]
mov al, byte [ebp + ecx - 0x1c]
lea ecx, [ecx + 1]
xor byte [ecx + 0x6a3873], al
sub edx, 1
jne 0x50e890
movsd xmm0, qword [0x61c6e8]
movsd xmm1, qword [0x6a3888]
comisd xmm0, xmm1
jbe 0x50e8c5
addsd xmm1, qword [ebp + 0x10]
movsd qword [0x6a3888], xmm1
test esi, esi
jne 0x50e8d7
push dword [0x6a3894]
call fcn.0050e4d0
add esp, 4
mov dword [ebp - 0x10], 1
pop edi
pop esi
push ebx
call fcn.004fb4e0
mov eax, dword [ebp - 0x10]
add esp, 4
pop ebx
mov esp, ebp
pop ebp
ret