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

Disassembly:
mov eax, 0x1006107c
call fcn.1005fb28
sub esp, 0x44
cmp byte [ebp + 0xc], 0
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x28], edi
je 0x100302bc
mov eax, dword [0x1418b36c]
test al, 1
jne 0x10030030
or dword [0x1418c704], 0xffffffff
or eax, 1
mov ecx, 0x1571
mov dword [0x1418b36c], eax
xor edx, edx
mov dword [0x1418b384], ecx
inc edx
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, edx
mov dword [edx*4 + 0x1418b384], ecx
inc edx
cmp edx, 0x270
jl 0x10030007
mov dword [0x1418b380], 0x270
xor ebx, ebx
push 3
mov dword [ebp - 0x18], ebx
pop esi
jmp 0x10030048
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x44], 0x25b9b55b
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], esi
jl 0x1003003a
mov dword [ebp - 0x40], 0x17
jmp 0x10030060
push ecx
call fcn.10031200
inc dword [ebp - 0x40]
pop ecx
cmp dword [ebp - 0x40], 0x1d
je 0x10030056
cmp byte [0x1418b1d0], bl
jne 0x10030222
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x1c], 0x11
jmp 0x100300e8
mov dword [ebp - 0x18], 0x506d4441
mov dword [ebp - 0x18], ebx
jmp 0x100300df
push 2
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x20], 1
call fcn.100138f8
lea eax, [ebp - 0x38]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x2c]
push eax
push ecx
call fcn.10030415
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
push ecx
lea eax, [ebp - 0x38]
push eax
call fcn.10030816
or dword [ebp - 4], 0xffffffff
add esp, 0xc
cmp dword [ebp - 0x38], 0
je 0x100300dc
push dword [ebp - 0x38]
call fcn.10047697
pop ecx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
dec dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0xfffffff5
jne 0x1003008a
dec dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x1003007e
push ecx
push 0x282c
mov edx, 0x2bc3
mov ecx, 0x1418b380
call fcn.10030435
mov dword [ebp - 0x1c], 0x73838a1f
mov dword [ebp - 0x18], 0x221d
cmp dword [ebp - 0x18], 0x2539
pop ecx
pop ecx
jle 0x10030167
mov edi, ebx
mov esi, ebx
mov dword [ebp - 0x1c], 0x23e5
mov dword [ebp - 0x24], ebx
mov eax, esi
mov ecx, 0x1007d058
xor eax, ebx
cdq
push edx
push eax
call fcn.100136b0
inc ebx
cmp ebx, 0x4e26
jl 0x1003012a
add esi, edi
dec dword [ebp - 0x1c]
push 0
pop ebx
jne 0x10030127
inc edi
cmp edi, 0x2279
jl 0x1003011e
push 1
push 0x1592
call dword [sym.imp.USER32.dll_GetSystemMenu]
push 3
pop esi
mov dword [ebp - 4], 1
cmp dword [ebp - 0x18], 0x1ed8
jge 0x10030186
mov edx, str.xfztp_cbtx_nazoxvtk_lazutils_ddybdqp_lmfivdw_iatpus_dwlcs_rld_dcmcc_fpgqu_bpjzgr_plgwz_oodb
mov ecx, 0x1007d058
call fcn.100160b3
or dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], ebx
jmp 0x100301be
mov eax, dword [ebp - 0x1c]
mov dword [ebp + eax*4 - 0x50], esi
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], esi
jl 0x100301b4
mov dword [ebp - 0x1c], ebx
jmp 0x100301fd
push ecx
mov byte [ebp - 0x11], bl
lea edx, [ebp - 0x11]
mov ecx, 0x11da
call fcn.10030341
push 1
push 0x7e94
push ebx
push 0x2085
push 0xb6a
mov dl, 1
mov ecx, 0x1f8f
call fcn.10031a08
add esp, 0x18
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 2
jle 0x100301c8
push ebx
push 1
mov edx, 0x21a8
mov byte [ebp - 0x12], bl
lea ecx, [ebp - 0x12]
call fcn.1002ffbf
mov edi, dword [ebp - 0x28]
pop ecx
pop ecx
mov byte [0x1418b1d0], 1
mov eax, dword [0x1418b380]
cmp eax, 0x270
jne 0x1003026e
mov edx, 0x1418b388
mov ecx, dword [edx - 4]
xor ecx, dword [edx]
and ecx, 0x7fffffff
xor ecx, dword [edx - 4]
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [edx + 0x630]
xor eax, ecx
mov dword [edx + 0x9bc], eax
add edx, 4
cmp edx, 0x1418bd48
jl 0x10030233
jmp 0x1003027a
cmp eax, 0x4e0
jb 0x1003027f
call fcn.100328b8
mov eax, dword [0x1418b380]
mov ecx, dword [eax*4 + 0x1418b384]
inc eax
mov dword [0x1418b380], eax
mov eax, ecx
shr eax, 0xb
and eax, dword [0x1418c704]
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
mov dword [edi], eax
jmp 0x100302c6
cmp byte [ecx], 0
je 0x100302c6
call fcn.100302f4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret