Function at 0x4081d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.00408ba0
mov esi, edx
mov ebp, ecx
mov ebx, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.00408c50
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], esi
je 0x408280
test ebx, ebx
jle 0x4089ed
xor eax, eax
cmp ebx, 1
je 0x408258
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0x10]
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 0x408240
test bl, 1
je 0x4089ed
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x10]
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x28]
jmp 0x4089ed
lea ecx, [esi + esi*8]
mov eax, ecx
shl eax, 6
test ebx, ebx
mov dword [esp + 0x1c], eax
jle 0x408379
mov edi, ebp
mov ebp, ecx
cmp ebx, 1
jne 0x40856b
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x4082d7
mov ecx, dword [esp + 0x1c]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4082d7
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.00408c50
add esp, 0xc
test ebx, ebx
sete byte [esp + 0x14]
je 0x408392
xor eax, eax
cmp ebx, 1
je 0x40834f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
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 0x408310
test bl, 1
je 0x408370
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 0x40839b
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
mov ebp, ecx
call fcn.00408c50
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0x14], 1
xor eax, eax
mov dword [esp + 0x20], ebp
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x24], eax
xor ecx, ecx
lea eax, [esp + 0xac]
mov dword [esp + 0xc], eax
lea edx, [esp + 0x112c]
lea esi, [esp + 0x52c]
xor eax, eax
mov dword [esp], ebx
jmp 0x4083fe
mov eax, dword [esp + 4]
inc eax
add ecx, 8
mov esi, dword [esp + 8]
add esi, 0x400
mov edx, ebp
cmp eax, dword [esp + 0x24]
je 0x4084b1
mov dword [esp + 4], eax
mov ebp, dword [esp + 0xc]
mov dword [esp + 0xc], edx
mov edx, 3
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xd20], edi
add edi, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xd24], edi
add edi, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xd28], edi
add edi, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xd2c], edi
add edi, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x408420
mov dword [esp + 8], esi
cmp byte [esp + 0x14], 0
mov edi, dword [esp + 0xc]
jne 0x4083e0
xor edx, edx
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov esi, ebp
mov ebp, edi
mov edi, dword [esp + eax*4 + 0xd2c]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xd2c], ebx
mov ebx, dword [esp]
mov eax, dword [esi + edx*4]
mov dword [ebp + edi*4], eax
mov edi, ebp
mov ebp, esi
mov eax, edx
and eax, 1
xor edx, 1
lea edx, [edx + eax*2]
cmp edx, ebx
jb 0x408470
jmp 0x4083e0
test ebx, ebx
mov ebx, dword [esp + 0xc]
je 0x4088c3
mov edx, dword [esp]
cmp edx, 1
jne 0x4084cf
mov word [ebx], 1
jmp 0x40874c
movzx eax, word [ebx + 4]
add word [ebx], ax
lea ebp, [edx - 1]
cmp edx, 3
jl 0x4085c5
xor ecx, ecx
mov edx, 2
mov esi, 1
jmp 0x408510
movzx edi, word [ebx + ecx*4]
add word [ebx + esi*4], di
mov word [ebx + ecx*4], si
inc ecx
mov eax, esi
and eax, 1
xor esi, 1
lea esi, [esi + eax*2]
cmp esi, ebp
jge 0x4085d4
movzx eax, word [ebx + ecx*4]
cmp edx, dword [esp]
jge 0x408522
movzx edi, word [ebx + edx*4]
cmp ax, di
jae 0x408540
mov word [ebx + esi*4], ax
mov word [ebx + ecx*4], si
inc ecx
cmp edx, dword [esp]
jge 0x4084f0
jmp 0x40854a
inc edx
mov word [ebx + esi*4], di
cmp edx, dword [esp]
jge 0x4084f0
cmp ecx, esi
jge 0x408560
movzx edi, word [ebx + ecx*4]
movzx eax, word [ebx + edx*4]
cmp di, ax
jb 0x4084f4
jmp 0x408564
movzx eax, word [ebx + edx*4]
inc edx
add word [ebx + esi*4], ax
jmp 0x4084fd
mov ecx, ebx
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x40858b
add eax, 2
cmp ecx, eax
je 0x4082a5
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x4085a6
mov word [esp + ebx*4 + 0xac], si
mov word [esp + ebx*4 + 0xae], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x408580
mov word [esp + ebx*4 + 0xac], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0xae], si
inc ebx
jmp 0x408580
lea ecx, [edx - 2]
mov word [ebx + edx*4 - 8], 0
jmp 0x408651
mov eax, dword [esp]
mov word [ebx + eax*4 - 8], 0
lea esi, [eax - 3]
lea ecx, [eax + 2]
mov edx, esi
and ecx, 3
je 0x408601
mov edx, esi
nop
nop
nop
movzx eax, word [ebx + edx*4]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4], ax
dec edx
dec ecx
jne 0x4085f0
mov eax, dword [esp]
lea ecx, [eax - 2]
cmp esi, 3
jb 0x408651
inc edx
nop
nop
nop
movzx eax, word [ebx + edx*4 - 4]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4 - 4], ax
movzx eax, word [ebx + edx*4 - 8]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4 - 8], ax
movzx eax, word [ebx + edx*4 - 0xc]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4 - 0xc], ax
movzx eax, word [ebx + edx*4 - 0x10]
movzx eax, word [ebx + eax*4]
inc eax
mov word [ebx + edx*4 - 0x10], ax
add edx, 0xfffffffc
jne 0x408610
mov esi, 1
xor edx, edx
jmp 0x408670
mov ebp, dword [esp + 4]
lea esi, [edi + edi]
inc edx
test edi, edi
jle 0x408742
test ecx, ecx
mov dword [esp + 4], ebp
js 0x4086b0
lea eax, [ecx + 1]
mov dword [esp + 8], eax
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebx + ecx*4]
cmp edx, eax
jne 0x4086b2
inc edi
add ecx, 0xffffffff
jb 0x408690
mov ecx, 0xffffffff
mov edi, dword [esp + 8]
jmp 0x4086b2
xor edi, edi
mov ebp, esi
sub ebp, edi
jle 0x408660
mov eax, edi
not eax
add eax, esi
and ebp, 3
je 0x408705
mov dword [esp + 0x14], eax
mov dword [esp + 8], edi
mov eax, dword [esp + 4]
lea eax, [ebx + eax*4]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
inc edi
add eax, 0xfffffffc
cmp ebp, edi
jne 0x4086e0
mov ebp, dword [esp + 4]
sub ebp, edi
sub esi, edi
mov edi, dword [esp + 8]
mov eax, dword [esp + 0x14]
cmp eax, 3
jae 0x408720
jmp 0x408664
mov ebp, dword [esp + 4]
cmp eax, 3
jb 0x408664
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx + ebp*4], dx
mov word [ebx + ebp*4 - 4], dx
mov word [ebx + ebp*4 - 8], dx
mov word [ebx + ebp*4 - 0xc], dx
add ebp, 0xfffffffc
add esi, 0xfffffffc
cmp esi, edi
jg 0x408720
jmp 0x408664
cmp dword [esp], 0
jle 0x4088c3
mov eax, dword [esp]
lea edx, [eax - 1]
and eax, 3
xor ecx, ecx
cmp edx, 3
jb 0x40879a
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
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 0x408770
test eax, eax
je 0x4087bd
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 0x4087b0
cmp dword [esp], 2
jl 0x4088c3
mov esi, dword [esp + 0x15c4]
lea ecx, [esi + esi]
and ecx, 2
mov edx, esi
xor edx, 1
lea eax, [ecx + edx]
cmp eax, 0x20
jg 0x4087fe
mov eax, dword [esp + esi*4 + 0x28]
add ecx, edx
dec ecx
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
mov dword [esp + esi*4 + 0x28], eax
inc ecx
cmp ecx, 0x20
jl 0x4087f0
test esi, esi
mov ecx, esi
jle 0x408814
mov ebp, ecx
and ebp, 3
cmp ecx, 4
jae 0x408822
mov esi, ecx
xor edx, edx
jmp 0x408882
mov eax, 1
shl eax, cl
xor edx, edx
jmp 0x408b4d
mov dword [esp + 8], ebp
mov eax, ecx
and eax, 0xfffffffc
mov dword [esp + 4], eax
lea esi, [esp + ecx*4]
add esi, 0x28
xor edx, edx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov ebp, dword [esi]
mov ecx, eax
shl ebp, cl
add ebp, edx
mov edx, dword [esi - 4]
inc cl
shl edx, cl
mov edi, dword [esi - 8]
mov ecx, eax
add cl, 2
shl edi, cl
add edi, edx
add edi, ebp
mov edx, dword [esi - 0xc]
mov ecx, eax
add cl, 3
shl edx, cl
add edx, edi
add eax, 4
add esi, 0xfffffff0
cmp eax, dword [esp + 4]
jne 0x408840
mov esi, dword [esp + 0x15c4]
sub esi, eax
mov ebp, dword [esp + 8]
test ebp, ebp
je 0x4088ad
mov ecx, dword [esp + 0x15c4]
sub ecx, esi
lea eax, [esp + esi*4]
add eax, 0x28
neg ebp
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [eax + esi*4]
shl edi, cl
add edx, edi
inc ecx
dec esi
cmp ebp, esi
jne 0x4088a0
mov eax, 1
mov ecx, dword [esp + 0x15c4]
shl eax, cl
cmp edx, eax
jne 0x408b4d
mov edi, dword [esp + 0x20]
shl edi, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408c50
add esp, 0xc
mov eax, dword [esp + 0x1c]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408c50
add esp, 0xc
cmp dword [esp + 0x15c4], 0
jle 0x4089e6
add ebx, 0xfffffffe
mov eax, 1
mov dword [esp + 0xc], ebx
jmp 0x408942
mov ebp, ebx
mov ebx, dword [esp]
mov dword [esp], ebx
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, dword [esp + 0x15c4]
mov ebx, ebp
jg 0x4089e6
mov ebp, dword [esp + eax*4 + 0x28]
test ebp, ebp
jle 0x408920
mov edx, ebp
and edx, 3
je 0x408990
mov dword [esp + 4], ebp
mov ecx, edi
mov esi, dword [esp]
lea edi, [ebx + esi*4]
xor esi, esi
nop
movzx ebx, word [edi]
mov ebp, dword [esp + 0x10]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x408960
mov ebp, dword [esp + 4]
mov edx, ebp
sub edx, esi
sub dword [esp], esi
mov edi, ecx
jmp 0x408992
mov edx, ebp
cmp ebp, 4
mov ebx, dword [esp]
mov ebp, dword [esp + 0xc]
jb 0x408925
dec edx
nop
movzx ecx, word [ebp + ebx*4]
mov esi, dword [esp + 0x10]
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 0x4089a0
jmp 0x408925
mov ebx, dword [esp + 0x15c0]
mov dword [esp + 0x530], 0
mov eax, dword [esp + 0x15c4]
cmp eax, 2
jl 0x408a6d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408a1a
xor eax, eax
mov edx, 2
test cl, 1
jne 0x408a60
jmp 0x408a6d
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
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 0x408a30
add edx, 2
mov ebx, dword [esp + 0x15c0]
test cl, 1
je 0x408a6d
add eax, dword [esp + edx*4 + 0x24]
add eax, eax
mov dword [esp + edx*4 + 0x52c], eax
test ebx, ebx
jle 0x408b42
xor eax, eax
mov ecx, dword [esp + 0x18]
lea esi, [ecx + ecx*8]
mov edx, esi
shl edx, 5
mov ecx, dword [esp + 0x10]
add edx, ecx
shl esi, 6
add esi, ecx
mov dword [esp], esi
jmp 0x408abb
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15c0]
inc eax
cmp eax, ebx
je 0x408b42
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408ab2
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 0x408b1f
and ecx, 0xfffffffc
xor ebx, ebx
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 0x408af0
test edi, edi
je 0x408aa0
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 0x408b30
jmp 0x408aa0
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x15c4]
dec ecx
jmp 0x408b69
dec edx
cmp edx, eax
je 0x4088c3
mov esi, dword [esp + 0x15c4]
dec dword [esp + esi*4 + 0x28]
mov esi, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
test esi, esi
jle 0x408b60
mov edi, dword [esp + esi*4 + 0x28]
dec esi
test edi, edi
je 0x408b80
dec edi
mov dword [esp + esi*4 + 0x2c], edi
add dword [esp + esi*4 + 0x30], 2
jmp 0x408b60