Function at 0x10159870
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x64
push ebp
mov ebp, ecx
mov dword [esp + 0x5c], 0xffffffff
mov eax, 1
mov dword [esp + 0x14], ebp
mov dword [esp + 0x54], eax
push 3
movzx eax, word [ebp + 0x16]
mov dword [esp + 0x44], eax
mov dword [esp + 0x5c], eax
neg eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], 1
call fcn.1012da00
mov eax, dword [ebp + 0x83d64]
lea edx, [ebp + 0x83d68]
mov dword [esp + 4], edx
test eax, eax
je 0x101598e0
push 3
push 0
push 0x800
push dword [edx]
call eax
add esp, 0x10
test eax, eax
jne 0x10159ea0
lea edx, [ebp + 0x83d68]
jmp 0x101598e4
mov dword [esp + 4], edx
movzx eax, word [ebp + 0x14]
mov ecx, 3
sub eax, ecx
mov dword [esp + 0x10], ecx
push ebx
cmp eax, ecx
mov eax, dword [esp + 0x4c]
push esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
push edi
mov dword [esp + 0x18], eax
jle 0x10159b50
movzx esi, word [ebp + 0x16]
lea edi, [esi - 3]
mov ebx, dword [ebp + 0x194]
mov eax, ecx
and eax, 7
mov edx, ebx
lea ecx, [eax*4]
or ecx, 2
shr edx, cl
lea ecx, [eax + eax]
and edx, 1
add edx, 3
mov eax, edx
mov dword [esp + 0x38], edx
and eax, 1
or ecx, eax
add ecx, ecx
shr ebx, cl
and ebx, 3
mov dword [esp + 0x10], ebx
cmp edx, edi
jge 0x10159b2e
movzx eax, si
nop dword [eax + eax]
movzx ecx, ax
imul ecx, dword [esp + 0x1c]
mov eax, dword [ebp + 8]
mov ebp, 1
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], 0
add ecx, edx
lea edi, [eax + ecx*8]
movzx eax, word [edi + ebx*2]
mov dword [esp + 0x34], edi
mov dword [esp + 0x24], eax
nop word [eax + eax]
lea ecx, [ebp*8]
mov ebp, dword [esp + 0x18]
movzx edx, word [ecx + edi + 2]
mov eax, ecx
neg eax
mov dword [esp + 0x3c], edx
movzx esi, word [eax + edi + 2]
add eax, ebx
movzx ebx, word [edi + eax*2]
mov eax, dword [esp + 0x10]
add eax, ecx
movzx ecx, word [edi + eax*2]
mov eax, dword [esp + 0x24]
add eax, edx
add eax, esi
add eax, eax
sub eax, ebx
sub ebx, dword [esp + 0x24]
sub eax, ecx
mov dword [esp + 0x48], ebx
sub ecx, dword [esp + 0x24]
mov dword [esp + ebp + 0x58], eax
mov eax, esi
mov ebp, dword [esp + 0x14]
sub eax, edx
mov dword [esp + 0x40], eax
mov edx, ecx
sar eax, 0x1f
mov dword [esp + 0x2c], eax
mov eax, ebx
mov dword [esp + 0x44], ecx
lea ecx, [ebp*2]
add ecx, ebp
sar eax, 0x1f
mov dword [esp + 0x28], eax
mov eax, edi
shl ecx, 3
sub eax, ecx
sar edx, 0x1f
mov ecx, dword [esp + 0x2c]
xor ecx, dword [esp + 0x40]
movzx ebx, word [eax + 2]
mov eax, dword [esp + 0x14]
sub ebx, esi
mov ebp, ebx
sar ebp, 0x1f
lea eax, [eax + eax*2]
movzx edi, word [edi + eax*8 + 2]
mov eax, edx
xor eax, dword [esp + 0x44]
sub edi, dword [esp + 0x3c]
add ecx, eax
mov eax, dword [esp + 0x28]
mov esi, edi
xor eax, dword [esp + 0x48]
add ecx, eax
sar esi, 0x1f
sub ecx, edx
mov eax, esi
sub ecx, dword [esp + 0x28]
xor eax, edi
sub ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
lea edx, [ecx + ecx*2]
mov ecx, ebp
xor ecx, ebx
mov ebx, dword [esp + 0x10]
add ecx, eax
sub ecx, esi
sub ecx, ebp
lea eax, [edx + ecx*2]
mov ecx, dword [esp + 0x18]
mov dword [esp + ecx + 0x50], eax
mov eax, dword [esp + 0x30]
inc eax
mov dword [esp + 0x30], eax
shl eax, 2
mov dword [esp + 0x18], eax
mov ebp, dword [esp + eax + 0x60]
test ebp, ebp
mov dword [esp + 0x14], ebp
jg 0x101599a0
mov ecx, dword [esp + 0x50]
xor edx, edx
mov eax, dword [esp + 0x54]
mov esi, edi
cmp ecx, eax
mov dword [esp + 0x14], eax
mov eax, 4
mov dword [esp + 0x18], ecx
cmovg edx, eax
mov eax, dword [esp + edx + 0x60]
mov edx, dword [esp + edx + 0x58]
sar edx, 2
lea ecx, [eax*8]
mov eax, esi
movzx ebx, word [ecx + esi + 2]
sub eax, ecx
movzx eax, word [eax + 2]
cmp bx, ax
jae 0x10159af0
mov edi, eax
mov ecx, ebx
jmp 0x10159af4
mov edi, ebx
mov ecx, eax
cmp edx, edi
mov eax, edx
cmovge eax, edi
cmp ecx, eax
jg 0x10159b06
cmp edx, edi
mov ecx, edi
cmovl ecx, edx
mov ebp, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x10]
add edx, 2
mov word [esi + 2], cx
movzx esi, word [ebp + 0x16]
mov dword [esp + 0x38], edx
mov eax, esi
lea edi, [esi - 3]
cmp edx, edi
jl 0x10159960
mov ecx, dword [esp + 0x1c]
movzx eax, word [ebp + 0x14]
inc ecx
sub eax, 3
mov dword [esp + 0x1c], ecx
cmp ecx, eax
jl 0x10159915
lea edx, [ebp + 0x83d68]
mov dword [esp + 0x10], edx
mov eax, dword [ebp + 0x83d64]
test eax, eax
je 0x10159b72
push 3
push 1
push 0x800
push dword [edx]
call eax
add esp, 0x10
test eax, eax
jne 0x10159eb7
movzx eax, word [ebp + 0x14]
mov esi, 1
dec eax
mov dword [esp + 0x1c], esi
cmp eax, esi
jle 0x10159c8d
nop dword [eax + eax]
mov edi, dword [ebp + 0x194]
mov edx, esi
and edx, 7
mov eax, edi
lea ecx, [edx*4]
shr eax, cl
lea ecx, [edx + edx]
and eax, 1
or ecx, eax
add ecx, ecx
shr edi, cl
movzx ecx, word [ebp + 0x16]
lea ebx, [eax + 1]
and edi, 3
mov dword [esp + 0x38], ebx
lea eax, [ecx - 1]
cmp ebx, eax
jge 0x10159c7b
nop dword [eax + eax]
mov eax, dword [ebp + 8]
lea ebp, [esp + 0x60]
movzx ecx, cx
imul ecx, esi
add ecx, ebx
lea ebx, [eax + ecx*8]
mov eax, 1
nop word [eax + eax]
lea ecx, [eax*4]
mov dword [esp + 0x48], edi
lea esi, [eax*8]
mov eax, edi
sub eax, ecx
movzx edx, word [ebx + eax*2]
lea eax, [ecx + edi]
movzx eax, word [ebx + eax*2]
add edx, eax
mov eax, ebx
sub eax, esi
movzx eax, word [eax + 2]
sub edx, eax
movzx eax, word [esi + ebx + 2]
sub edx, eax
movzx eax, word [ebx + 2]
lea eax, [edx + eax*2]
sar eax, 1
cmp eax, 0xffff
jge 0x10159c3d
xor ecx, ecx
test eax, eax
cmovs eax, ecx
jmp 0x10159c42
mov eax, 0xffff
add ebp, 4
mov word [ebx + edi*2], ax
mov edi, 2
sub edi, dword [esp + 0x48]
mov eax, dword [ebp]
test eax, eax
jg 0x10159bf0
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x1c]
add ebx, 2
mov dword [esp + 0x38], ebx
movzx eax, word [ebp + 0x16]
mov ecx, eax
dec eax
cmp ebx, eax
jl 0x10159bd0
movzx eax, word [ebp + 0x14]
inc esi
dec eax
mov dword [esp + 0x1c], esi
cmp esi, eax
jl 0x10159b90
mov eax, dword [ebp + 0x83d64]
test eax, eax
je 0x10159cb3
mov ecx, dword [esp + 0x10]
push 3
push 2
push 0x800
push dword [ecx]
call eax
add esp, 0x10
test eax, eax
jne 0x10159ece
movzx eax, word [ebp + 0x14]
mov ecx, 1
dec eax
mov dword [esp + 0x1c], ecx
cmp eax, ecx
jle 0x10159e98
movzx esi, word [ebp + 0x16]
lea edi, [esi - 1]
mov edx, dword [ebp + 0x194]
mov eax, ecx
and eax, 7
mov ebx, edx
lea ecx, [eax*4]
or ecx, 2
shr ebx, cl
lea ecx, [eax + eax]
and ebx, 1
inc ebx
mov eax, ebx
mov dword [esp + 0x2c], ebx
and eax, 1
or ecx, eax
mov eax, 2
add ecx, ecx
shr edx, cl
and edx, 3
sub eax, edx
mov dword [esp + 0x10], eax
cmp ebx, edi
jge 0x10159e82
mov edx, dword [esp + 0x10]
movzx eax, si
nop dword [eax]
mov esi, dword [esp + 0x4c]
movzx ecx, ax
inc esi
imul ecx, dword [esp + 0x1c]
mov eax, dword [ebp + 8]
mov dword [esp + 0x38], 0
add ecx, ebx
lea edi, [eax + ecx*8]
mov dword [esp + 0x30], edi
test esi, esi
jle 0x10159e26
movzx eax, word [edi + 2]
mov dword [esp + 0x48], eax
add eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], 0
nop
mov eax, dword [esp + 0x10]
lea ecx, [esi*4]
add eax, ecx
sub edx, ecx
movzx ecx, word [edi + eax*2]
mov eax, edi
movzx edx, word [edi + edx*2]
mov dword [esp + 0x40], edx
sub edx, ecx
mov dword [esp + 0x28], ecx
mov ebp, edx
lea ecx, [esi*8]
mov dword [esp + 0x44], edx
movzx edi, word [ecx + edi + 2]
sub eax, ecx
mov ecx, edi
sar ebp, 0x1f
sub ecx, dword [esp + 0x48]
movzx ebx, word [eax + 2]
mov eax, ecx
sar eax, 0x1f
mov edx, ebx
sub edx, dword [esp + 0x48]
xor ecx, eax
mov esi, edx
sar esi, 0x1f
xor edx, esi
add ecx, edx
mov edx, dword [esp + 0x44]
xor edx, ebp
add ecx, edx
mov edx, dword [esp + 0x34]
sub ecx, eax
mov eax, dword [esp + 0x40]
sub eax, ebx
sub ecx, esi
sub eax, edi
sub ecx, ebp
add eax, dword [esp + 0x3c]
add eax, dword [esp + 0x28]
mov edi, dword [esp + 0x30]
mov dword [esp + edx + 0x58], eax
mov eax, dword [esp + 0x38]
inc eax
mov dword [esp + edx + 0x50], ecx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x38], eax
shl eax, 2
mov dword [esp + 0x34], eax
mov esi, dword [esp + eax + 0x64]
add esi, dword [esp + eax + 0x60]
test esi, esi
jg 0x10159d60
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], esi
jmp 0x10159e2e
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
cmp esi, ecx
je 0x10159e46
xor eax, eax
cmp esi, ecx
mov ecx, 4
cmovg eax, ecx
mov eax, dword [esp + eax + 0x58]
sar eax, 1
jmp 0x10159e51
mov eax, dword [esp + 0x58]
add eax, dword [esp + 0x5c]
sar eax, 2
cmp eax, 0xffff
jge 0x10159e61
xor ecx, ecx
test eax, eax
cmovs eax, ecx
jmp 0x10159e66
mov eax, 0xffff
mov word [edi + edx*2], ax
add ebx, 2
movzx esi, word [ebp + 0x16]
mov dword [esp + 0x2c], ebx
mov eax, esi
lea edi, [esi - 1]
cmp ebx, edi
jl 0x10159d20
mov ecx, dword [esp + 0x1c]
movzx eax, word [ebp + 0x14]
inc ecx
dec eax
mov dword [esp + 0x1c], ecx
cmp ecx, eax
jl 0x10159cd0
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x64
ret
push 0x103fa020
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 6
push eax
call fcn.1026cad5
push 0x103fa020
lea eax, [esp + 0x4c]
mov dword [esp + 0x4c], 6
push eax
call fcn.1026cad5
push 0x103fa020
lea eax, [esp + 0x4c]
mov dword [esp + 0x4c], 6
push eax
call fcn.1026cad5
int3