Function at 0x4081a8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 7
mov ax, word [esi + 0x20]
mov bx, word [esi + 0x22]
lea ecx, [esi + 0x46]
mov word [ebp - 8], ax
mov al, byte [esi + 0x24]
mov dword [ebp - 4], ebx
mov dword [ebp + 8], ecx
pop edx
mov byte [ecx], al
mov ecx, dword [ebp + 8]
xor al, 0xa7
sub al, 0x35
inc ecx
dec edx
mov dword [ebp + 8], ecx
jne 0x4081ce
sub al, 0x59
mov byte [ecx], al
call fcn.004086a0
mov edi, dword [ebp + 0xc]
push edi
push dword [ebp - 8]
push 7
call fcn.0040868a
push ebx
call fcn.004084f5
push edi
lea eax, [ebp + 8]
push esi
push eax
push 0x10
call fcn.00408469
push ebx
call fcn.004084f5
or byte [esi + 0x3e], 0xf
push edi
lea eax, [ebp + 8]
push esi
push eax
push 8
call fcn.00408469
mov ebx, 0x96
add esp, 0x34
cmp ax, bx
jne 0x408231
xor word [esi + 0x3e], 5
push dword [ebp - 4]
call fcn.004084f5
push edi
lea eax, [ebp + 8]
push esi
push eax
push 8
call fcn.00408469
and eax, 3
add esp, 0x14
mov word [esi + 0x28], ax
mov al, byte [esi + 0x3e]
and al, 0xf
cmp al, 0xa
je 0x408264
mov word [esi + 0x2a], 0x80
jmp 0x4083ef
push edi
push esi
push 0x28
call fcn.0040840f
add esp, 0xc
test ax, ax
jne 0x408280
mov word [esi + 0x2a], 0x81
jmp 0x4083ef
or byte [esi + 0x34], 0xf
push edi
lea eax, [ebp + 8]
push esi
push eax
push 8
call fcn.00408469
add esp, 0x10
cmp ax, bx
jne 0x40829e
xor word [esi + 0x34], 5
push dword [ebp - 4]
call fcn.004084f5
push edi
lea eax, [ebp + 8]
push esi
push eax
push 8
call fcn.00408469
add esp, 0x14
test byte [esi + 0x26], 1
je 0x4082c1
mov byte [esi + 0x35], al
jmp 0x4082ca
cmp ax, bx
je 0x4082ca
or byte [esi + 0x34], 0xf
push dword [ebp - 4]
call fcn.004084f5
push edi
lea eax, [ebp + 8]
push esi
push eax
push 4
call fcn.00408469
and eax, 0xe
add esp, 0x14
shl eax, 1
or word [esi + 0x28], ax
mov al, byte [esi + 0x34]
and al, 0xf
cmp al, 0xa
je 0x4082ff
mov word [esi + 0x2a], 0x82
jmp 0x4083ef
mov ax, word [esi + 0x26]
test al, 2
jne 0x40831d
push edi
push esi
push 0x28
call fcn.0040840f
add esp, 0xc
and word [esi + 0x2a], 0
jmp 0x4083ef
and al, 1
push edi
neg al
sbb eax, eax
push esi
and ax, 0xfb50
add eax, 0x640
push eax
call fcn.0040840f
add esp, 0xc
test ax, ax
jne 0x408347
mov word [esi + 0x2a], 0x83
jmp 0x4083ef
push edi
lea eax, [ebp + 8]
push esi
push eax
push 8
call fcn.00408469
xor eax, 0x40
add esp, 0x10
test al, 0xc0
mov word [esi + 0x2a], ax
je 0x40836d
mov word [esi + 0x2a], 0x84
jmp 0x4083ef
test al, 4
je 0x40839f
add dword [ebp + 8], 0x16
xor ebx, ebx
push edi
lea eax, [ebp + 8]
push esi
push eax
push 0x10
call fcn.00408469
add esp, 0x10
movzx ecx, bx
push 0x19
pop edx
sub edx, ecx
inc ebx
mov word [esi + edx*2], ax
mov al, byte [esi + 0x2a]
and eax, 3
cmp bx, ax
jbe 0x408377
test byte [esi + 0x26], 1
je 0x4083ef
test byte [esi + 0x2a], 8
je 0x4083ef
push edi
push dword [ebp - 8]
push 0xff
call fcn.0040868a
push edi
push esi
push 0x190
call fcn.0040840f
add esp, 0x18
test ax, ax
jne 0x4083d5
mov word [esi + 0x2a], 0x85
jmp 0x4083ef
push edi
lea eax, [ebp + 8]
push esi
push eax
push 1
call fcn.00408469
and eax, 1
add esp, 0x10
shl eax, 6
or word [esi + 0x2a], ax
push edi
push dword [ebp - 8]
push 0xb
call fcn.0040868a
push dword [ebp - 4]
call fcn.004084f5
add esp, 0x10
call fcn.004086a2
pop edi
pop esi
pop ebx
leave
ret