Function at 0x486860
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x3c]
mov ebp, ecx
mov dword [esp + 0x10], ebp
cmp edi, dword [0x56ef80]
je 0x4868da
push 0x56df80
call fcn.0045e6c0
xor ebx, ebx
movzx eax, bl
mov edx, dword [eax*8 + 0x56df80]
mov eax, dword [eax*8 + 0x56df84]
test edi, edi
je 0x4868bd
mov esi, edi
lea esp, [esp]
movzx ecx, dl
shrd edx, eax, 8
shr eax, 8
xor edx, dword [ecx*8 + 0x56df80]
xor eax, dword [ecx*8 + 0x56df84]
sub esi, 1
jne 0x4868a0
mov dword [ebx*8 + 0x56e780], edx
mov dword [ebx*8 + 0x56e784], eax
inc ebx
cmp ebx, 0x100
jb 0x486885
mov dword [0x56ef80], edi
or ecx, 0xffffffff
or edx, 0xffffffff
cmp dword [ebp + 0x10044], 0
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jne 0x48690a
push 0x400001
call fcn.004ebd1f
add esp, 4
mov dword [ebp + 0x10044], eax
or ecx, 0xffffffff
or edx, 0xffffffff
mov esi, dword [ebp + 0x10044]
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x14], ebp
cmp ebp, dword [esp + 0x38]
ja 0x486abc
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], ebx
jb 0x486940
cmp ebx, eax
jae 0x486abc
lea esp, [esp]
mov eax, ecx
and eax, edx
cmp eax, 0xffffffff
jne 0x486abc
mov ecx, dword [esp + 0x10]
push 0
push ebp
push ebx
mov ecx, dword [ecx + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov edx, dword [esp + 0x34]
mov ecx, edx
mov eax, dword [esp + 0x38]
sub ecx, ebx
sbb eax, ebp
test eax, eax
jb 0x486980
ja 0x486979
cmp ecx, 0x400000
jbe 0x486980
mov edx, 0x400000
jmp 0x486982
sub edx, ebx
mov eax, dword [esp + 0x10]
push edx
push esi
mov ecx, dword [eax + 0x10]
mov eax, dword [ecx]
call dword [eax + 8]
mov dword [esp + 0x24], eax
cmp eax, edi
jl 0x486ab4
push edi
push esi
push 0
push 0
call fcn.0045e420
mov ebx, eax
xor ebp, ebp
mov eax, dword [esp + 0x24]
mov esi, edx
sub eax, edi
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x40]
cmp ebx, dword [ecx + 0x50]
jne 0x4869c9
cmp esi, dword [ecx + 0x54]
je 0x486a5a
mov ecx, dword [esp + 0x3c]
lea eax, [ecx + ebp]
movzx ecx, byte [ecx + ebp]
movzx eax, byte [eax + edi]
inc ebp
xor eax, ebx
movzx eax, al
shrd ebx, esi, 8
shr esi, 8
mov edx, dword [eax*8 + 0x56df80]
mov eax, dword [eax*8 + 0x56df84]
xor eax, dword [ecx*8 + 0x56e784]
xor edx, dword [ecx*8 + 0x56e780]
xor esi, eax
mov eax, dword [esp + 0x20]
xor ebx, edx
cmp ebp, eax
jbe 0x4869b7
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
cmp dword [esp + 0x24], edi
je 0x486abc
add ebx, eax
mov dword [esp + 0x2c], ebx
adc ebp, 0
mov dword [esp + 0x14], ebp
cmp ebp, dword [esp + 0x38]
jb 0x486940
ja 0x486abc
cmp ebx, dword [esp + 0x34]
jb 0x486940
pop edi
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x18
ret 0x18
mov esi, dword [esp + 0x3c]
push edi
lea eax, [esi + ebp]
push eax
push dword [ecx + 0x2c]
call fcn.004edb80
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov eax, dword [eax + 0x10078]
cmp edi, eax
jae 0x486a93
sub eax, edi
push eax
mov eax, dword [esp + 0x44]
push 0
mov eax, dword [eax + 0x2c]
add eax, edi
push eax
call fcn.004ee100
add esp, 0xc
mov ebx, dword [esp + 0x2c]
mov ecx, ebp
mov ebp, dword [esp + 0x14]
xor edx, edx
mov eax, dword [esp + 0x20]
add ecx, ebx
mov dword [esp + 0x18], ecx
adc edx, ebp
mov dword [esp + 0x1c], edx
jmp 0x486a21
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x18
ret 0x18