Function at 0x10031960
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10083c45
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
push esi
push edi
mov eax, dword [0x100a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x20], esi
movzx ecx, word [esi + 0xfa]
movzx eax, word [esi + 0xf8]
movaps xmm0, xmmword [0x1009fe80]
push ecx
push eax
movups xmmword [ebp - 0x34], xmm0
mov dword [ebp - 0x24], 0x531218
xor ecx, ecx
mov al, byte [ebp + ecx - 0x33]
xor al, byte [ebp - 0x34]
mov byte [ebp + ecx - 0x33], al
inc ecx
cmp ecx, 0x12
jb 0x100319c4
sub esp, 0x1c
mov byte [ebp - 0x21], 0
mov edx, esp
lea ecx, [ebp - 0x33]
xorps xmm0, xmm0
lea edi, [ecx + 1]
mov dword [edx], 0
movups xmmword [edx + 4], xmm0
mov dword [edx + 0x14], 0
mov dword [edx + 0x18], 0
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10031a00
sub ecx, edi
lea eax, [ebp - 0x33]
push ecx
push eax
mov ecx, edx
call fcn.10003350
lea eax, [ebp - 0x58]
push eax
call fcn.1000d820
add esp, 0x28
mov dword [ebp - 4], 0
mov edx, eax
mov ecx, dword [esi + 0x50]
call fcn.100141e0
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 0xffffffff
call fcn.10002f50
mov eax, dword [ebp - 0x58]
push 8
push eax
mov dword [ebp - 0x58], 0
call fcn.10046080
movzx eax, word [esi + 0xfc]
add esp, 8
mov ecx, eax
test ax, ax
jne 0x10031b6b
mov cl, 0x27
mov byte [ebp - 0x1a], 0
mov al, 0xa
mov byte [ebp - 0x1c], cl
xor al, cl
mov byte [ebp - 0x1a], 0
xorps xmm0, xmm0
mov byte [ebp - 0x1b], al
lea ecx, [ebp - 0x1b]
mov dword [ebp - 0x3c], 0
movups xmmword [ebp - 0x38], xmm0
mov dword [ebp - 0x28], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x24], 0
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10031aa0
sub ecx, edx
lea eax, [ebp - 0x1b]
push ecx
push eax
lea ecx, [ebp - 0x3c]
call fcn.10003350
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x54]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x10031b4d
push 4
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10031b4d
cmp dword [ebp - 0x24], 0xf
lea ecx, [ebp - 0x38]
cmova ecx, dword [ebp - 0x38]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10031ae6
sub ecx, edx
mov dword [ebp - 0x1c], ecx
lea esi, [ecx + 0x21]
push esi
call fcn.100460a0
add esp, 4
mov edi, eax
push esi
push 0
push edi
call fcn.10048c00
add esp, 0xc
lea edx, [ebp - 0x38]
cmp dword [ebp - 0x24], 0xf
lea esi, [edi + 0x20]
cmova edx, dword [ebp - 0x38]
push dword [ebp - 0x1c]
push edx
push esi
call fcn.10048680
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
mov dword [edi + 4], esi
mov dword [edi + 0x14], eax
push edi
mov dword [edi + 0x18], 0x1f
call dword [0x1009e0e0]
push edi
call fcn.10046080
mov esi, dword [ebp - 0x20]
add esp, 4
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0xffffffff
call fcn.10002f50
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
jmp 0x10031c0b
push ecx
mov dl, 0x45
mov dword [ebp - 0x18], 0x21606645
mov byte [ebp - 0x14], 0
xor ecx, ecx
nop dword [eax + eax]
xor byte [ebp + ecx - 0x17], dl
inc ecx
cmp ecx, 3
jae 0x10031b8f
mov dl, byte [ebp - 0x18]
jmp 0x10031b80
sub esp, 0x1c
mov byte [ebp - 0x14], 0
mov edx, esp
lea ecx, [ebp - 0x17]
xorps xmm0, xmm0
lea edi, [ecx + 1]
mov dword [edx], 0
movups xmmword [edx + 4], xmm0
mov dword [edx + 0x14], 0
mov dword [edx + 0x18], 0
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10031bc0
sub ecx, edi
lea eax, [ebp - 0x17]
push ecx
push eax
mov ecx, edx
call fcn.10003350
lea eax, [ebp - 0x58]
push eax
call fcn.1000d820
add esp, 0x24
mov dword [ebp - 4], 2
mov edx, eax
mov ecx, dword [esi + 0x54]
call fcn.100141e0
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 0xffffffff
call fcn.10002f50
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x58], 0
push 8
push eax
call fcn.10046080
movzx eax, word [esi + 0xf8]
add esp, 8
movss xmm1, dword [0x1009f960]
sub esp, 8
mov dl, 0x1f
mov dword [ebp - 0x18], 0x2d313a1f
mov dword [ebp - 0x14], 0x3a3a79
xor ecx, ecx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
cvtps2pd xmm0, xmm1
movsd qword [esp], xmm0
nop dword [eax]
xor byte [ebp + ecx - 0x17], dl
inc ecx
cmp ecx, 6
jae 0x10031c5f
mov dl, byte [ebp - 0x18]
jmp 0x10031c50
sub esp, 0x1c
mov byte [ebp - 0x11], 0
mov edx, esp
lea ecx, [ebp - 0x17]
xorps xmm0, xmm0
lea edi, [ecx + 1]
mov dword [edx], 0
movups xmmword [edx + 4], xmm0
mov dword [edx + 0x14], 0
mov dword [edx + 0x18], 0
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10031c90
sub ecx, edi
lea eax, [ebp - 0x17]
push ecx
push eax
mov ecx, edx
call fcn.10003350
lea eax, [ebp - 0x74]
push eax
call fcn.1000d820
add esp, 0x28
mov dword [ebp - 4], 3
mov edx, eax
mov ecx, dword [esi + 0x58]
call fcn.100141e0
lea ecx, [ebp - 0x74]
call fcn.10002f50
mov eax, dword [ebp - 0x74]
push 8
push eax
mov dword [ebp - 0x74], 0
call fcn.10046080
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret