Function at 0x46f210
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x18], edx
push edi
mov edi, dword [esi]
mov ecx, dword [esi + 8]
add edi, dword [esi + 0xc]
sub ecx, dword [esi + 0xc]
cmp dword [esi + 4], 0
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], ecx
jl 0x46f3e4
mov ebx, dword [esi + 0x14]
test ebx, ebx
jne 0x46f2b9
cmp ecx, 0x1b
jl 0x46f3e4
mov ecx, edi
mov edx, str.OggS
mov eax, dword [ecx]
cmp eax, dword [edx]
je 0x46f272
cmp al, byte [edx]
jne 0x46f276
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x46f276
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x46f276
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x46f276
xor eax, eax
jmp 0x46f27b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x46f357
movzx eax, byte [edi + 0x1a]
lea ebx, [eax + 0x1b]
cmp dword [ebp - 4], ebx
jl 0x46f3e4
xor ecx, ecx
test eax, eax
je 0x46f2b3
mov edx, dword [esi + 0x18]
nop dword [eax]
movzx eax, byte [edi + ecx + 0x1b]
inc ecx
add edx, eax
mov dword [esi + 0x18], edx
movzx eax, byte [edi + 0x1a]
cmp ecx, eax
jl 0x46f2a0
mov ecx, dword [ebp - 4]
mov dword [esi + 0x14], ebx
mov eax, dword [esi + 0x18]
add eax, ebx
cmp eax, ecx
jg 0x46f3e4
mov eax, dword [edi + 0x16]
xor ebx, ebx
mov dword [edi + 0x16], 0
mov ecx, dword [esi + 0x14]
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], eax
lea edx, [ecx + edi]
mov dword [ebp - 0xc], edx
test ecx, ecx
jle 0x46f305
xor eax, eax
movzx edx, byte [eax + edi]
mov ecx, ebx
shr ecx, 0x18
inc eax
xor edx, ecx
shl ebx, 8
xor ebx, dword [edx*4 + 0x4dff00]
cmp eax, dword [esi + 0x14]
jl 0x46f2e7
mov eax, dword [ebp - 8]
cmp dword [esi + 0x18], 0
jle 0x46f331
mov edi, dword [ebp - 0xc]
xor eax, eax
movzx edx, byte [edi + eax]
mov ecx, ebx
shr ecx, 0x18
inc eax
xor edx, ecx
shl ebx, 8
xor ebx, dword [edx*4 + 0x4dff00]
cmp eax, dword [esi + 0x18]
jl 0x46f310
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 0x10]
mov ecx, ebx
mov byte [edi + 0x16], bl
shr ecx, 8
mov byte [edi + 0x17], cl
mov ecx, ebx
shr ecx, 0x10
mov byte [edi + 0x18], cl
lea ecx, [ebp - 0x14]
mov ecx, dword [ecx]
shr ebx, 0x18
mov byte [edi + 0x19], bl
cmp ecx, dword [edi + 0x16]
je 0x46f395
mov dword [edi + 0x16], eax
mov ebx, dword [esi]
mov eax, dword [ebp - 4]
dec eax
mov dword [esi + 0x14], 0
push eax
lea eax, [edi + 1]
mov dword [esi + 0x18], 0
push 0x4f
push eax
call fcn.004c5390
add esp, 0xc
test eax, eax
jne 0x46f383
mov eax, dword [esi + 8]
add eax, ebx
mov ecx, eax
sub ecx, ebx
sub edi, eax
mov dword [esi + 0xc], ecx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
mov edx, dword [esi + 0xc]
add ecx, edx
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x46f3bc
mov dword [ebx], ecx
mov eax, dword [esi + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [esi + 0x14]
add eax, ecx
mov dword [ebx + 8], eax
mov eax, dword [esi + 0x18]
mov dword [ebx + 0xc], eax
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
add eax, dword [esi + 0x18]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
lea ecx, [edx + eax]
mov dword [esi + 0xc], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret