Function at 0x4099e0
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 0x409a03
inc ebx
inc ebp
inc edx
mov ch, byte [esi + edx]
movzx eax, ch
lea edi, [eax - 9]
cmp edi, 5
jb 0x409a00
cmp eax, 0x20
je 0x409a00
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 ecx, ecx
mov esi, 0xffffffff
jmp 0x409a45
mov ecx, dword [esp + 8]
inc ecx
mov edi, dword [esp + 0xc]
mov dword [esp + 8], ecx
add ecx, edi
movzx eax, byte [ebx + ecx - 1]
lea edi, [eax - 0x30]
cmp edi, 0xa
jb 0x409a40
mov dword [esp + 0x18], eax
cmp eax, 0x2e
mov eax, esi
jne 0x409a6f
mov esi, dword [esp + 8]
test eax, eax
js 0x409a40
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ecx
test eax, eax
setns ch
jns 0x409a82
mov eax, dword [esp + 8]
add edx, dword [esp + 0xc]
xor ebx, ebx
mov bl, ch
mov ecx, ebx
mov ebx, dword [esp + 8]
sub ebx, ecx
cmp ebx, 0x10
mov esi, dword [esp + 0x3c]
jl 0x409ab1
mov esi, eax
xor esi, 0xf
and eax, 0xfffffff0
add eax, eax
sub eax, esi
mov dword [esp + 4], 0xf
jmp 0x409aca
test ebx, ebx
je 0x409b03
neg ecx
sub eax, ecx
sub eax, dword [esp + 8]
cmp ebx, 9
jle 0x409b51
mov dword [esp + 4], ebx
mov esi, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
lea edi, [esi + ecx]
mov ch, byte [esi + ecx - 1]
cmp ch, 0x2e
jne 0x409ae3
mov ch, byte [edi]
lea edi, [esi + ebp]
movsx esi, ch
add esi, 0xffffffd0
cmp dword [esp + 4], 0xb
jb 0x409bea
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x409b2a
mov ch, byte [edi + 1]
add edi, 2
jmp 0x409b2b
mov eax, dword [esp + 0x40]
test eax, eax
movzx ecx, byte [esp + 3]
je 0x409b12
mov dword [eax], esi
fldz
fld st(0)
fchs
cmp cl, 0x2d
je 0x409b23
fstp st(0)
fldz
fxch st(1)
fstp st(1)
jmp 0x409d7c
inc edi
lea ebx, [esi + esi*4]
movsx esi, ch
lea esi, [esi + ebx*2]
add esi, 0xffffffd0
cmp dword [esp + 4], 0xb
je 0x409bea
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x409b68
mov ch, byte [edi + 1]
add edi, 2
jmp 0x409b69
fldz
mov edi, edx
fld st(0)
test ebx, ebx
mov ecx, dword [esp + 0x18]
jg 0x409bf9
jmp 0x409c50
inc edi
lea ebx, [esi + esi*4]
movsx esi, ch
lea esi, [esi + ebx*2]
add esi, 0xffffffd0
cmp dword [esp + 4], 0xd
jb 0x409bea
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x409b8b
mov ch, byte [edi + 1]
add edi, 2
jmp 0x409b8c
inc edi
lea ebx, [esi + esi*4]
movsx esi, ch
lea esi, [esi + ebx*2]
add esi, 0xffffffd0
cmp dword [esp + 4], 0xd
je 0x409bea
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x409bae
mov ch, byte [edi + 1]
add edi, 2
jmp 0x409baf
inc edi
lea ebx, [esi + esi*4]
movsx esi, ch
lea esi, [esi + ebx*2]
add esi, 0xffffffd0
cmp dword [esp + 4], 0xf
jb 0x409bea
mov dword [esp + 0x10], ebp
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x409bd5
mov ch, byte [edi + 1]
add edi, 2
jmp 0x409bd6
inc edi
mov ebp, edi
lea esi, [esi + esi*4]
movsx edi, ch
lea esi, [edi + esi*2]
add esi, 0xffffffd0
mov edi, ebp
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x24], esi
mov ebx, 9
fild dword [esp + 0x24]
fldz
fstp st(0)
mov dword [esp + 0x10], ebp
mov dword [esp + 4], eax
xor esi, esi
jmp 0x409c3a
mov ch, byte [edi + 1]
add edi, 2
mov ebp, edi
lea esi, [esi + esi*4]
movsx edi, ch
mov eax, edi
xor eax, 0xffffffcf
lea eax, [eax + esi*2]
and edi, 0xffffffcf
lea esi, [eax + edi*2]
inc esi
dec ebx
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x18]
mov edi, ebp
jle 0x409c44
mov ch, byte [edi]
cmp ch, 0x2e
je 0x409c10
inc edi
jmp 0x409c16
mov dword [esp + 0x20], esi
fild dword [esp + 0x20]
mov ebp, dword [esp + 0x10]
mov dword [esp + 4], eax
fxch st(1)
fmul dword [str._knN]
faddp st(1)
or ecx, 0x20
cmp ecx, 0x65
jne 0x409c81
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov ch, byte [edx + eax]
mov al, ch
add al, 0xd5
test al, 0xfd
je 0x409c8d
mov eax, dword [esp + 0xc]
add eax, edx
jmp 0x409c93
add edx, dword [esp + 8]
xor eax, eax
mov ebp, dword [esp + 0x40]
jmp 0x409ce7
mov eax, dword [esp + 0xc]
add eax, ebp
mov esi, dword [esp + 8]
lea edx, [eax + esi]
movzx ebx, byte [eax + esi]
lea esi, [ebx - 0x30]
xor eax, eax
cmp esi, 9
mov ebp, dword [esp + 0x40]
ja 0x409ce0
xor eax, eax
nop
nop
mov edi, eax
and edi, 0xa
mov esi, eax
or eax, 0xa
imul eax, edi
xor edi, 0xa
and esi, 0xfffffff5
imul esi, edi
movsx edi, bl
add edi, eax
lea eax, [esi + edi]
add eax, 0xffffffd0
movzx ebx, byte [edx + 1]
inc edx
mov esi, ebx
add esi, 0xffffffd0
cmp esi, 0xa
jb 0x409cb0
cmp ch, 0x2d
jne 0x409ce7
neg eax
movzx ecx, byte [esp + 3]
mov esi, eax
mov edi, dword [esp + 4]
and esi, edi
xor eax, edi
lea edi, [eax + esi*2]
mov esi, edi
sar esi, 0x1f
mov eax, edi
xor eax, esi
sub eax, esi
cmp eax, 0x200
jb 0x409d22
mov eax, 0x1ff
mov esi, dword [esp + 0x44]
test esi, esi
je 0x409d1e
mov dword [esi], 0x22
fldz
jmp 0x409d28
fld1
test edi, edi
je 0x409d56
fstp st(0)
fld1
mov esi, 0x43b2d0
jmp 0x409d4e
mov ebx, eax
shr ebx, 1
add esi, 8
cmp eax, 2
mov eax, ebx
jb 0x409d56
test al, 1
je 0x409d40
fmul qword [esi]
jmp 0x409d40
fld st(1)
fmul st(1)
test edi, edi
jns 0x409d6a
fstp st(0)
fdivp st(1)
fldz
fldz
fxch st(1)
fxch st(2)
fstp st(2)
fstp st(0)
test ebp, ebp
je 0x409d75
mov dword [ebp], edx
cmp cl, 0x2d
jne 0x409d7c
fchs
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret