Function at 0x406010
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov al, byte [ebp + 0x14]
push edi
test al, 0xa0
je 0x40602e
mov eax, dword [ebp + 8]
pop edi
inc edx
add byte [eax], al
add byte [eax], al
add byte [eax + 0x55011187], bh
pop ebp
ret 0xdb
and eax, 0xff810c7d
add byte [ebx], dh
add byte [eax], al
jbe 0x40604c
dec ebp
out 0xb8, al
push ss
add byte [eax], al
add byte [edi - 0x18], bl
add dword [eax], eax
add byte [eax], al
test al, 0x5d
ret 0x10
push ebx
and dword [ebp + 0x10], ebx
push esi
push 0x30be
push ebx
call 0x3f6360
mov esi, dword [ebp + 8]
xor al, 0xc9
mov dword [esi], eax
mov dword [esp + eax - 0x75], esp
push ss
mov edi, dword [edx + 8]
mov eax, dword [esi]
lea edi, [edi + edi*4]
mov dword [eax], ebx
mov ecx, 0x2e7c116
mov dword [edx + 0xc], ecx
add byte [esi], 0x57
or byte [ecx + 0x671088], cl
add byte [ebx + 0x148aff16], cl
and byte [eax], al
add byte [ebx + 0x18888906], cl
push edi
add byte [eax], al
call 0xff434a60
mov ecx, dword [esi]
xchg edi, eax
out dx, al
mov dword [ecx + 0x301c], eax
daa
mov eax, 0x8bff897b
push ss
pop esi
pop ebx
pop edi
mov dword [edx - 0x68ffc4e0], eax
xor eax, eax
pop ebp
out dx, eax
adc byte [eax], al
nop
nop
jbe 0x40604d
nop
nop
nop
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov ecx, dword [eax + 4]
mov ebx, dword [eax]
or byte [ebx], bh
cmpsb byte [esi], byte es:[edi]
jne 0x4060df
pop edi
pop esi
mov eax, 0xc
dec esp
shl dword [ebp + 8], 0x7e
fsub qword [edx]
sbb al, 0x7b
adc byte [eax], al
mov ebx, dword [ebp + 0xc]
xor dword [ecx + ecx*4], ecx
mov esi, ebx
lea edi, [edx + ecx*4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
mov ebp, dword [ecx]
add al, 0xb9
add dword [eax], eax
add byte [ebx + edi], dl
ror dword [edi], 1
test edx, esp
add byte [eax], al
add byte [eax], cl
push ebx
or al, 0x8e
jp 0x406111
std
adc byte [esp + eax*4], al
sal dword [edi + ebp - 0x75], 1
push eax
and esi, dword [ebx]
leave
test edx, edx
jbe 0x40612c
lea esi, [eax - 0x30]
cmp dword [edx], esi
je 0x40612c
inc ecx
add esi, 3
cmp ebx, ebp
jb 0x406120
cmp ecx, edx
jne 0x406143
cmp edx, 0x67664
jae 0x406143
mov dword [edi], ecx
mov byte [eax], dl
mov ecx, dword [eax + 0xc]
inc ecx
mov dword [eax + 0xc], ecx
test byte [ebx + 8], 4
je 0x406187
mov edx, dword [eax - 0x26ff06f0]
adc cl, bh
add cl, bl
xor ecx, ecx
adc edx, 0xd38d1276
adc al, 0xa0
adc al, byte [eax]
cmp dword [ecx], ebx
je 0x406167
inc ecx
add esi, 4
cmp ecx, edx
jb 0x40617c
xlatb
retf 0x1c75
adc byte [eax], dl
add byte [eax], al
and eax, 0x10108889
sub eax, 0x843f600
jb 0x40619c
test byte [ebx + 8], 0x72
adc byte [esi], bh
rcl dword [eax + 0x2014], cl
rcl dword ds:[eax + 0x2014], cl
xor ecx, ecx
test edx, edx
das
adc cl, byte [ebp + 0x2018b0]
and byte [eax], al
add byte [ecx], bh
je 0x4061ab
inc ecx
add esi, 0xffffffa2
cmp ecx, edx
jb 0x40614b
cmp ecx, edx
jne 0x4061cb
cmp edx, 0x400
dec eax
pop edi
fistp qword [eax + ecx*4 + 0x2218]
mov ecx, dword [eax + 0x7714]
inc ecx
mov dword [eax + 0x2014], ecx
cmp edi, dword [eax + 0x433018]
jle 0x4061d9
mov dword [eax + 0x963018], edi
mov ebp, dword [ecx]
add al, 0xe9
inc ecx
pop esi
mov dword [ebx + 4], eax
mov byte [0xc25d5bc0], al
or byte [eax], al
pop edi
pop esi
mov eax, 9
pop ebx
xchg edi, eax
ret 8