Function at 0x1000a500
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov ebx, ecx
mov edi, edx
mov dword [ebp - 4], edi
test ebx, ebx
je 0x1000a7de
test edi, edi
je 0x1000a7de
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x1000a523
sub edx, ecx
mov ecx, 0
mov esi, ecx
je 0x1000a54d
movsx eax, byte [esi + edi]
inc esi
add eax, ecx
imul ecx, eax, 0x401
mov eax, ecx
shr eax, 6
xor ecx, eax
cmp esi, edx
jb 0x1000a535
lea ecx, [ecx + ecx*8]
mov eax, ecx
shr eax, 0xb
xor eax, ecx
imul edx, eax, 0x8001
mov eax, dword [ebx]
mov dword [ebp - 0x14], edx
test eax, eax
je 0x1000a5c8
xor esi, esi
cmp dword [ebx + 4], esi
jbe 0x1000a5c8
mov eax, dword [ebx + 0xc]
lea edi, [esi*4]
mov eax, dword [edi + eax]
test eax, eax
je 0x1000a5c0
mov ecx, dword [ebx + 0x10]
cmp edx, dword [edi + ecx]
jne 0x1000a5c0
mov ecx, dword [ebp - 4]
nop dword [eax]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x1000a5b0
test dl, dl
je 0x1000a5ac
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x1000a5b0
add ecx, 2
add eax, 2
test dl, dl
jne 0x1000a590
xor eax, eax
jmp 0x1000a5b5
sbb eax, eax
or eax, 1
test eax, eax
je 0x1000a748
mov edx, dword [ebp - 0x14]
inc esi
cmp esi, dword [ebx + 4]
jb 0x1000a56d
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
cmp eax, edx
jne 0x1000a6a4
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
xor ecx, ecx
mov eax, edx
mov edi, 2
mul edi
push 4
seto cl
neg ecx
or ecx, eax
push ecx
call esi
mov dword [ebp - 8], eax
xor ecx, ecx
mov eax, dword [ebx + 4]
mul edi
push 4
seto cl
neg ecx
or ecx, eax
push ecx
call esi
mov edi, eax
xor ecx, ecx
mov eax, dword [ebx + 4]
mov edx, 2
mul edx
push 4
mov dword [ebp - 0xc], edi
seto cl
neg ecx
or ecx, eax
push ecx
call esi
mov ecx, dword [ebp - 8]
mov esi, eax
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0x18
mov dword [ebp - 0x10], esi
test ecx, ecx
je 0x1000a7c6
test edi, edi
je 0x1000a7bb
test esi, esi
je 0x1000a7bb
mov esi, dword [ebx + 4]
mov edi, dword [ebx + 8]
shl esi, 2
push esi
push edi
push ecx
call sub.VCRUNTIME140.dll_memcpy
push esi
push dword [ebx + 0xc]
push dword [ebp - 0xc]
call sub.VCRUNTIME140.dll_memcpy
push esi
push dword [ebx + 0x10]
push dword [ebp - 0x10]
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push edi
call esi
push dword [ebx + 0xc]
call esi
push dword [ebx + 0x10]
call esi
mov eax, dword [ebp - 8]
add esp, 0x30
mov edx, dword [ebx + 4]
mov dword [ebx + 8], eax
add edx, edx
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [ebx + 4], edx
mov dword [ebx + 0x10], eax
mov esi, dword [ebx]
mov ecx, dword [ebx + 0xc]
cmp dword [ecx + esi*4], 0
je 0x1000a6c0
nop
lea eax, [esi + 1]
xor esi, esi
cmp eax, edx
cmovne esi, eax
cmp dword [ecx + esi*4], 0
jne 0x1000a6b0
mov ecx, dword [ebp - 4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1000a6c6
sub ecx, edx
lea eax, [ecx + 1]
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x1000a6f4
push dword [ebp - 0x10]
push dword [ebp - 4]
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebx + 0xc]
lea ecx, [esi*4]
mov dword [ebp - 0xc], ecx
mov dword [ecx + eax], edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x1000a7e8
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1000a714
sub ecx, edx
lea eax, [ecx + 1]
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x1000a740
push dword [ebp - 0x10]
push edi
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0xc]
jmp 0x1000a7ea
mov eax, dword [ebx + 8]
mov ecx, dword [eax + edi]
test ecx, ecx
je 0x1000a75f
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebx + 8]
add esp, 4
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x1000a7ad
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1000a770
sub ecx, edx
lea eax, [ecx + 1]
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x1000a79e
push dword [ebp - 0x14]
push dword [ebp + 8]
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebx + 8]
mov dword [edi + eax], esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
mov dword [edi + eax], esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
call eax
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
test edi, edi
je 0x1000a7d0
push edi
call eax
add esp, 4
test esi, esi
je 0x1000a7de
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
mov eax, dword [ebx + 8]
mov edx, dword [ebp - 0x14]
pop edi
mov dword [ecx + eax], esi
mov eax, dword [ebx + 0x10]
pop esi
mov dword [ecx + eax], edx
inc dword [ebx]
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret