Function at 0x10031090
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007972c
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x1009f084]
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 eax, ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], 0
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov byte [ebp - 0x2d], 0
cmp esi, edi
je 0x10031463
nop dword [eax]
mov ebx, dword [esi]
mov dword [ebp - 0x58], ebx
test ebx, ebx
je 0x10031455
mov eax, 0x10624dd3
mov ecx, 0xd78ae8
mul ebx
mov eax, edx
shr eax, 6
mov dword [ebp - 0x3c], eax
imul eax, eax, 0x3e8
push eax
call fcn.10015880
mov ecx, eax
call dword [0x1009244c]
mov dword [ebp - 0x74], eax
test eax, eax
je 0x100312d9
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
mov byte [ebp - 4], 1
mov cl, byte [eax + 4]
mov eax, 0x12e0be83
mul ebx
mov byte [ebp - 0x35], cl
sub ebx, edx
shr ebx, 1
add ebx, edx
shr ebx, 0x1d
cmp ebx, 4
jae 0x100311a7
cmp cl, 0x2d
jae 0x100311a7
push 4
push 0xd78af0
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x100311a7
sub ebx, dword [ebp - 0x3c]
movzx ecx, byte [ebp - 0x35]
imul eax, ebx, 0x3e8
mov ebx, dword [ebp - 0x58]
mov ecx, dword [ecx*4 + 0xd78af0]
add eax, ebx
push eax
call dword [0x10092450]
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x100311af
cmp dword [eax + 0x48], 0
je 0x100311af
push ebx
push eax
xor edx, edx
lea ecx, [ebp - 0x70]
call fcn.10012090
add esp, 8
mov ebx, eax
jmp 0x100311c2
mov ebx, dword [ebp - 0x58]
xor eax, eax
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x74]
lea ecx, [ebp - 0x70]
push ebx
push 0
call fcn.10012090
add esp, 8
mov ebx, eax
lea eax, [ebp - 0x2c]
cmp eax, ebx
je 0x100311f9
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x100311de
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.10002790
push ebx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
call fcn.10005910
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x5c]
cmp eax, 0x10
jb 0x10031212
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.10002790
mov eax, dword [ebp - 0x34]
movzx ebx, byte [ebp - 0x2d]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + ebx*4]
test ecx, ecx
je 0x100312b7
add ecx, 4
lea edx, [ebp - 0x2c]
call fcn.10013af0
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x74]
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + ebx*4]
mov dword [eax + 0x50], edx
mov eax, dword [ecx + 0xc]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [eax + ebx*4]
mov dword [eax + 0x54], ecx
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + ebx*4]
mov dword [eax + 0x58], 0
test ecx, ecx
je 0x1003126d
movsx ecx, word [ecx + 0x56]
movsx eax, word [edx + 0x66]
add ecx, eax
jmp 0x10031271
movsx ecx, word [edx + 0x66]
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 0xc]
mov eax, dword [eax + ebx*4]
mov dword [eax + 0x5c], ecx
mov eax, dword [edx + 0xc]
mov eax, dword [eax + ebx*4]
mov ecx, dword [eax]
test ecx, ecx
je 0x100312b7
lea edx, [ebp - 0x2c]
call fcn.100155d0
mov ecx, dword [ebp - 0x34]
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + ebx*4]
mov ebx, dword [eax]
test ebx, ebx
je 0x100312b7
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x100312b7
push 1
mov ecx, ebx
call dword [0x10092478]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x10031452
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.10002790
jmp 0x10031452
mov eax, dword [ebp - 0x34]
movzx ebx, byte [ebp - 0x2d]
mov eax, dword [eax + 0xc]
cmp dword [eax + ebx*4], 0
je 0x10031452
movaps xmm0, xmmword [0x100941a0]
xor ecx, ecx
movups xmmword [ebp - 0x54], xmm0
mov dword [ebp - 0x44], 0x7228392e
mov dword [ebp - 0x40], 0x282438
mov al, byte [ebp - 0x54]
xor byte [ebp + ecx - 0x53], al
inc ecx
cmp ecx, 0x16
jb 0x10031308
cmp byte [ebp - 0x53], 0
mov byte [ebp - 0x3d], 0
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
jne 0x10031335
xor ecx, ecx
jmp 0x10031349
lea ecx, [ebp - 0x53]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10031340
sub ecx, edx
push ecx
lea eax, [ebp - 0x53]
push eax
lea ecx, [ebp - 0x70]
call fcn.100028b0
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x70]
mov byte [ebp - 4], 4
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + ebx*4]
add ecx, 4
call fcn.10013af0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x5c]
cmp eax, 0x10
jb 0x10031387
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.10002790
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + ebx*4]
cmp dword [eax], 0
je 0x10031452
movaps xmm0, xmmword [str.g2._]
xor ecx, ecx
movups xmmword [ebp - 0x54], xmm0
mov dword [ebp - 0x44], 0x49130215
mov dword [ebp - 0x40], 0x131f03
mov al, byte [ebp - 0x54]
xor byte [ebp + ecx - 0x53], al
inc ecx
cmp ecx, 0x16
jb 0x100313b4
cmp byte [ebp - 0x53], 0
mov byte [ebp - 0x3d], 0
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
jne 0x100313e1
xor ecx, ecx
jmp 0x100313f0
lea ecx, [ebp - 0x53]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100313e7
sub ecx, edx
push ecx
lea eax, [ebp - 0x53]
push eax
lea ecx, [ebp - 0x70]
call fcn.100028b0
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x70]
mov byte [ebp - 4], 5
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + ebx*4]
mov ecx, dword [ecx]
call fcn.100155d0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x5c]
cmp eax, 0x10
jb 0x1003142d
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.10002790
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + ebx*4]
mov ebx, dword [eax]
test ebx, ebx
je 0x10031452
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10031452
push eax
mov ecx, ebx
call dword [0x10092478]
inc byte [ebp - 0x2d]
add esi, 4
cmp esi, edi
jne 0x100310e0
mov eax, dword [ebp - 0x34]
mov ecx, eax
call fcn.10030cf0
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x10031480
mov eax, dword [ebp + 0x10]
sub eax, ecx
sar eax, 2
push eax
push ecx
call fcn.10012d40
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.1003bc25
mov esp, ebp
pop ebp
ret 0xc