Function at 0x10118790
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 1], dl
mov ecx, dword [edi + 8]
mov eax, ecx
cdq
mov ebx, eax
shr ecx, 0x1f
xor ebx, edx
mov dword [ebp - 0x18], ecx
sub ebx, edx
mov dword [ebp - 0x10], ebx
test ecx, ecx
je 0x101187dd
push ebx
call sym.python310.dll__PyLong_New
mov esi, eax
add esp, 4
test esi, esi
je 0x101188d7
push ebx
lea edx, [edi + 0xc]
lea ecx, [esi + 0xc]
call fcn.10118740
add esp, 4
mov edi, esi
jmp 0x101187df
inc dword [edi]
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 8]
mov dword [ebp - 8], eax
cdq
mov esi, eax
mov eax, dword [ebp - 8]
xor esi, edx
shr eax, 0x1f
sub esi, edx
mov dword [ebp - 8], eax
test eax, eax
je 0x10118844
push esi
call sym.python310.dll__PyLong_New
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x1011882a
add dword [edi], 0xffffffff
jne 0x101188d7
mov eax, dword [edi + 4]
push edi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
lea edx, [ebx + 0xc]
lea ecx, [eax + 0xc]
call fcn.10118740
mov ebx, dword [ebp - 0x14]
add esp, 4
mov eax, dword [ebp - 8]
mov dword [ebp + 8], ebx
jmp 0x10118846
inc dword [ebx]
mov edx, dword [ebp - 0x10]
mov ecx, edx
cmp edx, esi
jge 0x10118863
mov eax, dword [ebp - 0x18]
mov ecx, esi
mov dword [ebp + 8], edi
mov esi, edx
mov edi, ebx
mov ebx, dword [ebp - 8]
mov dword [ebp - 8], eax
jmp 0x10118866
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 1]
cmp dl, 0x26
je 0x10118888
cmp dl, 0x5e
mov edx, eax
je 0x10118881
or edx, ebx
test eax, eax
cmovne ecx, esi
mov dword [ebp - 0x14], ecx
jmp 0x1011889a
xor edx, ebx
mov dword [ebp - 0x14], ecx
jmp 0x1011889a
mov edx, eax
mov eax, esi
and edx, ebx
cmp dword [ebp - 8], 0
cmovne eax, ecx
mov ecx, eax
mov dword [ebp - 0x14], eax
lea eax, [edx + ecx]
mov dword [ebp - 0x18], edx
push eax
call sym.python310.dll__PyLong_New
mov ebx, eax
add esp, 4
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x101188e0
add dword [edi], 0xffffffff
jne 0x101188c3
mov eax, dword [edi + 4]
push edi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
mov ecx, dword [ebp + 8]
add dword [ecx], 0xffffffff
jne 0x101188d7
mov eax, dword [ecx + 4]
push ecx
mov eax, dword [eax + 0x18]
call eax
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 1]
xor edx, edx
cmp al, 0x26
je 0x101189ab
cmp al, 0x5e
je 0x1011892f
test esi, esi
jle 0x101189eb
mov ecx, dword [ebp + 8]
mov eax, edi
sub eax, ecx
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], eax
mov eax, ebx
sub eax, ecx
lea edx, [ecx + 0xc]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 8]
mov ebx, eax
mov ax, word [ecx + edx]
lea edx, [edx + 2]
or ax, word [edx - 2]
mov word [ebx + edx - 2], ax
sub esi, 1
jne 0x10118915
jmp 0x101189e5
mov dword [ebp - 0xc], edx
test esi, esi
jle 0x1011896b
mov eax, dword [ebp + 8]
mov edx, edi
sub edx, eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x1c], edx
mov edx, ebx
mov ebx, dword [ebp - 0x1c]
sub edx, eax
lea ecx, [eax + 0xc]
mov dword [ebp - 0x20], edx
mov ax, word [ecx + ebx]
lea ecx, [ecx + 2]
xor ax, word [ecx - 2]
mov word [ecx + edx - 2], ax
sub esi, 1
jne 0x10118950
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
cmp dword [ebp - 8], 0
je 0x101189eb
mov esi, dword [ebp - 0x14]
cmp edx, esi
jge 0x10118a0f
add edx, 6
mov eax, edi
sub eax, ebx
mov dword [ebp - 0x20], eax
lea ecx, [ebx + edx*2]
mov edx, esi
sub edx, dword [ebp - 0xc]
mov ebx, eax
mov eax, 0x7fff
lea ecx, [ecx + 2]
xor ax, word [ebx + ecx - 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x10118990
mov ebx, dword [ebp - 0x10]
jmp 0x10118a0f
test esi, esi
jle 0x101189eb
mov eax, dword [ebp + 8]
mov edx, edi
sub edx, eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x20], edx
mov edx, ebx
mov ebx, dword [ebp - 0x20]
sub edx, eax
lea ecx, [eax + 0xc]
mov dword [ebp - 0x1c], edx
nop dword [eax]
mov ax, word [ecx + ebx]
lea ecx, [ecx + 2]
and ax, word [ecx - 2]
mov word [ecx + edx - 2], ax
sub esi, 1
jne 0x101189d0
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
cmp edx, esi
jge 0x10118a0f
mov eax, esi
sub eax, edx
add eax, eax
push eax
lea eax, [edx + 6]
add edx, 6
lea eax, [edi + eax*2]
push eax
lea eax, [ebx + edx*2]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x18], 0
je 0x10118a38
mov eax, dword [ebx + 8]
lea ecx, [ebx + 0xc]
neg eax
mov edx, ecx
mov dword [ebx + 8], eax
mov eax, 0x7fff
mov word [ebx + esi*2 + 0xc], ax
lea eax, [esi + 1]
push eax
call fcn.10118740
add esp, 4
add dword [edi], 0xffffffff
jne 0x10118a49
mov eax, dword [edi + 4]
push edi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
mov ecx, dword [ebp + 8]
add dword [ecx], 0xffffffff
jne 0x10118a5d
mov eax, dword [ecx + 4]
push ecx
mov eax, dword [eax + 0x18]
call eax
add esp, 4
mov edi, dword [ebx + 8]
mov eax, edi
cdq
xor eax, edx
sub eax, edx
mov ecx, eax
test ecx, ecx
jle 0x10118a93
lea edx, [ecx + 5]
lea edx, [ebx + edx*2]
cmp word [edx], 0
jne 0x10118a81
dec ecx
sub edx, 2
test ecx, ecx
jg 0x10118a73
cmp ecx, eax
je 0x10118a93
mov esi, ecx
neg esi
test edi, edi
cmovns esi, ecx
mov dword [ebx + 8], esi
jmp 0x10118a95
mov esi, edi
mov eax, esi
cdq
xor eax, edx
sub eax, edx
cmp eax, 1
jg 0x10118af4
test esi, esi
jns 0x10118ab1
mov ax, word [ebx + 0xc]
neg ax
movzx esi, ax
jmp 0x10118abb
jne 0x10118ab7
xor esi, esi
jmp 0x10118acf
movzx esi, word [ebx + 0xc]
mov eax, 0xfffffffb
cmp ax, si
jg 0x10118af4
mov eax, 0x101
cmp si, ax
jge 0x10118af4
add dword [ebx], 0xffffffff
jne 0x10118ae0
mov eax, dword [ebx + 4]
push ebx
mov eax, dword [eax + 0x18]
call eax
add esp, 4
mov eax, dword [0x103fb118]
movsx ecx, si
mov eax, dword [eax + 8]
mov ebx, dword [eax + ecx*4 + 0x74c]
inc dword [ebx]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret