Function at 0x416400
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xa0
mov ebx, edx
movzx edx, byte [ecx]
mov ah, byte [ecx + 8]
mov edi, dword [esp + 0xb4]
call 0x41641e
pop esi
mov al, dl
or al, ah
test al, 1
je 0x41654a
test ah, 1
mov dword [esp], ebx
mov dword [esp + 0x24], esi
je 0x4164e4
mov dword [esp + 4], ecx
mov ecx, dword [ecx + 0xc]
lea eax, [ebx + edi]
xor esi, esi
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x416495
xor edi, edi
jmp 0x416470
lea eax, [ebx + 1]
mov ebp, eax
inc edi
sub ebp, ebx
mov ebx, eax
add esi, ebp
cmp ecx, edi
je 0x416497
cmp ebx, dword [esp + 0x10]
je 0x4164c4
mov ah, byte [ebx]
test ah, ah
jns 0x416460
cmp ah, 0xe0
jb 0x41648b
cmp ah, 0xf0
jb 0x416490
lea eax, [ebx + 4]
jmp 0x416463
lea eax, [ebx + 2]
jmp 0x416463
lea eax, [ebx + 3]
jmp 0x416463
mov eax, ebx
cmp eax, dword [esp + 0x10]
mov ecx, dword [esp + 4]
je 0x4164d4
movzx eax, byte [eax]
mov ebx, dword [esp]
mov edi, dword [esp + 0xb4]
test al, al
jns 0x4164b4
cmp al, 0xe0
test esi, esi
je 0x4164e2
cmp esi, edi
jae 0x4164e0
cmp byte [ebx + esi], 0xbf
jg 0x4164e2
jmp 0x4164e4
mov ebx, dword [esp]
mov edi, dword [esp + 0xb4]
mov ecx, dword [esp + 4]
jmp 0x4164e4
mov ebx, dword [esp]
mov edi, dword [esp + 0xb4]
jmp 0x4164e4
jne 0x4164e4
mov edi, esi
test dl, 1
je 0x41654a
mov eax, dword [ecx + 4]
cmp edi, 0x10
mov dword [esp + 0xc], edi
mov dword [esp + 0x20], eax
jae 0x416560
xor ebp, ebp
test edi, edi
je 0x41651e
mov eax, ebx
mov esi, edi
nop word cs:[eax + eax]
nop dword [eax]
xor ebx, ebx
cmp byte [eax], 0xc0
setge bl
inc eax
add ebp, ebx
dec esi
jne 0x416510
mov ebx, dword [esp + 0x20]
sub ebx, ebp
jbe 0x416981
movzx eax, byte [ecx + 0x20]
mov edi, dword [esp + 0x24]
mov edx, ecx
xor esi, esi
add edi, dword [eax*4 + 0x416a20]
mov eax, ebx
jmp edi
mov eax, dword [ecx + 0x18]
push edi
push ebx
push dword [ecx + 0x14]
call dword [eax + 0xc]
add esp, 0xac
pop esi
pop edi
pop ebx
pop ebp
ret
lea esi, [ebx + 3]
mov dword [esp + 4], ecx
mov ecx, edi
and esi, 0xfffffffc
mov eax, esi
mov edx, esi
sub eax, ebx
sub ecx, eax
xor eax, eax
mov dword [esp + 8], ecx
and ecx, 3
cmp esi, ebx
mov esi, 0
je 0x41659f
mov ebp, dword [esp]
xor esi, esi
mov edi, ebp
sub edi, edx
nop
xor ebx, ebx
cmp byte [ebp], 0xc0
setge bl
inc ebp
add esi, ebx
inc edi
jne 0x416590
test ecx, ecx
je 0x4165be
mov edi, dword [esp + 8]
xor eax, eax
and edi, 0xfffffffc
add edi, edx
nop
xor ebx, ebx
cmp byte [edi], 0xc0
setge bl
inc edi
add eax, ebx
dec ecx
jne 0x4165b0
add eax, esi
mov esi, dword [esp + 8]
movdqa xmm3, xmmword [0x4eb340]
pcmpeqd xmm2, xmm2
mov ecx, edx
shr esi, 2
jmp 0x416614
mov eax, ecx
shr ecx, 8
mov esi, dword [esp + 8]
and eax, 0xff00ff
and ecx, 0xff00ff
add ecx, eax
mov eax, ecx
shl eax, 0x10
sub esi, edi
add eax, ecx
lea ecx, [edx + edi*4]
shr eax, 0x10
add eax, ebp
mov ebp, edi
and ebp, 3
test ebp, ebp
jne 0x416922
mov ebp, eax
test esi, esi
je 0x41696d
cmp esi, 0xc0
mov edi, 0xc0
mov edx, ecx
mov dword [esp + 8], esi
cmovb edi, esi
xor ecx, ecx
cmp esi, 4
jb 0x4165e0
mov eax, edi
xor ecx, ecx
mov ebx, edx
shr eax, 2
lea esi, [eax - 1]
and esi, 0xfffffff
cmp esi, 7
jb 0x4168d7
inc esi
lea ecx, [edx + 0x40]
pxor xmm2, xmm2
pxor xmm3, xmm3
mov dword [esp + 0x2c], esi
and esi, 0xfffffff8
mov ebx, esi
mov dword [esp + 0x28], esi
shl ebx, 4
add ebx, edx
nop word cs:[eax + eax]
nop dword [eax]
movdqu xmm7, xmmword [ecx - 0x20]
movdqu xmmword [esp + 0x40], xmm2
movdqu xmm2, xmmword [ecx - 0x40]
movdqu xmm1, xmmword [ecx - 0x10]
movdqu xmmword [esp + 0x90], xmm3
movdqu xmm3, xmmword [ecx - 0x30]
movdqu xmm5, xmmword [ecx + 0x10]
movdqa xmm0, xmm7
movdqu xmmword [esp + 0x30], xmm1
movdqu xmmword [esp + 0x10], xmm2
movdqu xmmword [esp + 0x70], xmm3
movdqu xmmword [esp + 0x50], xmm5
punpckldq xmm0, xmm1
movdqa xmm1, xmm2
movdqu xmm2, xmmword [ecx + 0x30]
movdqu xmm6, xmmword [esp + 0x70]
punpckldq xmm1, xmm3
movdqa xmm4, xmm1
punpckhqdq xmm1, xmm0
movdqu xmmword [esp + 0x80], xmm1
movdqu xmm1, xmmword [ecx + 0x20]
punpcklqdq xmm4, xmm0
movdqu xmmword [esp + 0x60], xmm2
movdqa xmm0, xmm1
punpckldq xmm0, xmm2
movdqu xmm2, xmmword [ecx]
sub ecx, 0xffffff80
add esi, 0xfffffff8
movdqa xmm3, xmm2
punpckldq xmm3, xmm5
movdqa xmm5, xmm3
punpckhqdq xmm3, xmm0
punpcklqdq xmm5, xmm0
movdqu xmm0, xmmword [esp + 0x30]
punpckhdq xmm7, xmm0
movdqu xmm0, xmmword [esp + 0x10]
punpckhdq xmm0, xmm6
movdqu xmm6, xmmword [esp + 0x60]
punpckhdq xmm1, xmm6
movdqu xmm6, xmmword [esp + 0x50]
punpckhdq xmm2, xmm6
movdqa xmm6, xmm0
punpckhqdq xmm0, xmm7
punpcklqdq xmm6, xmm7
movdqa xmm7, xmm2
movdqu xmmword [esp + 0x10], xmm0
punpckhqdq xmm2, xmm1
movdqa xmm0, xmm4
psrld xmm4, 6
punpcklqdq xmm7, xmm1
pcmpeqd xmm1, xmm1
movdqu xmmword [esp + 0x30], xmm2
movdqu xmm2, xmmword [esp + 0x80]
pxor xmm0, xmm1
psrld xmm0, 7
por xmm4, xmm0
movdqa xmm0, xmm5
psrld xmm5, 6
pxor xmm0, xmm1
movdqa xmm1, xmmword [0x4eb340]
psrld xmm0, 7
por xmm5, xmm0
movdqu xmm0, xmmword [esp + 0x40]
pand xmm4, xmm1
pand xmm5, xmm1
paddd xmm4, xmm0
movdqu xmm0, xmmword [esp + 0x90]
movdqu xmmword [esp + 0x40], xmm4
pcmpeqd xmm4, xmm4
paddd xmm5, xmm0
movdqa xmm0, xmm2
psrld xmm2, 6
pxor xmm0, xmm4
psrld xmm0, 7
por xmm2, xmm0
movdqa xmm0, xmm3
psrld xmm3, 6
pxor xmm0, xmm4
pand xmm2, xmm1
psrld xmm0, 7
por xmm3, xmm0
movdqa xmm0, xmm6
psrld xmm6, 6
pxor xmm0, xmm4
pand xmm3, xmm1
psrld xmm0, 7
por xmm6, xmm0
movdqa xmm0, xmm7
psrld xmm7, 6
pand xmm6, xmm1
pxor xmm0, xmm4
paddd xmm6, xmm2
movdqu xmm2, xmmword [esp + 0x40]
psrld xmm0, 7
por xmm7, xmm0
pand xmm7, xmm1
paddd xmm7, xmm3
paddd xmm6, xmm2
movdqu xmm2, xmmword [esp + 0x10]
paddd xmm7, xmm5
movdqa xmm3, xmm2
psrld xmm2, 6
pxor xmm3, xmm4
psrld xmm3, 7
por xmm2, xmm3
movdqu xmm3, xmmword [esp + 0x30]
pand xmm2, xmm1
paddd xmm2, xmm6
movdqa xmm5, xmm3
psrld xmm3, 6
pxor xmm5, xmm4
psrld xmm5, 7
por xmm3, xmm5
pand xmm3, xmm1
paddd xmm3, xmm7
jne 0x416680
mov esi, dword [esp + 0x28]
paddd xmm3, xmm2
pcmpeqd xmm2, xmm2
pshufd xmm0, xmm3, 0xee
paddd xmm0, xmm3
movdqa xmm3, xmmword [0x4eb340]
pshufd xmm1, xmm0, 0x55
cmp dword [esp + 0x2c], esi
paddd xmm1, xmm0
movd ecx, xmm1
je 0x4165e0
shl eax, 4
add eax, edx
nop dword [eax]
movdqu xmm0, xmmword [ebx]
add ebx, 0x10
movdqa xmm1, xmm0
psrld xmm0, 6
pxor xmm1, xmm2
psrld xmm1, 7
por xmm0, xmm1
pand xmm0, xmm3
pshufd xmm1, xmm0, 0xee
paddd xmm1, xmm0
pshufd xmm0, xmm1, 0x55
paddd xmm0, xmm1
movd esi, xmm0
add ecx, esi
cmp ebx, eax
jne 0x4168e0
jmp 0x4165e0
and edi, 0xfc
shl ebp, 2
xor ecx, ecx
lea esi, [edx + edi*4]
mov edi, dword [esi]
add esi, 4
mov ebx, edi
shr edi, 6
not ebx
shr ebx, 7
or edi, ebx
and edi, 0x1010101
add ecx, edi
add ebp, 0xfffffffc
jne 0x416930
mov edx, ecx
shr ecx, 8
and edx, 0xff00ff
and ecx, 0xff00ff
add ecx, edx
mov ebp, ecx
shl ebp, 0x10
add ebp, ecx
shr ebp, 0x10
add ebp, eax
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 4]
mov ebx, dword [esp + 0x20]
sub ebx, ebp
ja 0x41652a
mov eax, dword [ecx + 0x18]
push edi
push dword [esp + 4]
jmp 0x41654f