Function at 0x101ae910
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x254
mov eax, dword [esp + 0x260]
push ebx
push esi
push edi
mov eax, dword [eax*4 + 0x103e64ac]
xor esi, esi
imul eax, dword [esp + 0x280]
sar eax, 6
mov dword [esp + 0x28], eax
or eax, 0xffffffff
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x288]
mov edi, 0x1000
cmp eax, esi
mov word [esp + 0x10], si
mov word [esp + 0x12], si
mov dword [esp + 0x4c], edi
mov dword [esp + 0x18], esi
je 0x101ae9a6
mov ecx, dword [esp + 0x268]
push ecx
call dword [0x104d84f4]
imul eax, dword [esp + 0x288]
mov edx, 0x8000
add esp, 4
add eax, eax
mov ecx, edx
mov ebx, ecx
imul ebx, ecx
cmp ebx, eax
jbe 0x101ae992
xor ecx, edx
shr edx, 1
je 0x101ae99a
or ecx, edx
jmp 0x101ae987
lea eax, [ecx + 0x30]
shr eax, 6
mov dword [esp + 0x44], eax
jmp 0x101ae9aa
mov dword [esp + 0x44], esi
mov eax, dword [esp + 0x278]
mov ecx, dword [esp + 0x270]
mov edx, dword [esp + 0x264]
cmp eax, esi
mov dword [esp + 0x58], edi
jl 0x101ae9e4
xor edi, edi
mov di, word [ecx + eax*2]
cmp word [edx + edi*2], si
jne 0x101ae9d8
dec eax
jns 0x101ae9c7
jmp 0x101ae9e4
cmp eax, 3
mov dword [esp + 0x278], eax
jge 0x101ae9f0
mov eax, 3
mov dword [esp + 0x278], eax
cmp eax, esi
mov dword [esp + 0xc], esi
jl 0x101af0f0
push ebp
mov edx, dword [esp + 0x274]
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov cx, word [edx + eax*2]
mov edx, dword [esp + 0x278]
xor eax, eax
mov ax, word [edx + ecx*2]
mov edx, dword [esp + 0x26c]
imul eax, dword [esp + 0x270]
sar eax, 4
movsx ebx, word [edx + ecx*2]
lea edi, [eax - 1]
lea ebp, [eax + eax]
or edi, 1
lea eax, [edi + ebp]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x268]
movsx edx, word [eax + ecx*2]
mov eax, dword [esp + 0x28c]
mov dword [esp + 0x20], edx
test eax, eax
je 0x101aeaf6
movsx esi, word [ecx*2 + 0x103e5bf8]
mov eax, dword [esp + 0x48]
and eax, 0xffff
imul esi, eax
movsx eax, bx
cdq
xor eax, edx
add esi, 0x20
sub eax, edx
sar esi, 7
shl eax, 4
cmp esi, 0x10000
jb 0x101aea91
mov esi, 0xffff
cmp ax, si
ja 0x101aea9a
xor eax, eax
jmp 0x101aea9c
sub eax, esi
xor edx, edx
and eax, 0xffff
mov dx, word [ecx*2 + 0x103e5cf8]
add edx, eax
xor eax, eax
mov ax, word [ecx*2 + 0x103e5c78]
imul edx, eax
sar edx, 0x10
and edx, 0xffff
movsx eax, bx
mov esi, edx
imul esi, edx
mov edx, eax
imul esi, dword [esp + 0x2c]
imul edx, eax
imul edx, dword [esp + 0x2c]
sar esi, 4
mov eax, 0x66666667
lea edx, [esi + edx*4]
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [esp + 0x54], edx
jmp 0x101aeb04
mov eax, ebx
imul eax, ebx
imul eax, dword [esp + 0x2c]
mov dword [esp + 0x54], eax
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x1c]
add esi, edx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], 0xf0000000
lea esi, [edx + 1]
cmp esi, 3
jae 0x101aecc5
mov eax, dword [esp + 0x10]
shl eax, 2
mov dword [esp + 0x20], eax
lea eax, [esp + eax + 0x162]
test ebx, ebx
mov dword [esp + 0x3c], eax
jge 0x101aeb51
mov edx, dword [esp + 0x24]
mov word [eax], 0xffff
add ebx, edx
jmp 0x101aeb5e
mov word [eax], 1
mov eax, dword [esp + 0x24]
sub eax, ebx
mov ebx, eax
mov eax, dword [esp + 0x28c]
test eax, eax
je 0x101aec02
movsx esi, word [ecx*2 + 0x103e5bf8]
mov edx, dword [esp + 0x48]
and edx, 0xffff
imul esi, edx
movsx edi, bx
mov eax, edi
add esi, 0x20
cdq
xor eax, edx
sub eax, edx
sar esi, 7
shl eax, 4
cmp esi, 0x10000
jb 0x101aeba2
mov esi, 0xffff
cmp ax, si
ja 0x101aebab
xor eax, eax
jmp 0x101aebad
sub eax, esi
xor edx, edx
and eax, 0xffff
mov dx, word [ecx*2 + 0x103e5cf8]
add edx, eax
xor eax, eax
mov ax, word [ecx*2 + 0x103e5c78]
imul edx, eax
sar edx, 0x10
and edx, 0xffff
mov eax, dword [esp + 0x2c]
mov ecx, edx
imul ecx, edx
mov edx, edi
imul ecx, eax
imul edx, edi
imul edx, eax
sar ecx, 4
mov eax, 0x66666667
lea ecx, [ecx + edx*4]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov ebp, edx
jmp 0x101aec0c
mov ebp, ebx
imul ebp, ebx
imul ebp, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x40]
lea eax, [esp + ecx + 0x160]
mov ecx, dword [esp + ecx + 0x5c]
mov dword [esp + 0x24], eax
lea edx, [ecx + ebp + 0x1800]
mov word [eax], 1
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
mov ecx, edx
sub ecx, esi
test ecx, ecx
jle 0x101aecaa
sub edx, ecx
mov eax, 0x103e63f8
dec eax
lea ebx, [esp + edx*4 + 0x60]
mov edx, 0x103e62f8
sub edx, eax
lea edi, [eax + ecx]
dec edx
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x20]
mov esi, dword [ebx]
xor eax, eax
add esi, ebp
mov al, byte [edx + edi]
xor edx, edx
mov dl, byte [edi]
shl eax, 0xb
shl edx, 0xb
add eax, esi
add edx, esi
cmp eax, dword [esp + 0x18]
jae 0x101aec86
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
mov word [eax], cx
cmp edx, dword [esp + 0x1c]
jae 0x101aec9d
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x10]
mov word [esp + 0x14], cx
mov dword [esp + 0x44], edx
dec ecx
add ebx, 4
dec edi
test ecx, ecx
jg 0x101aec5a
mov edx, dword [esp + 0x10]
cmp dword [esp + 0x44], edx
jne 0x101af07a
mov eax, dword [esp + 0x3c]
mov cx, word [eax]
mov word [esp + 0x16], cx
jmp 0x101af07a
lea eax, [edx + 0x19]
cmp eax, 0x33
jae 0x101af019
mov eax, edx
imul eax, ebp
sub eax, ebx
cmp edx, 1
jle 0x101aed50
add eax, edi
lea esi, [edx - 1]
mov edi, eax
mov dword [esp + 0x24], esi
sub edi, ebp
cmp edx, 0x18
mov dword [esp + 0x28], edi
jg 0x101aed05
mov edi, dword [edx*4 + 0x103e6434]
mov dword [esp + 0x38], edi
mov edi, 0x103e5df8
jmp 0x101aed0e
mov edi, 0x103e5df8
mov dword [esp + 0x38], edi
cmp esi, 0x18
jg 0x101aed20
mov ebx, dword [esi*4 + 0x103e6434]
mov dword [esp + 0x4c], ebx
jmp 0x101aed24
mov dword [esp + 0x4c], edi
cmp edx, 6
jg 0x101aed36
mov edx, dword [edx*4 + 0x103e6494]
mov dword [esp + 0x30], edx
jmp 0x101aed3a
mov dword [esp + 0x30], edi
cmp esi, 6
jg 0x101aedc7
mov edx, dword [esi*4 + 0x103e6494]
mov dword [esp + 0x34], edx
jmp 0x101aedcb
sub eax, edi
cmp edx, 0xffffffe8
mov dword [esp + 0x24], esi
lea edi, [eax + ebp]
mov dword [esp + 0x28], edi
jl 0x101aed78
mov edi, edx
not edi
mov edi, dword [edi*4 + 0x103e6438]
mov dword [esp + 0x38], edi
mov edi, 0x103e5df8
jmp 0x101aed81
mov edi, 0x103e5df8
mov dword [esp + 0x38], edi
cmp esi, 0xffffffe8
jl 0x101aed97
mov ebx, esi
not ebx
mov ebx, dword [ebx*4 + 0x103e6438]
mov dword [esp + 0x4c], ebx
jmp 0x101aed9b
mov dword [esp + 0x4c], edi
cmp edx, 0xfffffffa
jl 0x101aedaf
not edx
mov edx, dword [edx*4 + 0x103e6498]
mov dword [esp + 0x30], edx
jmp 0x101aedb3
mov dword [esp + 0x30], edi
cmp esi, 0xfffffffa
jl 0x101aedc7
not esi
mov edx, dword [esi*4 + 0x103e6498]
mov dword [esp + 0x34], edx
jmp 0x101aedcb
mov dword [esp + 0x34], edi
mov edx, dword [esp + 0x28c]
test edx, edx
je 0x101aeef6
mov ebx, dword [esp + 0x48]
movsx esi, word [ecx*2 + 0x103e5bf8]
and ebx, 0xffff
imul esi, ebx
movsx edi, ax
mov eax, edi
add esi, 0x20
cdq
xor eax, edx
sub eax, edx
sar esi, 7
shl eax, 4
cmp esi, 0x10000
jb 0x101aee0f
mov esi, 0xffff
cmp ax, si
ja 0x101aee18
xor eax, eax
jmp 0x101aee1a
sub eax, esi
xor edx, edx
and eax, 0xffff
mov dx, word [ecx*2 + 0x103e5cf8]
mov ebp, dword [esp + 0x2c]
add edx, eax
xor eax, eax
mov ax, word [ecx*2 + 0x103e5c78]
imul edx, eax
sar edx, 0x10
and edx, 0xffff
mov eax, edx
imul eax, edx
mov edx, edi
imul eax, ebp
imul edx, edi
imul edx, ebp
sar eax, 4
movsx esi, word [ecx*2 + 0x103e5bf8]
lea edx, [eax + edx*4]
mov eax, 0x66666667
imul edx
imul esi, ebx
movsx edi, word [esp + 0x28]
sar edx, 1
mov eax, edx
add esi, 0x20
shr eax, 0x1f
add edx, eax
mov eax, edi
mov dword [esp + 0x3c], edx
cdq
xor eax, edx
sub eax, edx
sar esi, 7
shl eax, 4
cmp esi, 0x10000
jb 0x101aee9c
mov esi, 0xffff
cmp ax, si
ja 0x101aeea5
xor eax, eax
jmp 0x101aeea7
sub eax, esi
xor edx, edx
and eax, 0xffff
mov dx, word [ecx*2 + 0x103e5cf8]
add edx, eax
xor eax, eax
mov ax, word [ecx*2 + 0x103e5c78]
imul edx, eax
sar edx, 0x10
and edx, 0xffff
mov eax, 0x66666667
mov ecx, edx
imul ecx, edx
mov edx, edi
imul ecx, ebp
imul edx, edi
imul edx, ebp
sar ecx, 4
lea ecx, [ecx + edx*4]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
jmp 0x101aef10
mov ecx, eax
mov edx, dword [esp + 0x28]
imul ecx, eax
imul edx, edx
mov eax, dword [esp + 0x2c]
imul ecx, eax
imul edx, eax
mov dword [esp + 0x3c], ecx
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
sub edx, esi
mov esi, dword [esp + 0x10]
sub esi, ecx
mov ebx, edx
test esi, esi
mov dword [esp + 0x58], ebx
jle 0x101af07a
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x4c]
mov edx, ebp
sub edx, esi
lea eax, [ecx - 1]
lea ecx, [esp + edx*4 + 0x60]
lea edi, [eax + esi]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x38]
sub ecx, eax
dec ecx
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x30]
sub ecx, eax
dec ecx
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x34]
sub ecx, eax
dec ecx
mov dword [esp + 0x34], ecx
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov edx, dword [edx]
add edx, ecx
xor ecx, ecx
mov cl, byte [eax + edi]
xor eax, eax
mov al, byte [edi]
shl eax, 0xb
shl ecx, 0xb
add eax, edx
add ecx, edx
add eax, ebx
cmp eax, ecx
jae 0x101aef9a
mov ecx, eax
mov eax, dword [esp + 0x24]
jmp 0x101aef9e
mov eax, dword [esp + 0x20]
cmp ecx, dword [esp + 0x18]
jae 0x101aefb8
mov dword [esp + 0x18], ecx
mov word [esp + ebp*4 + 0x160], si
mov word [esp + ebp*4 + 0x162], ax
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
xor eax, eax
mov al, byte [ecx + edi]
xor ecx, ecx
mov cl, byte [ebx + edi]
mov ebx, dword [esp + 0x58]
shl ecx, 0xb
shl eax, 0xb
add ecx, edx
add eax, edx
add ecx, ebx
cmp ecx, eax
jae 0x101aefe6
mov eax, ecx
mov ecx, dword [esp + 0x24]
jmp 0x101aefea
mov ecx, dword [esp + 0x20]
cmp eax, dword [esp + 0x1c]
jae 0x101af002
mov dword [esp + 0x1c], eax
mov word [esp + 0x14], si
mov word [esp + 0x16], cx
mov dword [esp + 0x44], ebp
mov edx, dword [esp + 0x28]
dec esi
add edx, 4
dec edi
test esi, esi
mov dword [esp + 0x28], edx
jg 0x101aef69
jmp 0x101af07a
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x40]
mov ecx, edi
sub ecx, esi
test ecx, ecx
jle 0x101af07a
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov eax, edi
sub eax, ecx
lea ebx, [esp + eax*4 + 0x60]
mov eax, dword [ebx]
add eax, 0xf000
cmp eax, esi
jae 0x101af056
mov esi, eax
mov word [esp + edi*4 + 0x160], cx
mov word [esp + edi*4 + 0x162], dx
cmp eax, ebp
jae 0x101af06a
mov ebp, eax
mov word [esp + 0x14], cx
mov word [esp + 0x16], dx
mov dword [esp + 0x44], edi
dec ecx
add ebx, 4
test ecx, ecx
jg 0x101af039
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
lea edi, [esi + edx]
cmp eax, edi
mov dword [esp + ecx*4 + 0x60], eax
jae 0x101af09f
mov dword [esp + 0x50], eax
mov dword [esp + 0x40], ecx
jmp 0x101af0d3
mov eax, dword [esp + 0x40]
add edx, 0x800
cmp dword [esp + eax*4 + 0x60], edx
jbe 0x101af0bc
mov ebx, dword [esp + eax*4 + 0x64]
inc eax
cmp ebx, edx
ja 0x101af0af
mov dword [esp + 0x40], eax
cmp eax, ecx
jge 0x101af0cf
mov ebp, dword [esp + eax*4 + 0x60]
add ebp, esi
mov dword [esp + eax*4 + 0x60], ebp
inc eax
cmp eax, ecx
jl 0x101af0c0
mov dword [esp + 0x50], edi
mov eax, dword [esp + 0x27c]
inc ecx
cmp ecx, eax
mov dword [esp + 0x10], ecx
jle 0x101ae9fd
mov edx, dword [esp + 0x44]
pop ebp
test edx, edx
jge 0x101af101
mov eax, dword [esp + 0x27c]
pop edi
pop esi
pop ebx
add esp, 0x254
ret
mov ebx, dword [esp + 0x264]
mov ecx, 0x20
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x270]
mov ax, word [esp + 0x12]
xor ecx, ecx
mov cx, word [edi + edx*2]
mov word [ebx + ecx*2], ax
movsx ecx, word [esp + 0x10]
movsx eax, ax
sub edx, ecx
mov ecx, edx
cdq
mov esi, eax
xor esi, edx
sub esi, edx
test ecx, ecx
jl 0x101af168
mov ax, word [esp + ecx*4 + 0x15e]
xor edx, edx
mov dx, word [edi + ecx*2]
mov word [ebx + edx*2], ax
movsx eax, ax
cdq
xor eax, edx
sub eax, edx
add esi, eax
movsx eax, word [esp + ecx*4 + 0x15c]
sub ecx, eax
jns 0x101af140
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x254
ret