Function at 0x418590
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xc0
movzx ebx, byte [ecx]
movzx eax, byte [ecx + 8]
mov edi, dword [ebp + 8]
call 0x4185ae
pop esi
mov ah, bl
or ah, al
test ah, 1
je 0x4186b3
test al, 1
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], esi
je 0x418672
mov ecx, dword [ecx + 0xc]
lea eax, [edx + edi]
xor esi, esi
mov byte [esp + 0x40], bl
mov dword [esp + 0x20], eax
test ecx, ecx
je 0x418624
xor edi, edi
mov ebx, edx
jmp 0x418600
lea edx, [ebx + 1]
mov eax, edx
inc edi
sub eax, ebx
mov ebx, edx
add esi, eax
cmp ecx, edi
je 0x418624
cmp ebx, dword [esp + 0x20]
je 0x418653
movzx eax, byte [ebx]
test al, al
jns 0x4185f0
cmp al, 0xe0
jb 0x41861a
cmp al, 0xf0
jb 0x41861f
lea edx, [ebx + 4]
jmp 0x4185f3
lea edx, [ebx + 2]
jmp 0x4185f3
lea edx, [ebx + 3]
jmp 0x4185f3
cmp edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
movzx ebx, byte [esp + 0x40]
je 0x418665
movzx eax, byte [edx]
mov edx, dword [esp + 0xc]
mov edi, dword [ebp + 8]
test al, al
jns 0x418643
cmp al, 0xe0
test esi, esi
je 0x418670
cmp esi, edi
jae 0x41866e
cmp byte [edx + esi], 0xbf
jg 0x418670
jmp 0x418672
mov edx, dword [esp + 0xc]
mov edi, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
movzx ebx, byte [esp + 0x40]
jmp 0x418672
mov edx, dword [esp + 0xc]
mov edi, dword [ebp + 8]
jmp 0x418672
jne 0x418672
mov edi, esi
test bl, 1
je 0x4186b3
mov eax, dword [ecx + 4]
cmp edi, 0x10
mov dword [esp + 0x1c], edi
mov dword [esp + 0x54], eax
jae 0x4186c9
xor ecx, ecx
test edi, edi
je 0x418b18
mov esi, dword [esp + 0x10]
mov eax, edx
mov edx, edi
nop dword [eax]
xor ebx, ebx
cmp byte [eax], 0xc0
setge bl
inc eax
add ecx, ebx
dec edx
jne 0x4186a0
jmp 0x418af5
mov eax, dword [ecx + 0x18]
push edi
push edx
push dword [ecx + 0x14]
call dword [eax + 0xc]
add esp, 0xc
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [edx + 3]
mov esi, edi
and ecx, 0xfffffffc
mov eax, ecx
mov dword [esp + 0x20], ecx
sub eax, edx
sub esi, eax
xor eax, eax
mov dword [esp + 0x40], esi
and esi, 3
cmp ecx, edx
mov edx, 0
je 0x41870e
mov ebx, dword [esp + 0xc]
xor edx, edx
mov edi, ebx
sub edi, dword [esp + 0x20]
nop dword [eax]
xor ecx, ecx
cmp byte [ebx], 0xc0
setge cl
inc ebx
add edx, ecx
inc edi
jne 0x418700
mov ebx, dword [esp + 0x40]
test esi, esi
je 0x41873e
mov edi, ebx
xor eax, eax
and edi, 0xfffffffc
add edi, dword [esp + 0x20]
nop word cs:[eax + eax]
nop dword [eax + eax]
xor ecx, ecx
cmp byte [edi], 0xc0
setge cl
inc edi
add eax, ecx
dec esi
jne 0x418730
movdqa xmm3, xmmword [0x4571c0]
mov edi, dword [esp + 0x20]
add eax, edx
shr ebx, 2
pcmpeqd xmm2, xmm2
jmp 0x418798
mov eax, ecx
shr ecx, 8
mov esi, dword [esp + 0x3c]
and eax, 0xff00ff
and ecx, 0xff00ff
add ecx, eax
mov eax, ecx
shl eax, 0x10
sub ebx, esi
add eax, ecx
mov ecx, dword [esp + 0x18]
shr eax, 0x10
add eax, edx
mov edx, esi
and edx, 3
lea edi, [ecx + esi*4]
test edx, edx
jne 0x418a99
mov edx, eax
test ebx, ebx
je 0x418a82
cmp ebx, 0xc0
mov eax, 0xc0
mov dword [esp + 0x18], edi
cmovb eax, ebx
xor ecx, ecx
cmp ebx, 4
mov dword [esp + 0x3c], eax
jb 0x418760
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
xor ecx, ecx
shr edi, 2
lea esi, [edi - 1]
and esi, 0xfffffff
cmp esi, 7
jb 0x418a39
inc esi
mov ecx, dword [esp + 0x18]
pxor xmm2, xmm2
pxor xmm3, xmm3
mov dword [esp + 0x5c], esi
and esi, 0xfffffff8
mov eax, esi
mov dword [esp + 0x58], esi
shl eax, 4
add eax, ecx
add ecx, 0x40
movdqu xmm7, xmmword [ecx - 0x20]
movdqa xmmword [esp + 0x70], xmm2
movdqu xmm2, xmmword [ecx - 0x40]
movdqu xmm1, xmmword [ecx - 0x10]
movdqa xmmword [esp + 0x60], xmm3
movdqu xmm3, xmmword [ecx - 0x30]
movdqu xmm6, xmmword [ecx + 0x10]
movdqa xmm0, xmm7
movdqa xmmword [esp + 0x40], xmm1
movdqa xmmword [esp + 0x20], xmm2
movdqa xmmword [esp + 0x90], xmm3
punpckldq xmm0, xmm1
movdqa xmm1, xmm2
movdqu xmm2, xmmword [ecx + 0x30]
punpckhdq xmm7, xmmword [esp + 0x40]
punpckldq xmm1, xmm3
movdqa xmm4, xmm1
punpckhqdq xmm1, xmm0
movdqa xmmword [esp + 0xa0], xmm1
movdqu xmm1, xmmword [ecx + 0x20]
punpcklqdq xmm4, xmm0
movdqa xmmword [esp + 0x80], xmm2
movdqa xmm0, xmm1
punpckhdq xmm1, xmmword [esp + 0x80]
punpckldq xmm0, xmm2
movdqu xmm2, xmmword [ecx]
sub ecx, 0xffffff80
add esi, 0xfffffff8
movdqa xmm3, xmm2
punpckhdq xmm2, xmm6
punpckldq xmm3, xmm6
movdqa xmm5, xmm3
punpckhqdq xmm3, xmm0
punpcklqdq xmm5, xmm0
movdqa xmm0, xmmword [esp + 0x20]
punpckhdq xmm0, xmmword [esp + 0x90]
movdqa xmm6, xmm0
punpckhqdq xmm0, xmm7
punpcklqdq xmm6, xmm7
movdqa xmm7, xmm2
movdqa xmmword [esp + 0x20], xmm0
punpckhqdq xmm2, xmm1
movdqa xmm0, xmm4
psrld xmm4, 6
punpcklqdq xmm7, xmm1
pcmpeqd xmm1, xmm1
movdqa xmmword [esp + 0x40], xmm2
movdqa xmm2, xmmword [esp + 0xa0]
pxor xmm0, xmm1
psrld xmm0, 7
por xmm4, xmm0
movdqa xmm0, xmm5
psrld xmm5, 6
pxor xmm0, xmm1
movdqa xmm1, xmmword [0x4571c0]
psrld xmm0, 7
por xmm5, xmm0
movdqa xmm0, xmm2
psrld xmm2, 6
pand xmm4, xmm1
pand xmm5, xmm1
paddd xmm4, xmmword [esp + 0x70]
paddd xmm5, xmmword [esp + 0x60]
movdqa xmmword [esp + 0x70], xmm4
pcmpeqd xmm4, xmm4
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
pxor xmm0, xmm4
pand xmm6, xmm1
psrld xmm0, 7
paddd xmm6, xmm2
movdqa xmm2, xmmword [esp + 0x20]
por xmm7, xmm0
paddd xmm6, xmmword [esp + 0x70]
pand xmm7, xmm1
paddd xmm7, xmm3
movdqa xmm3, xmmword [esp + 0x40]
movdqa xmm0, xmm2
paddd xmm7, xmm5
psrld xmm2, 6
pxor xmm0, xmm4
psrld xmm0, 7
movdqa xmm5, xmm3
psrld xmm3, 6
por xmm2, xmm0
pxor xmm5, xmm4
pand xmm2, xmm1
psrld xmm5, 7
paddd xmm2, xmm6
por xmm3, xmm5
pand xmm3, xmm1
paddd xmm3, xmm7
jne 0x418800
mov esi, dword [esp + 0x58]
paddd xmm3, xmm2
pcmpeqd xmm2, xmm2
pshufd xmm0, xmm3, 0xee
paddd xmm0, xmm3
movdqa xmm3, xmmword [0x4571c0]
pshufd xmm1, xmm0, 0x55
cmp dword [esp + 0x5c], esi
paddd xmm1, xmm0
movd ecx, xmm1
je 0x418760
shl edi, 4
add edi, dword [esp + 0x18]
movdqu xmm0, xmmword [eax]
add eax, 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 eax, edi
jne 0x418a40
jmp 0x418760
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov ecx, edx
mov edx, dword [esp + 0x54]
sub edx, ecx
ja 0x418afd
jmp 0x418b24
and esi, 0xfc
shl edx, 2
lea esi, [ecx + esi*4]
xor ecx, ecx
nop word [eax + eax]
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 edx, 0xfffffffc
jne 0x418ab0
mov edx, ecx
shr ecx, 8
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
and edx, 0xff00ff
and ecx, 0xff00ff
add ecx, edx
mov edx, ecx
shl ecx, 0x10
add ecx, edx
shr ecx, 0x10
add ecx, eax
mov edx, dword [esp + 0x54]
sub edx, ecx
jbe 0x418b24
mov ecx, dword [esp + 0x14]
xor edi, edi
movzx eax, byte [ecx + 0x20]
add esi, dword [eax*4 + 0x418bd0]
mov eax, edx
jmp esi
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x54]
sub edx, ecx
ja 0x418afd
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x18]
push edi
push dword [esp + 0x10]
jmp 0x4186b8