Function at 0x49dc50
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
cmp dword [ebp + 8], 0
push ebx
push esi
push edi
mov edi, ecx
jne 0x49dc6f
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 0x114]
mov esi, dword [eax + 0x470]
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 0x40]
mov eax, dword [esi + 0x48]
and ecx, 0x5aa01092
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x49dcb4
nop dword [eax + eax]
cmp dword [eax + 8], 0x5aa01092
je 0x49dda6
mov eax, dword [eax + 4]
test eax, eax
jne 0x49dca0
xor ebx, ebx
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [edi + 0x114]
mov esi, dword [eax + 0x470]
lea eax, [esi + 8]
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 0x40]
mov eax, dword [esi + 0x48]
and ecx, 0x7fa8011c
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x49dd04
nop dword [eax]
cmp dword [eax + 8], 0x7fa8011c
je 0x49ddae
mov eax, dword [eax + 4]
test eax, eax
jne 0x49dcf0
xor esi, esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xcccccccd
movsd xmm1, qword [0x513ae8]
mul esi
shr edx, 3
add edx, ebx
lea ebx, [edi + 0x30]
push ebx
mov dword [ebp - 0x28], ebx
movd xmm0, edx
cvtdq2pd xmm0, xmm0
shr edx, 0x1f
addsd xmm0, qword [edx*8 + 0x513d40]
divsd xmm0, qword [0x513bc0]
minsd xmm1, xmm0
movsd qword [ebp - 0x24], xmm1
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0xbc], 1
jne 0x49ddb6
movups xmm0, xmmword [edi + 0xc0]
mov eax, dword [ebp + 8]
push ebx
movups xmmword [eax], xmm0
movq xmm0, qword [edi + 0xd0]
movq qword [eax + 0x10], xmm0
xorps xmm0, xmm0
movups xmmword [edi + 0xc0], xmm0
movq qword [edi + 0xd0], xmm0
mov dword [edi + 0xbc], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [eax + 0xc]
jmp 0x49dcb6
mov esi, dword [eax + 0xc]
jmp 0x49dd06
mov eax, dword [edi + 0x94]
add eax, dword [edi + 0x90]
cmp dword [edi + 0xf4], 0
je 0x49e09c
cmp eax, 0x20
jb 0x49e02e
mov esi, dword [edi + 0x48]
mov eax, dword [esi + 0x9c0]
cmp eax, 0x270
jl 0x49dead
cmp eax, 0x271
jne 0x49ddff
push 0x1571
mov ecx, esi
call fcn.004b4290
xor edx, edx
mov ecx, dword [esi + edx*4 + 4]
xor ecx, dword [esi + edx*4]
and ecx, 0x7fffffff
xor ecx, dword [esi + edx*4]
mov eax, ecx
shr ecx, 1
and eax, 1
mov eax, dword [eax*4 + 0x503e54]
xor eax, dword [esi + edx*4 + 0x634]
xor eax, ecx
mov dword [esi + edx*4], eax
inc edx
cmp edx, 0xe3
jl 0x49de01
nop dword [eax]
nop dword [eax + eax]
mov ecx, dword [esi + edx*4 + 4]
xor ecx, dword [esi + edx*4]
and ecx, 0x7fffffff
xor ecx, dword [esi + edx*4]
mov eax, ecx
shr ecx, 1
and eax, 1
mov eax, dword [eax*4 + 0x503e54]
xor eax, dword [esi + edx*4 - 0x38c]
xor eax, ecx
mov dword [esi + edx*4], eax
inc edx
cmp edx, 0x26f
jl 0x49de40
mov eax, dword [esi + 0x9bc]
mov ecx, dword [esi]
xor ecx, eax
and ecx, 0x7fffffff
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
mov eax, dword [eax*4 + 0x503e54]
xor eax, dword [esi + 0x630]
xor eax, ecx
mov dword [esi + 0x9bc], eax
xor eax, eax
mov dword [esi + 0x9c0], 0
mov ecx, dword [esi + eax*4]
inc eax
mov dword [esi + 0x9c0], eax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
test al, 1
jne 0x49e033
mov ecx, edi
call fcn.0049e880
mov ecx, dword [edi + 0x118]
lea eax, [ebp - 0x40]
push eax
call fcn.0049c310
test eax, eax
je 0x49df0b
xorps xmm0, xmm0
movups xmmword [ebp - 0x40], xmm0
movq qword [ebp - 0x30], xmm0
mov eax, dword [edi + 0x94]
add eax, dword [edi + 0x90]
cmp eax, 0x20
jb 0x49e1a4
mov ecx, dword [edi + 0x48]
call fcn.00409ee0
movsd xmm1, qword [ebp - 0x24]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x513d40]
mulsd xmm0, qword [0x513a38]
comisd xmm1, xmm0
jbe 0x49e193
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [edi + 0x114]
mov esi, dword [eax + 0x470]
lea eax, [esi + 8]
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [esi + 0xbc]
mov ecx, esi
push dword [esi + 0xb4]
call fcn.00402c30
lea eax, [esi + 0xc0]
mov edi, 3
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
lea eax, [ebp - 0x28]
dec edi
push eax
push dword [esi + 0xbc]
push dword [esi + 0xb4]
call fcn.00402ea0
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x49e162
mov eax, dword [ebx + 0x2c]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 8]
mov dword [ebp - 8], eax
push ecx
mov dword [ebp - 0x18], 4
mov ecx, ebx
mov eax, dword [ebx]
push 0
push reloc.WS2_32.dll_closesocket
call dword [eax + 0x14]
lea eax, [ebp - 0x1c]
mov ecx, esi
push eax
push ebx
call fcn.00419290
mov eax, dword [esi + 0xc0]
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x50]
push ecx
push dword [ebp + 8]
mov ecx, dword [eax + 0x4b0]
lea ebx, [esi + 0xc0]
push dword [ebp - 8]
mov dword [ebp - 0xc], ebx
push dword [ebp - 0x1c]
call fcn.0049e3e0
test eax, eax
je 0x49e14e
test edi, edi
jne 0x49df94
jmp 0x49e165
mov eax, 1
mov ecx, dword [edi + 0xf4]
cmp dword [ecx + 0x24], 1
mov esi, dword [ecx + 0x1c]
je 0x49e053
inc dword [edi + 0xe4]
mov dword [edi + 0xf4], esi
jmp 0x49ddc2
cmp dword [edi + 0xe4], 1
jae 0x49e064
push ecx
mov ecx, edi
call fcn.004a0340
mov eax, dword [edi + 0xf4]
mov ecx, dword [ebp + 8]
push ebx
movups xmm0, xmmword [eax + 0x58]
movups xmmword [ecx], xmm0
movq xmm0, qword [eax + 0x68]
movq qword [ecx + 0x10], xmm0
inc dword [edi + 0xe4]
mov dword [edi + 0xf4], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 0x20
jae 0x49dee5
cmp dword [edi + 0xec], 0
je 0x49dee5
mov ecx, dword [edi + 0x48]
call fcn.00409ee0
test al, 1
je 0x49dee5
mov ecx, dword [edi + 0x48]
mov esi, dword [edi + 0xec]
call fcn.00409ee0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x513d40]
mov eax, dword [edi + 0xe8]
mulsd xmm1, qword [0x513a38]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x513d40]
mulsd xmm0, xmm1
call fcn.004f3af0
test esi, esi
je 0x49dee5
test eax, eax
je 0x49e128
mov esi, dword [esi + 0x1c]
dec eax
test esi, esi
jne 0x49e117
jmp 0x49dee5
movups xmm0, xmmword [esi + 0x58]
mov eax, dword [ebp + 8]
push ebx
movups xmmword [eax], xmm0
movq xmm0, qword [esi + 0x68]
movq qword [eax + 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [ebp - 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x50]
push ecx
push dword [ebp + 8]
mov ecx, dword [eax + 0x4b0]
call fcn.0049e1e0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x40]
push eax
push ebx
mov ecx, edi
call fcn.0049c940
jmp 0x49e1b5
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x40]
push eax
push 0
push ebx
mov ecx, edi
call fcn.0049d1b0
push dword [ebp - 0x28]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x49e1cf
xorps xmm0, xmm0
movups xmmword [ebx], xmm0
movq qword [ebx + 0x10], xmm0
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4