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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x468438
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1568
call fcn.0043f0c0
mov eax, dword [0x48a140]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
push 0xc0
lea eax, [ebp - 0x1560]
mov dword [ebp - 0x1564], 0
push 0
push eax
mov dword [ebp - 4], 0
call fcn.0043fe00
add esp, 0xc
cmp dword [esi + 0x14], 0xf
jbe 0x408637
mov esi, dword [esi]
lea ecx, [ebp - 0x14e8]
mov dword [ebp - 0x1560], 0x47e768
mov dword [ebp - 0x1550], 0x47e500
call fcn.004119d0
push ecx
lea eax, [ebp - 0x1548]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x1560]
mov dword [ebp - 0x1564], 1
call fcn.00411880
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x1560]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_fstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1560]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x78]
mov dword [ebp + ecx - 0x1564], eax
lea ecx, [ebp - 0x1548]
call fcn.00412550
push ecx
push 0x23
push esi
lea ecx, [ebp - 0x1548]
mov byte [ebp - 4], 3
call fcn.00412490
test eax, eax
jne 0x4086f0
mov eax, dword [ebp - 0x1560]
lea ecx, [ebp - 0x1560]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.00402540
mov eax, dword [ebp - 0x1560]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_fstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1560]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x78]
mov dword [ebp + ecx - 0x1564], eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x1560]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x1554], 6
jne 0x408911
push 0x100
lea eax, [ebp - 0x118]
push 0
push eax
call fcn.0043fe00
add esp, 0xc
lea eax, [ebp - 0x118]
lea ecx, [ebp - 0x1560]
push 0
push 0x100
push eax
call fcn.0040e090
mov esi, dword [ebp - 0x1554]
mov ebx, dword [ebp - 0x1558]
mov dword [ebp - 0x1568], ebx
mov dword [ebp - 0x1570], esi
test esi, esi
jg 0x40878b
jl 0x4088d9
test ebx, ebx
je 0x4088d9
call fcn.0043d3c3
mov edx, eax
mov dword [ebp - 0x11c], 0xffffffff
mov dword [ebp - 0x149c], edx
mov ecx, 1
mov eax, edx
shr eax, 0x1e
xor eax, edx
imul edx, eax, 0x6c078965
add edx, ecx
mov dword [ebp + ecx*4 - 0x149c], edx
inc ecx
cmp ecx, 0x270
jb 0x4087a7
lea eax, [ebp - 0x118]
mov dword [ebp - 0x14a0], 0x270
add eax, ebx
lea ecx, [ebp - 0x118]
cmp ecx, eax
je 0x4088b7
lea ecx, [ebp - 0x117]
mov edi, 1
cmp ecx, eax
je 0x4088b7
mov ecx, 2
lea eax, [ebp - 0x117]
sub ecx, eax
mov dword [ebp - 0x156c], ecx
nop dword [eax]
lea eax, [ebp - 0x118]
add eax, edi
add eax, ecx
mov dword [ebp - 0x1564], eax
mov ecx, eax
xor ebx, ebx
xor esi, esi
test edi, edi
je 0x408840
lea ecx, [ebp - 0x14a0]
call fcn.004171a0
mov ecx, dword [ebp - 0x1564]
mov ebx, eax
or esi, 0xffffffff
xor edx, edx
mov eax, esi
div ecx
xor edx, edx
mov ecx, eax
mov eax, ebx
div dword [ebp - 0x1564]
cmp eax, ecx
mov ecx, dword [ebp - 0x1564]
jb 0x408866
xor edx, edx
mov eax, esi
div ecx
cmp edx, edi
jne 0x408822
xor edx, edx
mov eax, ebx
div ecx
cmp edx, edi
je 0x40888c
mov al, byte [ebp + edx - 0x118]
mov cl, byte [ebp + edi - 0x118]
mov byte [ebp + edi - 0x118], al
mov byte [ebp + edx - 0x118], cl
mov ebx, dword [ebp - 0x1568]
lea eax, [ebp - 0x118]
inc edi
lea ecx, [ebp - 0x118]
add ecx, ebx
add eax, edi
cmp eax, ecx
mov ecx, dword [ebp - 0x156c]
jne 0x408810
mov esi, dword [ebp - 0x1570]
sub esp, 0xc
lea ecx, [ebp - 0x1550]
call fcn.0040d930
push esi
push ebx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x1550]
call fcn.0040da90
lea ecx, [ebp - 0x1548]
call fcn.00411640
test eax, eax
jne 0x408911
mov eax, dword [ebp - 0x1560]
lea ecx, [ebp - 0x1560]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.00402540
lea ecx, [ebp - 0x1560]
call fcn.00408940
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043de82
mov esp, ebp
pop ebp
ret