Function at 0x4082a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.00408cd0
mov edi, edx
mov ebx, ecx
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00408d80
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x20], edi
je 0x40835c
test esi, esi
mov ecx, esi
jle 0x408b01
xor eax, eax
cmp ecx, 1
je 0x408328
mov ecx, dword [esp + 0x15c8]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x20]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + ebx]
add edx, 0x8f13
xor eax, eax
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x30]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x30]
add eax, 2
cmp ecx, eax
jne 0x408310
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408b01
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, ebx
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c8]
inc dword [esp + eax*4 + 0x30]
jmp 0x408b01
lea eax, [edi + edi*8]
mov dword [esp + 0x2c], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], eax
jle 0x408419
cmp esi, 1
jne 0x408685
mov edi, ebx
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x4083b7
mov ecx, dword [esp + 0x24]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4083b7
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.00408d80
add esp, 0xc
test ebx, ebx
sete byte [esp + 0xc]
je 0x408430
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4b4]
mov edx, ecx
or edx, 0xff
mov esi, ecx
xor esi, 0x3fffff00
and esi, edx
inc dword [esp + esi*4 + 0x934]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd34]
inc eax
cmp ebx, eax
jne 0x4083e0
mov eax, dword [esp + 0xd34]
jmp 0x408439
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408d80
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0xc], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov edi, 2
sub edi, ecx
lea eax, [ebx - 1]
mov dword [esp + 0x14], eax
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x28], eax
lea eax, [esp + 0x4b4]
mov dword [esp + 4], eax
lea edx, [esp + 0x1134]
xor ecx, ecx
lea ebp, [esp + 0x934]
xor eax, eax
mov dword [esp + 8], ebx
mov dword [esp + 0x18], edi
jmp 0x408495
inc eax
add ecx, 8
add ebp, 0x400
mov edx, dword [esp]
cmp eax, edi
je 0x4085b5
mov esi, dword [esp + 4]
mov dword [esp], esi
mov dword [esp + 4], edx
mov edx, 3
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xa8], esi
add esi, dword [ebp + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xac], esi
add esi, dword [ebp + edx*4 - 8]
mov dword [esp + edx*4 + 0xb0], esi
add esi, dword [ebp + edx*4 - 4]
mov dword [esp + edx*4 + 0xb4], esi
add esi, dword [ebp + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x4084b0
cmp byte [esp + 0xc], 0
jne 0x408480
mov dword [esp + 0x10], eax
cmp dword [esp + 0x14], 0
je 0x408566
xor edx, edx
mov edi, dword [esp + 4]
mov ebx, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebx + edx*4]
shr eax, cl
movzx eax, al
mov esi, dword [esp + eax*4 + 0xb4]
lea ebx, [esi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov eax, dword [esp]
mov eax, dword [eax + edx*4]
mov dword [edi + esi*4], eax
mov eax, dword [esp]
movzx eax, word [eax + edx*4 + 4]
shr eax, cl
movzx eax, al
mov esi, dword [esp + eax*4 + 0xb4]
lea ebx, [esi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov ebx, dword [esp]
mov eax, dword [ebx + edx*4 + 4]
mov dword [edi + esi*4], eax
add edx, 2
cmp dword [esp + 0x28], edx
jne 0x408510
jmp 0x408568
xor edx, edx
mov ebx, dword [esp + 8]
test bl, 1
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
je 0x408480
mov edi, dword [esp]
movzx eax, word [edi + edx*4]
shr eax, cl
movzx eax, al
mov esi, dword [esp + eax*4 + 0xb4]
lea ebx, [esi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov ebx, dword [esp + 8]
mov eax, dword [edi + edx*4]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 4]
mov dword [edx + esi*4], eax
mov eax, dword [esp + 0x10]
jmp 0x408480
test ebx, ebx
je 0x4089d0
cmp ebx, 1
jne 0x4085d0
mov eax, dword [esp + 4]
mov word [eax], 1
jmp 0x408891
mov ebx, dword [esp + 4]
movzx eax, word [ebx + 4]
add word [ebx], ax
cmp dword [esp + 0x14], 2
jl 0x4086e5
mov eax, 2
mov ecx, 2
sub ecx, dword [esp + 8]
mov dword [esp], ecx
mov edx, 1
xor esi, esi
jmp 0x408622
movzx ebp, word [ecx + esi*4]
add word [ecx + edx*4], bp
mov word [ecx + esi*4], dx
inc esi
mov ecx, dword [esp]
lea edi, [ecx + edx]
inc edi
inc edx
cmp edi, 1
mov ebx, dword [esp + 4]
je 0x4086f8
mov ecx, ebx
movzx edi, word [ebx + esi*4]
mov ebx, dword [esp + 8]
cmp eax, ebx
jge 0x408639
movzx ebp, word [ecx + eax*4]
cmp di, bp
jae 0x408650
mov word [ecx + edx*4], di
mov word [ecx + esi*4], dx
inc esi
cmp eax, ebx
jge 0x408600
jmp 0x408659
inc eax
mov word [ecx + edx*4], bp
cmp eax, ebx
jge 0x408600
cmp esi, edx
jge 0x408670
movzx ebp, word [ecx + esi*4]
movzx edi, word [ecx + eax*4]
cmp bp, di
jb 0x408604
jmp 0x408674
movzx edi, word [ecx + eax*4]
mov ebx, eax
and ebx, 1
xor eax, 1
lea eax, [eax + ebx*2]
add word [ecx + edx*4], di
jmp 0x40860d
mov ecx, esi
and ecx, 0xfffffffe
mov edi, ebx
lea edx, [eax + ebx]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x4086ab
add eax, 2
cmp ecx, eax
je 0x408385
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x4086c6
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 0x4086a0
mov word [esp + ebx*4 + 0x4b4], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4b6], si
inc ebx
jmp 0x4086a0
mov eax, dword [esp + 8]
lea ecx, [eax - 2]
mov word [ebx + eax*4 - 8], 0
jmp 0x408783
mov eax, dword [esp + 8]
lea ecx, [eax - 2]
mov word [ebx + eax*4 - 8], 0
cmp eax, 3
jl 0x408783
mov ebp, ecx
lea edx, [eax - 3]
lea esi, [eax + 2]
mov eax, edx
and esi, 3
je 0x408731
mov eax, edx
nop
nop
nop
nop
movzx ecx, word [ebx + eax*4]
movzx ecx, word [ebx + ecx*4]
inc ecx
mov word [ebx + eax*4], cx
dec eax
dec esi
jne 0x408720
cmp edx, 3
jb 0x408781
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebx + eax*4 - 4]
movzx ecx, word [ebx + ecx*4]
inc ecx
mov word [ebx + eax*4 - 4], cx
movzx ecx, word [ebx + eax*4 - 8]
movzx ecx, word [ebx + ecx*4]
inc ecx
mov word [ebx + eax*4 - 8], cx
movzx ecx, word [ebx + eax*4 - 0xc]
movzx ecx, word [ebx + ecx*4]
inc ecx
mov word [ebx + eax*4 - 0xc], cx
movzx ecx, word [ebx + eax*4 - 0x10]
movzx ecx, word [ebx + ecx*4]
inc ecx
mov word [ebx + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x408740
mov ecx, ebp
mov ebp, 1
xor edx, edx
mov esi, dword [esp + 0x14]
jmp 0x40879c
lea ebp, [edi + edi]
inc edx
test edi, edi
jle 0x408885
test ecx, ecx
js 0x4087e0
lea eax, [ecx + 1]
mov dword [esp], eax
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, ecx
mov ecx, dword [esp + 4]
movzx ecx, word [ecx + edi*4]
cmp edx, ecx
jne 0x4087f0
inc eax
dec edi
cmp dword [esp], eax
mov ecx, edi
jne 0x4087b0
mov ecx, 0xffffffff
mov ebx, dword [esp + 4]
mov edi, dword [esp]
jmp 0x4087f8
xor edi, edi
jmp 0x4087f8
mov ecx, edi
mov edi, eax
mov ebx, dword [esp + 4]
mov eax, ebp
sub eax, edi
jle 0x408790
mov dword [esp], edi
not edi
add edi, ebp
mov dword [esp + 0x10], edi
and eax, 3
mov dword [esp + 0xc], eax
je 0x40884a
mov dword [esp + 0x18], ecx
lea edi, [ebx + esi*4]
mov ecx, ebp
add ecx, ebp
xor eax, eax
mov ebx, dword [esp + 0xc]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], dx
inc eax
add edi, 0xfffffffc
add ecx, 0xfffffffe
cmp ebx, eax
jne 0x408830
sub esi, eax
sub ebp, eax
mov ebx, dword [esp + 4]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
cmp eax, 3
mov edi, dword [esp]
jb 0x408790
mov eax, ebp
add eax, ebp
nop
nop
mov word [ebx + esi*4], dx
mov word [ebx + esi*4 - 4], dx
mov word [ebx + esi*4 - 8], dx
mov word [ebx + esi*4 - 0xc], dx
add esi, 0xfffffffc
add ebp, 0xfffffffc
add eax, 0xfffffff8
cmp ebp, edi
jg 0x408860
jmp 0x408790
mov ebx, dword [esp + 8]
test ebx, ebx
jle 0x4089d0
cmp dword [esp + 0x14], 0
je 0x408c5d
xor eax, eax
mov edi, dword [esp + 4]
mov ebp, dword [esp + 0x28]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + eax*4]
mov edx, dword [esp + ecx*4 + 0x30]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov dword [esp + ecx*4 + 0x30], edx
movzx ecx, word [edi + eax*4 + 4]
mov edx, dword [esp + ecx*4 + 0x30]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov dword [esp + ecx*4 + 0x30], edx
add eax, 2
cmp ebp, eax
jne 0x4088b0
test bl, 1
je 0x408902
movzx eax, word [edi + eax*4]
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
cmp ebx, 2
jl 0x4089d0
mov edx, dword [esp + 0x15cc]
cmp edx, 0x20
jge 0x408980
mov eax, dword [esp + edx*4 + 0x30]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x40893c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
inc ecx
mov dword [esp + esi*4 + 0x30], eax
dec edx
jne 0x408930
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408978
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x3c]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x40]
add ecx, 4
mov dword [esp + edx*4 + 0x30], eax
cmp ecx, 0x20
jne 0x408950
test edx, edx
jle 0x408c71
mov esi, edx
not edx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + esi*4 + 0x30]
mov ebx, esi
mov ebp, dword [esp + 0x15cc]
xor ebx, ebp
mov ecx, edx
and ecx, ebp
add ecx, ecx
sub ecx, ebx
shl edi, cl
add eax, edi
lea ecx, [esi - 1]
inc edx
cmp esi, 1
mov esi, ecx
ja 0x408990
mov edx, 1
mov ecx, dword [esp + 0x15cc]
shl edx, cl
cmp eax, edx
mov ebx, dword [esp + 8]
jne 0x408c7c
mov edi, dword [esp + 0x2c]
shl edi, 5
mov esi, dword [esp + 0x1c]
lea eax, [esi + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408d80
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408d80
add esp, 0xc
cmp dword [esp + 0x15cc], 0
jle 0x408af6
add dword [esp + 4], 0xfffffffe
mov eax, 1
jmp 0x408a42
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15cc]
mov eax, ecx
je 0x408af6
mov ebp, dword [esp + eax*4 + 0x30]
test ebp, ebp
jle 0x408a30
mov edx, ebp
and edx, 3
mov dword [esp + 8], ebx
je 0x408aa0
mov dword [esp], ebp
mov ecx, edi
mov esi, dword [esp + 4]
lea edi, [esi + ebx*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov ebp, dword [esp + 0x1c]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x408a70
sub dword [esp + 8], esi
mov ebp, dword [esp]
mov edx, ebp
sub edx, esi
mov edi, ecx
jmp 0x408aa2
mov edx, ebp
cmp ebp, 4
mov ebp, dword [esp + 4]
mov ebx, dword [esp + 8]
jb 0x408a30
dec edx
movzx ecx, word [ebp + ebx*4]
mov esi, dword [esp + 0x1c]
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 0x408ab0
jmp 0x408a30
mov ecx, dword [esp + 0x15c8]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x938], 0
mov eax, dword [esp + 0x15cc]
cmp eax, 2
jl 0x408b7f
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408b29
xor eax, eax
mov edx, 2
jmp 0x408b66
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
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add edx, 2
cmp ebx, edx
jne 0x408b40
add edx, 2
mov ebx, esi
test cl, 1
mov ecx, dword [esp + 0x15c8]
je 0x408b7f
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x934], eax
test ecx, ecx
jle 0x408c52
xor eax, eax
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, ebx
shl ecx, 6
add ecx, ebx
mov dword [esp], ecx
jmp 0x408bc9
mov ecx, dword [esp]
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 0x408bbb
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
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
xor eax, eax
mov edi, dword [esp + 4]
test bl, 1
jne 0x4088eb
jmp 0x408902
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
mov ecx, dword [esp + 0x15cc]
dec ecx
jmp 0x408c99
dec eax
cmp eax, edx
je 0x4089d0
mov esi, dword [esp + 0x15cc]
dec dword [esp + esi*4 + 0x30]
mov esi, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
test esi, esi
jle 0x408c90
mov edi, dword [esp + esi*4 + 0x30]
dec esi
test edi, edi
je 0x408cb0
dec edi
mov dword [esp + esi*4 + 0x34], edi
add dword [esp + esi*4 + 0x38], 2
jmp 0x408c90