Function at 0x46e310
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x848
mov eax, dword [0x71de04]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
cmp dword [ebx + 0x8a0], 0
je 0x46e6ae
push esi
push edi
lea ecx, [ebx + 0x8d4]
call fcn.00426050
lea esi, [ebx + 0x9c]
push esi
lea ecx, [ebx + 0x8d4]
call fcn.0041ef10
mov ecx, esi
call fcn.00426050
cmp word [ebx + 0x8d4], 0x54
jne 0x46e420
nop word [eax + eax]
movzx esi, word [ebx + 0x10dc]
xor eax, eax
mov word [ebp - 0x18], ax
xorps xmm0, xmm0
mov word [ebp - 6], ax
mov eax, dword [0x6624b4]
mov dword [ebp - 0x20], eax
mov ax, word [0x6624b8]
movups xmmword [ebp - 0x16], xmm0
push 0x800
movups xmm0, xmmword [0x6624a4]
mov word [ebp - 0x1c], ax
lea eax, [ebp - 0x830]
push 0
push eax
movups xmmword [ebp - 0x30], xmm0
call fcn.004a0318
mov ecx, 1
add esp, 0xc
cmp dword [ebx + 0x10d8], ecx
jle 0x46e3df
lea eax, [ebx + 0x8d6]
nop
xor word [eax], si
lea eax, [eax + 2]
inc ecx
cmp ecx, dword [ebx + 0x10d8]
jl 0x46e3d0
mov ecx, dword [ebx + 0x10d8]
mov esi, 1
mov dword [ebp - 0x834], esi
cmp ecx, esi
jle 0x46e420
lea edi, [ebx + 0x8d6]
mov edx, 0xffee
mov dword [ebp - 0x83c], edi
mov eax, edi
cmp word [eax], dx
je 0x46e4b7
add esi, 2
add eax, 4
mov dword [ebp - 0x834], esi
cmp esi, ecx
jl 0x46e407
cmp dword [ebx + 0xd49c], 0
lea esi, [ebx + 0x1190]
mov eax, dword [ebx + 0x8ba4]
mov ecx, dword [ebx + 0x8d0]
mov dword [ebx + 0x1108], 0
mov dword [ebx + 0x20], 0
mov dword [esi], eax
mov eax, dword [ebx + 0xd490]
mov edi, dword [eax + ecx*4]
je 0x46e62c
push esi
lea eax, [ebp - 0x840]
mov ecx, edi
push eax
call fcn.0045b170
mov eax, dword [ebp - 0x840]
cmp byte [eax + 0x14], 1
je 0x46e622
cmp dword [ebx + 0xd4a0], 0
jne 0x46e622
cmp dword [ebx + 0xf230], 1
je 0x46e622
cmp dword [ebx + 0xd4b4], 0
jne 0x46e62c
mov ecx, ebx
mov dword [ebx + 0xcbf0], 0
call fcn.00474d80
jmp 0x46e62c
movzx eax, word [ebx + esi*2 + 0x8d6]
mov dword [ebp - 0x838], eax
lea eax, [ebp - 0x838]
push eax
call fcn.005eda89
add esp, 4
cmp eax, 0xffffffff
je 0x46e420
push 0xa
push 0xa
lea ecx, [ebp - 0x18]
push ecx
push dword [ebx + eax*4 + 0xf518]
call fcn.005ef61c
lea edx, [ebp - 0x18]
add esp, 0x10
lea ecx, [edx + 2]
nop word [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x46e500
sub edx, ecx
xor ecx, ecx
mov dword [ebp - 0x838], ecx
lea ecx, [esi - 1]
sar edx, 1
test ecx, ecx
jle 0x46e53b
mov dword [ebp - 0x838], ecx
mov esi, edi
shr ecx, 1
lea edi, [ebp - 0x830]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x834]
add edx, edx
mov dword [ebp - 0x848], edx
lea eax, [edx + esi]
mov edx, dword [ebp - 0x838]
mov dword [ebp - 0x844], eax
cmp edx, eax
jge 0x46e594
lea edi, [ebp - 0x18]
mov esi, eax
nop dword [eax + eax]
movzx eax, word [edi]
lea edi, [edi + 2]
lea ecx, [eax*4 - 0xc0]
movzx eax, word [ebp + ecx - 0x30]
mov word [ebp + edx*2 - 0x830], ax
movzx eax, word [ebp + ecx - 0x2e]
mov word [ebp + edx*2 - 0x82e], ax
add edx, 2
cmp edx, esi
jl 0x46e560
mov esi, dword [ebp - 0x834]
mov ecx, dword [ebx + 0x10d8]
lea edx, [edx - 2]
add ecx, 0xfffffffe
cmp esi, ecx
jge 0x46e5c5
sub ecx, dword [ebp - 0x834]
lea edi, [ebp - 0x830]
add esi, 0x46c
lea edi, [edi + edx*2]
shr ecx, 1
lea esi, [ebx + esi*2]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov ecx, dword [ebp - 0x848]
sub ecx, 2
add dword [ebx + 0x10d8], ecx
mov eax, dword [ebx + 0x10d8]
add dword [ebx + 0x10dc], ecx
add eax, 0xfffffffe
xor ecx, ecx
test eax, eax
jle 0x46e370
mov edx, dword [ebp - 0x83c]
nop dword [eax]
nop word [eax + eax]
movzx eax, byte [ebp + ecx*2 - 0x830]
lea edx, [edx + 2]
mov word [edx - 2], ax
inc ecx
mov eax, dword [ebx + 0x10d8]
sub eax, 2
cmp ecx, eax
jl 0x46e600
jmp 0x46e370
mov dword [ebx + 0xcbf0], 1
push esi
lea eax, [ebp - 0x840]
mov ecx, edi
push eax
call fcn.0045b170
cmp dword [ebx + 0xd754], 1
mov eax, dword [ebp - 0x840]
movsx eax, byte [eax + 0x14]
mov dword [ebx + 0xd4a8], eax
jne 0x46e658
xor eax, eax
jmp 0x46e671
push esi
lea eax, [ebp - 0x840]
mov ecx, edi
push eax
call fcn.0045b170
mov eax, dword [ebp - 0x840]
movsx eax, byte [eax + 0x14]
cmp dword [ebx + 0xf230], 1
mov dword [ebx + 0xf248], eax
jne 0x46e68a
mov dword [ebx + 0xd4a8], 1
push esi
lea eax, [ebp - 0x840]
mov ecx, edi
push eax
call fcn.0045b170
cmp dword [ebx + 0xd754], 1
mov eax, dword [ebp - 0x840]
setne cl
pop edi
pop esi
mov byte [eax + 0x14], cl
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.005e0710
mov esp, ebp
pop ebp
ret