Function at 0x1005d170
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1a80
call fcn.100a6a00
mov eax, dword [0x100f529c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
push 0xcc
mov dword [ebp - 0x1a60], eax
lea eax, [ebp - 0x1984]
push 0
push eax
mov dword [ebp - 0x1a54], edi
call fcn.100a7e90
lea eax, [ebp - 0x18b8]
push esi
push eax
call fcn.1005f7b0
add esp, 0x14
lea esi, [ebp - 0x17ec]
mov ebx, 2
nop dword [eax]
test bl, 1
je 0x1005d1ef
lea eax, [esi - 0xcc]
push eax
lea eax, [ebp - 0x18b8]
push eax
push esi
push edi
call fcn.1005af00
add esp, 0x10
jmp 0x1005d20c
mov eax, ebx
lea ecx, [ebp - 0x1984]
shr eax, 1
imul eax, eax, 0xcc
add eax, ecx
push eax
push esi
push edi
call fcn.1005bd00
add esp, 0xc
inc ebx
add esi, 0xcc
cmp ebx, 0x20
jb 0x1005d1d0
mov esi, dword [edi + 0xec]
test esi, esi
jle 0x1005d23d
mov eax, dword [edi + 0xe8]
lea eax, [eax + esi*4]
add eax, 0xfffffffc
nop
cmp dword [eax], 0
jne 0x1005d243
dec esi
sub eax, 4
test esi, esi
jg 0x1005d230
je 0x1005d4f8
mov eax, dword [edi + 0xe8]
push dword [eax + esi*4 - 4]
call fcn.1004ae80
shl esi, 5
add esp, 4
lea ecx, [eax - 0x20]
mov eax, 1
add ecx, esi
mov dword [ebp - 0x1a58], eax
mov dword [ebp - 0x1a80], ecx
lea ebx, [ecx - 1]
mov dword [ebp - 0x1a5c], ebx
cmp ebx, ecx
jae 0x1005d4f8
lea esi, [ebx + 3]
mov dword [ebp - 0x1a68], esi
test eax, eax
jne 0x1005d29d
mov eax, dword [ebp - 0x1a60]
push eax
push eax
push edi
call fcn.1005bd00
add esp, 0xc
mov eax, 0xcccccccd
mov ecx, ebx
mul ebx
shr edx, 2
lea eax, [edx + edx*4]
sub ecx, eax
jne 0x1005d4d4
mov edx, dword [edi + 0xec]
lea ecx, [esi + 1]
mov eax, ecx
shr eax, 5
cmp eax, edx
jb 0x1005d2d2
mov dword [ebp - 0x1a6c], 0
jmp 0x1005d2ec
mov edi, dword [ebp + 0x14]
and ecx, 0x1f
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 0x1a54]
shr eax, cl
and eax, 1
mov dword [ebp - 0x1a6c], eax
mov eax, esi
shr eax, 5
cmp eax, edx
jb 0x1005d301
mov dword [ebp - 0x1a70], 0
jmp 0x1005d31d
mov edi, dword [ebp + 0x14]
mov ecx, esi
and ecx, 0x1f
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 0x1a54]
shr eax, cl
and eax, 1
mov dword [ebp - 0x1a70], eax
lea ecx, [esi - 1]
mov eax, ecx
shr eax, 5
cmp eax, edx
jb 0x1005d335
mov dword [ebp - 0x1a74], 0
jmp 0x1005d34f
mov ebx, dword [ebp + 0x14]
and ecx, 0x1f
mov eax, dword [ebx + eax*4]
mov ebx, dword [ebp - 0x1a5c]
shr eax, cl
and eax, 1
mov dword [ebp - 0x1a74], eax
lea ecx, [esi - 2]
mov eax, ecx
shr eax, 5
cmp eax, edx
jb 0x1005d367
mov dword [ebp - 0x1a78], 0
jmp 0x1005d37b
mov esi, dword [ebp + 0x14]
and ecx, 0x1f
mov eax, dword [esi + eax*4]
shr eax, cl
and eax, 1
mov dword [ebp - 0x1a78], eax
mov esi, ebx
shr esi, 5
cmp esi, edx
jb 0x1005d388
xor esi, esi
jmp 0x1005d398
mov eax, dword [ebp + 0x14]
mov ecx, ebx
and ecx, 0x1f
mov esi, dword [eax + esi*4]
shr esi, cl
and esi, 1
push 0xcc
lea eax, [ebp - 0x1a50]
push 0
push eax
call fcn.100a7e90
mov edx, dword [edi + 0x11c]
lea ebx, [ebp - 0x18fc]
mov edi, dword [ebp - 0x1a6c]
xor ecx, ecx
add edi, edi
mov dword [ebp - 0x1a7c], ecx
or edi, dword [ebp - 0x1a70]
add esp, 0xc
add edi, edi
mov dword [ebp - 0x1a64], edx
or edi, dword [ebp - 0x1a74]
add edi, edi
or edi, dword [ebp - 0x1a78]
add edi, edi
or edi, esi
nop word [eax + eax]
mov eax, edi
xor eax, ecx
push edx
lea esi, [eax - 1]
not eax
shr eax, 0x1f
shr esi, 0x1f
and esi, eax
lea eax, [ebp - 0x1a50]
push eax
lea eax, [ebx - 0x88]
neg esi
push eax
lea eax, [ebp - 0x1a50]
push esi
push eax
call fcn.10059f40
push dword [ebp - 0x1a64]
lea eax, [ebp - 0x1a0c]
push eax
lea eax, [ebx - 0x44]
push eax
lea eax, [ebp - 0x1a0c]
push esi
push eax
call fcn.10059f40
push dword [ebp - 0x1a64]
lea eax, [ebp - 0x19c8]
push eax
push ebx
push esi
push eax
call fcn.10059f40
mov ecx, dword [ebp - 0x1a7c]
add esp, 0x3c
mov edx, dword [ebp - 0x1a64]
inc ecx
add ebx, 0xcc
mov dword [ebp - 0x1a7c], ecx
cmp ecx, 0x20
jb 0x1005d3f0
cmp dword [ebp - 0x1a58], 0
lea eax, [ebp - 0x1a50]
push eax
je 0x1005d4b1
push dword [ebp - 0x1a60]
call fcn.1005f7b0
mov edi, dword [ebp - 0x1a54]
add esp, 8
mov ebx, dword [ebp - 0x1a5c]
xor eax, eax
mov esi, dword [ebp - 0x1a68]
mov dword [ebp - 0x1a58], eax
jmp 0x1005d4da
mov eax, dword [ebp - 0x1a60]
mov edi, dword [ebp - 0x1a54]
push eax
push eax
push edi
call fcn.1005af00
mov ebx, dword [ebp - 0x1a5c]
add esp, 0x10
mov esi, dword [ebp - 0x1a68]
mov eax, dword [ebp - 0x1a58]
dec ebx
dec esi
mov dword [ebp - 0x1a5c], ebx
mov dword [ebp - 0x1a68], esi
cmp ebx, dword [ebp - 0x1a80]
jb 0x1005d288
test eax, eax
je 0x1005d50d
push 0xcc
push 0
push dword [ebp - 0x1a60]
call fcn.100a7e90
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100a69cd
mov esp, ebp
pop ebp
ret