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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x10059977
push eax
mov dword fs:[0], esp
sub esp, 0x58
cmp byte [ebp + 8], 0
push ebx
push esi
push edi
mov edi, edx
je 0x10035560
push 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10035859
push 0x6133
xor ebx, ebx
mov dword [esp + 0x24], 5
push ebx
push ecx
push ecx
mov ecx, 0x712
call fcn.1003668a
add esp, 0x10
xor dl, dl
push 0x614c
push ecx
push ecx
call fcn.100353fd
mov eax, dword [0x1009ae98]
add esp, 0xc
mov esi, 0x270
test al, 1
jne 0x100355dc
or dword [0x1009ae94], 0xffffffff
or eax, 1
mov ecx, 0x1571
mov dword [0x1009ae98], eax
xor edx, edx
mov dword [0x10099b14], ecx
inc edx
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, edx
mov dword [edx*4 + 0x10099b14], ecx
inc edx
cmp edx, esi
jl 0x100355bb
mov dword [0x10099b10], esi
mov dword [esp + 0x20], 0xceafd94
mov dword [esp + 0x20], 0x6f6dd8d1
mov dword [esp + 0x1c], 1
mov dword [esp + 0x1c], 0x3d1bca9d
mov dword [esp + 0x1c], 0xffff
mov dword [esp + 0x14], ebx
jmp 0x1003561a
mov eax, dword [esp + 0x14]
mov dword [esp + eax*4 + 0x50], 0x7a98815
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 4
jl 0x1003560a
dec dword [esp + 0x1c]
jne 0x1003566d
mov eax, dword [esp + 0x54]
xor ebx, ebx
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x1c]
cmp ecx, eax
mov eax, dword [esp + 0x1c]
setg bl
xor edx, edx
cmp ebx, eax
mov eax, dword [esp + 0x1c]
sete dl
xor ecx, ecx
cmp eax, edx
mov eax, 0xc4365dea
setle cl
cmp eax, ecx
sbb eax, eax
xor ebx, ebx
neg eax
cmp eax, dword [esp + 0x20]
jne 0x10035669
cmp dword [esp + 0x20], ebx
jne 0x1003566d
mov eax, ebx
jmp 0x10035670
xor eax, eax
inc eax
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x28]
mov eax, dword [esp + 0x20]
sub eax, 0xc809
neg eax
push 3
sbb eax, eax
pop esi
inc eax
mov dword [esp + 0x20], eax
push esi
call fcn.10001bdd
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x18], 0xd45db34e
mov dword [esp + 0x14], ebx
jmp 0x100356b5
mov eax, dword [esp + 0x14]
mov dword [esp + eax*4 + 0x34], 0xffffffff
inc dword [esp + 0x14]
cmp dword [esp + 0x14], esi
jl 0x100356a5
mov dword [esp + 0x14], ebx
jmp 0x100356d0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
mov dword [eax + ecx*4], ebx
inc dword [esp + 0x14]
cmp dword [esp + 0x14], esi
jl 0x100356c1
mov esi, dword [esp + 0x28]
mov dword [esi], ebx
push ecx
push ecx
lea eax, [esp + 0x1b]
mov byte [esp + 0x1b], bl
push eax
push ebx
push ecx
mov edx, 0x56f5
call fcn.100351e7
add esp, 0x14
inc dword [esi]
cmp dword [esi], 2
jle 0x100356dc
mov dword [esp + 0x18], ebx
jmp 0x10035763
mov dword [esp + 0x24], 0xb7d8cf4c
mov dword [esp + 0x1c], ebx
jmp 0x10035721
mov eax, dword [esp + 0x1c]
mov dword [esp + eax*4 + 0x40], 8
inc dword [esp + 0x1c]
cmp dword [esp + 0x1c], 4
jl 0x10035711
mov dword [esp + 0x4c], ebx
jmp 0x10035758
push ebx
push 0x6587
lea eax, [esp + 0x20]
xor dl, dl
push eax
lea eax, [esp + 0x34]
mov cl, 1
push eax
lea eax, [esp + 0x34]
push eax
push 0x51be
call fcn.10035b50
add esp, 0x18
dec dword [esp + 0x4c]
cmp dword [esp + 0x4c], 0xffffffe8
jl 0x1003572e
dec dword [esp + 0x18]
cmp dword [esp + 0x18], 0xfffffffb
je 0x10035703
or dword [esp + 0x6c], 0xffffffff
lea ecx, [esp + 0x28]
call fcn.10001c3a
cmp byte [0x10099941], 0
jne 0x100357c1
push ebx
push 1
push 0xa30
push ebx
mov edx, 0x1575
mov ecx, 0x4ff4
call fcn.10035da7
add esp, 0xc
xor dl, dl
push 0x4d65
push 0x10099b10
push 0x6c7f
call fcn.10035449
add esp, 0x10
xor dl, dl
mov ecx, 0x10099941
call fcn.10035d8f
mov eax, dword [0x10099b10]
cmp eax, 0x270
jne 0x1003580d
mov edx, 0x10099b18
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, 0x1009a4d8
jl 0x100357d2
jmp 0x10035819
cmp eax, 0x4e0
jb 0x1003581e
call fcn.10036ea9
mov eax, dword [0x10099b10]
mov ecx, dword [eax*4 + 0x10099b14]
inc eax
mov dword [0x10099b10], eax
mov eax, ecx
shr eax, 0xb
and eax, dword [0x1009ae94]
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
mov ecx, dword [esp + 0x64]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret