Function at 0x10035300
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
cmp ebx, dword [esi + 0x1c]
push edi
jle 0x10035350
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x10035323
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
lea eax, [ebx*8]
push eax
mov dword [esi + 0x1c], ebx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
mov dword [esi + 0x2c], eax
jne 0x10035350
mov eax, dword [ebp + 8]
pop edi
mov ecx, 5
pop esi
mov dword [eax], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
test ebx, ebx
mov dword [esi + 0x14], 0
jle 0x1003537a
mov eax, dword [esi + 0x30]
add eax, 0xc
mov edx, ebx
mov ecx, dword [eax]
mov edi, 1
shl edi, cl
mov ecx, dword [esi + 0x14]
add eax, 0x14
add ecx, edi
dec edx
mov dword [esi + 0x14], ecx
jne 0x10035363
mov ecx, dword [esi + 0x14]
cmp ecx, dword [esi + 0x18]
jle 0x100353d3
mov eax, dword [esi + 0x28]
test eax, eax
je 0x10035392
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esi + 0x14]
lea edx, [eax + eax]
push edx
mov dword [esi + 0x18], eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
mov dword [esi + 0x28], eax
je 0x1003533d
mov ecx, dword [esi + 0x18]
xor eax, eax
test ecx, ecx
jle 0x100353d3
mov ecx, dword [esi + 0x28]
or word [ecx + eax*2], 0xfff
mov edx, dword [esi + 0x28]
and byte [edx + eax*2 + 1], 0xf
lea ecx, [ecx + eax*2]
lea ecx, [edx + eax*2]
mov ecx, dword [esi + 0x18]
inc eax
cmp eax, ecx
jl 0x100353b4
xor edi, edi
xor eax, eax
cmp ebx, edi
mov dword [esi + 0x14], edi
jle 0x1003541c
mov edx, dword [esi + 0x30]
mov edx, dword [edi + edx + 0xc]
mov ecx, dword [esi + 0x2c]
mov dword [ecx + eax*8], edx
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x28]
lea ecx, [edx + ecx*2]
mov edx, dword [esi + 0x2c]
mov dword [edx + eax*8 + 4], ecx
mov edx, dword [esi + 0x30]
mov ecx, dword [edi + edx + 0xc]
mov ebx, 1
shl ebx, cl
mov ecx, dword [esi + 0x14]
add edi, 0x14
add ecx, ebx
mov ebx, dword [ebp + 0xc]
inc eax
cmp eax, ebx
mov dword [esi + 0x14], ecx
jl 0x100353e1
xor edi, edi
test ebx, ebx
jle 0x100354a6
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x10035430
mov ecx, dword [esi + 0x30]
lea edx, [eax + ecx]
mov ecx, dword [edx + 4]
cmp ecx, dword [edx + 8]
jge 0x1003548e
lea edx, [ecx + ecx*4]
shl edx, 2
mov eax, dword [esi + 0x30]
mov eax, dword [edx + eax]
mov ebx, dword [esi + 0x2c]
mov ebx, dword [ebx + edi*8 + 4]
lea eax, [ebx + eax*2]
xor ebx, ebx
mov bx, word [eax]
xor bx, cx
add edx, 0x14
and ebx, 0xfff
xor word [eax], bx
mov eax, dword [esi + 0x30]
mov eax, dword [edx + eax - 0x14]
mov ebx, dword [esi + 0x2c]
mov ebx, dword [ebx + edi*8 + 4]
and byte [ebx + eax*2 + 1], 0xf
lea eax, [ebx + eax*2]
mov ebx, dword [esi + 0x30]
mov eax, dword [ebp - 4]
inc ecx
cmp ecx, dword [eax + ebx + 8]
jl 0x10035444
mov ebx, dword [ebp + 0xc]
mov ecx, dword [esi + 0x30]
cmp dword [eax + ecx + 8], 0x1000
jae 0x100354b8
inc edi
add eax, 0x14
cmp edi, ebx
mov dword [ebp - 4], eax
jl 0x10035430
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword [eax], 0
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
pop edi
mov ecx, 7
pop esi
mov dword [eax], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8