Function at 0x1001b540
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ecx + 0xc]
push ebx
push esi
push edi
mov ecx, dword [eax + 0x30]
imul eax, dword [eax + 0x2c], 0x2cc
mov dword [ebp - 0x10], ecx
add eax, ecx
mov dword [ebp - 0x30], eax
cmp ecx, eax
je 0x1001b720
mov edx, dword [ecx]
mov esi, dword [ecx + 4]
shl edx, 6
add edx, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x2c], edx
cmp esi, edx
je 0x1001b70f
nop
mov edi, dword [esi + 0x38]
mov dword [ebp - 0x20], edi
test edi, edi
je 0x1001b6fb
mov eax, dword [esi + 0x34]
lea eax, [eax + eax*8]
lea ecx, [edi + eax*4]
mov dword [ebp - 0x28], ecx
cmp edi, ecx
je 0x1001b6fb
cmp dword [edi + 4], 0
je 0x1001b6ea
cmp dword [esi + 0x20], 0
mov eax, dword [edi]
mov dword [ebp - 0x1c], 0
jbe 0x1001b6ea
mov ecx, dword [ebp - 4]
add eax, 0x1c
mov dword [ebp - 8], eax
nop dword [eax + eax]
mov esi, dword [eax]
test esi, esi
je 0x1001b6ce
mov eax, dword [eax - 4]
xor edx, edx
mov ecx, eax
mov dword [ebp - 0xc], edx
shl ecx, 4
sub ecx, eax
lea ebx, [esi + ecx*4]
mov dword [ebp - 0x24], ebx
cmp esi, ebx
je 0x1001b68c
mov ebx, dword [esi + 0x1c]
xor ecx, ecx
xor edi, edi
mov eax, dword [ebx + 0x14]
test eax, eax
jle 0x1001b641
mov edx, dword [ebx + 0x18]
test edx, edx
jle 0x1001b639
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0x18], edx
mov eax, dword [eax + edi*4]
mov dword [ebp - 0x14], eax
mov eax, dword [eax]
cdq
xor eax, edx
sub eax, edx
cmp eax, ecx
cmovg ecx, eax
mov eax, dword [ebp - 0x14]
add eax, 4
sub dword [ebp - 0x18], 1
mov dword [ebp - 0x14], eax
jne 0x1001b618
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x18]
inc edi
cmp edi, eax
jl 0x1001b608
mov edx, dword [ebp - 0xc]
cmp ecx, edx
mov eax, ecx
cmovg edx, ecx
mov dword [ebp - 0xc], edx
or edx, 0xffffffff
test ecx, ecx
jle 0x1001b659
sar eax, 1
inc edx
test eax, eax
jg 0x1001b652
lea eax, [edx - 5]
test eax, eax
jle 0x1001b673
or eax, 0xffffffff
test ecx, ecx
jle 0x1001b66e
sar ecx, 1
inc eax
test ecx, ecx
jg 0x1001b667
add eax, 0xfffffffb
jmp 0x1001b675
xor eax, eax
mov ebx, dword [ebp - 0x24]
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x24], eax
add esi, 0x3c
cmp esi, ebx
jne 0x1001b5f7
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
cmp ecx, ebx
je 0x1001b6a8
mov eax, dword [edi + 0xc]
sub eax, dword [ecx + 0x24]
mov dword [ecx + 0xc], eax
add ecx, 0x3c
cmp ecx, ebx
jne 0x1001b695
mov eax, dword [ebp - 8]
mov esi, dword [eax]
cmp esi, ebx
je 0x1001b6cb
nop
push esi
push edi
push dword [ebp - 0x10]
call fcn.1001b880
add esp, 0xc
test eax, eax
jne 0x1001b729
add esi, 0x3c
cmp esi, ebx
jne 0x1001b6b0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 0x1c]
add eax, 0x34
inc esi
mov dword [ebp - 8], eax
mov dword [ebp - 0x1c], esi
cmp esi, dword [ecx + 0x20]
jb 0x1001b5d0
mov esi, dword [ebp - 4]
mov ecx, dword [ebp - 0x28]
add edi, 0x24
mov dword [ebp - 0x20], edi
cmp edi, ecx
jne 0x1001b5a2
mov edx, dword [ebp - 0x2c]
add esi, 0x40
mov dword [ebp - 4], esi
cmp esi, edx
jne 0x1001b580
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x30]
add ecx, 0x2cc
mov dword [ebp - 0x10], ecx
cmp ecx, eax
jne 0x1001b566
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret