Function at 0x10097240
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x1029912c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
mov dword [ebp - 0x58], edx
push ebx
push esi
mov dword [ebp - 0x60], eax
mov esi, edx
movzx eax, byte [eax + edx - 1]
mov ecx, edx
sub ecx, eax
xor edx, edx
push edi
mov edi, dword [ebp + 8]
dec ecx
sub esi, edi
mov dword [ebp - 0x5c], ecx
sub esi, 0x100
mov dword [ebp - 0x48], edx
mov eax, esi
sub ecx, edi
shr eax, 0x1f
lea edx, [edi - 1]
dec eax
mov dword [ebp - 0x68], edx
and esi, eax
xor bl, bl
mov eax, ecx
mov byte [ebp - 0x49], bl
shr eax, 0x1f
dec eax
mov dword [ebp - 0x50], esi
and ecx, eax
mov eax, edx
and eax, edi
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x64], eax
jne 0x100972b3
mov eax, edi
sub eax, esi
add eax, ecx
and eax, edx
mov dword [ebp - 0x48], eax
jmp 0x100972d5
cmp edi, 0x14
jne 0x100972c2
mov eax, ecx
mov ecx, edi
sub eax, esi
add eax, edi
jmp 0x100972cf
cmp edi, 0x30
jne 0x100972d5
mov eax, ecx
mov ecx, edi
sub eax, esi
add eax, edi
cdq
idiv ecx
mov dword [ebp - 0x48], edx
push edi
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.101ee530
mov edx, dword [ebp - 0x58]
add esp, 0xc
cmp esi, edx
jge 0x10097351
lea eax, [ebp - 0x44]
mov ebx, esi
sub ebx, eax
sub eax, dword [ebp - 0x54]
mov dword [ebp - 0x54], eax
xor eax, eax
test edi, edi
jle 0x10097343
nop
lea ecx, [ebp - 0x44]
add ecx, eax
add ecx, ebx
cmp ecx, edx
jge 0x10097340
mov edx, dword [ebp - 0x5c]
lea esi, [ebp - 0x44]
mov ecx, dword [ebp - 0x54]
sub edx, eax
sub edx, dword [ebp - 0x50]
add ecx, ebx
add ecx, eax
dec edx
shr edx, 0x1f
shr ecx, 0x1f
dec dl
dec cl
and dl, cl
lea ecx, [ebp - 0x44]
add ecx, dword [ebp - 0x60]
add ecx, ebx
and dl, byte [ecx + eax]
or byte [esi + eax], dl
inc eax
mov edx, dword [ebp - 0x58]
cmp eax, edi
jl 0x10097300
mov esi, dword [ebp - 0x50]
add esi, edi
add ebx, edi
mov dword [ebp - 0x50], esi
cmp esi, edx
jl 0x100972f8
mov bl, byte [ebp - 0x49]
cmp dword [ebp - 0x64], 0
jne 0x10097398
test edi, edi
jle 0x10097406
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp + 0xc]
sub ecx, eax
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x48], ecx
nop dword [eax]
add ecx, eax
and ecx, edx
mov cl, byte [ebp + ecx - 0x44]
xor cl, byte [eax]
inc eax
or bl, cl
mov ecx, dword [ebp - 0x48]
sub edi, 1
jne 0x10097370
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101d506b
mov esp, ebp
pop ebp
ret
cmp edi, 0x14
jne 0x100973d9
mov eax, dword [ebp - 0x48]
mov esi, edi
mov ecx, dword [ebp + 0xc]
sub eax, ecx
mov dword [ebp - 0x48], eax
nop word [eax + eax]
add eax, ecx
cdq
idiv edi
mov al, byte [ebp + edx - 0x44]
xor al, byte [ecx]
inc ecx
or bl, al
mov eax, dword [ebp - 0x48]
sub esi, 1
jne 0x100973b0
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101d506b
mov esp, ebp
pop ebp
ret
cmp edi, 0x30
jne 0x10097406
mov eax, dword [ebp - 0x48]
mov esi, edi
mov ecx, dword [ebp + 0xc]
sub eax, ecx
mov dword [ebp - 0x48], eax
nop dword [eax + eax]
add eax, ecx
cdq
idiv edi
mov al, byte [ebp + edx - 0x44]
xor al, byte [ecx]
inc ecx
or bl, al
mov eax, dword [ebp - 0x48]
sub esi, 1
jne 0x100973f0
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.101d506b
mov esp, ebp
pop ebp
ret