Function at 0x406067
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
and dword [ebp - 0x14], 0
cmp dword [ebp + 8], 0
jne 0x406084
mov eax, 0xffffff9a
jmp 0x40632a
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x38], 0
jne 0x406097
mov eax, 0xffffff9a
jmp 0x40632a
cmp dword [ebx + 0x9c], 0
je 0x4060a9
push dword [ebp + 8]
call fcn.00406744
pop ecx
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.00405e7b
add esp, 0x10
or eax, eax
je 0x4060cc
mov eax, 0xffffff99
jmp 0x40632a
push 0x90
call fcn.0040a670
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4060e8
mov eax, 0xffffff98
jmp 0x40632a
push 0x4000
call fcn.0040a670
pop ecx
mov edi, dword [ebp - 4]
mov dword [edi], eax
mov eax, edi
mov edx, dword [ebp - 0x1c]
mov dword [eax + 0x44], edx
mov eax, edi
mov edx, dword [ebp - 0x20]
mov dword [eax + 0x48], edx
mov eax, edi
and dword [eax + 0x4c], 0
mov eax, edi
mov edx, dword [ebp + 0x14]
mov dword [eax + 0x8c], edx
mov eax, edi
cmp dword [eax], 0
jne 0x406135
test edi, edi
je 0x40612b
push edi
call fcn.00409d60
pop ecx
mov eax, 0xffffff98
jmp 0x40632a
mov eax, dword [ebp - 4]
and dword [eax + 0x40], 0
cmp dword [ebp + 0xc], 0
je 0x40614a
mov eax, dword [ebp + 0xc]
mov edx, dword [ebx + 0x54]
mov dword [eax], edx
cmp dword [ebp + 0x10], 0
je 0x40618d
mov eax, dword [ebp + 0x10]
mov dword [eax], 6
mov eax, dword [ebx + 0x50]
and eax, 6
cmp eax, 2
je 0x406184
cmp eax, 4
je 0x406179
cmp eax, 6
jne 0x40618d
mov eax, dword [ebp + 0x10]
mov dword [eax], 1
jmp 0x40618d
mov eax, dword [ebp + 0x10]
mov dword [eax], 2
jmp 0x40618d
mov eax, dword [ebp + 0x10]
mov dword [eax], 9
mov eax, dword [ebx + 0x54]
or eax, eax
je 0x4061a0
cmp eax, 8
je 0x4061a0
mov dword [ebp - 0x14], 0xffffff99
mov eax, dword [ebp - 4]
mov edx, dword [ebx + 0x5c]
mov dword [eax + 0x54], edx
and dword [eax + 0x50], 0
mov edx, dword [ebx + 0x54]
mov dword [eax + 0x84], edx
mov edx, dword [ebx + 0x20]
mov dword [eax + 0x80], edx
mov edi, eax
add edi, 0x60
mov esi, ebx
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebx + 0x2c]
mov dword [eax + 0x88], edx
and dword [eax + 0x18], 0
cmp dword [ebx + 0x54], 8
jne 0x40622a
cmp dword [ebp + 0x14], 0
jne 0x40622a
and dword [eax + 0x24], 0
and dword [eax + 0x28], 0
and dword [eax + 0x2c], 0
and dword [eax + 4], 0
and dword [eax + 8], 0
push 0x38
push 0x412061
push 0xfffffffffffffff1
add eax, 4
push eax
call fcn.00406a98
add esp, 0x10
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x406222
mov eax, dword [ebp - 4]
mov dword [eax + 0x40], 1
jmp 0x40622a
mov eax, dword [ebp - 0x14]
jmp 0x40632a
mov eax, dword [ebp - 4]
mov edx, dword [ebx + 0x60]
mov dword [eax + 0x58], edx
mov edx, dword [ebx + 0x64]
mov dword [eax + 0x5c], edx
mov edx, dword [ebx + 0x98]
add edx, 0x1e
add edx, dword [ebp - 0x18]
mov dword [eax + 0x3c], edx
and dword [eax + 8], 0
mov dword [ebx + 0x9c], eax
cmp dword [ebp + 0x18], 0
je 0x406328
call fcn.004084c0
mov dword [ebx + 0xb0], eax
push dword [ebx + 0xb0]
mov eax, ebx
add eax, 0xa4
push eax
push dword [ebp + 0x18]
call fcn.004051be
push 0
mov eax, dword [ebx + 0x9c]
mov edx, dword [eax + 0x3c]
add edx, dword [eax + 0x88]
push edx
push dword [ebx + 0x20]
push dword [ebx + 0x1c]
call dword [ebx + 0x10]
add esp, 0x1c
or eax, eax
je 0x4062a9
mov eax, 0xffffff98
jmp 0x40632a
push 0xc
lea eax, [ebp - 0x10]
push eax
push dword [ebx + 0x20]
push dword [ebx + 0x1c]
call dword [ebx + 4]
add esp, 0x10
cmp eax, 0xc
jae 0x4062c7
mov eax, 0xffffff98
jmp 0x40632a
and dword [ebp - 0x24], 0
push dword [ebx + 0xb0]
mov eax, ebx
add eax, 0xa4
push eax
call fcn.00405130
mov edi, dword [ebp - 0x24]
lea edi, [ebp + edi - 0x10]
movsx esi, byte [edi]
xor esi, eax
mov edx, esi
mov byte [edi], dl
movsx edi, dl
push edi
push dword [ebx + 0xb0]
mov edi, ebx
add edi, 0xa4
push edi
call fcn.0040515a
add esp, 0x14
inc dword [ebp - 0x24]
cmp dword [ebp - 0x24], 0xc
jl 0x4062cb
mov eax, dword [ebx + 0x9c]
add eax, 0x3c
add dword [eax], 0xc
mov dword [ebx + 0xa0], 1
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret