Function at 0x4102d0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x10]
sub esp, 0x40
shl eax, 3
push ebx
push ebp
push esi
mov esi, dword [esp + 0x50]
push edi
test esi, esi
je 0x41068e
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x41068e
mov bl, byte [esi]
cmp bl, 3
je 0x410306
cmp byte [ecx], 0
je 0x41068e
cdq
and edx, 0x7f
lea edi, [edx + eax]
movzx eax, bl
sar edi, 7
mov dword [esp + 0x24], edi
dec eax
je 0x41065c
dec eax
je 0x4105bc
dec eax
jne 0x41068e
mov eax, dword [esi + 1]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 5]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 9]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0xd]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x28], edi
test edi, edi
jle 0x410687
mov al, byte [esp + 0x3f]
add ecx, 0x2a
mov byte [esp + 0x1f], al
mov al, byte [esp + 0x3e]
mov byte [esp + 0x1e], al
mov al, byte [esp + 0x3d]
mov byte [esp + 0x1d], al
mov al, byte [esp + 0x3c]
mov byte [esp + 0x1c], al
mov al, byte [esp + 0x3b]
mov byte [esp + 0x1b], al
mov al, byte [esp + 0x3a]
mov byte [esp + 0x1a], al
mov al, byte [esp + 0x39]
mov byte [esp + 0x19], al
mov al, byte [esp + 0x38]
mov edi, dword [esp + 0x64]
mov byte [esp + 0x18], al
mov al, byte [esp + 0x37]
mov byte [esp + 0x17], al
mov al, byte [esp + 0x36]
mov byte [esp + 0x16], al
mov al, byte [esp + 0x35]
mov byte [esp + 0x15], al
mov al, byte [esp + 0x34]
mov byte [esp + 0x14], al
mov al, byte [esp + 0x33]
mov byte [esp + 0x13], al
mov al, byte [esp + 0x32]
mov byte [esp + 0x12], al
mov al, byte [esp + 0x31]
mov byte [esp + 0x54], al
mov al, byte [esp + 0x30]
mov dword [esp + 0x2c], ecx
mov byte [esp + 0x60], al
mov ebp, dword [esp + 0x2c]
xor ebx, ebx
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x30]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x40]
push ebp
push eax
push eax
call fcn.00410f19
mov dl, byte [esp + 0x60]
add esp, 0xc
mov cl, byte [esp + 0x60]
mov al, dl
shr al, 7
add cl, cl
or cl, al
add dl, dl
mov byte [esp + 0x60], cl
mov byte [esp + 0x30], cl
mov cl, byte [esp + 0x12]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [esp + 0x54], dl
mov byte [esp + 0x31], 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 + 0x32], 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 + 0x33], 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 + 0x34], 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 + 0x35], 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 + 0x36], 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 + 0x37], dl
mov dl, byte [esp + 0x19]
mov al, dl
shr al, 7
or cl, al
mov byte [esp + 0x18], cl
mov byte [esp + 0x38], cl
mov cl, byte [esp + 0x1a]
mov al, cl
shr al, 7
add dl, dl
mov ch, byte [esp + 0x1f]
or dl, al
add cl, cl
mov byte [esp + 0x19], dl
and bl, 7
mov byte [esp + 0x39], dl
mov dl, byte [esp + 0x1b]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [esp + 0x1a], cl
mov byte [esp + 0x3a], cl
mov cl, byte [esp + 0x1c]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [esp + 0x1b], dl
mov byte [esp + 0x3b], 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 + 0x3c], cl
mov cl, byte [esp + 0x1e]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov al, ch
shr al, 7
add ch, ch
or cl, al
mov byte [esp + 0x1d], dl
mov eax, dword [esp + 0x20]
mov byte [esp + 0x3d], dl
cdq
and edx, 7
mov byte [esp + 0x1e], cl
mov byte [esp + 0x3e], cl
mov cl, 7
sub cl, bl
lea esi, [edx + eax]
mov eax, dword [esp + 0x5c]
sar esi, 3
mov dl, byte [esi + eax]
mov al, byte [esp + 0x40]
shr dl, cl
and al, 0x80
mov cl, bl
and dl, 1
mov ebx, dword [esp + 0x20]
or ch, dl
shr al, cl
xor byte [esi + edi], al
inc ebx
mov byte [esp + 0x1f], ch
mov byte [esp + 0x3f], ch
mov dword [esp + 0x20], ebx
cmp ebx, 0x80
jl 0x4103e9
mov ebp, dword [esp + 0x28]
dec ebp
mov dword [esp + 0x28], ebp
test ebp, ebp
jg 0x4103df
jmp 0x410683
mov ebp, dword [esp + 0x5c]
lea eax, [ecx + 0x2a]
push eax
mov dword [esp + 0x58], eax
lea eax, [esp + 0x44]
push eax
push ebp
call fcn.00410b73
mov eax, dword [esi + 1]
add esp, 0xc
xor eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x64]
mov dword [ecx], eax
mov eax, dword [esi + 5]
xor eax, dword [esp + 0x44]
mov dword [ecx + 4], eax
mov eax, dword [esi + 9]
xor eax, dword [esp + 0x48]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0xd]
xor eax, dword [esp + 0x4c]
mov dword [ecx + 0xc], eax
lea eax, [edi - 1]
test eax, eax
jle 0x410687
lea ebx, [ebp - 0xc]
mov edi, eax
lea esi, [ecx + 0x14]
sub ebp, ecx
push dword [esp + 0x54]
lea eax, [esp + 0x44]
push eax
lea eax, [ebp - 0x14]
add eax, esi
push eax
call fcn.00410b73
mov eax, dword [ebx - 4]
add esp, 0xc
xor eax, dword [esp + 0x40]
mov dword [esi - 4], eax
mov eax, dword [ebx]
lea ebx, [ebx + 0x10]
xor eax, dword [esp + 0x44]
mov dword [esi], eax
mov eax, dword [ebx - 0xc]
xor eax, dword [esp + 0x48]
mov dword [esi + 4], eax
mov eax, dword [ebx - 8]
xor eax, dword [esp + 0x4c]
mov dword [esi + 8], eax
add esi, 0x10
dec edi
test edi, edi
jg 0x410612
jmp 0x410683
mov esi, edi
test edi, edi
jle 0x410687
mov ebx, dword [esp + 0x64]
lea edi, [ecx + 0x2a]
mov ebp, dword [esp + 0x5c]
push edi
push ebx
push ebp
call fcn.00410b73
add esp, 0xc
add ebp, 0x10
add ebx, 0x10
dec esi
test esi, esi
jg 0x41066d
mov edi, dword [esp + 0x24]
shl edi, 7
mov eax, edi
jmp 0x410691
push 0xfffffffffffffffb
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret