Function at 0x4082a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.00408c30
mov esi, edx
mov edi, ecx
mov ebx, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.00408ce0
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], esi
je 0x408350
test ebx, ebx
jle 0x408a8c
xor eax, eax
cmp ebx, 1
je 0x408328
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0xc]
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 0x408310
test bl, 1
je 0x408a8c
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x28]
jmp 0x408a8c
lea eax, [esi + esi*8]
mov dword [esp + 0x20], eax
shl eax, 6
test ebx, ebx
mov dword [esp + 0x1c], eax
jle 0x408449
mov ebp, edi
cmp ebx, 1
jne 0x40863b
xor eax, eax
xor edi, edi
test bl, 1
mov ebx, edi
je 0x4083a2
mov ecx, dword [esp + 0x1c]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4083a2
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.00408ce0
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x408460
xor ecx, ecx
cmp ebx, 1
je 0x40841f
mov edx, ebx
and edx, 0xfffffffe
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [esp + ecx*4 + 0xac]
movzx esi, al
inc dword [esp + esi*4 + 0x52c]
shr eax, 8
inc dword [esp + eax*4 + 0x92c]
movzx eax, word [esp + ecx*4 + 0xb0]
movzx esi, al
inc dword [esp + esi*4 + 0x52c]
shr eax, 8
inc dword [esp + eax*4 + 0x92c]
add ecx, 2
cmp edx, ecx
jne 0x4083e0
test bl, 1
je 0x408440
movzx eax, word [esp + ecx*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 0x408469
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.00408ce0
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x24], eax
xor edx, edx
lea eax, [esp + 0xac]
mov dword [esp + 8], eax
lea eax, [esp + 0x112c]
lea edi, [esp + 0x52c]
xor ecx, ecx
mov dword [esp], ebx
jmp 0x4084c6
mov edx, dword [esp + 0x10]
inc edx
mov eax, ecx
and eax, 8
xor ecx, 8
lea ecx, [ecx + eax*2]
mov edi, dword [esp + 0x18]
add edi, 0x400
mov eax, ebp
cmp edx, dword [esp + 0x24]
je 0x40856b
mov dword [esp + 0x10], edx
mov ebp, dword [esp + 8]
mov dword [esp + 8], eax
mov eax, 3
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + eax*4 + 0xd20], edx
add edx, dword [edi + eax*4 - 0xc]
mov dword [esp + eax*4 + 0xd24], edx
add edx, dword [edi + eax*4 - 8]
mov dword [esp + eax*4 + 0xd28], edx
add edx, dword [edi + eax*4 - 4]
mov dword [esp + eax*4 + 0xd2c], edx
add edx, dword [edi + eax*4]
add eax, 4
cmp eax, 0x103
jne 0x4084e0
mov dword [esp + 0x18], edi
cmp byte [esp + 7], 0
jne 0x4084a0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [ebp + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xd2c]
mov esi, dword [ebp + eax*4]
mov edi, dword [esp + 8]
mov dword [edi + ebx*4], esi
mov esi, ebx
and ebx, 1
xor esi, 1
lea esi, [esi + ebx*2]
mov ebx, dword [esp]
mov dword [esp + edx*4 + 0xd2c], esi
inc eax
cmp ebx, eax
jne 0x408530
jmp 0x4084a0
test ebx, ebx
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 8]
je 0x408967
mov edx, dword [esp]
cmp edx, 1
jne 0x40858d
mov word [ebx], 1
jmp 0x408830
movzx eax, word [ebx + 4]
add word [ebx], ax
cmp edx, 3
jl 0x408695
mov eax, 2
mov ebp, 2
sub ebp, edx
xor edx, edx
mov esi, 1
jmp 0x4085df
movzx ebx, word [ecx + edx*4]
add word [ecx + esi*4], bx
mov word [ecx + edx*4], si
inc edx
lea edi, [esi + ebp]
inc edi
inc esi
cmp edi, 1
mov ebx, dword [esp + 8]
je 0x4086a4
movzx edi, word [ebx + edx*4]
cmp eax, dword [esp]
mov ecx, ebx
jge 0x4085f3
movzx ebx, word [ecx + eax*4]
cmp di, bx
jae 0x408610
mov word [ecx + esi*4], di
mov word [ecx + edx*4], si
inc edx
cmp eax, dword [esp]
jge 0x4085c0
jmp 0x40861a
inc eax
mov word [ecx + esi*4], bx
cmp eax, dword [esp]
jge 0x4085c0
cmp edx, esi
jge 0x408630
movzx ebx, word [ecx + edx*4]
movzx edi, word [ecx + eax*4]
cmp bx, di
jb 0x4085c4
jmp 0x408634
movzx edi, word [ecx + eax*4]
inc eax
add word [ecx + esi*4], di
jmp 0x4085cd
mov ecx, ebx
and ecx, 0xfffffffe
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x40865b
add eax, 2
cmp ecx, eax
je 0x408375
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408676
mov word [esp + edi*4 + 0xac], si
mov word [esp + edi*4 + 0xae], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x408650
mov word [esp + edi*4 + 0xac], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xae], si
inc edi
jmp 0x408650
lea eax, [edx - 2]
mov word [ebx + edx*4 - 8], 0
jmp 0x408724
mov eax, dword [esp]
mov word [ebx + eax*4 - 8], 0
lea edx, [eax - 3]
add eax, 2
mov ecx, edx
and eax, 3
je 0x4086d1
mov ecx, edx
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 eax
jne 0x4086c0
mov eax, dword [esp]
add eax, 0xfffffffe
cmp edx, 3
jb 0x408721
inc ecx
nop
nop
nop
movzx edx, word [ebx + ecx*4 - 4]
movzx edx, word [ebx + edx*4]
inc edx
mov word [ebx + ecx*4 - 4], dx
movzx edx, word [ebx + ecx*4 - 8]
movzx edx, word [ebx + edx*4]
inc edx
mov word [ebx + ecx*4 - 8], dx
movzx edx, word [ebx + ecx*4 - 0xc]
movzx edx, word [ebx + edx*4]
inc edx
mov word [ebx + ecx*4 - 0xc], dx
movzx edx, word [ebx + ecx*4 - 0x10]
movzx edx, word [ebx + edx*4]
inc edx
mov word [ebx + ecx*4 - 0x10], dx
add ecx, 0xfffffffc
jne 0x4086e0
mov edx, dword [esp]
lea ecx, [edx - 1]
xor edx, edx
mov esi, 1
jmp 0x408758
mov edi, ebp
mov esi, edi
and esi, 2
mov ebp, edi
or edi, 2
imul edi, esi
xor esi, 2
and ebp, 0x7ffffffd
imul ebp, esi
add edi, ebp
inc edx
mov esi, edi
test edi, edi
jle 0x408822
test eax, eax
js 0x408790
lea ebp, [eax + 1]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [ebx + eax*4]
cmp edx, ebx
jne 0x4087a0
inc edi
add eax, 0xffffffff
mov ebx, dword [esp + 8]
jb 0x408770
mov eax, 0xffffffff
jmp 0x4087a2
xor ebp, ebp
jmp 0x4087a6
mov ebp, edi
mov ebx, dword [esp + 8]
mov edi, esi
sub edi, ebp
jle 0x408730
mov dword [esp + 0x10], ebp
not ebp
add ebp, esi
and edi, 3
je 0x4087e7
mov dword [esp + 0x18], ebp
lea ebx, [ebx + ecx*4]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx], dx
inc ebp
add ebx, 0xfffffffc
cmp edi, ebp
jne 0x4087d0
sub ecx, ebp
sub esi, ebp
mov ebx, dword [esp + 8]
mov ebp, dword [esp + 0x18]
cmp ebp, 3
mov edi, dword [esp + 0x10]
jb 0x408732
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx + ecx*4], dx
mov word [ebx + ecx*4 - 4], dx
mov word [ebx + ecx*4 - 8], dx
mov word [ebx + ecx*4 - 0xc], dx
add ecx, 0xfffffffc
add esi, 0xfffffffc
cmp esi, edi
jg 0x408800
jmp 0x408732
cmp dword [esp], 0
mov ebp, dword [esp + 0x20]
jle 0x408967
mov eax, dword [esp]
lea edx, [eax - 1]
and eax, 3
xor ecx, ecx
cmp edx, 3
jb 0x40887a
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
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 0x408850
test eax, eax
je 0x40889d
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 0x408890
cmp dword [esp], 2
jl 0x408967
mov edx, dword [esp + 0x15c4]
cmp edx, 0x20
jge 0x40891c
mov eax, dword [esp + edx*4 + 0x28]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x4088dc
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 0x4088d0
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408918
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 0x4088f0
test edx, edx
jle 0x408957
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 0x408930
mov edx, 1
mov ecx, dword [esp + 0x15c4]
shl edx, cl
cmp eax, edx
jne 0x408bed
jmp 0x408967
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x408bed
shl ebp, 5
mov edi, dword [esp + 0xc]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408ce0
add esp, 0xc
mov eax, dword [esp + 0x1c]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408ce0
add esp, 0xc
cmp dword [esp + 0x15c4], 0
jle 0x408a85
add ebx, 0xfffffffe
mov eax, 1
mov dword [esp + 8], ebx
jmp 0x4089dc
mov edi, ebx
mov ebx, dword [esp]
mov dword [esp], ebx
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c4]
mov eax, ecx
mov ebx, edi
je 0x408a85
mov edi, dword [esp + eax*4 + 0x28]
test edi, edi
jle 0x4089c0
mov edx, edi
and edx, 3
je 0x408a30
mov dword [esp + 0x10], edi
mov ecx, ebp
mov esi, dword [esp]
lea edi, [ebx + esi*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov ebp, dword [esp + 0xc]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x408a00
sub dword [esp], esi
mov edi, dword [esp + 0x10]
mov edx, edi
sub edx, esi
mov ebp, ecx
jmp 0x408a32
mov edx, edi
cmp edi, 4
mov ebx, dword [esp]
mov edi, dword [esp + 8]
jb 0x4089c5
dec edx
nop
movzx ecx, word [edi + ebx*4]
mov esi, dword [esp + 0xc]
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 0x4089c5
mov ebx, dword [esp + 0x15c0]
mov dword [esp + 0x530], 0
mov eax, dword [esp + 0x15c4]
cmp eax, 2
jl 0x408b0d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408ab9
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
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 0x408be2
xor eax, eax
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
mov ebp, dword [esp + 0xc]
add edx, ebp
shl ecx, 6
add ecx, ebp
mov dword [esp + 8], ecx
jmp 0x408b5c
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15c0]
inc eax
cmp eax, ebx
je 0x408be2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408b53
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 0x408bbf
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 0x408b90
test edi, edi
je 0x408b40
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 0x408bd0
jmp 0x408b40
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x15c4]
dec dword [esp + ecx*4 + 0x28]
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408c18
mov esi, dword [esp + ecx*4 + 0x24]
dec ecx
test esi, esi
je 0x408c00
dec esi
mov dword [esp + ecx*4 + 0x28], esi
add dword [esp + ecx*4 + 0x2c], 2
dec eax
cmp eax, edx
jne 0x408bed
jmp 0x408967