Function at 0x417840
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x34
push esi
mov esi, ecx
test esi, esi
je 0x417b3c
test edx, edx
je 0x417b3c
mov al, byte [esi]
cmp al, 3
je 0x417865
cmp byte [edx], 0
je 0x417b3c
movzx eax, al
sub eax, 1
je 0x417b1e
sub eax, 1
je 0x417ad5
sub eax, 1
jne 0x417b3c
mov eax, dword [esi + 1]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 5]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 9]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0xd]
lea esi, [edx + 0x2a]
mov dword [esp + 0x24], eax
mov al, byte [esp + 0x25]
mov byte [esp + 0x12], al
mov al, byte [esp + 0x24]
mov byte [esp + 0x11], al
mov al, byte [esp + 0x23]
mov byte [esp + 0x10], al
mov al, byte [esp + 0x22]
mov byte [esp + 0xf], al
mov al, byte [esp + 0x21]
mov byte [esp + 0xe], al
mov al, byte [esp + 0x20]
mov byte [esp + 0xd], al
mov al, byte [esp + 0x1f]
mov byte [esp + 0xc], al
mov al, byte [esp + 0x1e]
mov byte [esp + 0xb], al
mov al, byte [esp + 0x1d]
mov byte [esp + 0xa], al
mov al, byte [esp + 0x1c]
mov byte [esp + 9], al
mov al, byte [esp + 0x1b]
mov byte [esp + 8], al
mov al, byte [esp + 0x1a]
push ebx
mov bh, byte [esp + 0x2b]
mov bl, byte [esp + 0x2a]
mov byte [esp + 0xb], al
mov al, byte [esp + 0x1d]
push ebp
mov ebp, dword [esp + 0x44]
mov byte [esp + 0xe], al
mov al, byte [esp + 0x20]
push edi
mov edi, dword [esp + 0x50]
mov dword [esp + 0x20], 0
mov byte [esp + 0x11], al
nop dword [eax]
movups xmm0, xmmword [esp + 0x24]
lea edx, [esp + 0x34]
push esi
mov ecx, edx
movups xmmword [esp + 0x38], xmm0
call fcn.004169b0
mov cl, byte [esp + 0x16]
add esp, 4
mov dl, byte [esp + 0x11]
mov al, cl
shr al, 7
add dl, dl
or dl, al
add cl, cl
mov byte [esp + 0x11], dl
mov byte [esp + 0x24], dl
mov dl, byte [esp + 0x13]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [esp + 0x12], cl
mov byte [esp + 0x25], cl
mov cl, byte [esp + 0x14]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [esp + 0x13], dl
mov byte [esp + 0x26], dl
mov dl, byte [esp + 0x15]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [esp + 0x14], cl
mov byte [esp + 0x27], cl
mov cl, byte [esp + 0x16]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [esp + 0x15], dl
mov byte [esp + 0x28], dl
mov dl, byte [esp + 0x17]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [esp + 0x16], cl
mov byte [esp + 0x29], cl
mov cl, byte [esp + 0x18]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [esp + 0x17], dl
mov byte [esp + 0x2a], dl
mov dl, byte [esp + 0x19]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [esp + 0x18], cl
mov byte [esp + 0x2b], cl
mov cl, byte [esp + 0x1a]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [esp + 0x19], dl
mov byte [esp + 0x2c], dl
mov dl, byte [esp + 0x1b]
mov al, dl
shr al, 7
or cl, al
mov byte [esp + 0x1a], cl
mov byte [esp + 0x2d], cl
mov cl, byte [esp + 0x1c]
mov al, cl
shr al, 7
add dl, dl
add cl, cl
or dl, al
mov byte [esp + 0x1b], dl
mov byte [esp + 0x2e], dl
mov dl, byte [esp + 0x1d]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [esp + 0x1c], cl
mov byte [esp + 0x2f], cl
mov cl, byte [esp + 0x1e]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov al, bl
shr al, 7
add bl, bl
or cl, al
mov byte [esp + 0x1d], dl
mov al, bh
mov byte [esp + 0x30], dl
shr al, 7
add bh, bh
or bl, al
mov byte [esp + 0x1e], cl
mov eax, dword [esp + 0x20]
mov edx, eax
mov byte [esp + 0x1f], bl
mov byte [esp + 0x32], bl
mov bl, al
shr edx, 3
and bl, 7
mov byte [esp + 0x31], cl
mov cl, 7
sub cl, bl
movzx eax, byte [edx + ebp]
shr al, cl
mov cl, bl
mov bl, byte [esp + 0x1f]
and al, 1
or bh, al
movzx eax, byte [esp + 0x34]
and al, 0x80
mov byte [esp + 0x33], bh
shr al, cl
xor byte [edx + edi], al
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, 0x80
jl 0x417930
pop edi
pop ebp
pop ebx
mov eax, 0x80
pop esi
add esp, 0x34
ret
mov ecx, dword [esp + 0x3c]
lea eax, [edx + 0x2a]
push eax
lea edx, [esp + 0x2c]
call fcn.00416da0
mov eax, dword [esi + 1]
add esp, 4
xor eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x44]
mov dword [ecx], eax
mov eax, dword [esi + 5]
xor eax, dword [esp + 0x2c]
mov dword [ecx + 4], eax
mov eax, dword [esi + 9]
xor eax, dword [esp + 0x30]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0xd]
xor eax, dword [esp + 0x34]
mov dword [ecx + 0xc], eax
mov eax, 0x80
pop esi
add esp, 0x34
ret
mov ecx, dword [esp + 0x3c]
lea eax, [edx + 0x2a]
mov edx, dword [esp + 0x44]
push eax
call fcn.00416da0
add esp, 4
mov eax, 0x80
pop esi
add esp, 0x34
ret
mov eax, 0xfffffffb
pop esi
add esp, 0x34
ret