Function at 0x408840
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
xor ebx, ebx
mov edi, dword [esp + 0x30]
jmp 0x408851
inc ebx
movzx ecx, byte [edi + ebx]
movzx eax, cl
lea esi, [eax - 9]
cmp esi, 5
jb 0x408850
cmp eax, 0x20
je 0x408850
mov eax, ecx
add al, 0xd5
and al, 0xfd
cmp al, 1
adc ebx, 0
xor edx, edx
mov ebp, 0xffffffff
jmp 0x408890
mov eax, ebp
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
inc ebx
mov ebp, eax
movzx esi, byte [edi + ebx]
lea eax, [esi - 0x30]
cmp eax, 0xa
jb 0x408880
cmp esi, 0x2e
jne 0x4088a7
mov eax, edx
test ebp, ebp
js 0x408882
xor eax, eax
test ebp, ebp
setns ch
jns 0x4088b2
mov ebp, edx
mov al, ch
mov edi, edx
sub edi, eax
mov dword [esp + 4], 0xfffffff1
cmp edi, 0x10
jge 0x4088cd
mov eax, edi
neg eax
mov dword [esp + 4], eax
test edi, edi
je 0x40892c
mov dword [esp + 0x10], ebp
mov ebp, edi
mov dword [esp + 8], edi
cmp edi, 0xf
jl 0x4088e5
mov ebp, 0xf
mov edi, dword [esp + 0x30]
mov eax, edi
sub eax, edx
add eax, ebx
fldz
cmp dword [esp + 8], 0xa
jl 0x408941
xor edi, edi
jmp 0x408922
mov ch, byte [eax + 1]
add eax, 2
mov dword [esp], eax
lea edi, [edi + edi*4]
movsx eax, ch
lea edi, [eax + edi*2]
add edi, 0xffffffd0
mov eax, ebp
dec eax
mov ebp, eax
cmp eax, 9
mov eax, dword [esp]
jle 0x40894c
mov ch, byte [eax]
cmp ch, 0x2e
je 0x408900
inc eax
jmp 0x408906
mov eax, dword [esp + 0x34]
test eax, eax
je 0x40893a
mov edx, dword [esp + 0x30]
mov dword [eax], edx
fldz
jmp 0x408b44
fld st(0)
test ebp, ebp
jg 0x40896f
jmp 0x408a22
mov ebp, dword [esp + 8]
cmp ebp, 0xa
jl 0x40895a
mov ebp, 0xa
dec ebp
mov dword [esp + 0x18], edi
fild dword [esp + 0x18]
mov edi, dword [esp + 0x30]
test ebp, ebp
jle 0x408a22
fstp st(1)
cmp ebp, 1
mov dword [esp + 0xc], ebp
jne 0x40898b
mov edi, 0xffffffd0
test byte [esp + 0xc], 1
jne 0x408a03
jmp 0x408a14
mov dword [esp], eax
and ebp, 0x7ffffffe
xor edx, edx
jmp 0x4089c8
mov ch, byte [eax + 1]
add eax, 2
mov dword [esp], eax
lea eax, [edx + edx*4]
movsx edi, byte [esp + 8]
lea eax, [edi + eax*2]
add eax, 0xffffffd0
lea eax, [eax + eax*4]
movsx edi, ch
lea edx, [edi + eax*2]
add edx, 0xffffffd0
add ebp, 0xfffffffe
je 0x4089ef
mov eax, dword [esp]
mov ch, byte [eax]
cmp ch, 0x2e
jne 0x4089e0
mov ch, byte [eax + 1]
mov byte [esp + 8], ch
add eax, 2
jmp 0x4089e5
mov byte [esp + 8], ch
inc eax
mov ch, byte [eax]
cmp ch, 0x2e
je 0x4089a0
inc eax
jmp 0x4089a6
lea eax, [edx + edx*4]
lea edi, [eax*2 - 0x30]
mov eax, dword [esp]
test byte [esp + 0xc], 1
je 0x408a14
mov ch, byte [eax]
cmp ch, 0x2e
jne 0x408a0d
mov ch, byte [eax + 1]
movsx eax, ch
add edi, eax
mov edx, edi
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
mov edi, dword [esp + 0x30]
fxch st(1)
fmul dword [str._knN]
mov eax, dword [esp + 4]
add eax, dword [esp + 0x10]
mov ebp, eax
faddp st(1)
or esi, 0x20
cmp esi, 0x65
jne 0x408a50
movzx eax, byte [edi + ebx + 1]
mov ah, al
add ah, 0xd5
test ah, 0xfd
je 0x408a5c
add edi, ebx
inc edi
jmp 0x408a61
add edi, ebx
mov edx, edi
xor esi, esi
mov edi, dword [esp + 0x34]
jmp 0x408ac6
add edi, ebx
add edi, 2
mov dword [esp + 4], ebp
mov edx, edi
movzx ebx, byte [edi]
lea edi, [ebx - 0x30]
xor esi, esi
cmp edi, 9
ja 0x408ab8
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, esi
and edi, 0xfffffff5
mov ebp, esi
and ebp, 0xa
or esi, 0xa
imul esi, ebp
xor ebp, 0xa
imul ebp, edi
movsx edi, bl
mov ebx, edi
xor ebx, 0xffffffcf
add ebx, esi
add ebx, ebp
and edi, 0xffffffcf
lea esi, [ebx + edi*2]
inc esi
movzx ebx, byte [edx + 1]
inc edx
mov edi, ebx
add edi, 0xffffffd0
cmp edi, 0xa
jb 0x408a80
cmp al, 0x2d
jne 0x408abe
neg esi
mov edi, dword [esp + 0x34]
mov ebp, dword [esp + 4]
add ebp, esi
mov esi, ebp
sar esi, 0x1f
mov eax, ebp
xor eax, esi
sub eax, esi
cmp eax, 0x200
jb 0x408af1
mov eax, 0x1ff
mov esi, dword [esp + 0x38]
test esi, esi
je 0x408aed
mov dword [esi], 0x22
fldz
jmp 0x408af7
fld1
test ebp, ebp
je 0x408b26
fstp st(0)
fld1
mov esi, 0x43f250
jmp 0x408b1e
mov ebx, eax
shr ebx, 1
add esi, 8
cmp eax, 2
mov eax, ebx
jb 0x408b26
test al, 1
je 0x408b10
fmul qword [esi]
jmp 0x408b10
fld st(1)
fmul st(1)
test ebp, ebp
jns 0x408b3a
fstp st(0)
fdivp st(1)
fldz
fldz
fxch st(1)
fxch st(2)
fstp st(2)
fstp st(0)
test edi, edi
je 0x408b44
mov dword [edi], edx
fld st(0)
fchs
cmp cl, 0x2d
je 0x408b53
fstp st(0)
fldz
fxch st(1)
fstp st(1)
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret