Function at 0x10046010
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, 0x8000
push edi
mov edi, dword [ebp + 0xc]
mov ebx, ecx
cmp edi, eax
mov dword [ebp - 8], ebx
cmovl eax, edi
push eax
push esi
push dword [ebx + 8]
mov dword [ebx + 4], 0
mov dword [ebx], 0
call fcn.1008bac0
mov eax, 1
lea ecx, [edi - 1]
add esp, 0xc
xor dl, dl
cmp edi, eax
jle 0x100460dc
cmp ecx, 0x20
jb 0x100460d0
and ecx, 0x8000001f
jns 0x1004606c
dec ecx
or ecx, 0xffffffe0
inc ecx
mov dword [ebp - 4], ecx
xorps xmm2, xmm2
mov ecx, edi
movaps xmm1, xmm2
sub ecx, dword [ebp - 4]
nop word [eax + eax]
movups xmm0, xmmword [esi + eax]
pxor xmm2, xmm0
movups xmm0, xmmword [esi + eax + 0x10]
add eax, 0x20
pxor xmm1, xmm0
cmp eax, ecx
jl 0x10046080
pxor xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
pxor xmm1, xmm0
movaps xmm0, xmm1
psrldq xmm0, 4
pxor xmm1, xmm0
movaps xmm0, xmm1
psrldq xmm0, 2
pxor xmm1, xmm0
movaps xmm0, xmm1
psrldq xmm0, 1
pxor xmm1, xmm0
movd edx, xmm1
cmp eax, edi
jge 0x100460dc
xor dl, byte [eax + esi]
inc eax
cmp eax, edi
jl 0x100460d4
mov ecx, dword [ebx + 4]
mov esi, dword [ebp + 0x10]
add ecx, 8
mov eax, ecx
and ecx, 7
sar eax, 3
add dword [ebx], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 4], ecx
mov dword [esi + 0x10], 0
cmp dl, byte [eax]
jne 0x1004647f
push edi
mov edx, eax
or ecx, 0xffffffff
call fcn.10042f10
add esp, 4
xor edx, edx
not eax
xor ecx, ecx
cmp dword [ecx + 0x100dcf34], eax
jne 0x10046128
cmp dword [ecx + 0x100dcf30], edi
je 0x10046136
add ecx, 0xc
inc edx
cmp ecx, 0x54
jb 0x10046118
jmp 0x100461cb
lea eax, [edx + edx*2]
mov eax, dword [eax*4 + 0x100dcf38]
mov dword [ebp + 8], eax
test eax, eax
je 0x100461cb
inc dword [esi + 4]
mov ecx, dword [esi + 8]
cmp dword [esi + 4], ecx
jle 0x1004618b
mov eax, ecx
lea edi, [ecx + 0x20]
cdq
and edx, 3
add eax, edx
sar eax, 2
add edi, eax
cmp dword [esi + 4], edi
cmovg edi, dword [esi + 4]
lea eax, [edi + edi*4]
shl eax, 3
push eax
push dword [esi]
call fcn.10098190
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x10046538
mov dword [esi + 8], edi
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp + 8]
mov dword [ebp + 0xc], 0
lea eax, [ecx + 1]
mov dword [esi + 0x10], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi]
mov dword [eax + ecx*8], 0x36
mov dword [eax + ecx*8 + 0x18], 3
mov dword [eax + ecx*8 + 8], 3
lea ecx, [eax + ecx*8]
lea eax, [ecx + 0xc]
mov dword [eax], edx
mov dword [ecx + 0x14], eax
lea eax, [ecx + 0x1c]
mov dword [ecx + 0x24], eax
mov edi, dword [ebx]
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 4]
movzx eax, byte [ecx + edi]
movzx ebx, byte [ecx + edi + 1]
shl eax, 8
or ebx, eax
movzx eax, byte [ecx + edi + 2]
shl ebx, 8
mov ecx, 8
or ebx, eax
sub ecx, edx
shr ebx, cl
lea ecx, [edx + 1]
mov eax, ecx
and ecx, 7
sar eax, 3
add eax, edi
mov edi, dword [ebp - 8]
mov dword [edi], eax
mov dword [edi + 4], ecx
test ebx, 0x8000
je 0x100462d7
mov ecx, edi
call fcn.100466a0
mov ebx, dword [ebp + 0xc]
lea ecx, [eax + 1]
xor eax, eax
mov dword [ebp - 8], ecx
mov dword [ebp + 8], eax
cmp dword [edi], ebx
jge 0x10046481
cmp eax, ecx
jge 0x100462da
inc dword [esi + 0x24]
mov edx, dword [esi + 0x24]
mov ecx, dword [esi + 0x28]
cmp edx, ecx
jle 0x1004627d
mov eax, ecx
test eax, eax
jns 0x10046250
add eax, 3
sar eax, 2
add ecx, 0x20
add eax, ecx
cmp edx, eax
cmovg eax, edx
push eax
push dword [esi + 0x20]
mov dword [ebp + 0x10], eax
call fcn.10098190
add esp, 8
mov dword [esi + 0x20], eax
test eax, eax
je 0x10046538
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x28], eax
mov ecx, dword [edi]
add ecx, dword [edi + 8]
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
shl eax, 8
or edx, eax
movzx eax, byte [ecx + 2]
shl edx, 8
mov ecx, 8
sub ecx, dword [edi + 4]
or edx, eax
mov eax, dword [esi + 0x20]
shr edx, cl
mov ecx, dword [ebp + 8]
shr edx, 8
mov byte [ecx + eax], dl
mov ecx, dword [edi + 4]
add ecx, 8
mov eax, ecx
and ecx, 7
sar eax, 3
add dword [edi], eax
mov eax, dword [ebp + 8]
inc eax
mov dword [edi + 4], ecx
mov dword [ebp + 8], eax
cmp dword [edi], ebx
jge 0x10046481
mov ecx, dword [ebp - 8]
jmp 0x10046232
mov ebx, dword [ebp + 0xc]
cmp dword [edi], ebx
jge 0x10046481
inc dword [esi + 4]
mov edx, dword [esi + 4]
mov ecx, dword [esi + 8]
cmp edx, ecx
jle 0x10046323
mov eax, ecx
test eax, eax
jns 0x100462f8
add eax, 3
sar eax, 2
lea ebx, [ecx + 0x20]
add ebx, eax
cmp edx, ebx
cmovg ebx, edx
lea eax, [ebx + ebx*4]
shl eax, 3
push eax
push dword [esi]
call fcn.10098190
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x10046538
mov dword [esi + 8], ebx
mov eax, dword [esi + 0x10]
lea ecx, [eax + eax*4]
mov eax, dword [esi]
lea ebx, [eax + ecx*8]
mov ecx, dword [edi]
add ecx, dword [edi + 8]
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
shl eax, 8
or edx, eax
movzx eax, byte [ecx + 2]
shl edx, 8
mov ecx, 8
sub ecx, dword [edi + 4]
or edx, eax
shr edx, cl
movzx eax, dx
test eax, 0x8000
jne 0x10046369
shr eax, 0xc
mov dword [ebx], eax
mov ecx, dword [edi + 4]
add ecx, 4
jmp 0x10046377
shr eax, 0xa
sub eax, 0x18
mov dword [ebx], eax
mov ecx, dword [edi + 4]
add ecx, 6
mov eax, ecx
and ecx, 7
sar eax, 3
add dword [edi], eax
mov dword [edi + 4], ecx
mov eax, dword [ebx]
test byte [eax + 0x100c7ca8], 4
je 0x100463cf
mov ecx, dword [edi]
add ecx, dword [edi + 8]
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
shl eax, 8
or edx, eax
movzx eax, byte [ecx + 2]
shl edx, 8
mov ecx, 8
sub ecx, dword [edi + 4]
or edx, eax
shr edx, cl
shr edx, 0xf
and dl, 1
mov byte [ebx + 4], dl
mov ecx, dword [edi + 4]
inc ecx
mov eax, ecx
sar eax, 3
add dword [edi], eax
and ecx, 7
mov dword [edi + 4], ecx
jmp 0x100463d3
mov byte [ebx + 4], 0
mov eax, dword [ebx]
lea ecx, [ebx + 8]
mov dword [ebx + 0x18], 3
mov dword [ecx], 3
mov dword [ebx + 0x24], 0
movzx eax, byte [eax + 0x100c7ca8]
and eax, 3
mov dword [ebx + 0x14], 0
mov dword [ebp + 8], eax
jbe 0x1004646f
movzx eax, byte [ebx + 4]
push eax
push ecx
mov ecx, edi
call fcn.10046550
cmp dword [ebp + 8], 2
jne 0x10046427
movzx eax, byte [ebx + 4]
mov ecx, edi
push eax
lea eax, [ebx + 0x18]
push eax
call fcn.10046550
jmp 0x1004646f
cmp dword [ebx + 8], 1
jne 0x1004646f
mov eax, dword [ebx]
test byte [eax + 0x100c7ca8], 0x18
je 0x1004646f
mov eax, dword [ebx + 0xc]
cmp eax, 0x100
jl 0x10046449
sub eax, 0x100
jmp 0x1004646c
cmp eax, 0x88
jl 0x10046457
sub eax, 0x108
jmp 0x10046469
cmp eax, 0x10
jl 0x10046461
sub eax, 8
jmp 0x10046469
cmp eax, 8
jl 0x10046469
sub eax, 0x10
add eax, dword [esi + 0x10]
mov dword [ebx + 0xc], eax
inc dword [esi + 0x10]
mov ebx, dword [ebp + 0xc]
cmp dword [edi], ebx
jl 0x100462e2
jmp 0x10046481
mov ebx, edi
inc dword [esi + 4]
mov ecx, dword [esi + 8]
cmp dword [esi + 4], ecx
jle 0x100464c1
mov eax, ecx
lea edi, [ecx + 0x20]
cdq
and edx, 3
add eax, edx
sar eax, 2
add edi, eax
cmp dword [esi + 4], edi
cmovg edi, dword [esi + 4]
lea eax, [edi + edi*4]
shl eax, 3
push eax
push dword [esi]
call fcn.10098190
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x1004653d
mov dword [esi + 8], edi
mov ecx, dword [esi + 0x10]
xor edi, edi
lea eax, [ecx + 1]
mov dword [esi + 0x10], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi]
mov dword [eax + ecx*8], 0x16
mov dword [eax + ecx*8 + 0x18], 3
mov dword [eax + ecx*8 + 8], 3
lea ecx, [eax + ecx*8]
lea eax, [ecx + 0xc]
mov dword [ecx + 0x14], eax
lea eax, [ecx + 0x1c]
mov dword [ecx + 0x24], eax
cmp dword [esi + 0x10], edi
jle 0x10046525
xor edx, edx
nop
mov ecx, dword [esi]
add ecx, edx
cmp dword [ecx + 0x14], 0
jne 0x10046510
lea eax, [ecx + 0xc]
mov dword [ecx + 0x14], eax
cmp dword [ecx + 0x24], 0
jne 0x1004651c
lea eax, [ecx + 0x1c]
mov dword [ecx + 0x24], eax
inc edi
add edx, 0x28
cmp edi, dword [esi + 0x10]
jl 0x10046500
test ebx, ebx
je 0x1004652f
push esi
call fcn.10046860
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call fcn.10043300
call fcn.10043300
int3