Function at 0x486940
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov ebx, dword [ebp + 0x18]
mov edi, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x20]
xor eax, eax
push ebp
push 0x486cb1
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
xor ecx, ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [0x482e04]
call fcn.00483090
test al, al
je 0x486c88
xor ecx, ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [0x482e04]
call fcn.004830ac
test eax, eax
jns 0x4869b1
add eax, 7
sar eax, 3
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 8]
jne 0x486c88
lea eax, [ebp - 0x40]
call fcn.0046159c
lea eax, [ebp - 0x40]
mov ecx, ebx
mov edx, edi
call fcn.0045da90
mov eax, dword [ebp - 0x40]
call fcn.00461244
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x40]
call fcn.00461600
cmp dword [ebp - 0x30], 0
je 0x486c88
dec dword [ebp - 0x30]
mov dword [ebp - 0x34], ebx
mov eax, dword [ebp - 0x34]
push eax
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x45cac8]
call fcn.004056cc
add esp, 4
push ebx
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x34]
push eax
mov ecx, edi
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
call fcn.004863e0
test al, al
je 0x486c88
mov eax, dword [ebp - 0x2c]
add eax, esi
add eax, 2
cmp eax, dword [ebp - 0x34]
jg 0x486c88
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x34]
cmp byte [eax + edx - 1], 0xbc
jne 0x486c88
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x2c]
dec eax
push eax
lea eax, [ebp - 0x18]
mov ecx, 1
mov edx, dword [0x45cac8]
call fcn.004056cc
add esp, 4
mov eax, dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x20]
mov ecx, 1
mov edx, dword [0x45cac8]
call fcn.004056cc
add esp, 4
mov ecx, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x2c]
dec ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.00402c84
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x14]
lea eax, [edx + eax - 1]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
call fcn.00402c84
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x2c]
dec ecx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x2c]
call fcn.004854d0
mov eax, dword [ebp - 0x34]
shl eax, 3
sub eax, dword [ebp - 0x30]
test eax, eax
jle 0x486b0a
mov edx, 1
mov ecx, 8
sub ecx, edx
mov ebx, 1
shl ebx, cl
mov ecx, dword [ebp - 0x18]
movzx ecx, byte [ecx]
and ebx, ecx
jne 0x486c88
inc edx
dec eax
jne 0x486aea
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x2c]
sub eax, 2
test eax, eax
jl 0x486b2a
inc eax
xor edx, edx
mov ecx, dword [ebp - 0x1c]
mov cl, byte [ecx + edx]
mov ebx, dword [ebp - 0x18]
xor byte [ebx + edx], cl
inc edx
dec eax
jne 0x486b1a
mov eax, dword [ebp - 0x34]
shl eax, 3
sub eax, dword [ebp - 0x30]
test eax, eax
jle 0x486b52
mov edx, 1
mov ecx, 8
sub ecx, edx
mov bl, 1
shl bl, cl
not bl
mov ecx, dword [ebp - 0x18]
and byte [ecx], bl
inc edx
dec eax
jne 0x486b3c
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x2c]
sub eax, esi
sub eax, 3
test eax, eax
jl 0x486b75
inc eax
xor edx, edx
mov ecx, dword [ebp - 0x18]
cmp byte [ecx + edx], 0
jne 0x486c88
inc edx
dec eax
jne 0x486b64
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x2c]
sub eax, esi
mov edx, dword [ebp - 0x18]
cmp byte [edx + eax - 2], 1
jne 0x486c88
push esi
lea eax, [ebp - 0x24]
mov ecx, 1
mov edx, dword [0x45cac8]
call fcn.004056cc
add esp, 4
mov ebx, dword [ebp - 0x2c]
add ebx, 8
mov eax, ebx
add eax, esi
push eax
lea eax, [ebp - 0x28]
mov ecx, 1
mov edx, dword [0x45cac8]
call fcn.004056cc
add esp, 4
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x2c]
sub eax, esi
mov edx, dword [ebp - 0x18]
lea eax, [edx + eax - 1]
mov edx, dword [ebp - 0x24]
mov ecx, esi
call fcn.00402c84
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov edx, 8
call fcn.00402f74
mov eax, dword [ebp - 0x28]
lea edx, [eax + 8]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x2c]
call fcn.00402c84
test esi, esi
jle 0x486c10
mov eax, dword [ebp - 0x28]
lea edx, [eax + ebx]
mov eax, dword [ebp - 0x24]
mov ecx, esi
call fcn.00402c84
push 0
mov ecx, dword [ebp - 0xc]
mov dl, 1
mov eax, dword [0x482e04]
call fcn.00482f30
mov dword [ebp - 0x38], eax
xor eax, eax
push ebp
push 0x486c64
push dword fs:[eax]
mov dword fs:[eax], esp
lea ecx, [esi + 8]
add ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x38]
call fcn.00483180
lea edx, [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
call fcn.00483188
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x486c6b
mov eax, dword [ebp - 0x38]
call fcn.0040355c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x486cb8
lea eax, [ebp - 0x3c]
call fcn.0040438c
lea eax, [ebp - 0x28]
mov edx, dword [0x45cac8]
mov ecx, 6
call fcn.00404e44
ret