Function at 0x100012e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x80c
push ebx
push esi
mov esi, dword [esp + 0x81c]
mov ecx, dword [esi + 0x2c]
mov eax, ecx
shr eax, 1
xor edx, edx
mov ebx, 0x186a0
div ebx
push edi
xor edi, edi
mov dword [esp + 0x14], edi
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 8
mov bl, al
mov al, byte [esi + 0x24]
cmp al, 1
jne 0x1000137f
mov al, byte [esi + 0x26]
mov cl, byte [esi + 0x39]
mov byte [esp + 0x1f], cl
mov cl, byte [esi + 0x36]
mov byte [esp + 0x19], al
mov al, byte [esi + 0x37]
mov byte [esp + 0x1e], dl
mov dl, byte [esi + 0x38]
mov byte [esp + 0x22], cl
mov byte [esp + 0x21], al
xor cl, cl
mov byte [esp + 0x18], 2
mov byte [esp + 0x1a], 0x86
mov byte [esp + 0x1b], 0x32
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], dh
mov byte [esp + 0x20], dl
xor eax, eax
jmp 0x10001360
xor cl, byte [esp + eax + 0x18]
inc eax
cmp eax, 0xb
jl 0x10001360
mov eax, 0xc
mov byte [esp + 0x23], cl
mov dword [esp + 0x14], eax
mov dword [esi + 4], eax
jmp 0x100014f1
cmp al, 2
jne 0x10001466
cmp byte [0x10009030], 1
je 0x10001466
cmp byte [0x10009031], 1
mov cl, byte [esi + 0x34]
jne 0x100013e9
mov ax, word [0x10009902]
mov word [esp + 0xc], ax
mov al, byte [esi + 0x35]
test al, al
mov eax, 1
jne 0x100013d1
shl eax, cl
mov ecx, dword [esp + 0xc]
not eax
and ecx, eax
mov dword [esp + 0xc], ecx
movzx eax, cx
movzx ecx, word [0x10009900]
jmp 0x10001412
shl eax, cl
mov ecx, dword [esp + 0xc]
or ecx, eax
mov dword [esp + 0xc], ecx
movzx eax, cx
movzx ecx, word [0x10009900]
jmp 0x10001412
mov al, byte [esi + 0x35]
mov edi, dword [0x10009900]
test al, al
mov eax, 1
jne 0x10001403
shl eax, cl
not eax
and edi, eax
jmp 0x10001407
shl eax, cl
or edi, eax
mov eax, dword [0x10009900]
shr eax, 0x10
movzx ecx, di
shl eax, 0x10
or eax, ecx
mov dword [0x10009900], eax
mov cl, byte [esi + 0x26]
mov byte [esp + 0x19], cl
mov ecx, eax
shr ecx, 0x10
mov byte [esp + 0x20], cl
mov byte [esp + 0x21], ah
mov byte [esp + 0x22], al
xor cl, cl
mov byte [esp + 0x18], 2
mov byte [esp + 0x1a], 0x86
mov byte [esp + 0x1b], 0x32
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], dh
mov byte [esp + 0x1e], dl
mov byte [esp + 0x1f], ch
xor eax, eax
xor cl, byte [esp + eax + 0x18]
inc eax
cmp eax, 0xb
jl 0x10001457
jmp 0x1000136a
movzx eax, byte [esi + 0x27]
dec eax
je 0x1000149d
dec eax
jne 0x100014ea
test cl, 1
je 0x10001486
dec ecx
mov dword [esi + 0x2c], ecx
mov byte [0x10009031], 1
jmp 0x1000148d
mov byte [0x10009031], 2
mov eax, dword [esi + 0x2c]
shr eax, 1
xor edx, edx
mov ecx, 0x186a0
div ecx
mov bl, al
mov al, byte [esi + 0x26]
mov byte [esp + 0x19], al
xor cl, cl
mov byte [esp + 0x18], 2
mov byte [esp + 0x1a], 0x86
mov byte [esp + 0x1b], 0x31
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], dh
mov byte [esp + 0x1e], dl
mov byte [esp + 0x1f], 0
mov byte [esp + 0x20], 0
mov byte [esp + 0x21], 0
mov byte [esp + 0x22], 0
xor eax, eax
xor cl, byte [esp + eax + 0x18]
inc eax
cmp eax, 0xb
jl 0x100014d7
mov byte [esp + 0x23], cl
mov edi, 0xc
mov dword [esp + 0x14], edi
mov dword [esi + 4], edi
mov eax, dword [esp + 0x81c]
mov ecx, 0x202
lea esi, [esp + 0x10]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebx
add esp, 0x80c
ret