Function at 0x40d150
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov ebx, 1
mov ebp, 2
xor esi, esi
mov edx, dword [esp + 0x44]
jmp 0x40d173
inc ebx
inc ebp
inc esi
movzx ecx, byte [edx + esi]
movzx eax, cl
lea edi, [eax - 9]
cmp edi, 5
jb 0x40d170
cmp eax, 0x20
je 0x40d170
mov eax, ecx
add al, 0xd5
test al, 0xfd
mov eax, 0
sete al
add eax, edx
xor edi, edi
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], eax
jmp 0x40d1c1
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0xc]
inc edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0xc], edi
add eax, edi
mov dword [esp + 0x24], eax
movzx edi, byte [ebx + eax - 1]
lea eax, [edi - 0x30]
cmp eax, 0xa
jb 0x40d1b0
mov dword [esp + 0x20], edi
cmp edi, 0x2e
jne 0x40d1ec
mov eax, dword [esp + 0xc]
cmp dword [esp + 0x14], 0
js 0x40d1b4
xor eax, eax
cmp dword [esp + 0x14], 0
setns ch
jns 0x40d200
mov edi, dword [esp + 0xc]
mov dword [esp + 0x14], edi
mov al, ch
mov edi, dword [esp + 0xc]
sub edi, eax
mov dword [esp + 8], edi
mov dword [esp + 0x18], edi
cmp edi, 0xf
jl 0x40d21d
mov dword [esp + 8], 0xf
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40d254
cmp edi, 9
jle 0x40d265
neg eax
mov edx, dword [esp + 0xc]
add eax, edx
add eax, 0xfffffff6
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10]
lea edi, [eax + ebx]
movzx edx, byte [eax + ebx - 1]
cmp dl, 0x2e
jne 0x40d27f
movzx edx, byte [edi]
add eax, ebp
mov dword [esp], eax
jmp 0x40d282
mov eax, dword [esp + 0x48]
test eax, eax
je 0x40d25e
mov dword [eax], edx
fldz
jmp 0x40d526
fldz
test edi, edi
jle 0x40d2ae
mov eax, dword [esp + 0x10]
add eax, esi
mov dword [esp], eax
mov edi, dword [esp + 8]
mov edx, edi
jmp 0x40d3c0
mov dword [esp], edi
movsx edx, dl
add edx, 0xffffffd0
cmp dword [esp + 4], 0
mov edi, dword [esp + 8]
je 0x40d3b3
mov dword [esp + 4], edx
mov edx, dword [esp]
movzx eax, byte [edx]
cmp al, 0x2e
jne 0x40d2b5
movzx eax, byte [edx + 1]
add edx, 2
jmp 0x40d2b6
fld st(0)
jmp 0x40d400
inc edx
mov dword [esp], edx
mov edx, dword [esp + 4]
lea edx, [edx + edx*4]
movsx eax, al
lea edx, [eax + edx*2]
add edx, 0xffffffd0
mov eax, dword [esp + 0x18]
cmp eax, 0xc
jl 0x40d3b3
mov dword [esp + 4], edx
add eax, 0xfffffff4
mov dword [esp + 0x1c], eax
mov eax, dword [esp]
movzx edx, byte [eax]
cmp dl, 0x2e
jne 0x40d2f5
movzx edx, byte [eax + 1]
add eax, 2
jmp 0x40d2f6
inc eax
mov dword [esp], eax
mov eax, dword [esp + 4]
lea eax, [eax + eax*4]
movsx edx, dl
lea edx, [edx + eax*2]
add edx, 0xffffffd0
cmp dword [esp + 0x1c], 0
je 0x40d3b3
mov dword [esp + 4], edx
mov edx, dword [esp]
movzx eax, byte [edx]
cmp al, 0x2e
mov dword [esp + 8], edi
jne 0x40d32f
movzx eax, byte [edx + 1]
add edx, 2
jmp 0x40d330
inc edx
mov dword [esp], edx
mov edx, dword [esp + 4]
lea edx, [edx + edx*4]
movsx eax, al
lea edx, [eax + edx*2]
add edx, 0xffffffd0
mov edi, dword [esp + 0x18]
cmp edi, 0xe
jl 0x40d399
mov dword [esp + 4], edx
add edi, 0xfffffff2
mov edx, dword [esp]
movzx eax, byte [edx]
cmp al, 0x2e
jne 0x40d366
movzx eax, byte [edx + 1]
add edx, 2
jmp 0x40d367
inc edx
mov dword [esp], edx
mov edx, dword [esp + 4]
lea edx, [edx + edx*4]
movsx eax, al
lea edx, [eax + edx*2]
add edx, 0xffffffd0
test edi, edi
je 0x40d399
mov dword [esp + 4], edx
mov edx, dword [esp]
movzx eax, byte [edx]
cmp al, 0x2e
mov edi, dword [esp + 8]
jne 0x40d39f
movzx eax, byte [edx + 1]
add edx, 2
jmp 0x40d3a0
mov edi, dword [esp + 8]
jmp 0x40d3b3
inc edx
mov dword [esp], edx
mov edx, dword [esp + 4]
lea edx, [edx + edx*4]
movsx eax, al
lea edx, [eax + edx*2]
add edx, 0xffffffd0
mov dword [esp + 0x2c], edx
mov edx, 9
fild dword [esp + 0x2c]
mov dword [esp + 8], edi
inc edx
xor eax, eax
jmp 0x40d3eb
mov ch, byte [edi + 1]
add edi, 2
mov dword [esp], edi
lea eax, [eax + eax*4]
movsx edi, ch
lea eax, [edi + eax*2]
add eax, 0xffffffd0
dec edx
cmp edx, 1
jle 0x40d3f8
mov edi, dword [esp]
mov ch, byte [edi]
cmp ch, 0x2e
je 0x40d3d0
inc edi
jmp 0x40d3d6
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
mov edi, dword [esp + 0x10]
fxch st(1)
fmul dword [str._knN]
mov eax, dword [esp + 8]
sub dword [esp + 0x14], eax
faddp st(1)
mov eax, dword [esp + 0x20]
or eax, 0x20
cmp eax, 0x65
jne 0x40d43a
mov eax, dword [esp + 0x24]
movzx edx, byte [ebx + eax]
mov eax, edx
add al, 0xd5
test al, 0xfd
je 0x40d444
mov esi, dword [esp + 0x10]
add esi, ebx
jmp 0x40d44a
add esi, dword [esp + 0xc]
add edi, esi
xor eax, eax
jmp 0x40d4a9
mov esi, dword [esp + 0x10]
add esi, ebp
mov eax, esi
mov ebx, dword [esp + 0xc]
lea ebp, [esi + ebx]
movzx ebx, byte [esi + ebx]
lea esi, [ebx - 0x30]
xor eax, eax
cmp esi, 9
ja 0x40d4a0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
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 [ebp + 1]
inc ebp
mov esi, ebx
add esi, 0xffffffd0
cmp esi, 0xa
jb 0x40d470
mov edi, ebp
cmp dl, 0x2d
jne 0x40d4a9
neg eax
mov ebp, dword [esp + 0x48]
add eax, dword [esp + 0x14]
mov esi, eax
sar esi, 0x1f
mov edx, eax
xor edx, esi
sub edx, esi
cmp edx, 0x200
jb 0x40d4db
mov edx, 0x1ff
mov esi, dword [esp + 0x4c]
test esi, esi
je 0x40d4d7
mov dword [esi], 0x22
fldz
jmp 0x40d4e1
fld1
test eax, eax
je 0x40d507
fstp st(0)
fld1
mov esi, 0x448690
jmp 0x40d4fe
mov ebx, edx
shr ebx, 1
add esi, 8
cmp edx, 2
mov edx, ebx
jb 0x40d507
test dl, 1
je 0x40d4f0
fmul qword [esi]
jmp 0x40d4f0
fld st(1)
fmul st(1)
test eax, eax
jns 0x40d51b
fstp st(0)
fdivp st(1)
fldz
fldz
fxch st(1)
fxch st(2)
fstp st(2)
fstp st(0)
test ebp, ebp
je 0x40d526
mov dword [ebp], edi
fld st(0)
fchs
cmp cl, 0x2d
je 0x40d535
fstp st(0)
fldz
fxch st(1)
fstp st(1)
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret