Function at 0x46f31b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10
and dword [esp + 0xc], 0
cmp dword [esi + 0x48], 0
push ebx
mov ebx, dword [ebp + 8]
push edi
mov dword [esp + 0x10], ebx
je 0x46f342
mov dword [esp + 8], 2
jmp 0x46f34e
mov eax, dword [esi + 0x10]
xor edx, edx
div dword [esi + 8]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
mov edx, eax
or edx, ecx
je 0x46f37e
sub eax, dword [esi + 0x40]
sbb ecx, dword [esi + 0x44]
xor edx, edx
cmp edx, ecx
jb 0x46f37e
ja 0x46f36d
cmp dword [ebp + 0xc], eax
jbe 0x46f37e
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x46f37e
mov eax, 0x80000000
jmp 0x46f66d
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 8]
cmp edi, ecx
je 0x46f3be
jbe 0x46f3b0
push 4
pop eax
cmp edi, eax
jbe 0x46f394
mov eax, edi
imul eax, dword [ebp + 0xc]
xor edx, edx
div ecx
push eax
call fcn.00450ff1
mov dword [ebp + 8], eax
test eax, eax
je 0x46f66d
mov ebx, dword [ebp + 8]
mov eax, edi
imul eax, dword [ebp + 0xc]
xor edx, edx
div dword [esi + 0xc]
mov dword [ebp + 0xc], eax
cmp dword [esi + 0x48], 0
je 0x46f4a9
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
cmp dword [esi + 0x70], 0
jg 0x46f45f
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0xa0]
sub ecx, eax
push ecx
mov ecx, dword [esi + 0x58]
add ecx, eax
push ecx
push dword [esi]
call fcn.00455b52
add dword [esi + 0x5c], eax
mov eax, dword [esi + 0x5c]
cmp eax, dword [esi + 0xa0]
jae 0x46f413
push dword [esi]
call fcn.0045621a
test eax, eax
je 0x46f4a0
push 0x20
jmp 0x46f415
push 4
cmp dword [esi + 0x70], 0
pop eax
je 0x46f41f
or eax, 0x10
push eax
lea eax, [esi + 0x4c]
push eax
push dword [esi + 0x48]
call dword [sym.imp.MSACM32.DLL_acmStreamConvert]
test eax, eax
jne 0x46f498
mov ecx, dword [esi + 0x60]
test ecx, ecx
jne 0x46f43d
cmp dword [esi + 0x70], ecx
je 0x46f498
sub dword [esi + 0x5c], ecx
mov edx, dword [esi + 0x5c]
je 0x46f456
mov eax, dword [esi + 0x58]
push edx
add ecx, eax
push ecx
push eax
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
mov eax, dword [esi + 0x68]
mov dword [esi + 0xa4], eax
mov ebx, dword [esi + 0x70]
cmp dword [esp + 0xc], ebx
jae 0x46f46c
mov ebx, dword [esp + 0xc]
push ebx
push dword [esi + 0xa4]
push dword [ebp + 8]
call sub.msvcrt.dll_memcpy
add dword [ebp + 8], ebx
sub dword [esi + 0x70], ebx
add dword [esi + 0xa4], ebx
add esp, 0xc
sub dword [esp + 0xc], ebx
mov ebx, dword [ebp + 8]
je 0x46f4a0
jmp 0x46f3cf
mov dword [esp + 0x14], 0x80000000
mov eax, dword [esp + 0xc]
sub dword [ebp + 0xc], eax
jmp 0x46f51d
mov edi, dword [esi + 0xac]
test edi, edi
je 0x46f4c3
push edi
push dword [esi + 0xa8]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebp + 0xc]
sub eax, edi
push eax
lea eax, [edi + ebx]
push eax
push dword [esi]
call fcn.00455b52
mov ecx, dword [esi + 0x10]
add eax, edi
xor edx, edx
mov dword [ebp + 0xc], eax
div ecx
mov dword [esi + 0xac], edx
test edx, edx
je 0x46f51d
cmp dword [esi + 0xa8], 0
jne 0x46f4ff
push ecx
call fcn.00450ff1
mov dword [esi + 0xa8], eax
mov eax, dword [esi + 0xac]
sub dword [ebp + 0xc], eax
push eax
mov eax, dword [ebp + 0xc]
add eax, ebx
push eax
push dword [esi + 0xa8]
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0xc], 0
je 0x46f64e
push 3
pop edi
cmp dword [esp + 8], edi
jne 0x46f56c
mov eax, dword [ebp + 0xc]
xor edx, edx
mov ecx, edi
div ecx
mov ecx, eax
imul ecx, ecx, 3
add ecx, ebx
shl eax, 2
lea edx, [eax + ebx]
mov dword [ebp + 0xc], eax
sub ecx, edi
mov eax, dword [ecx]
and eax, 0xffffff
cmp dword [esi + 0x20], 1
je 0x46f55b
shl eax, 8
sub edx, 4
mov dword [edx], eax
cmp edx, ebx
jne 0x46f549
mov dword [esp + 8], 4
cmp dword [esp + 8], 1
jne 0x46f587
cmp dword [esi + 0x20], 0
je 0x46f5a2
mov ecx, dword [ebp + 0xc]
mov eax, ebx
xor byte [eax], 0x80
inc eax
dec ecx
jne 0x46f57e
jmp 0x46f5a2
cmp dword [esi + 0x20], 1
jne 0x46f5a2
mov eax, dword [ebp + 0xc]
xor edx, edx
div dword [esp + 8]
push dword [esp + 8]
push eax
push ebx
push ebx
call fcn.0046f28c
cmp dword [esi + 4], edi
jne 0x46f5f8
cmp dword [esp + 8], 8
jne 0x46f5d4
cmp dword [esi + 0xc], 4
mov edx, dword [esp + 0x10]
je 0x46f5ba
mov edx, ebx
mov ecx, dword [ebp + 0xc]
shr ecx, 3
xor eax, eax
test ecx, ecx
je 0x46f5d1
fld qword [ebx + eax*8]
fstp dword [edx + eax*4]
inc eax
cmp eax, ecx
jb 0x46f5c6
shr dword [ebp + 0xc], 1
mov eax, dword [esi + 0xc]
cmp eax, 4
je 0x46f64e
push eax
mov eax, dword [ebp + 0xc]
shr eax, 2
push eax
push dword [esp + 0x18]
push ebx
call fcn.0046f09c
mov ecx, edi
sub ecx, dword [esi + 0xc]
shr dword [ebp + 0xc], cl
jmp 0x46f64e
cmp dword [esi + 0xc], 4
jne 0x46f625
mov eax, dword [ebp + 0xc]
xor edx, edx
div dword [esp + 8]
push dword [esp + 8]
mov edi, eax
push edi
push dword [esp + 0x18]
push dword [esp + 0x1c]
call fcn.0046efac
mov eax, edi
shl eax, 2
mov dword [ebp + 0xc], eax
jmp 0x46f64e
cmp dword [esp + 8], 4
jne 0x46f64e
mov eax, dword [ebp + 0xc]
mov edx, dword [esp + 0x10]
shr eax, 2
lea edi, [eax + eax]
lea ecx, [ebx + 2]
mov dword [ebp + 0xc], edi
mov di, word [ecx]
mov word [edx], di
add edx, 2
add ecx, 4
dec eax
jne 0x46f63f
mov eax, dword [esp + 8]
cmp eax, dword [esi + 0xc]
jbe 0x46f65d
push ebx
call fcn.0045105e
mov ecx, dword [ebp + 0xc]
add dword [esi + 0x40], ecx
mov eax, dword [esp + 0x14]
adc dword [esi + 0x44], 0
or eax, ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 8