Function at 0x15d81d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.015d8ba0
mov esi, edx
mov ebp, ecx
mov ebx, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.015d8c50
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], esi
je 0x15d8280
test ebx, ebx
jle 0x15d89ed
xor eax, eax
cmp ebx, 1
je 0x15d8258
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0x10]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x28]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x28]
add eax, 2
cmp ecx, eax
jne 0x15d8240
test bl, 1
je 0x15d89ed
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x10]
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x28]
jmp 0x15d89ed
lea ecx, [esi + esi*8]
mov eax, ecx
shl eax, 6
test ebx, ebx
mov dword [esp + 0x1c], eax
jle 0x15d8379
mov edi, ebp
mov ebp, ecx
cmp ebx, 1
jne 0x15d856b
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x15d82d7
mov ecx, dword [esp + 0x1c]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x15d82d7
mov word [esp + ebx*4 + 0xac], cx
mov word [esp + ebx*4 + 0xae], ax
inc ebx
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.015d8c50
add esp, 0xc
test ebx, ebx
sete byte [esp + 0x14]
je 0x15d8392
xor eax, eax
cmp ebx, 1
je 0x15d834f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xac]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
add eax, 2
cmp ecx, eax
jne 0x15d8310
test bl, 1
je 0x15d8370
movzx eax, word [esp + eax*4 + 0xac]
movzx ecx, al
inc dword [esp + ecx*4 + 0x52c]
shr eax, 8
inc dword [esp + eax*4 + 0x92c]
mov eax, dword [esp + 0x92c]
jmp 0x15d839b
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
mov ebp, ecx
call fcn.015d8c50
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0x14], 1
xor eax, eax
mov dword [esp + 0x20], ebp
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x24], eax
xor ecx, ecx
lea eax, [esp + 0xac]
mov dword [esp + 0xc], eax
lea edx, [esp + 0x112c]
lea esi, [esp + 0x52c]
xor eax, eax
mov dword [esp], ebx
jmp 0x15d83fe
mov eax, dword [esp + 4]
inc eax
add ecx, 8
mov esi, dword [esp + 8]
add esi, 0x400
mov edx, ebp
cmp eax, dword [esp + 0x24]
je 0x15d84b1
mov dword [esp + 4], eax
mov ebp, dword [esp + 0xc]
mov dword [esp + 0xc], edx
mov edx, 3
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xd20], edi
add edi, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xd24], edi
add edi, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xd28], edi
add edi, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xd2c], edi
add edi, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x15d8420
mov dword [esp + 8], esi
cmp byte [esp + 0x14], 0
mov edi, dword [esp + 0xc]
jne 0x15d83e0
xor edx, edx
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov esi, ebp
mov ebp, edi
mov edi, dword [esp + eax*4 + 0xd2c]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xd2c], ebx
mov ebx, dword [esp]
mov eax, dword [esi + edx*4]
mov dword [ebp + edi*4], eax
mov edi, ebp
mov ebp, esi
mov eax, edx
and eax, 1
xor edx, 1
lea edx, [edx + eax*2]
cmp edx, ebx
jb 0x15d8470
jmp 0x15d83e0
test ebx, ebx
mov ebx, dword [esp + 0xc]
je 0x15d88c3
mov edx, dword [esp]
cmp edx, 1
jne 0x15d84cf
mov word [ebx], 1
jmp 0x15d874c
movzx eax, word [ebx + 4]
add word [ebx], ax
lea ebp, [edx - 1]
cmp edx, 3
jl 0x15d85c5
xor ecx, ecx
mov edx, 2
mov esi, 1
jmp 0x15d8510
movzx edi, word [ebx + ecx*4]
add word [ebx + esi*4], di
mov word [ebx + ecx*4], si
inc ecx
mov eax, esi
and eax, 1
xor esi, 1
lea esi, [esi + eax*2]
cmp esi, ebp
jge 0x15d85d4
movzx eax, word [ebx + ecx*4]
cmp edx, dword [esp]
jge 0x15d8522
movzx edi, word [ebx + edx*4]
cmp ax, di
jae 0x15d8540
mov word [ebx + esi*4], ax
mov word [ebx + ecx*4], si
inc ecx
cmp edx, dword [esp]
jge 0x15d84f0
jmp 0x15d854a
inc edx
mov word [ebx + esi*4], di
cmp edx, dword [esp]
jge 0x15d84f0
cmp ecx, esi
jge 0x15d8560
movzx edi, word [ebx + ecx*4]
movzx eax, word [ebx + edx*4]
cmp di, ax
jb 0x15d84f4
jmp 0x15d8564
movzx eax, word [ebx + edx*4]
inc edx
add word [ebx + esi*4], ax
jmp 0x15d84fd
mov ecx, ebx
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x15d858b
add eax, 2
cmp ecx, eax
je 0x15d82a5
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x15d85a6
mov word [esp + ebx*4 + 0xac], si
mov word [esp + ebx*4 + 0xae], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x15d8580
mov word [esp + ebx*4 + 0xac], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0xae], si
inc ebx
jmp 0x15d8580
lea ecx, [edx - 2]
mov word [ebx + edx*4 - 8], 0
jmp 0x15d8651
mov eax, dword [esp]
mov word [ebx + eax*4 - 8], 0
lea esi, [eax - 3]
lea ecx, [eax + 2]
mov edx, esi
and ecx, 3
je 0x15d8601
mov edx, esi
nop
nop
nop
movzx eax, word [ebx + edx*4]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4], ax
dec edx
dec ecx
jne 0x15d85f0
mov eax, dword [esp]
lea ecx, [eax - 2]
cmp esi, 3
jb 0x15d8651
inc edx
nop
nop
nop
movzx eax, word [ebx + edx*4 - 4]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4 - 4], ax
movzx eax, word [ebx + edx*4 - 8]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4 - 8], ax
movzx eax, word [ebx + edx*4 - 0xc]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4 - 0xc], ax
movzx eax, word [ebx + edx*4 - 0x10]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4 - 0x10], ax
add edx, 0xfffffffc
jne 0x15d8610
mov esi, 1
xor edx, edx
jmp 0x15d8670
mov ebp, dword [esp + 4]
lea esi, [edi + edi]
inc edx
test edi, edi
jle 0x15d8742
test ecx, ecx
mov dword [esp + 4], ebp
js 0x15d86b0
lea eax, [ecx + 1]
mov dword [esp + 8], eax
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebx + ecx*4]
cmp edx, eax
jne 0x15d86b2
inc edi
add ecx, 0xffffffff
jb 0x15d8690
mov ecx, 0xffffffff
mov edi, dword [esp + 8]
jmp 0x15d86b2
xor edi, edi
mov ebp, esi
sub ebp, edi
jle 0x15d8660
mov eax, edi
not eax
add eax, esi
and ebp, 3
je 0x15d8705
mov dword [esp + 0x14], eax
mov dword [esp + 8], edi
mov eax, dword [esp + 4]
lea eax, [ebx + eax*4]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
inc edi
add eax, 0xfffffffc
cmp ebp, edi
jne 0x15d86e0
mov ebp, dword [esp + 4]
sub ebp, edi
sub esi, edi
mov edi, dword [esp + 8]
mov eax, dword [esp + 0x14]
cmp eax, 3
jae 0x15d8720
jmp 0x15d8664
mov ebp, dword [esp + 4]
cmp eax, 3
jb 0x15d8664
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx + ebp*4], dx
mov word [ebx + ebp*4 - 4], dx
mov word [ebx + ebp*4 - 8], dx
mov word [ebx + ebp*4 - 0xc], dx
add ebp, 0xfffffffc
add esi, 0xfffffffc
cmp esi, edi
jg 0x15d8720
jmp 0x15d8664
cmp dword [esp], 0
jle 0x15d88c3
mov eax, dword [esp]
lea edx, [eax - 1]
and eax, 3
xor ecx, ecx
cmp edx, 3
jb 0x15d879a
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebx + ecx*4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [ebx + ecx*4 + 4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [ebx + ecx*4 + 8]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [ebx + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x28]
add ecx, 4
cmp edx, ecx
jne 0x15d8770
test eax, eax
je 0x15d87bd
lea ecx, [ebx + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x28]
inc edx
cmp eax, edx
jne 0x15d87b0
cmp dword [esp], 2
jl 0x15d88c3
mov esi, dword [esp + 0x15c4]
lea ecx, [esi + esi]
and ecx, 2
mov edx, esi
xor edx, 1
lea eax, [ecx + edx]
cmp eax, 0x20
jg 0x15d87fe
mov eax, dword [esp + esi*4 + 0x28]
add ecx, edx
dec ecx
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
mov dword [esp + esi*4 + 0x28], eax
inc ecx
cmp ecx, 0x20
jl 0x15d87f0
test esi, esi
mov ecx, esi
jle 0x15d8814
mov ebp, ecx
and ebp, 3
cmp ecx, 4
jae 0x15d8822
mov esi, ecx
xor edx, edx
jmp 0x15d8882
mov eax, 1
shl eax, cl
xor edx, edx
jmp 0x15d8b4d
mov dword [esp + 8], ebp
mov eax, ecx
and eax, 0xfffffffc
mov dword [esp + 4], eax
lea esi, [esp + ecx*4]
add esi, 0x28
xor edx, edx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov ebp, dword [esi]
mov ecx, eax
shl ebp, cl
add ebp, edx
mov edx, dword [esi - 4]
inc cl
shl edx, cl
mov edi, dword [esi - 8]
mov ecx, eax
add cl, 2
shl edi, cl
add edi, edx
add edi, ebp
mov edx, dword [esi - 0xc]
mov ecx, eax
add cl, 3
shl edx, cl
add edx, edi
add eax, 4
add esi, 0xfffffff0
cmp eax, dword [esp + 4]
jne 0x15d8840
mov esi, dword [esp + 0x15c4]
sub esi, eax
mov ebp, dword [esp + 8]
test ebp, ebp
je 0x15d88ad
mov ecx, dword [esp + 0x15c4]
sub ecx, esi
lea eax, [esp + esi*4]
add eax, 0x28
neg ebp
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [eax + esi*4]
shl edi, cl
add edx, edi
inc ecx
dec esi
cmp ebp, esi
jne 0x15d88a0
mov eax, 1
mov ecx, dword [esp + 0x15c4]
shl eax, cl
cmp edx, eax
jne 0x15d8b4d
mov edi, dword [esp + 0x20]
shl edi, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.015d8c50
add esp, 0xc
mov eax, dword [esp + 0x1c]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.015d8c50
add esp, 0xc
cmp dword [esp + 0x15c4], 0
jle 0x15d89e6
add ebx, 0xfffffffe
mov eax, 1
mov dword [esp + 0xc], ebx
jmp 0x15d8942
mov ebp, ebx
mov ebx, dword [esp]
mov dword [esp], ebx
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, dword [esp + 0x15c4]
mov ebx, ebp
jg 0x15d89e6
mov ebp, dword [esp + eax*4 + 0x28]
test ebp, ebp
jle 0x15d8920
mov edx, ebp
and edx, 3
je 0x15d8990
mov dword [esp + 4], ebp
mov ecx, edi
mov esi, dword [esp]
lea edi, [ebx + esi*4]
xor esi, esi
nop
movzx ebx, word [edi]
mov ebp, dword [esp + 0x10]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x15d8960
mov ebp, dword [esp + 4]
mov edx, ebp
sub edx, esi
sub dword [esp], esi
mov edi, ecx
jmp 0x15d8992
mov edx, ebp
cmp ebp, 4
mov ebx, dword [esp]
mov ebp, dword [esp + 0xc]
jb 0x15d8925
dec edx
nop
movzx ecx, word [ebp + ebx*4]
mov esi, dword [esp + 0x10]
add esi, edi
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x15d89a0
jmp 0x15d8925
mov ebx, dword [esp + 0x15c0]
mov dword [esp + 0x530], 0
mov eax, dword [esp + 0x15c4]
cmp eax, 2
jl 0x15d8a6d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x15d8a1a
xor eax, eax
mov edx, 2
test cl, 1
jne 0x15d8a60
jmp 0x15d8a6d
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
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x534], eax
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x538], eax
add edx, 2
cmp ebx, edx
jne 0x15d8a30
add edx, 2
mov ebx, dword [esp + 0x15c0]
test cl, 1
je 0x15d8a6d
add eax, dword [esp + edx*4 + 0x24]
add eax, eax
mov dword [esp + edx*4 + 0x52c], eax
test ebx, ebx
jle 0x15d8b42
xor eax, eax
mov ecx, dword [esp + 0x18]
lea esi, [ecx + ecx*8]
mov edx, esi
shl edx, 5
mov ecx, dword [esp + 0x10]
add edx, ecx
shl esi, 6
add esi, ecx
mov dword [esp], esi
jmp 0x15d8abb
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15c0]
inc eax
cmp eax, ebx
je 0x15d8b42
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x15d8ab2
mov ebp, dword [esp + ecx*4 + 0x52c]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x52c], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x15d8b1f
and ecx, 0xfffffffc
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
mov esi, ebp
and esi, 1
shl esi, 2
lea esi, [esi + ebx*8]
mov ebx, ebp
and ebx, 2
or ebx, esi
mov esi, ebp
shr esi, 2
and esi, 1
or esi, ebx
mov ebx, ebp
shr ebx, 3
and ebx, 1
lea ebx, [ebx + esi*2]
shr ebp, 4
add ecx, 0xfffffffc
jne 0x15d8af0
test edi, edi
je 0x15d8aa0
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, ebp
and ecx, 1
lea ebx, [ecx + ebx*2]
shr ebp, 1
dec edi
jne 0x15d8b30
jmp 0x15d8aa0
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x15c4]
dec ecx
jmp 0x15d8b69
dec edx
cmp edx, eax
je 0x15d88c3
mov esi, dword [esp + 0x15c4]
dec dword [esp + esi*4 + 0x28]
mov esi, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
test esi, esi
jle 0x15d8b60
mov edi, dword [esp + esi*4 + 0x28]
dec esi
test edi, edi
je 0x15d8b80
dec edi
mov dword [esp + esi*4 + 0x2c], edi
add dword [esp + esi*4 + 0x30], 2
jmp 0x15d8b60