Function at 0x989100
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.00989b70
mov edi, edx
mov dword [esp + 0x10], ecx
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.00989d10
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x20], edi
je 0x9891ce
test esi, esi
mov ecx, esi
jle 0x9899b7
xor eax, eax
cmp ecx, 1
je 0x989198
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x20]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0x10]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x2c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x2c]
add eax, 2
cmp ecx, eax
jne 0x989180
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x9899b7
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x10]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c4]
inc dword [esp + eax*4 + 0x2c]
jmp 0x9899b7
lea eax, [edi + edi*8]
mov dword [esp + 0x1c], eax
mov ebx, eax
shl ebx, 6
test esi, esi
jle 0x9892cb
cmp esi, 1
jne 0x98952e
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x989225
mov ecx, dword [esp + 0x10]
add ecx, ebx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x989225
mov edx, edi
mov word [esp + edi*4 + 0xb0], cx
mov word [esp + edi*4 + 0xb2], ax
inc edx
mov edi, edx
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.00989d10
add esp, 0xc
test edi, edi
sete byte [esp + 7]
je 0x9892e2
mov ecx, edi
xor eax, eax
cmp edi, 1
je 0x98929f
mov ecx, edi
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x930]
shr edx, 8
inc dword [esp + edx*4 + 0xd30]
movzx edx, word [esp + eax*4 + 0xb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x930]
shr edx, 8
inc dword [esp + edx*4 + 0xd30]
add eax, 2
cmp ecx, eax
jne 0x989260
mov edx, edi
test dl, 1
je 0x9892c2
movzx eax, word [esp + eax*4 + 0xb0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x930]
shr eax, 8
inc dword [esp + eax*4 + 0xd30]
mov eax, dword [esp + 0xd30]
jmp 0x9892eb
lea eax, [esp + 0x930]
push 0x800
push 0
push eax
call fcn.00989d10
add esp, 0xc
xor edx, edx
mov byte [esp + 7], 1
xor eax, eax
mov dword [esp + 0x24], ebx
xor ecx, ecx
cmp eax, edx
setne cl
inc ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 8], edx
mov ebx, edx
and ebx, 0xfffffffe
lea ebp, [esp + 0xb0]
lea eax, [esp + 0x1130]
xor ecx, ecx
lea esi, [esp + 0x934]
xor edi, edi
mov dword [esp + 0xc], ebx
jmp 0x98934a
inc edi
add ecx, 8
add esi, 0x400
mov eax, ebp
cmp edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x14]
je 0x989454
mov dword [esp + 0x18], edi
mov dword [esp], ebp
mov dword [esp + 0x14], eax
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0x530], eax
mov ebp, dword [esi + edx*4 - 4]
mov ebx, ebp
xor ebx, eax
and ebp, eax
lea eax, [ebx + ebp*2]
mov dword [esp + edx*4 + 0x534], eax
mov ebx, dword [esi + edx*4]
mov ebp, ebx
xor ebp, eax
and ebx, eax
lea eax, [ebx*2]
add eax, ebp
add edx, 2
cmp edx, 0x100
jne 0x989360
cmp byte [esp + 7], 0
mov edi, dword [esp + 0x18]
mov ebp, dword [esp]
jne 0x989330
xor edx, edx
cmp dword [esp + 8], 1
mov edi, dword [esp + 0x14]
je 0x989417
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0x530]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0x530], ebp
mov eax, dword [esp]
mov eax, dword [eax + edx*4]
mov dword [edi + ebx*4], eax
mov eax, dword [esp]
movzx eax, word [eax + edx*4 + 4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0x530]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0x530], ebp
mov ebp, dword [esp]
mov eax, dword [ebp + edx*4 + 4]
mov dword [edi + ebx*4], eax
mov ebx, dword [esp + 0xc]
add edx, 2
cmp ebx, edx
jne 0x9893c0
test byte [esp + 8], 1
mov edi, dword [esp + 0x18]
je 0x989330
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0x530]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0x530], ebp
mov ebp, dword [esp]
mov eax, dword [ebp + edx*4]
mov edx, dword [esp + 0x14]
mov dword [edx + ebx*4], eax
jmp 0x989330
cmp dword [esp + 8], 0
mov ebx, dword [esp + 0x15c8]
mov edi, dword [esp + 0x1c]
je 0x989869
mov edx, dword [esp + 8]
cmp edx, 1
jne 0x98947e
mov word [ebp], 1
jmp 0x989742
movzx eax, word [ebp + 4]
add word [ebp], ax
lea esi, [edx - 1]
cmp esi, 2
jl 0x989595
mov dword [esp + 0xc], esi
mov ecx, 2
mov eax, 2
sub eax, edx
mov dword [esp], eax
xor esi, esi
mov edi, 1
jmp 0x9894cf
movzx eax, word [ebp + ecx*4]
inc ecx
add word [ebp + edi*4], ax
mov eax, dword [esp]
add eax, edi
inc eax
inc edi
cmp eax, 1
mov edx, dword [esp + 8]
je 0x9895a4
movzx eax, word [ebp + esi*4]
cmp ecx, edx
jge 0x9894e2
movzx edx, word [ebp + ecx*4]
cmp ax, dx
jae 0x989510
mov word [ebp + edi*4], ax
mov word [ebp + esi*4], di
inc esi
cmp ecx, dword [esp + 8]
jge 0x98951c
cmp esi, edi
jge 0x9894b0
movzx edx, word [ebp + esi*4]
movzx eax, word [ebp + ecx*4]
cmp dx, ax
jae 0x9894b5
jmp 0x989521
inc ecx
mov word [ebp + edi*4], dx
cmp ecx, dword [esp + 8]
jl 0x9894f3
movzx edx, word [ebp + esi*4]
add word [ebp + edi*4], dx
mov word [ebp + esi*4], di
inc esi
jmp 0x9894bb
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x10]
lea edx, [ebx + eax]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x98955b
add eax, 2
cmp ecx, eax
je 0x9891ef
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x989576
mov word [esp + edi*4 + 0xb0], si
mov word [esp + edi*4 + 0xb2], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x989550
mov word [esp + edi*4 + 0xb0], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xb2], si
inc edi
jmp 0x989550
lea ecx, [edx - 2]
mov word [ebp + edx*4 - 8], 0
jmp 0x989645
lea ecx, [edx - 2]
mov word [ebp + edx*4 - 8], 0
cmp edx, 3
jl 0x9895e9
lea esi, [edx - 3]
mov edi, edx
and edi, 3
xor edi, 2
mov edx, esi
je 0x9895e4
mov edx, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4], ax
dec edx
dec edi
jne 0x9895d0
cmp esi, 3
jae 0x9895ef
mov esi, dword [esp + 0xc]
jmp 0x989645
inc edx
mov esi, dword [esp + 0xc]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4 - 4]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4 - 4], ax
movzx eax, word [ebp + edx*4 - 8]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4 - 8], ax
movzx eax, word [ebp + edx*4 - 0xc]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4 - 0xc], ax
movzx eax, word [ebp + edx*4 - 0x10]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + edx*4 - 0x10], ax
add edx, 0xfffffffc
jne 0x989600
mov edi, 1
xor edx, edx
jmp 0x98965c
lea edi, [eax + eax]
inc edx
test eax, eax
je 0x989733
test ecx, ecx
mov dword [esp], edi
js 0x989690
lea eax, [ecx + 1]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, eax
movzx eax, word [ebp + ecx*4]
cmp edx, eax
jne 0x9896a0
inc edi
dec ecx
mov eax, ebx
cmp ebx, edi
jne 0x989670
mov ecx, 0xffffffff
jmp 0x9896a2
xor eax, eax
sub edi, eax
jg 0x9896b0
jmp 0x989650
mov eax, edi
mov ebx, dword [esp + 0x15c8]
mov edi, dword [esp]
sub edi, eax
jle 0x989650
and edi, 3
je 0x9896ee
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], esi
lea eax, [esi*4]
add eax, ebp
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
inc esi
add eax, 0xfffffffc
cmp edi, esi
jne 0x9896d0
mov edi, dword [esp]
sub edi, esi
mov eax, dword [esp + 0xc]
sub eax, esi
mov esi, eax
mov eax, dword [esp + 0x18]
jmp 0x9896f1
mov edi, dword [esp]
mov ebx, eax
sub eax, dword [esp]
cmp eax, 0xfffffffc
mov eax, ebx
mov ebx, dword [esp + 0x15c8]
ja 0x989650
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp + esi*4], dx
mov word [ebp + esi*4 - 4], dx
mov word [ebp + esi*4 - 8], dx
mov word [ebp + esi*4 - 0xc], dx
add esi, 0xfffffffc
add edi, 0xfffffffc
cmp edi, eax
jg 0x989710
jmp 0x989650
cmp dword [esp + 8], 0
mov edi, dword [esp + 0x1c]
jle 0x989869
xor eax, eax
mov edx, dword [esp + 8]
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebp + eax*4]
inc dword [esp + ecx*4 + 0x2c]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, edx
jl 0x989750
cmp edx, 2
jl 0x989869
lea ecx, [ebx + ebx]
and ecx, 2
mov edx, ebx
xor edx, 1
lea eax, [ecx + edx]
cmp eax, 0x20
jg 0x98979e
mov eax, dword [esp + ebx*4 + 0x2c]
add ecx, edx
dec ecx
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + ebx*4 + 0x2c], eax
inc ecx
cmp ecx, 0x20
jl 0x989790
test ebx, ebx
jle 0x9897b5
lea eax, [ebx - 1]
mov edi, ebx
and edi, 3
cmp eax, 3
jae 0x9897c5
xor edx, edx
mov esi, ebx
jmp 0x989823
mov eax, 1
mov ecx, ebx
shl eax, cl
xor edx, edx
jmp 0x989993
mov dword [esp + 0xc], edi
mov eax, ebx
and eax, 0x7ffffffc
mov dword [esp], eax
lea edi, [esp + ebx*4]
add edi, 0x2c
xor edx, edx
xor eax, eax
nop
nop
nop
mov ebx, dword [edi]
mov ecx, eax
shl ebx, cl
add ebx, edx
mov edx, dword [edi - 4]
inc cl
shl edx, cl
mov esi, dword [edi - 8]
mov ecx, eax
add cl, 2
shl esi, cl
add esi, edx
add esi, ebx
mov edx, dword [edi - 0xc]
mov ecx, eax
add cl, 3
shl edx, cl
add edx, esi
add eax, 4
add edi, 0xfffffff0
cmp eax, dword [esp]
jne 0x9897e0
mov ebx, dword [esp + 0x15c8]
mov esi, ebx
sub esi, eax
mov edi, dword [esp + 0xc]
test edi, edi
je 0x989854
mov ecx, ebx
sub ecx, esi
lea eax, [esp + esi*4]
add eax, 0x2c
mov dword [esp], eax
neg edi
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, edi
mov edi, dword [esp]
mov edi, dword [edi + esi*4]
shl edi, cl
add edx, edi
mov edi, eax
inc ecx
dec esi
cmp eax, esi
jne 0x989840
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp edx, eax
mov edi, dword [esp + 0x1c]
jne 0x989993
shl edi, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00989d10
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00989d10
add esp, 0xc
test ebx, ebx
jle 0x9899b0
add ebp, 0xfffffffe
mov eax, 1
add edi, dword [esp + 0x10]
mov dword [esp + 0x14], ebp
jmp 0x9898d5
mov esi, dword [esp + 8]
mov dword [esp + 8], esi
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x9899b0
mov ecx, dword [esp + eax*4 + 0x2c]
test ecx, ecx
jle 0x9898c0
mov edx, ecx
and edx, 3
je 0x989930
mov ebx, ebp
mov ebp, edi
mov esi, dword [esp + 8]
lea edi, [ebx + esi*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x989900
sub dword [esp + 8], esi
mov edx, ecx
sub edx, esi
mov ebx, dword [esp + 0x15c8]
mov edi, ebp
mov ebp, dword [esp + 0x14]
jmp 0x989932
mov edx, ecx
cmp ecx, 4
mov esi, dword [esp + 8]
jb 0x9898c4
dec edx
nop
nop
nop
nop
movzx ecx, word [ebp + esi*4]
mov byte [ecx + edi + 0x8f12], al
movzx ecx, word [ebp + esi*4 - 4]
mov byte [ecx + edi + 0x8f12], al
movzx ecx, word [ebp + esi*4 - 8]
mov byte [ecx + edi + 0x8f12], al
movzx ecx, word [ebp + esi*4 - 0xc]
add esi, 0xfffffffc
mov byte [ecx + edi + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x989940
jmp 0x9898c4
dec esi
mov dword [esp + ecx*4 + 0x2c], esi
add dword [esp + ecx*4 + 0x30], 2
dec edx
cmp edx, eax
je 0x989869
dec dword [esp + ebx*4 + 0x2c]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x98998a
mov esi, dword [esp + ecx*4 + 0x28]
dec ecx
test esi, esi
je 0x9899a0
jmp 0x989980
mov ecx, dword [esp + 0x15c4]
mov dword [esp + 0x934], 0
cmp ebx, 2
jl 0x989a2d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x9899d8
xor eax, eax
mov edx, 2
jmp 0x989a14
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x938], eax
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add edx, 2
cmp ebx, edx
jne 0x9899f0
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c4]
je 0x989a2d
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x930], eax
test ecx, ecx
jle 0x989b02
xor eax, eax
mov edx, dword [esp + 0x20]
lea edi, [edx + edx*8]
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0x10]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp], edi
jmp 0x989a7b
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x989b02
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x989a72
mov ecx, dword [esp + ebx*4 + 0x930]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x930], edi
xor edi, edi
cmp bl, 4
jb 0x989adf
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
shl esi, 2
lea esi, [esi + edi*8]
mov edi, ecx
and edi, 2
or edi, esi
mov esi, ecx
shr esi, 2
and esi, 1
or esi, edi
mov edi, ecx
shr edi, 3
and edi, 1
lea edi, [edi + esi*2]
shr ecx, 4
add ebp, 0xfffffffc
jne 0x989ab0
and ebx, 3
je 0x989a60
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
lea edi, [esi + edi*2]
shr ecx, 1
dec ebx
jne 0x989af0
jmp 0x989a60
add esp, 0x15b0
pop esi
pop edi
pop ebx
pop ebp
ret