Function at 0x46a7f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x27c
mov eax, dword [0x5513d4]
xor eax, esp
mov dword [esp + 0x278], eax
mov eax, dword [esp + 0x288]
mov edx, ecx
mov ecx, dword [esp + 0x284]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x28c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x290]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x298]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x294]
mov dword [esp + 0xc], edx
mov dword [esp], ecx
push ebp
mov ebp, dword [esp + 0x2a0]
cmp eax, 0x18
ja 0x46aad6
push ebx
push esi
push edi
xor edi, edi
lea ebx, [edx + 0x4b4]
jmp 0x46a870
cmp dword [ebx + 0x134], eax
lea esi, [ebx + 0x102]
jne 0x46a8f7
push ecx
mov ecx, ebx
call fcn.00499fc0
test al, al
je 0x46a8ec
mov ecx, dword [esp + 0x18]
mov edx, 0xc
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x46a8ec
add esi, 4
add ecx, 4
sub edx, 4
jae 0x46a893
push 0
push 0
push 0x20
lea eax, [esp + 0x54]
mov ecx, 8
lea esi, [ebx + 0x112]
lea edi, [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.0049a210
lea esi, [ebx + 0x138]
mov ecx, 8
lea edi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
lea esi, [ebx + 0x158]
mov ecx, 8
lea edi, [esp + 0x68]
rep movsd dword es:[edi], dword [esi]
jmp 0x46aa16
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x2a4]
inc edi
add ebx, 0x178
cmp edi, 4
jb 0x46a870
push 0x200
lea eax, [esp + 0x8c]
push eax
push dword [esp + 0x28]
call fcn.004a02c0
lea edx, [esp + 0x88]
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x46a927
mov edi, dword [esp + 0x2a4]
sub edx, ecx
mov ebx, dword [esp + 0x18]
mov ecx, edi
mov eax, 1
shl eax, cl
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x54]
push eax
push 0x10
push ebx
push edx
lea eax, [esp + 0xa4]
push eax
call fcn.0046afb0
push 0x200
lea eax, [esp + 0x8c]
push eax
call fcn.0049a3e0
mov esi, dword [esp + 0x1c]
push 0
push 1
push 0x20
mov ecx, dword [esi + 0xa94]
lea edx, [esi + 0x4b4]
mov eax, ecx
and eax, 3
imul eax, eax, 0x178
add edx, eax
lea eax, [ecx + 1]
mov dword [esi + 0xa94], eax
mov ecx, 0x40
mov esi, dword [esp + 0x1c]
mov dword [edx + 0x134], edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, 8
movsw word es:[edi], word [esi]
mov eax, dword [ebx]
lea esi, [esp + 0x54]
mov dword [edx + 0x102], eax
mov eax, dword [ebx + 4]
mov dword [edx + 0x106], eax
mov eax, dword [ebx + 8]
mov dword [edx + 0x10a], eax
mov eax, dword [ebx + 0xc]
mov dword [edx + 0x10e], eax
lea eax, [edx + 0x112]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
lea edi, [edx + 0x138]
mov ecx, 8
lea esi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
lea edi, [edx + 0x158]
mov ecx, 8
lea esi, [esp + 0x74]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.0049a210
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46aa2b
mov ecx, 8
lea esi, [esp + 0x68]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
test ebp, ebp
je 0x46aa9e
xor eax, eax
lea ebx, [esp + 0x28]
mov dword [ebp], eax
xor edi, edi
mov dword [ebp + 4], eax
lea edx, [eax + 3]
lea esi, [eax + 1]
lea eax, [esp + 0x2a]
sub eax, edx
mov dword [esp + 0x14], eax
lea ecx, [ecx]
mov al, byte [ebx + esi - 1]
mov ecx, edi
and ecx, 7
add edi, 4
xor byte [ecx + ebp], al
mov ecx, esi
mov al, byte [esp + esi + 0x28]
and ecx, 7
add esi, 4
xor byte [ecx + ebp], al
lea ecx, [edx - 1]
mov eax, dword [esp + 0x14]
and ecx, 7
mov al, byte [eax + edx]
xor byte [ecx + ebp], al
mov ecx, edx
mov al, byte [esp + edx + 0x28]
and ecx, 7
add edx, 4
xor byte [ecx + ebp], al
cmp esi, 0x21
jb 0x46aa50
push 0x20
lea eax, [esp + 0x2c]
push eax
call fcn.0049a3e0
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebx
test eax, eax
je 0x46aaca
mov ecx, dword [esp + 0x10]
push eax
push 0x100
lea eax, [esp + 0x44]
add ecx, 0xa9c
push eax
push dword [esp + 0x290]
call fcn.00496ef0
push 0x20
lea eax, [esp + 0x40]
push eax
call fcn.0049a3e0
mov ecx, dword [esp + 0x27c]
pop ebp
xor ecx, esp
call fcn.00502f8e
add esp, 0x27c
ret 0x20