Function at 0x46f230
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, 1
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x20], ecx
mov ecx, dword [edi]
cmp dword [esi], ecx
cmova ecx, dword [esi]
cmp ecx, eax
cmovb ecx, eax
mov dword [ebp + 0xc], ecx
call fcn.0046ced0
mov ecx, dword [ebp + 0xc]
mov ebx, eax
mov dword [ebp - 0xc], ebx
call fcn.0046ced0
mov edx, esi
mov dword [ebp + 0x10], eax
mov ecx, ebx
call fcn.0046cfe0
mov ecx, dword [ebp + 0x10]
mov edx, edi
call fcn.0046cfe0
mov esi, dword [ebp + 0xc]
lea ecx, [esi + 1]
call fcn.0046ced0
mov edi, eax
lea ecx, [esi + 1]
mov dword [ebp - 8], edi
call fcn.0046ced0
mov ecx, esi
mov dword [ebp - 4], eax
call fcn.0046ced0
shl esi, 6
mov dword [ebp - 0x10], eax
mov dword [ebp + 0xc], esi
lea ecx, [esi + esi]
shr ecx, 5
call fcn.0046ced0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], 0
lea ecx, [eax + 4]
mov dword [ebp - 0x18], ecx
test esi, esi
jne 0x46f433
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0x20], 0
mov esi, dword [ebp - 0xc]
je 0x46f4c3
xor edx, edx
mov ecx, esi
call fcn.0046d400
mov ecx, dword [edi + 4]
xor edx, edx
mov ebx, dword [ebp + 0x10]
mov dword [ecx], eax
mov ecx, ebx
call fcn.0046d400
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 4]
mov edx, edi
mov dword [ecx], eax
mov ecx, esi
call fcn.0046cfe0
mov edx, dword [ebp - 4]
mov ecx, ebx
call fcn.0046cfe0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x46f3df
nop dword [eax]
mov ecx, dword [ebp - 0x1c]
dec eax
mov dword [ebp + 0xc], eax
lea esi, [eax + eax]
mov edx, esi
call fcn.0046d400
mov ecx, dword [ebp - 0x1c]
lea edx, [esi + 1]
mov edi, eax
call fcn.0046d400
mov ebx, eax
mov eax, dword [ebp - 8]
mov edx, eax
mov ecx, dword [eax + 4]
mov esi, dword [ecx]
mov ecx, eax
and esi, 1
push esi
push dword [ebp + 0x10]
call fcn.0046df70
mov edx, dword [ebp - 4]
mov ecx, edx
push esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.0046df70
mov edx, dword [ebp - 8]
mov ecx, edx
push 1
call fcn.0046e680
mov edx, dword [ebp - 4]
add esp, 0x14
mov ecx, edx
push edi
push dword [ebp - 8]
call fcn.0046df70
push 1
mov edx, esi
mov ecx, esi
call fcn.0046e5a0
add esp, 0xc
mov edx, esi
mov ecx, esi
push edi
mov edi, dword [ebp + 0x10]
push edi
call fcn.0046df70
push ebx
mov edx, edi
mov ecx, esi
call fcn.0046d090
mov edi, dword [ebp - 8]
add esp, 0xc
mov edx, dword [ebp - 4]
mov ecx, edi
push ebx
call fcn.0046d090
xor dword [ebp - 0x14], ebx
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x46f330
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, ebx
push edi
call fcn.0046dcb0
add esp, 4
mov edx, edi
mov ecx, edi
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0046d020
push dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
mov edx, esi
call fcn.0046dcb0
mov edx, dword [ebp - 4]
add esp, 0xc
mov ecx, edx
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0046d020
mov ecx, dword [ebp - 0x20]
add esp, 8
mov edx, edi
call fcn.0046cfe0
jmp 0x46f4c6
mov eax, dword [ebp + 0x10]
mov edx, ebx
mov ecx, eax
call fcn.0046dfd0
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
mov esi, edx
mov ecx, dword [ebp - 0x18]
and esi, 1
mov ebx, esi
xor ebx, eax
mov ecx, dword [ecx]
mov edi, dword [ecx]
and edi, edx
mov edx, dword [ebp + 0x10]
and edi, 1
and ebx, edi
xor ebx, esi
mov esi, dword [ebp - 0xc]
push ebx
mov ecx, esi
call fcn.0046d090
add esp, 4
mov edx, esi
mov ecx, esi
push edi
push dword [ebp + 0x10]
call fcn.0046dfa0
push 1
mov edx, esi
mov ecx, esi
call fcn.0046e680
mov esi, dword [ebp - 0x14]
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
add esi, esi
mov edx, esi
push edi
call fcn.0046d480
mov ecx, dword [ebp - 0x1c]
lea edx, [esi + 1]
add esp, 4
push ebx
call fcn.0046d480
mov eax, dword [ebp - 0x14]
add esp, 4
mov ebx, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp + 0xc]
jb 0x46f430
mov edi, dword [ebp - 8]
jmp 0x46f2d2
mov ebx, dword [ebp + 0x10]
mov ecx, esi
call fcn.0046cfc0
mov ecx, ebx
call fcn.0046cfc0
mov ecx, edi
call fcn.0046cfc0
mov ecx, dword [ebp - 4]
call fcn.0046cfc0
mov ecx, dword [ebp - 0x10]
call fcn.0046cfc0
mov ecx, dword [ebp - 0x1c]
call fcn.0046cfc0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret