Function at 0x406c10
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x108
mov ebp, dword [esp + 0x11c]
lea eax, [ebp + 0x8f12]
push 0x90
push 8
push eax
call fcn.00408540
add esp, 0xc
lea eax, [ebp + 0x8fa2]
push 0x70
push 9
push eax
call fcn.00408540
add esp, 0xc
mov dword [ebp + 0x9012], 0x7070707
mov dword [ebp + 0x9016], 0x7070707
mov dword [ebp + 0x901a], 0x7070707
mov dword [ebp + 0x901e], 0x7070707
mov dword [ebp + 0x9022], 0x7070707
mov dword [ebp + 0x9026], 0x7070707
mov dword [ebp + 0x902e], 0x8080808
mov dword [ebp + 0x902a], 0x8080808
mov dword [ebp + 0x9032], 0x5050505
mov dword [ebp + 0x9036], 0x5050505
mov dword [ebp + 0x903a], 0x5050505
mov dword [ebp + 0x903e], 0x5050505
mov dword [ebp + 0x9042], 0x5050505
mov dword [ebp + 0x9046], 0x5050505
mov dword [ebp + 0x904a], 0x5050505
mov dword [ebp + 0x904e], 0x5050505
mov eax, esp
push 0x84
push 0
push eax
call fcn.00408540
add esp, 0xc
xor eax, eax
nop
nop
movzx ecx, byte [ebp + eax + 0x8f12]
inc dword [esp + ecx*4]
movzx ecx, byte [ebp + eax + 0x8f13]
inc dword [esp + ecx*4]
movzx ecx, byte [ebp + eax + 0x8f14]
inc dword [esp + ecx*4]
movzx ecx, byte [ebp + eax + 0x8f15]
inc dword [esp + ecx*4]
add eax, 4
cmp eax, 0x120
jne 0x406d00
mov dword [esp + 0x88], 0
xor eax, eax
mov ecx, 2
nop
nop
nop
nop
nop
nop
nop
nop
lea edx, [ecx + ecx]
mov edi, edx
and edi, 0x3ffffffc
mov ebx, ecx
xor ebx, 1
sub edi, ebx
add eax, dword [esp + edi*4]
add eax, eax
mov dword [esp + ecx*4 + 0x84], eax
and edx, 2
add edx, ebx
lea ecx, [edx + edx]
mov edi, ecx
and edi, 0x3ffffffc
mov ebx, edx
xor ebx, 1
sub edi, ebx
add eax, dword [esp + edi*4]
add eax, eax
mov dword [esp + edx*4 + 0x84], eax
and ecx, 2
add ecx, ebx
cmp ecx, 0x10
jl 0x406d50
xor eax, eax
jmp 0x406db7
mov ebp, dword [esp + 0x11c]
mov word [ebp + eax*2 + 0x8852], bx
inc eax
cmp eax, 0x120
je 0x406e1a
movzx edx, byte [ebp + eax + 0x8f12]
test edx, edx
je 0x406daf
mov esi, dword [esp + edx*4 + 0x84]
lea edi, [esi + 1]
mov dword [esp + edx*4 + 0x84], edi
xor ebx, ebx
cmp edx, 1
je 0x406e0d
mov ebp, edx
and ebp, 0xfffffffe
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, esi
shr ebx, 1
mov ecx, esi
and ecx, 1
add ecx, ecx
lea ecx, [ecx + edi*4]
and ebx, 1
or ebx, ecx
shr esi, 2
mov edi, ebx
add ebp, 0xfffffffe
jne 0x406df0
test dl, 1
je 0x406da0
and esi, 1
lea ebx, [esi + ebx*2]
jmp 0x406da0
push 0x84
push 0
lea eax, [esp + 8]
push eax
call fcn.00408540
add esp, 0xc
xor eax, eax
movzx ecx, byte [ebp + eax + 0x9032]
inc dword [esp + ecx*4]
movzx ecx, byte [ebp + eax + 0x9033]
inc dword [esp + ecx*4]
movzx ecx, byte [ebp + eax + 0x9034]
inc dword [esp + ecx*4]
movzx ecx, byte [ebp + eax + 0x9035]
inc dword [esp + ecx*4]
add eax, 4
cmp eax, 0x20
jne 0x406e30
mov dword [esp + 0x88], 0
xor eax, eax
mov ecx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea edx, [ecx + ecx]
mov esi, edx
and esi, 0x3ffffffc
mov edi, ecx
xor edi, 1
sub esi, edi
add eax, dword [esp + esi*4]
add eax, eax
mov dword [esp + ecx*4 + 0x84], eax
and edx, 2
add edx, edi
lea ecx, [edx + edx]
mov esi, ecx
and esi, 0x3ffffffc
mov edi, edx
xor edi, 1
sub esi, edi
add eax, dword [esp + esi*4]
add eax, eax
mov dword [esp + edx*4 + 0x84], eax
and ecx, 2
add ecx, edi
cmp ecx, 0x10
jl 0x406e80
xor eax, eax
jmp 0x406ee5
mov ebp, dword [esp + 0x11c]
mov word [ebp + eax*2 + 0x8a92], di
inc eax
cmp eax, 0x20
je 0x406f3a
movzx edx, byte [ebp + eax + 0x9032]
test edx, edx
je 0x406edf
mov ecx, dword [esp + edx*4 + 0x84]
lea esi, [ecx + 1]
mov dword [esp + edx*4 + 0x84], esi
xor edi, edi
cmp edx, 1
je 0x406f2d
mov ebx, edx
and ebx, 0xfffffffe
xor ebp, ebp
mov edi, ecx
shr edi, 1
mov esi, ecx
and esi, 1
add esi, esi
lea esi, [esi + ebp*4]
and edi, 1
or edi, esi
shr ecx, 2
mov ebp, edi
add ebx, 0xfffffffe
jne 0x406f10
test dl, 1
je 0x406ed0
and ecx, 1
lea edi, [ecx + edi*2]
jmp 0x406ed0
mov ecx, dword [ebp + 0x44]
mov eax, dword [ebp + 0x48]
bts eax, ecx
mov dword [ebp + 0x48], eax
add ecx, 2
mov dword [ebp + 0x44], ecx
cmp ecx, 8
jae 0x406f71
add esp, 0x108
pop esi
pop edi
pop ebx
pop ebp
ret
shr eax, 8
mov dword [ebp + 0x48], eax
add ecx, 0xfffffff8
mov dword [ebp + 0x44], ecx
cmp ecx, 7
jbe 0x406f51
mov edx, dword [ebp + 0x30]
cmp edx, dword [ebp + 0x34]
jae 0x406f60
lea ecx, [edx + 1]
mov dword [ebp + 0x30], ecx
mov byte [edx], al
mov ecx, dword [ebp + 0x44]
mov eax, dword [ebp + 0x48]
jmp 0x406f60