Function at 0x10097319
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
test ecx, ecx
je 0x100976a3
mov edi, dword [esp + 0x54]
test edi, edi
je 0x100976a3
cmp byte [edi], 1
je 0x100976a3
mov eax, dword [esp + 0x5c]
shl eax, 3
cdq
and edx, 0x7f
lea esi, [edx + eax]
movzx eax, byte [ecx]
sar esi, 7
mov dword [esp + 0x24], esi
sub eax, 1
je 0x1009766f
sub eax, 1
je 0x100975e7
sub eax, 1
jne 0x100976a3
mov eax, dword [ecx + 1]
mov ebp, esi
mov dword [esp + 0x2c], eax
mov eax, dword [ecx + 5]
mov dword [esp + 0x30], eax
mov eax, dword [ecx + 9]
mov dword [esp + 0x34], eax
mov eax, dword [ecx + 0xd]
mov dword [esp + 0x38], eax
test esi, esi
jle 0x1009769c
mov al, byte [esp + 0x3b]
lea esi, [edi + 0x30]
mov byte [esp + 0x1f], al
mov al, byte [esp + 0x3a]
mov byte [esp + 0x1e], al
mov al, byte [esp + 0x39]
mov byte [esp + 0x1d], al
mov al, byte [esp + 0x38]
mov byte [esp + 0x1c], al
mov al, byte [esp + 0x37]
mov byte [esp + 0x1b], al
mov al, byte [esp + 0x36]
mov byte [esp + 0x1a], al
mov al, byte [esp + 0x35]
mov byte [esp + 0x19], al
mov al, byte [esp + 0x34]
mov edi, dword [esp + 0x60]
mov byte [esp + 0x18], al
mov al, byte [esp + 0x33]
mov byte [esp + 0x17], al
mov al, byte [esp + 0x32]
mov byte [esp + 0x16], al
mov al, byte [esp + 0x31]
mov byte [esp + 0x15], al
mov al, byte [esp + 0x30]
mov byte [esp + 0x14], al
mov al, byte [esp + 0x2f]
mov byte [esp + 0x13], al
mov al, byte [esp + 0x2e]
mov byte [esp + 0x12], al
mov al, byte [esp + 0x2d]
mov byte [esp + 0x5c], al
mov al, byte [esp + 0x2c]
mov byte [esp + 0x50], al
xor ebx, ebx
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], eax
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
lea eax, [esp + 0x3c]
push esi
push eax
push eax
call fcn.1009668c
mov edx, dword [esp + 0x2c]
and bl, 7
mov al, byte [esp + 0x48]
mov cl, bl
mov ah, byte [esp + 0x68]
and al, 0x80
shr al, cl
add esp, 0xc
mov cl, byte [esp + 0x50]
add cl, cl
shr edx, 3
xor byte [edx + edi], al
mov al, ah
shr al, 7
add ah, ah
or cl, al
mov dl, byte [edx + edi]
mov byte [esp + 0x50], cl
mov byte [esp + 0x2c], cl
mov cl, byte [esp + 0x12]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov byte [esp + 0x5c], ah
mov byte [esp + 0x2d], ah
mov ah, byte [esp + 0x13]
mov al, ah
add ah, ah
shr al, 7
or cl, al
mov byte [esp + 0x12], cl
mov byte [esp + 0x2e], cl
mov cl, byte [esp + 0x14]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov byte [esp + 0x13], ah
mov byte [esp + 0x2f], ah
mov ah, byte [esp + 0x15]
mov al, ah
add ah, ah
shr al, 7
or cl, al
mov byte [esp + 0x14], cl
mov byte [esp + 0x30], cl
mov cl, byte [esp + 0x16]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov byte [esp + 0x15], ah
mov byte [esp + 0x31], ah
mov ah, byte [esp + 0x17]
mov al, ah
add ah, ah
shr al, 7
or cl, al
mov byte [esp + 0x16], cl
mov byte [esp + 0x32], cl
mov cl, byte [esp + 0x18]
mov al, cl
shr al, 7
or ah, al
mov byte [esp + 0x17], ah
mov byte [esp + 0x33], ah
mov ah, byte [esp + 0x19]
mov al, ah
mov dh, byte [esp + 0x1d]
shr al, 7
add cl, cl
or cl, al
mov ch, byte [esp + 0x1e]
mov byte [esp + 0x18], cl
add ah, ah
mov byte [esp + 0x34], cl
mov cl, byte [esp + 0x1a]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov byte [esp + 0x19], ah
mov byte [esp + 0x35], ah
mov ah, byte [esp + 0x1b]
mov al, ah
add ah, ah
shr al, 7
or cl, al
mov byte [esp + 0x1a], cl
mov byte [esp + 0x36], cl
mov cl, byte [esp + 0x1c]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov al, dh
shr al, 7
add dh, dh
or cl, al
mov byte [esp + 0x1b], ah
mov al, ch
mov byte [esp + 0x1c], cl
shr al, 7
add ch, ch
mov byte [esp + 0x38], cl
or dh, al
mov byte [esp + 0x37], ah
mov cl, 7
mov ah, byte [esp + 0x1f]
sub cl, bl
mov ebx, dword [esp + 0x20]
mov al, ah
shr dl, cl
add ah, ah
shr al, 7
and dl, 1
or ch, al
mov byte [esp + 0x1d], dh
or ah, dl
mov byte [esp + 0x39], dh
inc ebx
mov byte [esp + 0x1e], ch
mov byte [esp + 0x3a], ch
mov byte [esp + 0x1f], ah
mov byte [esp + 0x3b], ah
mov dword [esp + 0x20], ebx
cmp ebx, 0x80
jl 0x10097427
dec ebp
test ebp, ebp
jg 0x10097421
jmp 0x10097698
mov eax, dword [ecx + 9]
mov ebx, dword [ecx + 1]
mov ebp, dword [ecx + 5]
mov ecx, dword [ecx + 0xd]
mov dword [esp + 0x20], eax
mov dword [esp + 0x5c], esi
test esi, esi
jle 0x1009769c
mov edx, dword [esp + 0x60]
lea eax, [edi + 0x30]
mov edi, dword [esp + 0x58]
mov esi, dword [esp + 0x20]
add edi, 8
mov dword [esp + 0x28], eax
mov dword [esp + 0x50], edx
push dword [esp + 0x28]
xor ecx, dword [edi + 4]
lea eax, [esp + 0x40]
xor ebx, dword [edi - 8]
xor ebp, dword [edi - 4]
xor esi, dword [edi]
push edx
push eax
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], esi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x54], ecx
call fcn.1009668c
mov edx, dword [esp + 0x5c]
lea edi, [edi + 0x10]
mov eax, dword [esp + 0x68]
add edx, 0x10
mov ecx, dword [esp + 0x2c]
add esp, 0xc
dec eax
mov dword [esp + 0x50], edx
mov dword [esp + 0x5c], eax
test eax, eax
jg 0x1009761d
jmp 0x10097698
mov ebx, esi
test esi, esi
jle 0x1009769c
mov ebp, dword [esp + 0x58]
lea esi, [edi + 0x30]
mov edi, dword [esp + 0x60]
sub ebp, edi
push esi
lea eax, [edi + ebp]
push edi
push eax
call fcn.1009668c
add esp, 0xc
add edi, 0x10
dec ebx
test ebx, ebx
jg 0x10097682
mov esi, dword [esp + 0x24]
shl esi, 7
mov eax, esi
jmp 0x100976a6
push 0xfffffffffffffffb
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret