Function at 0x4082a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.00408ca0
mov edi, edx
mov ebp, ecx
mov ebx, dword [esp + 0x15cc]
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00408d50
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x14], ebp
mov dword [esp + 0x1c], edi
je 0x40839b
test esi, esi
jle 0x408ae6
xor eax, eax
cmp dword [esp + 0x15c8], 1
je 0x408356
mov ecx, dword [esp + 0x15c8]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x1c]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0x14]
add edx, eax
add edx, 0x8f13
xor eax, eax
movzx esi, byte [edx + eax - 1]
mov edi, dword [esp + esi*4 + 0x30]
mov ebx, edi
and ebx, 1
xor edi, 1
lea edi, [edi + ebx*2]
mov dword [esp + esi*4 + 0x30], edi
movzx esi, byte [edx + eax]
mov edi, dword [esp + esi*4 + 0x30]
mov ebx, edi
and ebx, 1
xor edi, 1
lea edi, [edi + ebx*2]
mov dword [esp + esi*4 + 0x30], edi
add eax, 2
cmp ecx, eax
jne 0x408320
mov ecx, dword [esp + 0x15c8]
test cl, 1
mov ebx, dword [esp + 0x15cc]
je 0x408ae6
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x14]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + eax*4 + 0x30]
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
mov dword [esp + eax*4 + 0x30], ecx
jmp 0x408ae6
lea eax, [edi + edi*8]
mov dword [esp + 0x10], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x28], eax
jle 0x408459
cmp esi, 1
jne 0x40847f
xor eax, eax
xor ebx, ebx
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x4083f4
mov ecx, dword [esp + 0x28]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4083f4
mov word [esp + ebx*4 + 0x4b4], cx
mov word [esp + ebx*4 + 0x4b6], ax
inc ebx
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408d50
add esp, 0xc
mov eax, ebx
test ebx, ebx
sete byte [esp + 0xb]
je 0x4084e5
xor eax, eax
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4b4]
movzx edx, cl
inc dword [esp + edx*4 + 0x934]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd34]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, ebx
jb 0x408420
mov edx, ebx
mov eax, dword [esp + 0xd34]
jmp 0x4084ee
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408d50
add esp, 0xc
xor edx, edx
mov byte [esp + 0xb], 1
xor eax, eax
mov edi, dword [esp + 0x10]
jmp 0x4084f5
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
mov edi, dword [esp + 0x10]
jmp 0x4084ab
add eax, 2
cmp ecx, eax
je 0x4083c2
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x4084c6
mov word [esp + ebx*4 + 0x4b4], si
mov word [esp + ebx*4 + 0x4b6], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x4084a0
mov word [esp + ebx*4 + 0x4b4], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4b6], si
inc ebx
jmp 0x4084a0
xor edx, edx
mov byte [esp + 0xb], 1
xor eax, eax
mov ebx, dword [esp + 0x15cc]
xor ecx, ecx
cmp eax, edx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x2c], eax
lea eax, [edx - 1]
mov dword [esp + 0x20], eax
mov dword [esp], edx
and edx, 0xfffffffe
lea eax, [esp + 0x1134]
mov dword [esp + 4], eax
lea eax, [esp + 0x4b4]
xor esi, esi
lea ebp, [esp + 0x934]
xor ecx, ecx
mov dword [esp + 0x24], edx
jmp 0x408558
inc esi
add ecx, 8
add ebp, 0x400
mov eax, dword [esp + 0xc]
cmp esi, dword [esp + 0x2c]
je 0x408682
mov edx, dword [esp + 4]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov eax, 3
xor edx, edx
nop
nop
nop
nop
nop
mov dword [esp + eax*4 + 0xa8], edx
add edx, dword [ebp + eax*4 - 0xc]
mov dword [esp + eax*4 + 0xac], edx
add edx, dword [ebp + eax*4 - 8]
mov dword [esp + eax*4 + 0xb0], edx
add edx, dword [ebp + eax*4 - 4]
mov dword [esp + eax*4 + 0xb4], edx
add edx, dword [ebp + eax*4]
add eax, 4
cmp eax, 0x103
jne 0x408570
cmp byte [esp + 0xb], 0
jne 0x408540
mov dword [esp + 0x18], esi
cmp dword [esp + 0x20], 0
je 0x40862b
xor eax, eax
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [ebx + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb4]
lea edi, [ebx + 1]
mov dword [esp + edx*4 + 0xb4], edi
mov edx, dword [esp + 4]
mov edx, dword [edx + eax*4]
mov dword [esi + ebx*4], edx
mov edx, dword [esp + 4]
movzx edx, word [edx + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb4], ebx
mov ebx, dword [esp + 4]
mov edx, dword [ebx + eax*4 + 4]
mov dword [esi + edi*4], edx
mov edx, dword [esp + 0x24]
add eax, 2
cmp edx, eax
jne 0x4085d0
jmp 0x40862d
xor eax, eax
test byte [esp], 1
mov ebx, dword [esp + 0x15cc]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
je 0x408540
mov esi, dword [esp + 4]
movzx edx, word [esi + eax*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb4], ebx
mov ebx, dword [esp + 0x15cc]
mov eax, dword [esi + eax*4]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
mov dword [edx + edi*4], eax
mov edi, dword [esp + 0x10]
jmp 0x408540
cmp dword [esp], 0
je 0x4089d0
mov ecx, dword [esp]
cmp ecx, 1
jne 0x4086a2
mov eax, dword [esp + 0xc]
mov word [eax], 1
jmp 0x4088bd
mov ebp, dword [esp + 0xc]
movzx eax, word [ebp + 4]
add word [ebp], ax
cmp ecx, 3
jl 0x408747
mov eax, 2
mov edx, 2
sub edx, ecx
mov dword [esp + 4], edx
xor esi, esi
mov edx, 1
jmp 0x4086e3
inc eax
add word [ebp + edx*4], di
mov ecx, dword [esp + 4]
add ecx, edx
inc ecx
inc edx
cmp ecx, 1
je 0x408755
movzx ecx, word [ebp + esi*4]
cmp eax, dword [esp]
jge 0x4086f7
movzx edi, word [ebp + eax*4]
cmp cx, di
jae 0x408720
mov word [ebp + edx*4], cx
mov word [ebp + esi*4], dx
inc esi
cmp eax, dword [esp]
jge 0x40872b
movzx edi, word [ebp + eax*4]
cmp esi, edx
jge 0x4086d0
movzx ecx, word [ebp + esi*4]
cmp cx, di
jae 0x4086d0
jmp 0x408730
inc eax
mov word [ebp + edx*4], di
cmp eax, dword [esp]
jl 0x408707
movzx ecx, word [ebp + esi*4]
add word [ebp + edx*4], cx
mov ecx, esi
mov word [ebp + esi*4], dx
and esi, 1
xor ecx, 1
lea esi, [ecx + esi*2]
jmp 0x4086d6
lea eax, [ecx - 2]
mov word [ebp + ecx*4 - 8], 0
mov ecx, eax
jmp 0x4087c1
mov ecx, dword [esp]
mov word [ebp + ecx*4 - 8], 0
lea edx, [ecx - 3]
mov eax, edx
test cl, 1
je 0x408781
movzx eax, word [ebp + ecx*4 - 0xc]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + ecx*4 - 0xc], ax
lea eax, [edx + edx]
sub eax, ecx
add eax, 2
add ecx, 0xfffffffe
test edx, edx
je 0x4087c1
mov esi, ecx
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebp + eax*4]
movzx ecx, word [ebp + ecx*4]
inc ecx
mov word [ebp + eax*4], cx
mov ecx, eax
not ecx
lea ecx, [ecx + eax*2]
movzx edx, word [ebp + ecx*4]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + ecx*4], dx
add ecx, ecx
sub ecx, eax
mov eax, ecx
jns 0x408790
mov ecx, esi
mov esi, 1
xor edx, edx
mov eax, dword [esp + 0x20]
jmp 0x4087e9
mov edi, ebp
mov ebx, dword [esp + 0x15cc]
lea esi, [edi + edi]
inc edx
test edi, edi
mov edi, dword [esp + 0x10]
jle 0x4088b3
test ecx, ecx
js 0x408820
lea ebx, [ecx + 1]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, ecx
mov ecx, dword [esp + 0xc]
movzx ecx, word [ecx + edi*4]
cmp edx, ecx
jne 0x408830
inc ebp
dec edi
cmp ebx, ebp
mov ecx, edi
jne 0x408800
mov ecx, 0xffffffff
mov ebp, ebx
jmp 0x408832
xor ebp, ebp
jmp 0x408832
mov ecx, edi
mov ebx, esi
sub ebx, ebp
jle 0x4087d0
mov dword [esp + 4], ebp
not ebp
add ebp, esi
and ebx, 3
je 0x408877
mov dword [esp + 0x18], ebp
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0xc]
lea ecx, [ecx + eax*4]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ecx], dx
inc ebp
add ecx, 0xfffffffc
cmp ebx, ebp
jne 0x408860
sub eax, ebp
sub esi, ebp
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x15cc]
cmp ebp, 3
mov edi, dword [esp + 4]
mov ebp, dword [esp + 0xc]
jb 0x4087d9
nop
mov word [ebp + eax*4], dx
mov word [ebp + eax*4 - 4], dx
mov word [ebp + eax*4 - 8], dx
mov word [ebp + eax*4 - 0xc], dx
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, edi
jg 0x408890
jmp 0x4087d9
cmp dword [esp], 0
jle 0x4089d0
mov eax, dword [esp]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x20], 3
mov ebp, dword [esp + 0xc]
jb 0x40890b
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebp + ecx*4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [ebp + ecx*4 + 4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [ebp + ecx*4 + 8]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [ebp + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x30]
add ecx, 4
cmp edx, ecx
jne 0x4088e0
test eax, eax
je 0x40892d
lea ecx, [ecx*4]
add ecx, ebp
xor edx, edx
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x30]
inc edx
cmp eax, edx
jne 0x408920
cmp dword [esp], 2
jl 0x4089d0
cmp ebx, 0x20
jge 0x4089a0
mov eax, dword [esp + ebx*4 + 0x30]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x40895c
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
inc ecx
mov dword [esp + ebx*4 + 0x30], eax
dec edx
jne 0x408950
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x408998
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + ebx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + ebx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x3c]
mov dword [esp + ebx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x40]
add ecx, 4
mov dword [esp + ebx*4 + 0x30], eax
cmp ecx, 0x20
jne 0x408970
test ebx, ebx
jle 0x408c5d
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x2c]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x4089b0
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x408c68
shl edi, 5
mov esi, dword [esp + 0x14]
lea eax, [esi + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408d50
add esp, 0xc
mov eax, dword [esp + 0x28]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408d50
add esp, 0xc
test ebx, ebx
jle 0x408ae6
add dword [esp + 0xc], 0xfffffffe
mov eax, 1
jmp 0x408a3a
mov ebx, dword [esp]
mov dword [esp], ebx
lea ecx, [eax + 1]
mov ebx, dword [esp + 0x15cc]
cmp eax, ebx
mov eax, ecx
je 0x408ae6
mov ebx, dword [esp + eax*4 + 0x30]
test ebx, ebx
jle 0x408a20
mov edx, ebx
and edx, 3
je 0x408a90
mov dword [esp + 4], ebx
mov ecx, dword [esp]
mov esi, dword [esp + 0xc]
lea ebp, [esi + ecx*4]
xor esi, esi
mov ecx, edi
nop
nop
nop
nop
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 0x408a60
sub dword [esp], esi
mov ebx, dword [esp + 4]
mov edx, ebx
sub edx, esi
mov edi, ecx
jmp 0x408a92
mov edx, ebx
cmp ebx, 4
mov ebx, dword [esp]
mov ebp, dword [esp + 0xc]
jb 0x408a23
dec edx
nop
movzx ecx, word [ebp + ebx*4]
mov esi, dword [esp + 0x14]
add esi, edi
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408aa0
jmp 0x408a23
mov dword [esp + 0x938], 0
cmp ebx, 2
jl 0x408b74
lea edx, [ebx - 1]
cmp ebx, 2
jne 0x408b0b
xor eax, eax
mov ecx, 2
jmp 0x408b50
mov esi, edx
and esi, 0xfffffffe
neg esi
xor eax, eax
mov ecx, 2
nop
nop
nop
nop
nop
nop
nop
mov edi, ecx
and edi, 0x3ffffffe
add eax, dword [esp + edi*4 + 0x2c]
add eax, eax
mov dword [esp + ecx*4 + 0x934], eax
add eax, dword [esp + edi*4 + 0x30]
add eax, eax
mov dword [esp + ecx*4 + 0x938], eax
lea edi, [esi + ecx]
add edi, 2
add ecx, 2
cmp edi, 2
jne 0x408b20
test dl, 1
je 0x408b74
mov edx, ecx
or edx, 0x3ffffffe
mov esi, ecx
and esi, 0x3ffffffe
add esi, edx
add eax, dword [esp + esi*4 + 0x34]
add eax, eax
mov dword [esp + ecx*4 + 0x934], eax
cmp dword [esp + 0x15c8], 0
jle 0x408c52
xor eax, eax
mov ecx, dword [esp + 0x1c]
lea esi, [ecx + ecx*8]
mov edx, esi
shl edx, 5
mov ecx, dword [esp + 0x14]
add edx, ecx
shl esi, 6
add esi, ecx
mov dword [esp + 4], esi
jmp 0x408bca
mov ecx, dword [esp + 4]
mov word [ecx + eax*2 + 0x8852], bx
inc eax
cmp eax, dword [esp + 0x15c8]
je 0x408c52
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408bbc
mov ebp, dword [esp + ecx*4 + 0x934]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x934], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x408c2f
and ecx, 0xfffffffc
xor ebx, ebx
nop
nop
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 0x408c00
test edi, edi
je 0x408bb0
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 0x408c40
jmp 0x408bb0
add esp, 0x15b4
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
lea ecx, [ebx - 1]
jmp 0x408c79
dec eax
cmp eax, edx
je 0x4089d0
dec dword [esp + ebx*4 + 0x30]
mov esi, ecx
nop
test esi, esi
jle 0x408c70
mov ebp, dword [esp + esi*4 + 0x30]
dec esi
test ebp, ebp
je 0x408c80
dec ebp
mov dword [esp + esi*4 + 0x34], ebp
add dword [esp + esi*4 + 0x38], 2
jmp 0x408c70