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

Disassembly:
mov eax, 0x10061229
call fcn.1005f648
sub esp, 0x94
push ebx
push esi
push edi
or esi, 0xffffffff
mov dword [ebp - 0x10], esp
cmp byte [ebp + 0x18], 0
je 0x10041264
mov dword [ebp - 0x30], 0x137b1891
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov edi, 0x1007ba38
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x1c], 0xd2250db8
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x14], 0x7b36
cmp dword [ebp - 0x14], 0x7b90
jle 0x10040e9e
mov esi, ebx
mov dword [ebp - 0x20], ebx
mov ecx, ebx
mov dword [ebp - 0x24], 0x3e4b
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
mov eax, esi
shl eax, cl
mov ecx, edi
cdq
push edx
push eax
call fcn.10005547
mov ecx, dword [ebp - 0x1c]
add ecx, ebx
dec dword [ebp - 0x24]
mov dword [ebp - 0x1c], ecx
jne 0x10040e68
inc ebx
push 0
mov dword [ebp - 0x20], ebx
cmp ebx, 0x13cf
pop ebx
jl 0x10040e59
inc esi
cmp esi, 0x3c2
jl 0x10040e56
or esi, 0xffffffff
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x14], 0x7774
jge 0x10040edc
mov edx, str.ajpal_hqllxv_iwz
mov ecx, edi
call fcn.100078f4
jmp 0x10040edc
mov dword [ebp - 4], esi
mov dword [ebp - 0x20], 0x7110e6b6
mov dword [ebp - 0x24], 0x3f9150fa
mov dword [ebp - 0x14], ebx
jmp 0x10040efc
mov eax, dword [ebp - 0x14]
mov dword [ebp + eax*4 - 0x74], ebx
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 3
jl 0x10040ef2
push 0x4b92
push ecx
mov dl, 1
call fcn.10040b81
mov eax, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x1c], eax
inc dword [ebp - 0x20]
mov dword [ebp - 0x24], 1
cmp dword [ebp - 0x1c], 0xfe4b2830
mov eax, dword [ebp - 0x30]
pop ecx
pop ecx
sbb ecx, ecx
xor edx, edx
neg ecx
cmp eax, ecx
mov eax, dword [ebp - 0x20]
setge dl
xor ecx, ecx
cmp edx, eax
mov eax, dword [ebp - 0x24]
setl cl
add eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x70]
neg eax
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], ebx
sbb eax, eax
mov byte [ebp - 0x58], bl
inc eax
add ecx, eax
mov dword [ebp - 0x18], ecx
push 0x2fd6
lea eax, [ebp + 0x14]
mov dword [ebp - 4], 2
push eax
lea eax, [ebp - 0x58]
push eax
push 0x67d4
push ecx
mov cl, 1
call fcn.10040d05
mov dword [ebp - 0x14], 0x76d6
mov eax, 0x6219ff40
mov dword [ebp - 0x18], 0x246
add esp, 0x14
mov dword [ebp - 0x24], 0xbd907c4
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], 0xacefce06
mov dword [ebp - 0x18], 0x6f9132f4
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x14]
imul eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x24], ebx
je 0x10040fea
cmp dword [ebp - 0x14], ebx
je 0x10040fea
xor eax, eax
inc eax
jmp 0x10040fec
mov eax, ebx
cmp eax, dword [ebp - 0x14]
jle 0x10040ffa
cmp dword [ebp - 0x14], ebx
jne 0x10040ffa
mov edx, ebx
jmp 0x10040ffd
xor edx, edx
inc edx
mov eax, dword [ebp - 0x14]
xor ecx, ecx
cmp eax, edx
setne cl
cmp ecx, dword [ebp - 0x14]
jle 0x1004100f
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
xor ecx, ecx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
imul edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
neg eax
cmp eax, edx
setle cl
mov dword [ebp - 0x18], ecx
xor ecx, ecx
mov eax, dword [ebp - 0x18]
cmp eax, 0xfff7
setne cl
mov dword [ebp - 0x18], ecx
xor ecx, ecx
mov eax, dword [ebp - 0x18]
cmp eax, 0xf55
mov eax, dword [ebp - 0x14]
setg cl
xor edx, edx
cmp ecx, eax
mov eax, dword [ebp - 0x1c]
setne dl
xor ecx, ecx
cmp edx, eax
mov eax, dword [ebp - 0x20]
setge cl
cmp esi, ecx
sbb ecx, ecx
xor edx, edx
inc ecx
cmp ecx, eax
setne dl
xor eax, eax
imul edx, dword [ebp - 0x20]
cmp eax, edx
sbb eax, eax
neg eax
mov dword [ebp - 0x64], eax
mov eax, dword [0x10080a00]
test al, 1
jne 0x100410b5
or eax, 1
mov dword [0x10080a00], eax
push 0x24c6
mov byte [ebp - 4], 3
call fcn.1000a59d
pop ecx
mov byte [0x1007f65e], al
mov byte [ebp - 4], 2
push dword [ebp - 0x34]
movdqa xmm0, xmmword [0x1006e500]
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x84]
mov dword [ebp - 0x40], ebx
push eax
push ebx
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x3c], ebx
movdqu xmmword [ebp - 0x84], xmm0
mov dword [ebp - 0x38], ebx
call fcn.100018ed
mov byte [ebp - 4], 4
mov dword [ebp - 0x2c], 0xcb50bf34
mov dword [ebp - 0x30], 0x7dc5
cmp dword [ebp - 0x30], 0x8163
jle 0x10041151
push ebx
push 0x293
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov esi, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], 0x5402
mov eax, ebx
mov ecx, edi
cdq
push edx
push eax
call fcn.10005547
add ebx, esi
dec dword [ebp - 0x18]
jne 0x1004111b
inc esi
push 0
pop ebx
cmp esi, 0x70c8
jl 0x10041111
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetDC]
push eax
call dword [sym.imp.GDI32.dll_UpdateColors]
or esi, 0xffffffff
mov dword [ebp - 0x2c], ebx
jmp 0x1004116a
push 1
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x2c]
call fcn.10040bc1
mov eax, dword [ebp - 0x2c]
inc dword [ebp - 0x2c]
pop ecx
cmp dword [ebp - 0x2c], 3
jle 0x10041156
mov byte [ebp - 4], 5
cmp dword [ebp - 0x30], 0x7b2e
jge 0x100411aa
mov edx, str.aces_ppbet_tuj_bubkjjq_xnvzcz_oawyrps_xmwxgux_oucjgy_mzxkyfozl_hzrswopq
mov ecx, edi
call fcn.100078f4
jmp 0x100411aa
mov dword [ebp - 4], 4
mov byte [ebp - 0x25], bl
cmp byte [ebp - 0x25], 0
je 0x100411cd
push 0x732a
push 0x7c6f
mov cl, 1
call fcn.10040ca2
pop ecx
pop ecx
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 2
call fcn.10001830
mov eax, dword [0x10080a00]
test al, 2
jne 0x10041202
or eax, 2
mov dword [0x10080a00], eax
push 0x3376
mov byte [ebp - 4], 7
call fcn.1000a59d
pop ecx
mov byte [0x10080a04], al
mov byte [ebp - 4], 2
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x10041242
call fcn.1003f466
push 0x34
pop ecx
xor edx, edx
div ecx
push ecx
push 0x10080a04
push 0x6cfa
push 1
push 0x1007f65e
push ecx
lea eax, [ebp - 0x58]
mov dword [ebp - 0x34], edx
push eax
mov edx, 0x1be5
lea ecx, [ebp - 0x34]
call fcn.10040d8d
add esp, 0x1c
dec edi
jne 0x10041209
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x58]
cmp ecx, eax
je 0x10041254
push esi
push ebx
push eax
call fcn.10017673
push ebx
push 1
lea ecx, [ebp - 0x58]
call fcn.100177ae
jmp 0x1004135a
mov eax, dword [0x10080a00]
test al, 4
jne 0x100412af
or eax, 4
mov dword [0x100809f4], esi
mov ecx, 0x1571
mov dword [0x10080a00], eax
xor edx, edx
mov dword [0x1007f674], ecx
inc edx
mov edi, 0x270
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, edx
mov dword [edx*4 + 0x1007f674], ecx
inc edx
cmp edx, edi
jl 0x1004128e
mov dword [0x1007f670], edi
cmp byte [0x1007f4ae], 0
jne 0x10041350
push 0x1007f670
push ecx
xor dl, dl
mov ecx, 0x79c1
call fcn.10040c6d
mov dword [ebp - 0x18], 0x26ab
cmp dword [ebp - 0x18], 0x2730
pop ecx
pop ecx
jle 0x1004132e
xor ebx, ebx
mov edi, ebx
mov esi, ebx
mov ecx, esi
mov eax, edi
sar eax, cl
lea ecx, [ebp - 0x9c]
cdq
push edx
push eax
call fcn.10002394
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x10041304
mov eax, dword [eax]
push eax
call fcn.10047752
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x9c]
call fcn.10005baf
inc esi
cmp esi, 0x4ff7
jl 0x100412e6
inc edi
cmp edi, 0x46f8
jl 0x100412e4
or esi, 0xffffffff
cmp dword [ebp - 0x18], 0x267c
jge 0x10041342
push str.xnqo_wtstrg_urermkx_yfiasmh_xywur_safdbwtdu_tfoory_gdm_crzxoveie_xtf
call fcn.10047752
pop ecx
sub esp, 0x14
mov dword [ebp - 4], esi
call fcn.1003fa83
add esp, 0x14
call fcn.1004136b
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret