Function at 0x1001a130
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
push edi
mov edi, dword [esp + 0x30]
mov eax, dword [esi + 0xd4]
mov dword [esp + 0x28], edi
push eax
mov dword [esp + 0x28], 0
call fcn.1000cc50
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esi + 0xd4]
add esp, 4
mov dword [esp + 0x30], eax
push ebx
push ecx
push edi
call fcn.1000cb70
mov ebp, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp eax, ebp
je 0x1001a18b
push 0x2020449
push ebx
call fcn.100768dc
add esp, 8
mov edx, dword [esi + 0xd8]
add edi, ebp
push edx
call fcn.1000cc50
add esp, 4
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0xd8]
push ebx
push eax
push edi
call fcn.1000cb70
mov ebp, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp eax, ebp
je 0x1001a1c9
push 0x2020451
push ebx
call fcn.100768dc
add esp, 8
mov ecx, dword [esi + 0xd0]
add edi, ebp
push ecx
call fcn.1000cc50
mov edx, dword [esi + 0xd0]
add esp, 4
mov dword [esp + 0x30], eax
push ebx
push edx
push edi
call fcn.1000cb70
mov ebp, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp eax, ebp
je 0x1001a207
push 0x2020459
push ebx
call fcn.100768dc
add esp, 8
mov eax, dword [esi + 0x14078]
add edi, ebp
xor edx, edx
test eax, eax
mov dword [esp + 0x14], edx
jle 0x1001a3ec
mov ecx, dword [esi + 0x1407c]
lea eax, [edx + edx*2]
mov ebp, dword [ecx + eax*8 + 4]
lea ecx, [ecx + eax*8]
xor eax, eax
mov dword [esp + 0x20], ecx
test ebp, ebp
mov dword [esp + 0x38], eax
jle 0x1001a3d9
mov edx, eax
mov ebp, dword [ecx + 0xc]
shl edx, 3
sub edx, eax
shl edx, 0xb
add edx, eax
lea edx, [eax + edx*2]
lea ebp, [ebp + edx*4]
mov dword [esp + 0x1c], ebp
cmp dword [ebp + 0x1bf88], 1
je 0x1001a3c5
lea esi, [ebp + 0x874]
push esi
call fcn.1000cc50
add esp, 4
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
call fcn.1000cb70
mov esi, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp eax, esi
je 0x1001a29c
push 0x2020469
push ebx
call fcn.100768dc
add esp, 8
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x1001a2c5
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x1001a2c5
mov eax, dword [esp + 0x34]
mov cl, byte [eax + 1]
test cl, cl
jne 0x1001a2c5
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x1001a2c5
lea eax, [edi + 4]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x1bf80]
add edi, esi
test eax, eax
mov dword [esp + 0x18], 0
jle 0x1001a3b9
mov dword [esp + 0x10], 0
jmp 0x1001a2eb
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 0x1bf84]
add esi, ecx
lea ebp, [esi + 0x24]
push ebp
call fcn.1000cc50
add esp, 4
mov dword [esp + 0x30], eax
push ebx
push ebp
push edi
call fcn.1000cb70
mov ebp, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp eax, ebp
je 0x1001a32a
push 0x202047d
push ebx
call fcn.100768dc
add esp, 8
add edi, ebp
lea ebp, [esi + 0x44]
push ebp
call fcn.1000cc50
add esp, 4
mov dword [esp + 0x30], eax
push ebx
push ebp
push edi
call fcn.1000cb70
mov ebp, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp eax, ebp
je 0x1001a35f
push 0x2020485
push ebx
call fcn.100768dc
add esp, 8
add esi, 0x64
add edi, ebp
push esi
call fcn.1000cc50
add esp, 4
mov ebp, eax
push ebx
push esi
push edi
call fcn.1000cb70
mov esi, eax
add esp, 0xc
cmp ebp, esi
je 0x1001a38e
push 0x202048d
push ebx
call fcn.100768dc
add esp, 8
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
add edi, esi
mov esi, dword [esp + 0x10]
mov edx, dword [ecx + 0x1bf80]
inc eax
add esi, 0xcc
cmp eax, edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
jl 0x1001a2e7
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x34]
mov edx, dword [ecx + 4]
inc eax
cmp eax, edx
mov dword [esp + 0x38], eax
jl 0x1001a23f
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 0x14078]
inc edx
cmp edx, eax
mov dword [esp + 0x14], edx
jl 0x1001a21d
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1001a505
mov ebp, dword [esi + 0x14108]
mov dword [esp + 0x1c], ebp
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x1001a414
mov edx, dword [ebp + 0x9174]
mov dword [esp + 0x38], edx
jmp 0x1001a41e
mov eax, dword [ebp + 0x9170]
mov dword [esp + 0x38], eax
lea eax, [ebp + 0x40]
push eax
call fcn.1000cc50
add esp, 4
mov dword [esp + 0x30], eax
lea eax, [ebp + 0x40]
push ebx
push eax
push edi
call fcn.1000cb70
mov ecx, dword [esp + 0x3c]
add esp, 0xc
cmp ecx, eax
mov dword [esp + 0x20], eax
je 0x1001a45a
push 0x20204a3
push ebx
call fcn.100768dc
mov eax, dword [esp + 0x28]
add esp, 8
add edi, eax
mov eax, dword [ebp + 0x9168]
test eax, eax
mov dword [esp + 0x20], 0
jle 0x1001a505
mov ecx, dword [esp + 0x38]
lea ebp, [ecx + 0x40]
lea esi, [ebp - 0x20]
push esi
call fcn.1000cc50
add esp, 4
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
call fcn.1000cb70
mov esi, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp eax, esi
je 0x1001a4ac
push 0x20204ad
push ebx
call fcn.100768dc
add esp, 8
push ebp
add edi, esi
call fcn.1000cc50
add esp, 4
mov dword [esp + 0x30], eax
push ebx
push ebp
push edi
call fcn.1000cb70
mov esi, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
cmp eax, esi
je 0x1001a4de
push 0x20204b6
push ebx
call fcn.100768dc
add esp, 8
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
add edi, esi
inc eax
mov ecx, dword [edx + 0x9168]
add ebp, 0x48c
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x1001a479
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x28]
mov ebx, dword [0x1008c130]
mov eax, edi
xor edx, edx
sub eax, ecx
mov ecx, ebx
div ebx
sub ecx, edx
cmp ecx, ebx
ja 0x1001a521
add ecx, ebx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x24]
test edi, edi
je 0x1001a5b0
mov eax, dword [esi + 0x1407c]
mov ecx, dword [eax + 0xc]
mov eax, dword [ecx + 0x20]
cmp eax, 0x44
jb 0x1001a551
mov ebp, 0x40
jmp 0x1001a557
lea ebp, [eax - 4]
and ebp, 0xfffffffe
mov eax, dword [esi + 0x2c]
or ecx, 0xffffffff
xor edx, edx
sub ecx, eax
mov dl, ah
and eax, 0xff
shl eax, 8
add edx, eax
mov eax, 0x51eb851f
shr edx, 1
add edx, 0x4000
mul edx
shr edx, 6
shr ecx, 0x10
lea eax, [edx + edx*2]
test ebp, ebp
lea edx, [edx + eax*8]
lea edx, [edx*8 + 0x15]
jbe 0x1001a5b0
lea eax, [ebp + 1]
shr eax, 1
mov esi, edx
add edi, 2
imul esi, ecx
inc esi
and esi, 0xffff
mov ecx, esi
xor word [edi - 2], cx
dec eax
jne 0x1001a598
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret