Function at 0x10146430
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov dword [esp + 0x14], edx
mov edx, dword [ebp + 8]
mov ebx, edx
mov edi, edx
mov dword [esp + 0x10], ecx
shr edi, 5
mov esi, edx
inc edi
cmp edx, edi
jb 0x1014647e
mov edx, dword [esp + 0x14]
nop dword [eax]
movzx ecx, byte [edx + esi - 1]
mov eax, ebx
shl eax, 5
sub esi, edi
add ecx, eax
mov eax, ebx
shr eax, 2
add ecx, eax
xor ebx, ecx
cmp esi, edi
jae 0x10146460
mov edx, dword [ebp + 8]
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0x10]
mov dword [esp + 0x18], eax
mov ecx, dword [eax + 8]
mov eax, dword [eax]
dec ecx
and ecx, ebx
mov edi, dword [eax + ecx*4]
test edi, edi
je 0x1014650a
cmp byte [edi + 4], 4
jne 0x10146500
cmp dword [edi + 0xc], edx
jne 0x10146500
mov esi, dword [ebp + 8]
lea eax, [edi + 0x10]
mov edx, dword [esp + 0x14]
sub esi, 4
jb 0x101464c3
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x101464cc
add edx, 4
add eax, 4
sub esi, 4
jae 0x101464b2
cmp esi, 0xfffffffc
je 0x10146564
mov cl, byte [edx]
cmp cl, byte [eax]
jne 0x101464fd
cmp esi, 0xfffffffd
je 0x10146564
mov cl, byte [edx + 1]
cmp cl, byte [eax + 1]
jne 0x101464fd
cmp esi, 0xfffffffe
je 0x10146564
mov cl, byte [edx + 2]
cmp cl, byte [eax + 2]
jne 0x101464fd
cmp esi, 0xffffffff
je 0x10146564
mov cl, byte [edx + 3]
cmp cl, byte [eax + 3]
je 0x10146564
mov edx, dword [ebp + 8]
mov edi, dword [edi]
test edi, edi
jne 0x10146498
mov esi, dword [esp + 0x10]
lea eax, [edx + 1]
cmp eax, 0xffffffed
jbe 0x10146523
push str.memory_allocation_error:_block_too_big
push esi
call fcn.10144ef0
mov edx, dword [ebp + 8]
add esp, 8
mov ecx, dword [esi + 0x10]
lea eax, [edx + 0x11]
push 0
push 0x101e84c3
push eax
mov esi, dword [ecx + 0xc]
push 0
push 0
push dword [ecx + 0x10]
mov dword [esp + 0x34], ecx
mov ecx, esi
mov dword [esp + 0x30], eax
call dword [0x101d3368]
call esi
mov edi, eax
add esp, 0x18
mov eax, dword [esp + 0x18]
test edi, edi
jne 0x1014658d
test eax, eax
jne 0x1014660f
jmp 0x1014658d
mov ecx, dword [esp + 0x18]
mov al, byte [edi + 5]
movzx edx, byte [ecx + 0x14]
not edx
movzx ecx, al
and edx, ecx
test dl, 3
je 0x10146606
xor al, 3
mov byte [edi + 5], al
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x1c]
mov esi, dword [ebp + 8]
push esi
push dword [esp + 0x18]
add dword [ecx + 0x44], eax
mov eax, dword [esp + 0x18]
mov dword [edi + 0xc], esi
mov dword [edi + 8], ebx
mov eax, dword [eax + 0x10]
mov al, byte [eax + 0x14]
and al, 3
mov byte [edi + 4], 4
mov byte [edi + 5], al
lea eax, [edi + 0x10]
push eax
mov byte [edi + 6], 0
call fcn.10187960
mov byte [edi + esi + 0x10], 0
add esp, 0xc
mov esi, dword [esp + 0x10]
mov edx, dword [esi + 0x10]
mov eax, dword [edx + 8]
dec eax
and eax, ebx
lea ecx, [eax*4]
mov eax, dword [edx]
mov eax, dword [ecx + eax]
mov dword [edi], eax
mov eax, dword [edx]
mov dword [ecx + eax], edi
inc dword [edx + 4]
mov eax, dword [edx + 8]
cmp dword [edx + 4], eax
jbe 0x10146606
cmp eax, 0x3ffffffe
jg 0x10146606
lea edx, [eax + eax]
mov ecx, esi
call fcn.10146350
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x10]
mov edx, 4
call fcn.101452e0
int3