Function at 0x408260
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.00408be0
mov esi, edx
mov edi, ecx
mov ebx, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.00408d20
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x18], esi
je 0x40830e
test ebx, ebx
jle 0x408a90
xor eax, eax
cmp ebx, 1
je 0x4082e8
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
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 0x4082d0
test bl, 1
je 0x408a90
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x28]
jmp 0x408a90
lea eax, [esi + esi*8]
mov dword [esp + 0x14], eax
shl eax, 6
test ebx, ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0x24], eax
jle 0x408409
cmp ebx, 1
jne 0x4085eb
xor eax, eax
xor ebp, ebp
test bl, 1
mov ebx, ebp
mov edx, dword [esp + 0x10]
je 0x408366
mov ecx, dword [esp + 0x24]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408366
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.00408d20
add esp, 0xc
test ebx, ebx
sete byte [esp + 0xc]
je 0x408420
xor eax, eax
cmp ebx, 1
je 0x4083df
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
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 0x4083a0
test bl, 1
je 0x408400
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 0x408429
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.00408d20
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0xc], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x1c], eax
xor ecx, ecx
lea eax, [esp + 0xac]
mov dword [esp + 8], eax
lea eax, [esp + 0x112c]
lea esi, [esp + 0x52c]
xor edx, edx
mov dword [esp], ebx
jmp 0x40847e
mov edx, dword [esp + 4]
inc edx
add ecx, 8
mov esi, dword [esp + 0x20]
add esi, 0x400
mov eax, ebp
cmp edx, dword [esp + 0x1c]
je 0x408530
mov dword [esp + 4], edx
mov ebp, dword [esp + 8]
mov dword [esp + 8], eax
mov edx, 3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xd20], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xd24], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xd28], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xd2c], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x4084a0
mov dword [esp + 0x20], esi
cmp byte [esp + 0xc], 0
jne 0x408460
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xd2c]
mov ebx, dword [ebp + edx*4]
mov esi, ebp
mov ebp, dword [esp + 8]
mov dword [ebp + edi*4], ebx
mov ebp, esi
mov ebx, edi
and edi, 1
xor ebx, 1
lea edi, [ebx + edi*2]
mov ebx, dword [esp]
mov dword [esp + eax*4 + 0xd2c], edi
inc edx
cmp ebx, edx
jne 0x4084f0
jmp 0x408460
test ebx, ebx
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 8]
je 0x40894b
mov edx, dword [esp]
cmp edx, 1
jne 0x408552
mov word [ebx], 1
jmp 0x4087ef
movzx eax, word [ebx + 4]
add word [ebx], ax
lea ebp, [edx - 2]
cmp edx, 3
jl 0x408645
mov dword [esp + 0xc], ebp
mov ecx, 2
mov edi, 2
sub edi, edx
mov esi, 1
xor ebp, ebp
jmp 0x40859b
movzx edx, word [ebx + ebp*4]
add word [ebx + esi*4], dx
mov word [ebx + ebp*4], si
inc ebp
lea eax, [edi + esi]
inc eax
inc esi
cmp eax, 1
je 0x408651
movzx eax, word [ebx + ebp*4]
cmp ecx, dword [esp]
jge 0x4085ad
movzx edx, word [ebx + ecx*4]
cmp ax, dx
jae 0x4085c0
mov word [ebx + esi*4], ax
mov word [ebx + ebp*4], si
inc ebp
cmp ecx, dword [esp]
jge 0x408580
jmp 0x4085ca
inc ecx
mov word [ebx + esi*4], dx
cmp ecx, dword [esp]
jge 0x408580
cmp ebp, esi
jge 0x4085e0
movzx edx, word [ebx + ebp*4]
movzx eax, word [ebx + ecx*4]
cmp dx, ax
jb 0x408584
jmp 0x4085e4
movzx eax, word [ebx + ecx*4]
inc ecx
add word [ebx + esi*4], ax
jmp 0x40858d
mov ecx, ebx
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebp, ebp
jmp 0x40860b
add eax, 2
cmp ecx, eax
je 0x408335
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408626
mov word [esp + ebp*4 + 0xac], si
mov word [esp + ebp*4 + 0xae], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x408600
mov word [esp + ebp*4 + 0xac], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0xae], si
inc ebp
jmp 0x408600
mov word [ebx + edx*4 - 8], 0
jmp 0x4086d1
mov eax, dword [esp]
mov word [ebx + eax*4 - 8], 0
add eax, 0xfffffffd
mov ebp, dword [esp + 0xc]
mov edx, ebp
mov ecx, eax
and edx, 3
je 0x408681
mov ecx, eax
nop
nop
nop
movzx esi, word [ebx + ecx*4]
movzx esi, word [ebx + esi*4]
inc esi
mov word [ebx + ecx*4], si
dec ecx
dec edx
jne 0x408670
cmp eax, 3
jb 0x4086d1
inc ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebx + ecx*4 - 4]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + ecx*4 - 4], ax
movzx eax, word [ebx + ecx*4 - 8]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + ecx*4 - 8], ax
movzx eax, word [ebx + ecx*4 - 0xc]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + ecx*4 - 0xc], ax
movzx eax, word [ebx + ecx*4 - 0x10]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + ecx*4 - 0x10], ax
add ecx, 0xfffffffc
jne 0x408690
mov ecx, dword [esp]
mov eax, ecx
xor eax, 0xfffffffe
and ecx, 0xfffffffe
lea ecx, [eax + ecx*2]
inc ecx
mov edx, 1
mov dword [esp + 4], 0
jmp 0x40870a
mov esi, edi
mov edi, dword [esp + 4]
lea edx, [esi + esi]
inc edi
mov dword [esp + 4], edi
test esi, esi
mov edi, dword [esp + 0x14]
jle 0x4087e5
test ebp, ebp
js 0x408740
lea edi, [ebp + 1]
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebx + ebp*4]
cmp dword [esp + 4], esi
jne 0x408750
inc eax
add ebp, 0xffffffff
jb 0x408720
mov ebp, 0xffffffff
jmp 0x408752
xor edi, edi
jmp 0x408752
mov edi, eax
mov esi, edx
sub esi, edi
jle 0x4086f0
mov eax, edi
not eax
add eax, edx
and esi, 3
mov dword [esp + 0x20], edi
je 0x40879e
mov dword [esp + 0x1c], eax
mov dword [esp + 0xc], ebp
lea eax, [edx + 2]
mov edi, dword [esp + 4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, edx
mov word [ebx + ecx*4], di
dec ecx
not edx
lea edx, [edx + ebp*2]
dec eax
dec esi
jne 0x408780
add ebp, ebp
sub ebp, eax
mov edx, ebp
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x1c]
cmp eax, 3
mov edi, dword [esp + 4]
mov esi, dword [esp + 0x20]
jb 0x4086f6
lea eax, [edx + edx]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx + ecx*4], di
mov word [ebx + ecx*4 - 4], di
mov word [ebx + ecx*4 - 8], di
mov word [ebx + ecx*4 - 0xc], di
add ecx, 0xfffffffc
add edx, 0xfffffffc
add eax, 0xfffffff8
cmp edx, esi
jg 0x4087c0
jmp 0x4086f6
cmp dword [esp], 0
jle 0x40894b
mov eax, dword [esp]
lea edx, [eax - 1]
and eax, 3
xor ecx, ecx
cmp edx, 3
jb 0x40883a
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
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 0x408810
test eax, eax
je 0x40885d
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 0x408850
cmp dword [esp], 2
jl 0x40894b
mov edx, dword [esp + 0x15c4]
cmp edx, 0x20
jge 0x4088dc
mov eax, dword [esp + edx*4 + 0x28]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x40889c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
inc ecx
mov dword [esp + esi*4 + 0x28], eax
dec edx
jne 0x408890
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x4088d8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
mov dword [esp + edx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + edx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x38]
add ecx, 4
mov dword [esp + edx*4 + 0x28], eax
cmp ecx, 0x20
jne 0x4088b0
test edx, edx
jle 0x40890f
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 + 0x24]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x4088f0
mov edx, 1
mov ecx, dword [esp + 0x15c4]
shl edx, cl
jmp 0x40891c
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x408920
cmp eax, edx
je 0x40894b
mov ecx, dword [esp + 0x15c4]
dec dword [esp + ecx*4 + 0x28]
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408948
mov esi, dword [esp + ecx*4 + 0x24]
dec ecx
test esi, esi
je 0x408930
dec esi
mov dword [esp + ecx*4 + 0x28], esi
add dword [esp + ecx*4 + 0x2c], 2
dec eax
jmp 0x40891c
shl edi, 5
mov ebp, dword [esp + 0x10]
mov esi, edi
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408d20
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, ebp
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408d20
add esp, 0xc
cmp dword [esp + 0x15c4], 0
jle 0x408a85
add ebx, 0xfffffffe
mov eax, 1
mov dword [esp + 8], ebx
mov dword [esp + 0x14], esi
jmp 0x4089d0
mov edi, ebx
mov ebx, dword [esp]
mov ebp, esi
mov esi, ebp
mov dword [esp], ebx
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c4]
mov eax, ecx
mov ebx, edi
je 0x408a85
mov ecx, dword [esp + eax*4 + 0x28]
test ecx, ecx
jle 0x4089b0
mov edx, ecx
and edx, 3
je 0x408a20
mov dword [esp + 4], ecx
mov ecx, dword [esp]
lea ebp, [ebx + ecx*4]
xor esi, esi
mov ecx, dword [esp + 0x10]
nop
movzx edi, word [ebp]
mov ebx, dword [esp + 0x14]
add ebx, ecx
mov byte [edi + ebx + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x4089f0
mov ecx, dword [esp + 4]
mov edx, ecx
sub edx, esi
sub dword [esp], esi
mov esi, dword [esp + 0x14]
jmp 0x408a22
mov edx, ecx
cmp ecx, 4
mov ebx, dword [esp]
mov edi, dword [esp + 8]
mov ebp, esi
jb 0x4089b7
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + ebx*4]
mov esi, dword [esp + 0x10]
add esi, ebp
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408a40
jmp 0x4089b7
mov ebx, dword [esp + 0x15c0]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x530], 0
mov eax, dword [esp + 0x15c4]
cmp eax, 2
jl 0x408b0d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408abd
xor eax, eax
mov edx, 2
test cl, 1
jne 0x408b00
jmp 0x408b0d
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
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 0x408ad0
add edx, 2
mov ebx, dword [esp + 0x15c0]
test cl, 1
je 0x408b0d
add eax, dword [esp + edx*4 + 0x24]
add eax, eax
mov dword [esp + edx*4 + 0x52c], eax
test ebx, ebx
jle 0x408bd2
xor eax, eax
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, edi
shl ecx, 6
add ecx, edi
mov dword [esp + 8], ecx
jmp 0x408b4c
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15c0]
inc eax
cmp eax, ebx
je 0x408bd2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408b43
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 0x408baf
and ecx, 0xfffffffc
xor ebx, ebx
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 0x408b80
test edi, edi
je 0x408b30
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 0x408bc0
jmp 0x408b30
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret