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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x100c3348
push eax
mov eax, 0x13b4
mov dword fs:[0], esp
call fcn.100bd490
cmp dword [ebp + 8], 0
je 0x1004b055
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x1004b055
cmp dword [0x100fe100], 0
je 0x1004b055
cmp dword [edx + 0x1c], 0x10
lea ecx, [edx + 8]
jb 0x1004ae80
mov ecx, dword [edx + 8]
mov edx, dword [edx + 0x18]
push 0x1b
push str.QEV_CH_EVENT_KISAENG_081201
call fcn.1000ba70
add esp, 8
test al, al
je 0x1004b055
mov ecx, dword [0x100fe0fc]
push ebx
push esi
xor esi, esi
mov eax, dword [ecx]
push edi
cmp eax, ecx
je 0x1004aeb9
nop dword [eax + eax]
add esi, dword [eax + 0x28]
mov eax, dword [eax]
cmp eax, ecx
jne 0x1004aeb0
call fcn.10071062
mov dword [ebp - 0x3c], 0xffffffff
mov edx, 1
mov dword [ebp - 0x13bc], eax
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [ebp + edx*4 - 0x13bc], eax
inc edx
cmp edx, 0x270
jl 0x1004aed0
dec esi
mov dword [ebp - 0x13c0], 0x270
cmp esi, 0xffffffff
jne 0x1004af0e
lea ecx, [ebp - 0x13c0]
call fcn.10068b20
mov edx, eax
jmp 0x1004af4f
lea ebx, [esi + 1]
mov dword [ebp + 0xc], ebx
jmp 0x1004af19
lea ebx, [esi + 1]
xor edi, edi
xor eax, eax
test esi, esi
je 0x1004af31
lea ecx, [ebp - 0x13c0]
call fcn.10068b20
mov edi, eax
or eax, 0xffffffff
xor edx, edx
div ebx
mov ecx, eax
mov ebx, edx
xor edx, edx
mov eax, edi
div dword [ebp + 0xc]
cmp eax, ecx
jb 0x1004af48
cmp ebx, esi
jne 0x1004af16
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
lea eax, [edx - 0x7fffffff]
mov ebx, 0xf
lea ecx, [eax - 0x80000000]
mov dword [ebp - 0x24], ebx
cmp eax, 0x80000000
lea edi, [eax - 0x80000000]
cmovae edi, ecx
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov byte [ebp - 0x38], cl
mov dword [ebp - 4], ecx
mov eax, dword [0x100fe0fc]
mov esi, dword [eax]
cmp esi, eax
je 0x1004af97
add ecx, dword [esi + 0x28]
lea edx, [esi + 8]
cmp edi, ecx
jle 0x1004afae
mov esi, dword [esi]
cmp esi, eax
jne 0x1004af87
xor bl, bl
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x38]
cmp eax, edx
je 0x1004afcc
cmp dword [esi + 0x1c], 0x10
jb 0x1004afbd
mov edx, dword [edx]
push dword [esi + 0x18]
lea ecx, [ebp - 0x38]
push edx
call fcn.1000a420
mov ebx, dword [ebp - 0x24]
mov ecx, dword [esi + 0x20]
cmp ebx, 0x10
mov ebx, dword [ebp + 8]
push 0
push 0
push 1
push 0
mov dword [ebp - 0x20], ecx
mov edi, dword [esi + 0x24]
push edi
push 0
mov dword [ebp - 0x1c], edi
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x18], eax
mov edx, dword [esi + 0x2c]
lea esi, [ebp - 0x38]
mov eax, dword [ebx]
cmovae esi, dword [ebp - 0x38]
push edx
push 6
mov dword [ebp - 0x14], edx
lea edx, [ebp - 0x10]
push edx
push ecx
push esi
mov dword [ebp - 0x10], 0
mov ecx, ebx
mov eax, dword [eax + 0x22c]
push 0
call eax
mov edx, dword [ebp - 0x24]
mov bl, 1
cmp edx, 0x10
jb 0x1004af99
mov ecx, dword [ebp - 0x38]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1004b046
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1004b067
push edx
push ecx
call fcn.1006cd71
add esp, 8
jmp 0x1004af99
mov ecx, dword [ebp - 0xc]
xor al, al
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
call fcn.10087f1c
int3