Function at 0x40cd20
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov ebx, 1
mov ebp, 2
xor edx, edx
mov esi, dword [esp + 0x3c]
jmp 0x40cd43
inc ebx
inc ebp
inc edx
mov ch, byte [esi + edx]
movzx eax, ch
lea edi, [eax - 9]
cmp edi, 5
jb 0x40cd40
cmp eax, 0x20
je 0x40cd40
mov byte [esp + 3], ch
add ch, 0xd5
xor eax, eax
test ch, 0xfd
sete al
add eax, esi
mov dword [esp + 0xc], eax
xor eax, eax
mov ecx, 0xffffffff
jmp 0x40cd89
mov edi, ecx
mov eax, dword [esp + 8]
inc eax
mov ecx, edi
mov edi, dword [esp + 0xc]
mov dword [esp + 8], eax
add eax, edi
movzx esi, byte [ebx + eax - 1]
lea edi, [esi - 0x30]
cmp edi, 0xa
jb 0x40cd80
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], esi
cmp esi, 0x2e
jne 0x40cdb5
mov edi, dword [esp + 8]
test ecx, ecx
js 0x40cd82
mov dword [esp + 0x10], ebp
test ecx, ecx
setns byte [esp + 4]
jns 0x40cdc6
mov ecx, dword [esp + 8]
mov edi, ecx
add edx, dword [esp + 0xc]
xor ecx, ecx
movzx eax, byte [esp + 4]
mov cl, al
mov ebp, dword [esp + 8]
sub ebp, ecx
cmp ebp, 0x10
mov esi, dword [esp + 0x3c]
jl 0x40cdfe
mov eax, edi
mov esi, edi
not esi
and esi, 0xf
and eax, 0x7ffffff0
sub eax, esi
mov dword [esp + 4], 0xf
jmp 0x40ce15
test ebp, ebp
je 0x40ce4e
mov eax, edi
neg ecx
sub eax, ecx
sub eax, dword [esp + 8]
cmp ebp, 9
jle 0x40ce8b
mov dword [esp + 4], ebp
mov esi, dword [esp + 0xc]
lea edi, [esi + ebx]
mov ch, byte [esi + ebx - 1]
cmp ch, 0x2e
mov ebp, dword [esp + 0x10]
jne 0x40ce2e
mov ch, byte [edi]
lea edi, [esi + ebp]
movsx esi, ch
add esi, 0xffffffd0
cmp dword [esp + 4], 0xb
jb 0x40cf20
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x40ce64
mov ch, byte [edi + 1]
add edi, 2
jmp 0x40ce65
mov eax, dword [esp + 0x40]
test eax, eax
movzx ecx, byte [esp + 3]
je 0x40ce5d
mov dword [eax], esi
fldz
jmp 0x40d0a8
inc edi
lea ebp, [esi + esi*4]
movsx esi, ch
lea esi, [esi + ebp*2]
add esi, 0xffffffd0
cmp dword [esp + 4], 0xb
je 0x40cf20
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x40cea2
mov ch, byte [edi + 1]
add edi, 2
jmp 0x40cea3
fldz
mov edi, edx
fld st(0)
test ebp, ebp
mov ecx, dword [esp + 0x14]
jg 0x40cf2f
jmp 0x40cf92
inc edi
lea ebp, [esi + esi*4]
movsx esi, ch
lea esi, [esi + ebp*2]
add esi, 0xffffffd0
cmp dword [esp + 4], 0xd
jb 0x40cf20
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x40cec5
mov ch, byte [edi + 1]
add edi, 2
jmp 0x40cec6
inc edi
lea ebp, [esi + esi*4]
movsx esi, ch
lea esi, [esi + ebp*2]
add esi, 0xffffffd0
cmp dword [esp + 4], 0xd
je 0x40cf20
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x40cee8
mov ch, byte [edi + 1]
add edi, 2
jmp 0x40cee9
inc edi
lea ebp, [esi + esi*4]
movsx esi, ch
lea esi, [esi + ebp*2]
add esi, 0xffffffd0
cmp dword [esp + 4], 0xf
jb 0x40cf20
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x40cf0b
mov ch, byte [edi + 1]
add edi, 2
jmp 0x40cf0c
inc edi
mov dword [esp + 4], edi
lea esi, [esi + esi*4]
movsx edi, ch
lea esi, [edi + esi*2]
add esi, 0xffffffd0
mov edi, dword [esp + 4]
mov dword [esp + 0x24], esi
mov ebp, 9
fild dword [esp + 0x24]
fldz
fstp st(0)
mov dword [esp + 0x18], eax
inc ebp
xor esi, esi
jmp 0x40cf80
mov ch, byte [edi + 1]
add edi, 2
mov dword [esp + 4], edi
mov eax, esi
and eax, 0xa
mov edi, esi
or esi, 0xa
imul esi, eax
xor eax, 0xa
and edi, 0xfffffff5
imul edi, eax
movsx eax, ch
add esi, edi
add esi, eax
add esi, 0xffffffd0
mov eax, ebp
dec eax
mov ebp, eax
cmp eax, 1
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 4]
jle 0x40cf8a
mov ch, byte [edi]
cmp ch, 0x2e
je 0x40cf40
inc edi
jmp 0x40cf46
mov dword [esp + 0x20], esi
fild dword [esp + 0x20]
fxch st(1)
fmul dword [str._knN]
faddp st(1)
or ecx, 0x20
cmp ecx, 0x65
jne 0x40cfbd
mov edi, eax
mov eax, dword [esp + 0x1c]
mov ch, byte [ebx + eax]
mov al, ch
add al, 0xd5
test al, 0xfd
je 0x40cfc5
mov eax, dword [esp + 0xc]
add eax, ebx
jmp 0x40cfcd
add edx, dword [esp + 8]
xor ebp, ebp
jmp 0x40d027
mov eax, dword [esp + 0xc]
add eax, dword [esp + 0x10]
mov esi, dword [esp + 8]
lea edx, [eax + esi]
movzx ebx, byte [eax + esi]
lea esi, [ebx - 0x30]
xor ebp, ebp
cmp esi, 9
mov eax, edi
ja 0x40d020
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, ebp
and edi, 0xa
mov esi, ebp
or ebp, 0xa
imul ebp, edi
xor edi, 0xa
and esi, 0xfffffff5
imul esi, edi
movsx edi, bl
add edi, ebp
lea ebp, [esi + edi]
add ebp, 0xffffffd0
movzx ebx, byte [edx + 1]
inc edx
mov esi, ebx
add esi, 0xffffffd0
cmp esi, 0xa
jb 0x40cff0
cmp ch, 0x2d
jne 0x40d027
neg ebp
movzx ecx, byte [esp + 3]
add ebp, eax
mov esi, ebp
sar esi, 0x1f
mov eax, ebp
xor eax, esi
sub eax, esi
cmp eax, 0x200
jl 0x40d057
mov eax, 0x1ff
mov esi, dword [esp + 0x44]
test esi, esi
je 0x40d053
mov dword [esi], 0x22
fldz
jmp 0x40d05d
fld1
test ebp, ebp
je 0x40d086
fstp st(0)
fld1
mov esi, 0x44d718
jmp 0x40d07e
mov ebx, eax
sar ebx, 1
add esi, 8
cmp eax, 2
mov eax, ebx
jb 0x40d086
test al, 1
je 0x40d070
fmul qword [esi]
jmp 0x40d070
fld st(1)
fmul st(1)
test ebp, ebp
jns 0x40d09a
fstp st(0)
fdivp st(1)
fldz
fldz
fxch st(1)
fxch st(2)
fstp st(2)
fstp st(0)
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40d0a8
mov dword [eax], edx
fld st(0)
fchs
cmp cl, 0x2d
je 0x40d0b7
fstp st(0)
fldz
fxch st(1)
fstp st(1)
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret