Function at 0x408ad0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15a0
call fcn.00409570
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15b4]
lea eax, [esp + 0x1c]
push 0x84
push 0
push eax
call fcn.00409730
add esp, 0xc
cmp dword [esp + 0x15bc], 0
je 0x408b88
test esi, esi
mov ecx, esi
jle 0x40937e
xor eax, eax
cmp ecx, 1
je 0x408b58
mov ecx, dword [esp + 0x15b4]
and ecx, 0x7ffffffe
lea eax, [ebx + ebx*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x1c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x1c]
add eax, 2
cmp ecx, eax
jne 0x408b40
mov ecx, dword [esp + 0x15b4]
test cl, 1
je 0x40937e
lea ecx, [ebx + ebx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15b4]
inc dword [esp + eax*4 + 0x1c]
jmp 0x40937e
lea ebp, [ebx + ebx*8]
mov eax, ebp
shl eax, 6
test esi, esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
jle 0x408c91
cmp esi, 1
jne 0x408d87
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15b4]
test cl, 1
je 0x408bdf
mov ecx, dword [esp + 0x14]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408bdf
mov word [esp + ebx*4 + 0x4a0], cx
mov word [esp + ebx*4 + 0x4a2], ax
inc ebx
lea eax, [esp + 0x920]
push 0x800
push 0
push eax
call fcn.00409730
add esp, 0xc
test ebx, ebx
sete al
je 0x408ca8
mov byte [esp], al
xor eax, eax
cmp ebx, 1
je 0x408c5f
mov edx, ebx
and edx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4a0]
movzx esi, cl
inc dword [esp + esi*4 + 0x920]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd20]
movzx ecx, word [esp + eax*4 + 0x4a4]
movzx esi, cl
inc dword [esp + esi*4 + 0x920]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd20]
add eax, 2
cmp edx, eax
jne 0x408c20
test bl, 1
je 0x408c80
movzx eax, word [esp + eax*4 + 0x4a0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x920]
shr eax, 8
inc dword [esp + eax*4 + 0xd20]
mov eax, dword [esp + 0xd20]
mov dword [esp + 8], eax
movzx edx, byte [esp]
jmp 0x408cb4
lea eax, [esp + 0x920]
push 0x800
push 0
push eax
call fcn.00409730
add esp, 0xc
xor ebx, ebx
mov dl, 1
mov dword [esp + 8], 0
lea esi, [ebx - 1]
xor eax, eax
mov ecx, 3
nop
nop
mov dword [esp + ecx*4 + 0x94], eax
add eax, dword [esp + ecx*4 + 0x914]
mov dword [esp + ecx*4 + 0x98], eax
add eax, dword [esp + ecx*4 + 0x918]
mov dword [esp + ecx*4 + 0x9c], eax
add eax, dword [esp + ecx*4 + 0x91c]
mov dword [esp + ecx*4 + 0xa0], eax
add eax, dword [esp + ecx*4 + 0x920]
add ecx, 4
cmp ecx, 0x103
jne 0x408cc0
test dl, dl
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebp
mov dword [esp + 4], esi
jne 0x408e27
mov byte [esp], dl
test esi, esi
je 0x408de5
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [esp + eax*4 + 0x4a0]
mov edi, dword [esp + esi*4 + 0xa0]
lea ebp, [edi + 1]
mov dword [esp + esi*4 + 0xa0], ebp
mov esi, dword [esp + eax*4 + 0x4a0]
mov ebp, dword [esp + eax*4 + 0x4a4]
mov dword [esp + edi*4 + 0x1120], esi
movzx esi, byte [esp + eax*4 + 0x4a4]
mov edi, dword [esp + esi*4 + 0xa0]
lea edx, [edi + 1]
mov dword [esp + esi*4 + 0xa0], edx
mov dword [esp + edi*4 + 0x1120], ebp
add eax, 2
cmp ecx, eax
jne 0x408d30
jmp 0x408de7
mov ecx, esi
and ecx, 0x7ffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x408dab
add eax, 2
cmp ecx, eax
je 0x408bad
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408dc6
mov word [esp + ebx*4 + 0x4a0], si
mov word [esp + ebx*4 + 0x4a2], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x408da0
mov word [esp + ebx*4 + 0x4a0], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4a2], si
inc ebx
jmp 0x408da0
xor eax, eax
test bl, 1
mov ebp, dword [esp + 0xc]
mov esi, dword [esp + 4]
movzx edx, byte [esp]
je 0x408e27
movzx ecx, byte [esp + eax*4 + 0x4a0]
mov edx, dword [esp + ecx*4 + 0xa0]
lea esi, [edx + 1]
mov dword [esp + ecx*4 + 0xa0], esi
mov esi, dword [esp + 4]
mov eax, dword [esp + eax*4 + 0x4a0]
mov dword [esp + edx*4 + 0x1120], eax
movzx edx, byte [esp]
cmp dword [esp + 8], ebx
jne 0x408e41
lea edi, [esp + 0x1120]
test ebx, ebx
jne 0x408f51
jmp 0x409267
xor eax, eax
mov ecx, 3
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + ecx*4 + 0x94], eax
add eax, dword [esp + ecx*4 + 0xd14]
mov dword [esp + ecx*4 + 0x98], eax
add eax, dword [esp + ecx*4 + 0xd18]
mov dword [esp + ecx*4 + 0x9c], eax
add eax, dword [esp + ecx*4 + 0xd1c]
mov dword [esp + ecx*4 + 0xa0], eax
add eax, dword [esp + ecx*4 + 0xd20]
add ecx, 4
cmp ecx, 0x103
jne 0x408e50
test dl, dl
jne 0x408f42
test esi, esi
je 0x408f0d
mov eax, ebx
and eax, 0xfffffffe
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + ecx*4 + 0x1120]
movzx edx, dh
mov esi, dword [esp + edx*4 + 0xa0]
lea edi, [esi + 1]
mov dword [esp + edx*4 + 0xa0], edi
mov edx, dword [esp + ecx*4 + 0x1120]
mov edi, dword [esp + ecx*4 + 0x1124]
mov dword [esp + esi*4 + 0x4a0], edx
movzx edx, word [esp + ecx*4 + 0x1124]
movzx edx, dh
mov esi, dword [esp + edx*4 + 0xa0]
lea ebp, [esi + 1]
mov dword [esp + edx*4 + 0xa0], ebp
mov dword [esp + esi*4 + 0x4a0], edi
add ecx, 2
cmp eax, ecx
jne 0x408eb0
jmp 0x408f0f
xor ecx, ecx
test bl, 1
mov ebp, dword [esp + 0xc]
je 0x408f42
movzx eax, word [esp + ecx*4 + 0x1120]
movzx eax, ah
mov edx, dword [esp + eax*4 + 0xa0]
lea esi, [edx + 1]
mov dword [esp + eax*4 + 0xa0], esi
mov eax, dword [esp + ecx*4 + 0x1120]
mov dword [esp + edx*4 + 0x4a0], eax
lea edi, [esp + 0x4a0]
test ebx, ebx
je 0x409267
cmp ebx, 1
jne 0x408f60
mov word [edi], 1
jmp 0x40918e
movzx eax, word [edi + 4]
add word [edi], ax
cmp ebx, 3
jl 0x40900b
mov ecx, 2
mov eax, 2
sub eax, ebx
mov dword [esp], eax
xor esi, esi
mov edx, 1
jmp 0x408fa9
movzx ebp, word [edi + esi*4]
add word [edi + edx*4], bp
mov word [edi + esi*4], dx
inc esi
mov eax, dword [esp]
add eax, edx
inc eax
inc edx
cmp eax, 1
je 0x40900b
cmp ecx, ebx
jge 0x408fd0
movzx ebp, word [edi + ecx*4]
movzx eax, word [edi + esi*4]
cmp ax, bp
jb 0x408fd4
inc ecx
mov word [edi + edx*4], bp
cmp ecx, ebx
jge 0x408f90
jmp 0x408fe1
movzx eax, word [edi + esi*4]
mov word [edi + edx*4], ax
mov word [edi + esi*4], dx
inc esi
cmp ecx, ebx
jge 0x408f90
cmp esi, edx
jge 0x409000
movzx ebp, word [edi + esi*4]
movzx eax, word [edi + ecx*4]
cmp bp, ax
jb 0x408f94
jmp 0x409004
movzx eax, word [edi + ecx*4]
inc ecx
add word [edi + edx*4], ax
jmp 0x408f9d
mov word [edi + ebx*4 - 8], 0
mov eax, ebx
add eax, 0xfffffffd
js 0x409091
mov edx, ebx
and edx, 3
xor edx, 2
mov ecx, eax
je 0x409041
mov ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
movzx esi, word [edi + esi*4]
inc esi
mov word [edi + ecx*4], si
dec ecx
dec edx
jne 0x409030
cmp eax, 3
jb 0x409091
inc ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [edi + ecx*4 - 4]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + ecx*4 - 4], ax
movzx eax, word [edi + ecx*4 - 8]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + ecx*4 - 8], ax
movzx eax, word [edi + ecx*4 - 0xc]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + ecx*4 - 0xc], ax
movzx eax, word [edi + ecx*4 - 0x10]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + ecx*4 - 0x10], ax
add ecx, 0xfffffffc
jne 0x409050
lea ecx, [ebx - 2]
mov eax, 1
xor edx, edx
mov esi, dword [esp + 4]
jmp 0x4090c4
mov ebp, dword [esp + 8]
lea eax, [ebp*2]
inc edx
test ebp, ebp
je 0x409182
test ecx, ecx
mov dword [esp + 4], esi
mov dword [esp], eax
js 0x409100
lea ebp, [ecx + 1]
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
cmp edx, esi
jne 0x409110
inc eax
dec ecx
cmp ebp, eax
jne 0x4090e0
mov ecx, 0xffffffff
jmp 0x409112
xor ebp, ebp
jmp 0x409119
mov ebp, eax
mov esi, dword [esp + 4]
mov eax, dword [esp]
mov dword [esp + 8], ebp
sub eax, ebp
jle 0x4090b0
and eax, 3
je 0x409147
lea ebp, [edi + esi*4]
xor esi, esi
nop
nop
nop
nop
nop
mov word [ebp], dx
inc esi
add ebp, 0xfffffffc
cmp eax, esi
jne 0x409130
mov eax, dword [esp]
sub eax, esi
sub dword [esp + 4], esi
jmp 0x40914a
mov eax, dword [esp]
mov ebp, dword [esp + 8]
mov esi, ebp
sub esi, dword [esp]
cmp esi, 0xfffffffc
mov esi, dword [esp + 4]
ja 0x4090b4
mov word [edi + esi*4], dx
mov word [edi + esi*4 - 4], dx
mov word [edi + esi*4 - 8], dx
mov word [edi + esi*4 - 0xc], dx
add esi, 0xfffffffc
add eax, 0xfffffffc
cmp eax, ebp
jg 0x409160
jmp 0x4090b4
test ebx, ebx
mov ebp, dword [esp + 0xc]
jle 0x409267
xor eax, eax
movzx ecx, word [edi + eax*4]
inc dword [esp + ecx*4 + 0x1c]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, ebx
jl 0x409190
cmp ebx, 2
jl 0x409267
mov edx, dword [esp + 0x15b8]
cmp edx, 0x20
jge 0x40921c
mov eax, dword [esp + edx*4 + 0x1c]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x4091dc
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x20]
inc ecx
mov dword [esp + esi*4 + 0x1c], eax
dec edx
jne 0x4091d0
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x409218
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x20]
mov dword [esp + edx*4 + 0x1c], eax
add eax, dword [esp + ecx*4 + 0x24]
mov dword [esp + edx*4 + 0x1c], eax
add eax, dword [esp + ecx*4 + 0x28]
mov dword [esp + edx*4 + 0x1c], eax
add eax, dword [esp + ecx*4 + 0x2c]
add ecx, 4
mov dword [esp + edx*4 + 0x1c], eax
cmp ecx, 0x20
jne 0x4091f0
test edx, edx
jle 0x409257
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x18]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x409230
mov edx, 1
mov ecx, dword [esp + 0x15b8]
shl edx, cl
cmp eax, edx
jne 0x4094cd
jmp 0x409267
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x4094cd
shl ebp, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00409730
add esp, 0xc
mov eax, dword [esp + 0x14]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00409730
add esp, 0xc
cmp dword [esp + 0x15b8], 0
jle 0x40936f
add edi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0x10]
mov dword [esp], edi
jmp 0x4092d2
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15b8]
mov eax, ecx
je 0x40936f
mov ecx, dword [esp + eax*4 + 0x1c]
test ecx, ecx
jle 0x4092c0
mov edx, ecx
and edx, 3
je 0x409320
mov dword [esp + 4], ecx
mov ecx, edi
mov edi, ebp
lea ebp, [ecx + ebx*4]
xor esi, esi
nop
nop
movzx ecx, word [ebp]
mov byte [ecx + edi + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x4092f0
sub ebx, esi
mov ecx, dword [esp + 4]
mov edx, ecx
sub edx, esi
mov ebp, edi
mov edi, dword [esp]
cmp ecx, 4
jb 0x4092c0
jmp 0x409327
mov edx, ecx
cmp ecx, 4
jb 0x4092c0
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + ebx*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 0xc]
add ebx, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x409330
jmp 0x4092c0
mov ecx, dword [esp + 0x15b4]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x924], 0
mov eax, dword [esp + 0x15b8]
cmp eax, 2
jl 0x4093ff
lea ecx, [eax - 1]
cmp eax, 2
jne 0x4093a6
xor eax, eax
mov edx, 2
jmp 0x4093e6
mov esi, ebx
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 + 0x20]
add eax, eax
mov dword [esp + edx*4 + 0x928], eax
add eax, dword [esp + edx*4 + 0x24]
add eax, eax
mov dword [esp + edx*4 + 0x92c], eax
add edx, 2
cmp ebx, edx
jne 0x4093c0
add edx, 2
mov ebx, esi
test cl, 1
mov ecx, dword [esp + 0x15b4]
je 0x4093ff
add eax, dword [esp + edx*4 + 0x18]
add eax, eax
mov dword [esp + edx*4 + 0x920], eax
test ecx, ecx
jle 0x4094c2
xor eax, eax
lea esi, [ebx + ebx*8]
mov edx, esi
shl edx, 5
add edx, edi
shl esi, 6
add esi, edi
mov dword [esp + 4], esi
jmp 0x40943c
mov ecx, dword [esp + 4]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15b4]
inc eax
cmp eax, ecx
je 0x4094c2
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x409433
mov ecx, dword [esp + ebx*4 + 0x920]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x920], edi
xor edi, edi
cmp bl, 4
jb 0x40949f
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
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 0x409470
and ebx, 3
je 0x409420
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 0x4094b0
jmp 0x409420
add esp, 0x15a0
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x15b8]
dec dword [esp + ecx*4 + 0x1c]
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x4094f8
mov esi, dword [esp + ecx*4 + 0x18]
dec ecx
test esi, esi
je 0x4094e0
dec esi
mov dword [esp + ecx*4 + 0x1c], esi
add dword [esp + ecx*4 + 0x20], 2
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
cmp eax, edx
jne 0x4094cd
jmp 0x409267