Function at 0x4082f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.00408d10
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00408dd0
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], ebx
je 0x4083b7
test esi, esi
mov ebx, dword [esp + 0x15cc]
jle 0x408a65
xor eax, eax
cmp dword [esp + 0x15c8], 1
je 0x408388
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]
inc dword [esp + esi*4 + 0x30]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x30]
add eax, 2
cmp ecx, eax
jne 0x408370
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408a65
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x14]
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x30]
jmp 0x408a65
lea eax, [ebx + ebx*8]
mov dword [esp + 0x18], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x24], eax
jle 0x4084be
cmp esi, 1
jne 0x4084e7
xor eax, eax
xor ebp, ebp
mov ebx, dword [esp + 0x15cc]
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408413
mov ecx, dword [esp + 0x24]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408413
mov word [esp + ebp*4 + 0x4b4], cx
mov word [esp + ebp*4 + 0x4b6], ax
inc ebp
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408dd0
add esp, 0xc
test ebp, ebp
sete byte [esp + 0xf]
je 0x408555
mov ecx, ebp
xor eax, eax
cmp ebp, 1
je 0x40848f
mov ecx, ebp
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0x4b4]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
movzx edx, word [esp + eax*4 + 0x4b8]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
add eax, 2
cmp ecx, eax
jne 0x408450
mov edx, ebp
test dl, 1
je 0x4084b2
movzx eax, word [esp + eax*4 + 0x4b4]
movzx ecx, al
inc dword [esp + ecx*4 + 0x934]
shr eax, 8
inc dword [esp + eax*4 + 0xd34]
mov eax, dword [esp + 0xd34]
jmp 0x40855e
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408dd0
add esp, 0xc
xor edx, edx
mov byte [esp + 0xf], 1
xor eax, eax
mov ebx, dword [esp + 0x15cc]
jmp 0x40855e
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebp, ebp
mov ebx, dword [esp + 0x15cc]
jmp 0x40851b
add eax, 2
cmp ecx, eax
je 0x4083e1
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408536
mov word [esp + ebp*4 + 0x4b4], si
mov word [esp + ebp*4 + 0x4b6], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x408510
mov word [esp + ebp*4 + 0x4b4], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0x4b6], si
inc ebp
jmp 0x408510
xor edx, edx
mov byte [esp + 0xf], 1
xor eax, eax
xor ecx, ecx
cmp eax, edx
sete cl
mov edi, 2
sub edi, ecx
lea eax, [edx - 1]
mov dword [esp + 0x20], eax
mov dword [esp + 4], edx
and edx, 0xfffffffe
mov dword [esp + 0x10], edx
lea eax, [esp + 0x4b4]
mov dword [esp], eax
lea eax, [esp + 0x1134]
xor ecx, ecx
lea esi, [esp + 0x934]
xor edx, edx
mov dword [esp + 0x28], edi
jmp 0x4085ba
mov edx, dword [esp + 0x2c]
inc edx
add ecx, 8
add esi, 0x400
mov eax, dword [esp + 8]
cmp edx, edi
je 0x4086cc
mov dword [esp + 0x2c], edx
mov edx, dword [esp]
mov dword [esp + 8], edx
mov dword [esp], eax
mov edx, 3
xor eax, eax
nop
mov dword [esp + edx*4 + 0xa8], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xac], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xb0], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xb4], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x4085d0
cmp byte [esp + 0xf], 0
jne 0x4085a0
cmp dword [esp + 0x20], 0
je 0x40867b
xor edx, edx
mov ebp, dword [esp]
mov ebx, dword [esp + 8]
nop
nop
nop
movzx eax, word [ebx + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb4]
lea edi, [ebx + 1]
mov dword [esp + eax*4 + 0xb4], edi
mov eax, dword [esp + 8]
mov eax, dword [eax + edx*4]
mov dword [ebp + ebx*4], eax
mov eax, dword [esp + 8]
movzx eax, word [eax + edx*4 + 4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov ebx, dword [esp + 8]
mov eax, dword [ebx + edx*4 + 4]
mov dword [ebp + edi*4], eax
add edx, 2
cmp dword [esp + 0x10], edx
jne 0x408620
jmp 0x40867d
xor edx, edx
test byte [esp + 4], 1
mov ebx, dword [esp + 0x15cc]
mov edi, dword [esp + 0x28]
je 0x4085a0
mov ebp, dword [esp + 8]
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov ebx, dword [esp + 0x15cc]
mov eax, dword [ebp + edx*4]
mov edx, dword [esp]
mov dword [edx + edi*4], eax
mov edi, dword [esp + 0x28]
jmp 0x4085a0
cmp dword [esp + 4], 0
je 0x408b8d
mov edx, dword [esp + 4]
cmp edx, 1
jne 0x4086ed
mov eax, dword [esp]
mov word [eax], 1
jmp 0x40893d
mov ecx, dword [esp]
movzx eax, word [ecx + 4]
add word [ecx], ax
cmp dword [esp + 0x20], 2
jl 0x40879b
mov eax, 2
mov ebx, 2
sub ebx, edx
xor esi, esi
mov ebp, 1
jmp 0x40873b
movzx ecx, word [edi + esi*4]
add word [edi + ebp*4], cx
mov word [edi + esi*4], bp
inc esi
mov edx, dword [esp + 4]
lea ecx, [ebx + ebp]
inc ecx
inc ebp
cmp ecx, 1
je 0x4087aa
cmp eax, edx
jge 0x408760
mov edi, dword [esp]
movzx edx, word [edi + eax*4]
movzx ecx, word [edi + esi*4]
cmp cx, dx
jb 0x408767
inc eax
mov word [edi + ebp*4], dx
jmp 0x408770
mov edi, dword [esp]
movzx ecx, word [edi + esi*4]
mov word [edi + ebp*4], cx
mov word [edi + esi*4], bp
inc esi
mov ecx, dword [esp + 4]
cmp eax, ecx
jge 0x408720
cmp esi, ebp
jge 0x408790
movzx ecx, word [edi + esi*4]
movzx edx, word [edi + eax*4]
cmp cx, dx
jb 0x408724
jmp 0x408794
movzx edx, word [edi + eax*4]
inc eax
add word [edi + ebp*4], dx
jmp 0x40872d
lea edi, [edx - 2]
mov word [ecx + edx*4 - 8], 0
jmp 0x40884f
lea edi, [edx - 2]
mov eax, dword [esp]
mov word [eax + edx*4 - 8], 0
cmp edx, 3
jl 0x40884f
mov dword [esp + 8], edi
mov eax, edx
add edx, 0xfffffffd
lea esi, [eax + 2]
mov eax, edx
and esi, 3
mov edi, dword [esp]
je 0x4087f1
mov eax, edx
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + eax*4]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4], cx
dec eax
dec esi
jne 0x4087e0
cmp edx, 3
jb 0x408841
inc eax
mov edx, dword [esp]
nop
nop
nop
nop
nop
nop
movzx ecx, word [edx + eax*4 - 4]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 4], cx
movzx ecx, word [edx + eax*4 - 8]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 8], cx
movzx ecx, word [edx + eax*4 - 0xc]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0xc], cx
movzx ecx, word [edx + eax*4 - 0x10]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x408800
mov edx, dword [esp + 4]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 8]
jmp 0x408853
mov ecx, dword [esp + 0x10]
mov eax, edx
or eax, 0xfffffffe
add eax, ecx
inc eax
mov esi, 1
xor edx, edx
jmp 0x408884
mov esi, ebp
add esi, ebp
inc edx
test ebp, ebp
mov ebx, dword [esp + 0x15cc]
jle 0x408932
test edi, edi
js 0x4088b0
lea ebx, [edi + 1]
xor ebp, ebp
nop
nop
nop
mov ecx, dword [esp]
movzx ecx, word [ecx + edi*4]
cmp edx, ecx
jne 0x4088b2
inc ebp
add edi, 0xffffffff
jb 0x408890
mov edi, 0xffffffff
mov ebp, ebx
jmp 0x4088b2
xor ebp, ebp
mov ebx, esi
sub ebx, ebp
jle 0x408870
mov ecx, ebp
not ecx
add ecx, esi
and ebx, 3
mov dword [esp + 8], ebp
je 0x4088f3
mov dword [esp + 0x10], ecx
mov ecx, dword [esp]
lea ecx, [ecx + eax*4]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ecx], dx
inc ebp
add ecx, 0xfffffffc
cmp ebx, ebp
jne 0x4088e0
sub eax, ebp
sub esi, ebp
mov ecx, dword [esp + 0x10]
cmp ecx, 3
mov ecx, dword [esp]
mov ebp, dword [esp + 8]
jb 0x408870
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ecx + eax*4], dx
mov word [ecx + eax*4 - 4], dx
mov word [ecx + eax*4 - 8], dx
mov word [ecx + eax*4 - 0xc], dx
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebp
jg 0x408910
jmp 0x408870
cmp dword [esp + 4], 0
jle 0x408b8d
mov eax, dword [esp + 4]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x20], 3
mov edi, dword [esp]
jb 0x40898a
mov edx, dword [esp + 4]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x30]
add ecx, 4
cmp edx, ecx
jne 0x408960
test eax, eax
je 0x4089ad
mov edx, dword [esp]
lea ecx, [edx + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x30]
inc edx
cmp eax, edx
jne 0x4089a0
cmp dword [esp + 4], 2
jl 0x408b8d
lea eax, [ebx + 1]
cmp eax, 0x21
jge 0x408a1c
mov ecx, dword [esp + ebx*4 + 0x30]
mov edx, ebx
neg edx
and edx, 3
je 0x4089dc
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + ebx*4 + 0x30], ecx
inc eax
dec edx
jne 0x4089d0
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x408a18
add eax, 3
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + ebx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + ebx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + ebx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + ebx*4 + 0x30], ecx
add eax, 4
cmp eax, 0x24
jne 0x4089f0
test ebx, ebx
jle 0x408a55
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
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 0x408a30
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x408cd6
jmp 0x408b8d
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x408cd6
mov dword [esp + 0x938], 0
cmp ebx, 2
jl 0x408aae
mov eax, 2
xor ecx, ecx
nop
nop
nop
nop
mov edx, eax
or edx, 0x3ffffffe
mov esi, eax
and esi, 0x3ffffffe
add esi, edx
add ecx, dword [esp + esi*4 + 0x34]
add ecx, ecx
mov dword [esp + eax*4 + 0x934], ecx
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
cmp eax, ebx
jle 0x408a80
cmp dword [esp + 0x15c8], 0
jle 0x408b82
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 + 8], esi
jmp 0x408afa
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], bx
inc eax
cmp eax, dword [esp + 0x15c8]
je 0x408b82
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408aec
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 0x408b5f
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 0x408b30
test edi, edi
je 0x408ae0
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 0x408b70
jmp 0x408ae0
add esp, 0x15b4
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebp, dword [esp + 0x18]
shl ebp, 5
mov edi, dword [esp + 0x14]
mov esi, ebp
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408dd0
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408dd0
add esp, 0xc
test ebx, ebx
jle 0x408a65
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0x18], esi
jmp 0x408c10
mov ebx, dword [esp + 4]
mov edi, esi
mov esi, edi
mov dword [esp + 4], ebx
lea ecx, [eax + 1]
mov ebx, dword [esp + 0x15cc]
cmp eax, ebx
mov eax, ecx
je 0x408a65
mov ecx, dword [esp + eax*4 + 0x30]
test ecx, ecx
jle 0x408bf0
mov edx, ecx
and edx, 3
je 0x408c70
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 4]
mov edi, dword [esp]
lea ebp, [edi + esi*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebp]
mov ebx, dword [esp + 0x18]
add ebx, ecx
mov byte [edi + ebx + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x408c40
mov ecx, dword [esp + 8]
mov edx, ecx
sub edx, esi
sub dword [esp + 4], esi
mov esi, dword [esp + 0x18]
jmp 0x408c72
mov edx, ecx
cmp ecx, 4
mov ebx, dword [esp + 4]
mov ebp, dword [esp]
mov edi, esi
jb 0x408bf6
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
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 0x408c90
jmp 0x408bf6
dec dword [esp + ebx*4 + 0x30]
mov ecx, ebx
nop
nop
nop
nop
cmp ecx, 2
jl 0x408cf8
mov esi, dword [esp + ecx*4 + 0x2c]
dec ecx
test esi, esi
je 0x408ce0
dec esi
mov dword [esp + ecx*4 + 0x30], esi
add dword [esp + ecx*4 + 0x34], 2
dec eax
cmp eax, edx
jne 0x408cd6
jmp 0x408b8d