Function at 0x46b890
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov dword [esp], edx
mov edx, dword [ecx]
mov ebx, dword [ecx + 0xc]
mov eax, dword [esp + 0x38]
mov esi, 0xffffffff
mov dword [esp + 0xc], edx
mov edx, dword [ecx + 8]
cmp ebx, 3
ja 0x46b8c2
mov ecx, ebx
mov esi, 0xffffffff
shl cl, 3
shl esi, cl
not esi
mov ecx, 0xf
sub ecx, ebx
cmp ecx, eax
jne 0x46bc50
mov ebp, dword [esp + 0x44]
cmp esi, ebp
jb 0x46bc50
mov ecx, dword [esp]
lea esi, [ebx - 1]
mov dword [ecx + 0x15], 0
mov dword [ecx + 5], 0
mov dword [ecx + 1], 0
mov dword [ecx + 0xd], 0
mov dword [ecx + 9], 0
mov dword [ecx + 0x11], 0
mov dword [ecx + 0x1c], 0
mov dword [ecx + 0x18], 0
lea ecx, [edx*4 + 0xf8]
and ecx, 0xf8
or ecx, esi
cmp dword [esp + 0x40], 0
je 0x46b934
or cl, 0x40
mov edx, dword [esp]
test eax, eax
mov byte [edx], cl
je 0x46b94e
lea ecx, [edx + 1]
push eax
push dword [esp + 0x38]
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
test ebx, ebx
je 0x46ba7d
xor ecx, ecx
cmp ebx, 3
jbe 0x46ba50
movd xmm1, ebp
mov eax, dword [esp]
movdqa xmm0, xmmword [0x58ce10]
movapd xmm5, xmmword [0x58ce40]
mov ecx, ebx
mov edx, 3
pshufd xmm6, xmm1, 0x44
and ecx, 0xfffffffc
movd xmm3, edx
pand xmm6, xmmword [0x58ce20]
mov edx, ecx
lea eax, [eax + 0xe]
nop dword [eax + eax]
movdqa xmm7, xmm0
movdqa xmm1, xmmword [0x58ce20]
xorps xmm2, xmm2
psllq xmm7, xmm3
movdqa xmm4, xmm7
paddq xmm7, xmmword [0x58ce30]
pand xmm4, xmm1
pand xmm7, xmm1
movdqa xmm1, xmm6
psrlq xmm1, xmm4
pshufd xmm4, xmm4, 0x4e
movss xmm2, xmm4
movdqa xmm4, xmm6
psrlq xmm4, xmm2
pshufd xmm2, xmm7, 0x4e
movsd xmm4, xmm1
movdqa xmm1, xmm6
psrlq xmm1, xmm7
pxor xmm7, xmm7
andpd xmm4, xmm5
movss xmm7, xmm2
movdqa xmm2, xmm6
psrlq xmm2, xmm7
movsd xmm2, xmm1
pshufd xmm1, xmm4, 0xe8
pshuflw xmm1, xmm1, 0xe2
andpd xmm2, xmm5
packuswb xmm1, xmm0
movd esi, xmm1
pshufd xmm1, xmm2, 0xe8
pshuflw xmm1, xmm1, 0xe2
mov word [eax], si
packuswb xmm1, xmm0
paddq xmm0, xmmword [0x58ce50]
movd edi, xmm1
mov word [eax - 2], di
add eax, 0xfffffffc
add edx, 0xfffffffc
jne 0x46b9a0
cmp ebx, ecx
je 0x46ba7d
mov edx, dword [esp]
mov eax, 7
sub ebx, ecx
sub eax, ecx
shl ecx, 3
lea eax, [edx + eax + 8]
nop word cs:[eax + eax]
nop dword [eax]
mov edx, ebp
shr edx, cl
add ecx, 8
mov byte [eax], dl
dec eax
dec ebx
jne 0x46ba70
mov eax, dword [esp]
lea ecx, [eax + 0x10]
push dword [esp + 0x30]
mov dword [esp + 8], ecx
push ecx
push eax
call dword [esp + 0x18]
add esp, 0xc
mov ebx, dword [esp + 0x40]
test ebx, ebx
je 0x46bab6
cmp ebx, 0xfeff
ja 0x46bac0
mov eax, dword [esp + 4]
mov edx, 1
xor byte [eax], bh
mov eax, 2
jmp 0x46bae7
mov eax, 0xfffffffe
jmp 0x46bc48
mov ecx, dword [esp + 4]
mov eax, ebx
mov edx, 5
shr eax, 0x18
not byte [ecx]
xor byte [ecx + 1], 0xfe
xor byte [ecx + 2], al
mov eax, ebx
shr eax, 0x10
xor byte [ecx + 3], al
xor byte [ecx + 4], bh
mov eax, 6
mov esi, dword [esp]
mov ecx, dword [esp + 0x3c]
xor byte [esi + edx + 0x10], bl
lea edx, [esi + 0x20]
mov dword [esp + 0x14], edx
mov edx, 1
nop
mov edi, edx
test ebx, ebx
je 0x46bc30
mov esi, ebx
lea edx, [eax - 0x10]
mov dword [esp + 0x18], edi
neg esi
mov edi, edx
cmp edx, esi
cmovb edi, esi
neg edi
cmp edi, 0x1f
ja 0x46bb30
mov ebp, dword [esp + 4]
mov esi, ecx
mov edx, ebx
jmp 0x46bbd0
mov ebp, dword [esp + 4]
cmp edx, esi
mov dword [esp + 8], ebx
cmovb edx, esi
mov esi, ecx
sub esi, edx
lea ebx, [ebp + eax]
cmp ebx, esi
jae 0x46bb60
mov esi, eax
sub esi, edx
add esi, ebp
cmp ecx, esi
jae 0x46bb60
mov edx, dword [esp + 8]
mov esi, ecx
jmp 0x46bbd0
mov ebx, dword [esp + 8]
mov edx, edi
xor ebp, ebp
and edx, 0xffffffe0
lea esi, [ecx + edx]
sub ebx, edx
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x14]
lea ebx, [ebx + eax]
add eax, edx
nop dword [eax]
movdqu xmm0, xmmword [ecx + ebp]
movdqu xmm2, xmmword [ebx + ebp - 0x10]
movdqu xmm1, xmmword [ecx + ebp + 0x10]
movdqu xmm3, xmmword [ebx + ebp]
pxor xmm2, xmm0
pxor xmm3, xmm1
movdqu xmmword [ebx + ebp - 0x10], xmm2
movdqu xmmword [ebx + ebp], xmm3
add ebp, 0x20
cmp edx, ebp
jne 0x46bb80
cmp dword [esp + 8], ebp
mov ebp, dword [esp + 4]
setne bl
cmp edx, edi
mov edx, dword [esp + 0x10]
je 0x46bc06
nop word cs:[eax + eax]
nop dword [eax]
lea ecx, [ebp + eax]
mov dword [esp + 0x10], edx
inc eax
dec edx
xor edi, edi
nop dword [eax]
movzx ebx, byte [esi + edi]
lea ebp, [edi + 1]
xor byte [ecx + edi], bl
cmp edx, edi
setne bl
je 0x46bbfa
add edi, eax
cmp edi, 0x10
mov edi, ebp
jb 0x46bbe0
mov edx, dword [esp + 0x10]
add esi, ebp
sub edx, ebp
mov ebp, dword [esp + 4]
push dword [esp + 0x30]
push ebp
push ebp
mov ebp, edx
call dword [esp + 0x18]
add esp, 0xc
mov edi, dword [esp + 0x18]
xor eax, eax
test bl, bl
mov ebx, ebp
mov ebp, dword [esp + 0x44]
mov ecx, esi
lea edx, [edi + 1]
jne 0x46bb00
jmp 0x46bc41
push dword [esp + 0x30]
mov eax, dword [esp + 8]
push eax
push eax
call dword [esp + 0x18]
add esp, 0xc
mov eax, 0xfffffffe
sub eax, edi
mov ecx, dword [esp]
cmp ebp, 0xfffffff0
jbe 0x46bc5a
xor eax, eax
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
add ebp, 0xf
shr ebp, 3
or ebp, 1
cmp ebp, eax
mov eax, 0
ja 0x46bc52
and byte [ecx], 7
mov eax, 1
jmp 0x46bc52